| Summary: | BUG: %check RPM macro used in libseccomp %changelog needs to be escaped | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Kamil Dudka <kdudka> |
| Component: | libseccomp | Assignee: | Paul Moore <pmoore> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | chayang, huding, juzhang, virt-bugs, xfu |
| Target Milestone: | rc | Keywords: | EasyFix |
| Target Release: | 7.3 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libseccomp-2.3.1-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-04 03:29:50 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: | |
|
Description
Kamil Dudka
2016-04-21 07:18:49 UTC
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 |