On Friday, 18 September 2020 09:19:48 CEST Andreas R Maier wrote: > Hi, > I am new to building packages, and I'm trying to build a new package > 'python-nocaselist' on Copr, and it fails in the %prep stage when unpacking > the SRPM file because it cannot cd into the directory it assumes got > unpacked: Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.6rjfBt > + umask 022 > + cd /builddir/build/BUILD > + cd /builddir/build/BUILD > + rm -rf nocaselist-1.0.2 > + /usr/bin/gzip -dc /builddir/build/SOURCES/nocaselist-1.0.2.tar.gz > + /usr/bin/tar -xof - > + STATUS=0 > + '[' 0 -ne 0 ']' > + cd nocaselist-1.0.2 > /var/tmp/rpm-tmp.6rjfBt: line 39: cd: nocaselist-1.0.2: No such file or > directory I have configured copr to point to the Git repo and spec file. > > The same spec file builds fine on Koji. > > Spec file: > https://github.com/pywbem/nocaselist/blob/andy/fedora-packaging/packaging/f > edora/python-nocaselist.spec > <https://github.com/pywbem/nocaselist/blob/andy/fedora-packaging/packaging/ > fedora/python-nocaselist.spec> Failing Copr build: > https://copr.fedorainfracloud.org/coprs/andymaier/python-nocaselist/build/1 > 672638/ > <https://copr.fedorainfracloud.org/coprs/andymaier/python-nocaselist/build/ > 1672638/> Successful Koji build: > https://koji.fedoraproject.org/koji/taskinfo?taskID=51713400 > <https://koji.fedoraproject.org/koji/taskinfo?taskID=51713400> > > What am I doing wrong here? > > Thanks for any help > Andy The archives in your SRPM are different: - on COPR the root directory of your archive is python-%{srcname}-%{version} - on Koji the root directory of your archive is %{srcname}-%{version} To download the true original archive from Pypi, use "spectool -g *.spec" in the directory that contains your SPEC file. Then open the archive and see that the root of the archive is named % {srcname}-%{version} , like on Koji. To regenerate the SRPM, use: fedpkg --release f34 srpm in the directory that contains your SPEC file. Mini review: - %{?python_enable_dependency_generator} not needed anymore, it's the default. - %{python3} setup.py build → %py3_build - Not needed: rm -rf %{buildroot} - env PYTHONPATH=%{buildroot}/%{python3_sitelib} \ %{python3} setup.py install -O1 --skip-build --root %{buildroot} → %py3_install - The Python provide macro is not mandatory anymore on Rawhide and F33, but below F33, you should add: %py_provides python3-%{srcname} to the python3-% {srcname} subpackage. _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx