Hi!
I following https://docs.fedoraproject.org/en-US/quick-docs/publish-rpm-on-copr/#_step_1... 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
Hello Osama,
On pondělí 30. října 2023 18:44:39 CET Osama Albahrani wrote:
I following https://docs.fedoraproject.org/en-US/quick-docs/publish-rpm-on-copr/#_step_1... and got the error below when running `tito build --rpm --test`. Any ideas what I might be missing?
Nice, thank you for the reference!
... Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.1a8Sp6
- umask 022
- cd /tmp/tito/rpmbuild-hellocoprxgamrmkk/BUILD
- 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
This indicates that `setup.py` is missing in the SourceN: tarball. Which in turn means that `setup.py` is missing in the source git repository (because `tito` generates the tarball from git).
Pavel
copr-devel@lists.fedorahosted.org