hellocopr: ERROR: Error running command: rpmbuild
by Osama Albahrani
Hi!
I following https://docs.fedoraproject.org/en-US/quick-docs/publish-rpm-on-copr/#_ste... and got the error below when running `tito build --rpm --test`. Any ideas what I might be missing?
The files are in https://github.com/osalbahr/hellocopr and I am using the registry.fedoraproject.org/fedora-toolbox:rawhide container for development.
[nebula-toolbox@44544e1114fd hellocopr]$ tree
.
├── hellocopr.spec
├── LICENSE
└── README.md
1 directory, 3 files
[nebula-toolbox@44544e1114fd hellocopr]$ tito build --rpm --test
Creating output directory: /tmp/tito
WARNING: unable to lookup latest package tag, building untagged test project
WARNING: .tito/packages/hellocopr doesn't exist in git, using current directory
Building package [hellocopr-0.0.0-0]
Wrote: /tmp/tito/hellocopr-git-2.92e675f.tar.gz
warning: source_date_epoch_from_changelog set but %changelog is missing
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.6XatEt
+ umask 022
+ cd /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD
+ cd /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD
+ rm -rf hellocopr-git-2.92e675f
+ /usr/lib/rpm/rpmuncompress -x /tmp/tito/rpmbuild-hellocoprxgamrmkk/SOURCES/hellocopr-git-2.92e675f.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd hellocopr-git-2.92e675f
+ rm -rf /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD/hellocopr-git-2.92e675f-SPECPARTS
+ /usr/bin/mkdir -p /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD/hellocopr-git-2.92e675f-SPECPARTS
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.1a8Sp6
+ umask 022
+ cd /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
+ export CFLAGS
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn'
+ export RUSTFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ cd hellocopr-git-2.92e675f
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '
+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -sP'
/usr/bin/python3: can't open file '/tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD/hellocopr-git-2.92e675f/setup.py': [Errno 2] No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.1a8Sp6 (%build)
RPM build warnings:
source_date_epoch_from_changelog set but %changelog is missing
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.1a8Sp6 (%build)
ERROR: Error running command: rpmbuild --eval '%undefine scl' --define "_topdir /tmp/tito/rpmbuild-hellocoprxgamrmkk" --define "_sourcedir /tmp/tito/rpmbuild-hellocoprxgamrmkk/SOURCES" --define "_builddir /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD" --define "_srcrpmdir /tmp/tito" --define "_rpmdir /tmp/tito" --clean -ba /tmp/tito/rpmbuild-hellocoprxgamrmkk/SOURCES/hellocopr-git-2.92e675f/hellocopr.spec
Status code: 1
Command output: ['', 'warning: source_date_epoch_from_changelog set but %changelog is missing', 'Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.6XatEt', '+ umask 022', '+ cd /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD', '+ cd /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD', '+ rm -rf hellocopr-git-2.92e675f', '+ /usr/lib/rpm/rpmuncompress -x /tmp/tito/rpmbuild-hellocoprxgamrmkk/SOURCES/hellocopr-git-2.92e675f.tar.gz', '+ STATUS=0', "+ '[' 0 -ne 0 ']'", '+ cd hellocopr-git-2.92e675f', '+ rm -rf /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD/hellocopr-git-2.92e675f-SPECPARTS', '+ /usr/bin/mkdir -p /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD/hellocopr-git-2.92e675f-SPECPARTS', '+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .', '+ RPM_EC=0', '++ jobs -p', '+ exit 0', 'Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.1a8Sp6', '+ umask 022', '+ cd /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD', "+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '", '+ export CFLAGS', "+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '", '+ export CXXFLAGS', "+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '", '+ export FFLAGS', "+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '", '+ export FCFLAGS', '+ VALAFLAGS=-g', '+ export VALAFLAGS', "+ RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn'", '+ export RUSTFLAGS', "+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '", '+ export LDFLAGS', '+ LT_SYS_LIBRARY_PATH=/usr/lib64:', '+ export LT_SYS_LIBRARY_PATH', '+ CC=gcc', '+ export CC', '+ CXX=g++', '+ export CXX', '+ cd hellocopr-git-2.92e675f', "+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '", "+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '", "+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -sP'", "/usr/bin/python3: can't open file '/tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD/hellocopr-git-2.92e675f/setup.py': [Errno 2] No such file or directory", 'error: Bad exit status from /var/tmp/rpm-tmp.1a8Sp6 (%build)', '', 'RPM build warnings:', ' source_date_epoch_from_changelog set but %changelog is missing', '', 'RPM build errors:', ' Bad exit status from /var/tmp/rpm-tmp.1a8Sp6 (%build)']
ERROR: Error running command: rpmbuild --eval '%undefine scl' --define "_topdir /tmp/tito/rpmbuild-hellocoprxgamrmkk" --define "_sourcedir /tmp/tito/rpmbuild-hellocoprxgamrmkk/SOURCES" --define "_builddir /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD" --define "_srcrpmdir /tmp/tito" --define "_rpmdir /tmp/tito" --clean -ba /tmp/tito/rpmbuild-hellocoprxgamrmkk/SOURCES/hellocopr-git-2.92e675f/hellocopr.spec
1 month
PyPI build failing on copr but works locally on f38
by Barry Scott
I'm trying to package my PyPI config-path package.
Its failing to build:
https://copr.fedorainfracloud.org/coprs/barryascott/tools/build/6487785/
The log
https://download.copr.fedorainfracloud.org/results/barryascott/tools/srpm...
I see no error message that is actionable only report of failure.
The log tells me that I can do the build locally.
I have followed these steps to check the build locally on my up to date f38:
sudo dnf install copr-rpmbuild
/usr/bin/copr-rpmbuild --verbose --drop-resultdir --srpm --task-url
https://copr.fedorainfracloud.org/backend/get-srpm-build-task/6487785
I also needed to sudo dnf install pyp2spec
Then I needed to set /etc/mock/default.cfg to point to an existing cfg,
it was pointing to fedoara-35-x86_64.cfg
I set it to fedora-38-x86_64.cfg.
This build completes without error and I have a .src.rpm created.
I also set /etc/mock/default.cfg to point to fedora-rawhide-x86_64 as
the copr build log suggests
that is what using and the build succeeded as well.
I can then use mock to build the binary rpm:
mock -r fedora-38-x86_64 --rebuild
/var/lib/copr-rpmbuild/results/python-config-path-1.0.5-1.src.rpm
Which creates:
$ ll /var/lib/mock/fedora-38-x86_64/result
total 368
-rw-rw-r--. 1 barry 55899 2023-10-03 21:00:35 build.log
-rw-rw-r--. 1 barry 3454 2023-10-03 21:00:14 hw_info.log
-rw-rw-r--. 1 barry 15194 2023-10-03 21:00:24 installed_pkgs.log
-rw-r--r--. 1 barry 19114 2023-10-03 21:00:35
python3-config-path-1.0.5-1.fc38.noarch.rpm
-rw-r--r--. 1 barry 29486 2023-10-03 21:00:35
python-config-path-1.0.5-1.fc38.src.rpm
-rw-rw-r--. 1 barry 238389 2023-10-03 21:00:35 root.log
-rw-rw-r--. 1 barry 1414 2023-10-03 21:00:35 state.log
Why does it fail at copr.fedorainfracloud.org but work locally?
Barry
2 months