Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1496516

Summary: %check RPM macro used in %changelog needs to be escaped
Product: Red Hat Enterprise Linux 7 Reporter: Kamil Dudka <kdudka>
Component: python-tornadoAssignee: Python Maintainers <python-maint>
Status: CLOSED ERRATA QA Contact: Jan Kepler <jkejda>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: cstratak, hhorak, jkejda, kdudka
Target Milestone: pre-dev-freezeKeywords: EasyFix
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tornado-4.2.1-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 14:15:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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> - 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> - 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> - 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