Bug 1496516 - %check RPM macro used in %changelog needs to be escaped
Summary: %check RPM macro used in %changelog needs to be escaped
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-tornado
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: pre-dev-freeze
: ---
Assignee: Python Maintainers
QA Contact: Jan Kepler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-27 16:03 UTC by Kamil Dudka
Modified: 2018-04-10 14:15 UTC (History)
4 users (show)

Fixed In Version: python-tornado-4.2.1-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 14:15:02 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0810 0 None None None 2018-04-10 14:15:08 UTC

Description Kamil Dudka 2017-09-27 16:03:41 UTC
Description of problem:
The following change log entry contains unescaped RPM macro, which is not allowed:

* Tue Oct 25 2011 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 2.1.1-1
- new upstream version 2.1.1
- remove double word in description and rearrange it (#715272)
- fixed removal of shebangs
- added %check section to run unittests during package build


Version-Release number of selected component (if applicable):
python-tornado-4.2.1-2.el7


How reproducible:
Easily.


Steps to Reproduce:
1. rpmlint python-tornado.spec


Actual results:
python-tornado.spec:219: W: macro-in-%changelog %check
[...]


Additional info:
This causes problems to csmock (a tool for fully automatic static analysis of RPM packages).

Please consider applying the following trivial patch:

--- a/python-tornado.spec
+++ b/python-tornado.spec
@@ -215,9 +215,9 @@ Resolves: rhbz#1158617
 * Tue Oct 25 2011 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 2.1.1-1
 - new upstream version 2.1.1
 - remove double word in description and rearrange it (#715272)
 - fixed removal of shebangs
-- added %check section to run unittests during package build
+- added %%check section to run unittests during package build

 * Tue Mar 29 2011 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.2.1-1
 - new upstream version 1.2.1

Comment 1 Charalampos Stratakis 2017-09-27 16:16:01 UTC
Hello and thanks for the bug report.

Could you elaborate more on how this causes issues for csmock?

While this is indeed an easy fix, I don't see it as trivial to be fixed (without having the knowledge of course of the severity of the issue for your use case).

Also asking the qe owner for his opinion as well on that.

Comment 2 Kamil Dudka 2017-09-27 18:37:11 UTC
(In reply to Charalampos Stratakis from comment #1)
> Could you elaborate more on how this causes issues for csmock?

csmock fails to build/scan the package.  It is easy to reproduce it locally:

% brew download-build --arch=src python-tornado-4.2.1-2.el7
% csmock -r rhel-7-x86_64 python-tornado-4.2.1-2.el7.src.rpm
[...]
error: line 219: second %check
[...]
!!! 2017-09-27 20:35:15 error: %prep failed

scan.ini: time-finished = 2017-09-27 20:35:15
scan.ini: exit-code = 1
<<< 2017-09-27 20:35:15 csmock exit code: 1

Comment 7 Charalampos Stratakis 2017-10-03 15:36:30 UTC
Glad that things are working :)

Comment 11 errata-xmlrpc 2018-04-10 14:15:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0810


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