Hi,
I am tryingto repackage pdf-stapler with python3.
My updated SPEC file is:
https://paste.centos.org/view/b7477290
This SPEC file builds the binary using
rpmbuld -bb pdf-stapler.spec
fine, and the binary even installs. From what I can test, it seems to work.
However, when I try to use:
rpmbuild -ba pdf-stapler.spec
I get the following. I am not very familiar with the intricacies of packaging (sorry) but
this is the first time such an error has shown up for me. Any suggestions?
Many thanks in advance.
$ rpmbuild -ba pdf-stapler.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.as88BY
+ umask 022
+ cd /home/aarem/rpmbuild/BUILD
+ cd /home/aarem/rpmbuild/BUILD
+ rm -rf stapler-1.0.0
+ /usr/bin/bzip2 -dc /home/aarem/rpmbuild/SOURCES/stapler-1.0.0.tar.bz2
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd stapler-1.0.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ sed -i 's|"PyPDF2>=1.24"||' setup.py
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.9D7r1f
+ umask 022
+ cd /home/aarem/rpmbuild/BUILD
+ cd stapler-1.0.0
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s'
/usr/lib/python3.7/site-packages/setuptools/dist.py:475: UserWarning: Normalizing
'1.0.0-rc1' to '1.0.0rc1'
normalized_version,
running build
running build_py
creating build
creating build/lib
creating build/lib/staplelib
copying staplelib/stapler.py -> build/lib/staplelib
copying staplelib/commands.py -> build/lib/staplelib
copying staplelib/__init__.py -> build/lib/staplelib
copying staplelib/iohelper.py -> build/lib/staplelib
copying staplelib/tests.py -> build/lib/staplelib
running egg_info
creating stapler.egg-info
writing stapler.egg-info/PKG-INFO
writing dependency_links to stapler.egg-info/dependency_links.txt
writing entry points to stapler.egg-info/entry_points.txt
writing requirements to stapler.egg-info/requires.txt
writing top-level names to stapler.egg-info/top_level.txt
writing manifest file 'stapler.egg-info/SOURCES.txt'
reading manifest file 'stapler.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'stapler.egg-info/SOURCES.txt'
creating build/lib/staplelib/testfiles
copying staplelib/testfiles/1page.pdf -> build/lib/staplelib/testfiles
copying staplelib/testfiles/5page.pdf -> build/lib/staplelib/testfiles
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.KFKATx
+ umask 022
+ cd /home/aarem/rpmbuild/BUILD
+ '[' /home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64 '!='
/ ']'
+ rm -rf /home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64
++ dirname /home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64
+ mkdir -p /home/aarem/rpmbuild/BUILDROOT
+ mkdir /home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64
+ cd stapler-1.0.0
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ /usr/bin/python3 setup.py install -O1 --skip-build --root
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64
/usr/lib/python3.7/site-packages/setuptools/dist.py:475: UserWarning: Normalizing
'1.0.0-rc1' to '1.0.0rc1'
normalized_version,
running install
running install_lib
creating /home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr
creating /home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib
creating /home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7
creating
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages
creating
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib
copying build/lib/staplelib/stapler.py ->
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib
creating
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib/testfiles
copying build/lib/staplelib/testfiles/5page.pdf ->
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib/testfiles
copying build/lib/staplelib/testfiles/1page.pdf ->
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib/testfiles
copying build/lib/staplelib/commands.py ->
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib
copying build/lib/staplelib/__init__.py ->
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib
copying build/lib/staplelib/iohelper.py ->
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib
copying build/lib/staplelib/tests.py ->
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib
byte-compiling
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib/stapler.py
to stapler.cpython-37.pyc
byte-compiling
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib/commands.py
to commands.cpython-37.pyc
byte-compiling
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib/__init__.py
to __init__.cpython-37.pyc
byte-compiling
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib/iohelper.py
to iohelper.cpython-37.pyc
byte-compiling
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/staplelib/tests.py
to tests.cpython-37.pyc
writing byte-compilation script '/tmp/tmp37pd80wk.py'
/usr/bin/python3 /tmp/tmp37pd80wk.py
removing /tmp/tmp37pd80wk.py
running install_egg_info
running egg_info
writing stapler.egg-info/PKG-INFO
writing dependency_links to stapler.egg-info/dependency_links.txt
writing entry points to stapler.egg-info/entry_points.txt
writing requirements to stapler.egg-info/requires.txt
writing top-level names to stapler.egg-info/top_level.txt
reading manifest file 'stapler.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'stapler.egg-info/SOURCES.txt'
Copying stapler.egg-info to
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7/site-packages/stapler-1.0.0rc1-py3.7.egg-info
running install_scripts
Installing stapler script to
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/bin
Installing pdf-stapler script to
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/bin
+ mv /home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64//usr/bin/stapler
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64//usr/bin/pdf-stapler
+ /usr/lib/rpm/find-debuginfo.sh -j8 --strict-build-id -m -i --build-id-seed 1.0.0-1.fc30
--unique-debug-suffix -1.0.0-1.fc30.x86_64 --unique-debug-src-base
pdf-stapler-1.0.0-1.fc30.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000
--dwz-max-die-limit 110000000 -S debugsourcefiles.list
/home/aarem/rpmbuild/BUILD/stapler-1.0.0
find: 'debug': No such file or directory
+ '[' noarch = noarch ']'
+ case "${QA_CHECK_RPATHS:-}" in
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 0
Bytecompiling .py files below
/home/aarem/rpmbuild/BUILDROOT/pdf-stapler-1.0.0-1.fc30.x86_64/usr/lib/python3.7 using
/usr/bin/python3.7
+ /usr/lib/rpm/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.WqoCMQ
+ umask 022
+ cd /home/aarem/rpmbuild/BUILD
+ cd stapler-1.0.0
+ /usr/bin/python3 setup.py test
/usr/lib/python3.7/site-packages/setuptools/dist.py:475: UserWarning: Normalizing
'1.0.0-rc1' to '1.0.0rc1'
normalized_version,
running test
running egg_info
writing stapler.egg-info/PKG-INFO
writing dependency_links to stapler.egg-info/dependency_links.txt
writing entry points to stapler.egg-info/entry_points.txt
writing requirements to stapler.egg-info/requires.txt
writing top-level names to stapler.egg-info/top_level.txt
reading manifest file 'stapler.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'stapler.egg-info/SOURCES.txt'
running build_ext
test_cat (staplelib.tests.TestStapler)
Make sure files are properly concatenated. ... ok
test_del_one_page (staplelib.tests.TestStapler)
Test del command for inverse select of one page. ... ok
test_del_range (staplelib.tests.TestStapler)
Test del command for inverse select multiple pages. ... ok
test_output_file_already_exists (staplelib.tests.TestStapler)
Test zip. ... ok
test_sel_one_page (staplelib.tests.TestStapler)
Test select of a one page from a PDF file. ... ok
test_sel_range (staplelib.tests.TestStapler)
Test select of more pages from a PDF file. ... ok
test_split (staplelib.tests.TestStapler)
Make sure a file is properly split into pages. ... ok
test_zip (staplelib.tests.TestStapler)
Test zip. ... ok
----------------------------------------------------------------------
Ran 8 tests in 0.580s
OK
+ exit 0
error: Bad file: /home/aarem/rpmbuild/SOURCES/1.0.0.tar.bz2: No such file or directory
RPM build errors:
Bad file: /home/aarem/rpmbuild/SOURCES/1.0.0.tar.bz2: No such file or directory