Bug 1259665 - rpmdev-bumpspec wrongly updates the release for new version in BIND spec
rpmdev-bumpspec wrongly updates the release for new version in BIND spec
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpmdevtools (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-03 06:06 EDT by Tomáš Hozza
Modified: 2016-06-27 18:56 EDT (History)
4 users (show)

See Also:
Fixed In Version: rpmdevtools-8.9-1.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-26 16:55:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomáš Hozza 2015-09-03 06:06:27 EDT
Description of problem:
I know BIND's SPEC file is not simple :) so feel free to close this as WONTFIX.

Version-Release number of selected component (if applicable):
rpmdevtools-8.6-1.fc22.noarch

$ rpmdev-bumpspec -n 9.10.3 -c "Update to 9.10.3rc1" bind.spec 
error: line 27: unclosed macro or bad line continuation
error: query of specfile bind.spec failed, can't parse
thozza@thozza-pc ~/devel/fedora/bind (master *+%=)

$ git diff
diff --git a/bind.spec b/bind.spec
index 123098a..c6e9435 100644
--- a/bind.spec
+++ b/bind.spec
@@ -23,8 +23,8 @@
 Summary:  The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
 Name:     bind
 License:  ISC
-Version:  9.10.2
-Release:  9%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
+Version:  9.10.3
+Release:  9%{?PATCHVER:.%{PATCHVER}}%{?PREVER:1%{?dist}           <-- PROBLEM
 Epoch:    32
 Url:      http://www.isc.org/products/BIND/
 Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -996,6 +996,9 @@ rm -rf ${RPM_BUILD_ROOT}
 
 
 %changelog
+* Thu Sep 03 2015 Tomas Hozza <thozza@redhat.com>
+- Update to 9.10.3rc1
+
 * Wed Jul 29 2015 Tomas Hozza <thozza@redhat.com> - 32:9.10.2-9.P3
 - Update to 9.10.2-P3 to fix CVE-2015-5477


Maybe it would be better not to touch the release in this case and just update the version and add comment.
Comment 1 Michael Schwendt 2015-09-14 07:51:43 EDT
Well, it would not have worked that way anyway.

And Ralph's commit additionally causes regression:
https://git.fedorahosted.org/cgit/rpmdevtools.git/commit/rpmdev-bumpspec?id=4c15fc6199e574f09c457f13b0857333c194d5a0


Option -n is meant to be used with simple spec files only, because it would reset the Release tag to 1%{?dist} when setting a new Version.

> $ rpmdev-bumpspec -n 9.10.3 -c "Update to 9.10.3rc1" bind.spec 

Since you use a very complex Release tag in bind.spec, you would need to call it with full V-R instead of just V:

  $ rpmdev-bumpspec -n 9.10.3-1%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist} -c "Update to 9.10.3rc1" bind.spec 

With the original implementation, that would have worked. Ralph's change, however, introduces a regex sub call that stumbles upon the extra ':' in your macros and substitutes less than expected.
Comment 2 Michael Schwendt 2015-09-15 12:07:46 EDT
The following commit restores the original behaviour *and* preserves whitespace, too, so V-R can be set: https://git.fedorahosted.org/cgit/rpmdevtools.git/commit/?id=c0ac646aa25aa15aab52f834188bc3e16ad2d822
Comment 3 Fedora Update System 2016-06-23 13:14:38 EDT
rpmdevtools-8.7-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9
Comment 4 Fedora Update System 2016-06-23 13:16:04 EDT
rpmdevtools-8.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a18dce7e1
Comment 5 Fedora Update System 2016-06-24 20:27:52 EDT
rpmdevtools-8.7-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a18dce7e1
Comment 6 Fedora Update System 2016-06-24 20:32:24 EDT
rpmdevtools-8.7-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9
Comment 7 Fedora Update System 2016-06-25 06:36:33 EDT
rpmdevtools-8.8-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9
Comment 8 Fedora Update System 2016-06-25 06:37:43 EDT
rpmdevtools-8.8-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a18dce7e1
Comment 9 Fedora Update System 2016-06-25 20:27:41 EDT
rpmdevtools-8.9-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e11971c7e9
Comment 10 Fedora Update System 2016-06-26 02:22:28 EDT
rpmdevtools-8.9-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9a18dce7e1
Comment 11 Fedora Update System 2016-06-26 16:55:31 EDT
rpmdevtools-8.9-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-06-27 18:56:26 EDT
rpmdevtools-8.9-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.