Hide Forgot
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).
Odd that this wasn't caught earlier, perhaps rpmlint gained some new capabilities? Regardless, I'm fixing this now.
FWIW, I just fixed the same issue in Fedora Rawhide.
(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.
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.
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