Before:
$ rpmlint python-setuptools.spec
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 58: %endif # with tests
python-setuptools.spec: E: specfile-error
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 67: %endif # without bootstrap
python-setuptools.spec: E: specfile-error
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 181: %endif # with tests
0 packages and 1 specfiles checked; 5 errors, 0 warnings.
After:
$ rpmlint python-setuptools.spec
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 58: %endif # with tests
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 67: %endif # without bootstrap
python-setuptools.spec: E: specfile-error warning: extra tokens at the end of %endif directive in line 181: %endif # with tests
0 packages and 1 specfiles checked; 3 errors, 0 warnings.
The rpmlint build process byte compiles these, so no manual byte
compilation is needed. (The make definition COMPILE_PYC has been used
since 83a9a35 (2009-11-02). Prior to that a patch was applied to byte
compile in %build.)
On installs where documentation or additional languages are not
installed, rpmlint fails while attempting to iterate over the file list.
The files are only opened for their 'magic numbers' which is used in a
few tests in BinariesCheck and SourceCheck.
Fedora container images sets nodocs and '%_install_langs en_US' (which
causes locale files not to be installed). Running rpmlint in such a
container results in a traceback when rpmlint attempts to check the
packages files.
Backport patch from upstream to fix the issue.
Resolves: https://bugzilla.redhat.com/1574509
Source: https://github.com/rpm-software-management/rpmlint/commit/d59bc2a
In 2e06474 ("buildid fixes", 2017-07-17) an upstream patch was applied
which added '.build-id' to the UsrLibBinaryException regex.
Unfortunately, since fd3ffab ("add systemd to UsrLibBinaryException",
2014-06-25)), we override this setting in our rpmlint.config file and it
was not updated to include '.build-id'.
Update the regex to include (most) of the upstream changes, along with our
addition of 'systemd' to the regex.
This fixes spurious 'only-non-binary-in-usr-lib' warnings.