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 1329083 - BUG: %check RPM macro used in libseccomp %changelog needs to be escaped
Summary: BUG: %check RPM macro used in libseccomp %changelog needs to be escaped
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libseccomp
Version: 7.2
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: 7.3
Assignee: Paul Moore
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-21 07:18 UTC by Kamil Dudka
Modified: 2016-11-04 03:29 UTC (History)
5 users (show)

Fixed In Version: libseccomp-2.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 03:29:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2310 0 normal SHIPPED_LIVE libseccomp bug fix and enhancement update 2016-11-03 13:41:15 UTC

Description Kamil Dudka 2016-04-21 07:18:49 UTC
Description of problem:
The following change log entry contains unescaped RPM macro, which is not allowed:

* Tue Nov  5 2013 Paul Moore <pmoore> - 2.1.1-0
- New upstream version
- Added a %check procedure for self-test during build

%check should be spelled as %%check instead.


Version-Release number of selected component (if applicable):
libseccomp-2.3.1-0.el7


How reproducible:
Easily.


Steps to Reproduce:
1. rpmlint libseccomp.spec


Actual results:
libseccomp.spec:93: W: macro-in-%changelog %check


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

Comment 2 Paul Moore 2016-04-21 14:52:27 UTC
Odd that this wasn't caught earlier, perhaps rpmlint gained some new capabilities?  Regardless, I'm fixing this now.

Comment 4 Paul Moore 2016-04-21 15:04:02 UTC
FWIW, I just fixed the same issue in Fedora Rawhide.

Comment 5 Kamil Dudka 2016-04-21 15:05:22 UTC
(In reply to Paul Moore from comment #2)
> Odd that this wasn't caught earlier, perhaps rpmlint gained some new
> capabilities?

For rpmlint it is just a warning but it causes problems to csmock, where we call rpmbuild with "--define" "check\\\n%%check\\\nexit 0" in order not to execute %check on RHEL-6, where the --nocheck option of rpmbuild does not exist yet:

https://git.fedorahosted.org/cgit/csmock.git/tree/py/csmock?id=bbf04636#n52

The build fails with "error: line 88: second %check".

> Regardless, I'm fixing this now.

Thanks!  This will help us to make future scans of libseccomp unattended.

Comment 7 Chao Yang 2016-08-30 05:54:55 UTC
Reproduced with libseccomp-2.3.1-0.el7.src.rpm.

Steps:
rpmlint -i libseccomp.spec

Actual Result:

libseccomp.spec:93: W: macro-in-%changelog %check
Macros are expanded in %changelog too, which can in unfortunate cases lead to
the package not building at all, or other subtle unexpected conditions that
affect the build.  Even when that doesn't happen, the expansion results in
possibly "rewriting history" on subsequent package revisions and generally odd
entries eg. in source rpms, which is rarely wanted.  Avoid use of macros in
%changelog altogether, or use two '%'s to escape them, like '%%foo'.



- Verified pass with libseccomp-2.3.1-2.el7.src.rpm. No such issue any more.

Comment 9 errata-xmlrpc 2016-11-04 03:29:50 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://rhn.redhat.com/errata/RHBA-2016-2310.html


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