Bug 1259665 - rpmdev-bumpspec wrongly updates the release for new version in BIND spec
Summary: rpmdev-bumpspec wrongly updates the release for new version in BIND spec
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmdevtools
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-03 10:06 UTC by Tomáš Hozza
Modified: 2016-06-27 22:56 UTC (History)
4 users (show)

Fixed In Version: rpmdevtools-8.9-1.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-26 20:55:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hozza 2015-09-03 10:06:27 UTC
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>
+- Update to 9.10.3rc1
+
 * Wed Jul 29 2015 Tomas Hozza <thozza> - 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 11:51:43 UTC
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 16:07:46 UTC
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 17:14:38 UTC
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 17:16:04 UTC
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-25 00:27:52 UTC
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-25 00:32:24 UTC
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 10:36:33 UTC
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 10:37:43 UTC
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-26 00:27:41 UTC
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 06:22:28 UTC
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 20:55:31 UTC
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 22:56:26 UTC
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.