Skip to content

Commit

Permalink
csmock: prevent rpmbuild -bi from failing on unpackaged files
Browse files Browse the repository at this point in the history
This is a frequent cause of build/scan failures due to bugs in packaging
where redundant files are left in the buildroot when RPM packages are
built without tests or documentation.  New cases were also triggered by
the unicontrol plug-in which makes python3 unexpectedly available in el7
or el8 buildroots.  This fixes a scan failure for fetchmail-6.4.24-1.el8
with shellcheck and unicontrol plug-ins enabled:

error: Installed (but unpackaged) file(s) found:
   /usr/lib/python3.6/site-packages/__pycache__/fetchmailconf.cpython-36.opt-1.pyc
   /usr/lib/python3.6/site-packages/__pycache__/fetchmailconf.cpython-36.pyc
    Installed (but unpackaged) file(s) found:
   /usr/lib/python3.6/site-packages/__pycache__/fetchmailconf.cpython-36.opt-1.pyc
   /usr/lib/python3.6/site-packages/__pycache__/fetchmailconf.cpython-36.pyc
  • Loading branch information
kdudka committed Feb 23, 2022
1 parent 2ad478e commit e21fb1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions py/csmock
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ MOCK_WAITING_TICK = 60
DEFAULT_CSWRAP_TIMEOUT = 30

DEFAULT_RPM_OPTS = [
"--define", "_unpackaged_files_terminate_build 0",
"--define", "apidocs 0",
"--define", "with_publican 0",
"--without", "docs",
Expand Down

0 comments on commit e21fb1f

Please sign in to comment.