Bug#1020566: git-buildpackage's autopkg tests fail with setuptools 65
Hi Stefano, On Thu, Sep 29, 2022 at 02:41:33PM +0200, Stefano Rivera wrote: > Control: tag -1 + patch > > Not quite sure what changed in setuptools here to trigger it, but it > really seems to be a case of our default install layout breaking > non-standard build-systems. > > This patchset fixes the FTBFS. Thanks a lot! Applied and uploaded. -- Guido > > SR > > -- > Stefano Rivera > http://tumbleweed.org.za/ > +1 415 683 3272 > From e464acae335f3a0c0c2d04d06f8cb1a8f441cb24 Mon Sep 17 00:00:00 2001 > From: Stefano Rivera > Date: Thu, 29 Sep 2022 13:10:19 +0200 > Subject: [PATCH 1/2] Specify a sysconfig scheme in smoke-rpm > > Debian uses the posix_local scheme by default, since Python 3.10, > causing the rpm to be built with the incorrect layout. > --- > debian/tests/smoke-rpm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/debian/tests/smoke-rpm b/debian/tests/smoke-rpm > index 90598a28..b7694d1e 100755 > --- a/debian/tests/smoke-rpm > +++ b/debian/tests/smoke-rpm > @@ -25,7 +25,7 @@ if python3 -c "import setuptools"; then > --git-export-dir="$GBP_TEMPDIR" \ > -D'%__python3 /usr/bin/python3' \ > -D'%__python /usr/bin/python3' \ > - -D'%python_sitelib %(%{__python3} -Ic "from sysconfig > import get_path; print(get_path('"'platlib'"'))")' \ > + -D'%python_sitelib %(%{__python3} -Ic "from sysconfig > import get_path; print(get_path('"'platlib'"', '"'posix_prefix'"'))")' \ > -D'%_arch noarch' \ > -bb --nodeps > fi > -- > 2.35.1 > > From f75321fd63fe294d98f79e28e4891e1ad1f97f6a Mon Sep 17 00:00:00 2001 > From: Stefano Rivera > Date: Thu, 29 Sep 2022 13:33:43 +0200 > Subject: [PATCH 2/2] Explicitly use the deb install layout when building our > RPM > > Debian defaults to installing to /usr/local, unless told otherwise. This > is usually done by passing --install-layout=deb to setup.py, when called > directly. But that's only an option on Debian systems that have this > patch. Set the environment variable equivalent, instead. > --- > packaging/git-buildpackage.spec | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/packaging/git-buildpackage.spec b/packaging/git-buildpackage.spec > index 17d6ed44..dbf5567c 100644 > --- a/packaging/git-buildpackage.spec > +++ b/packaging/git-buildpackage.spec > @@ -180,7 +180,7 @@ GIT_CEILING_DIRECTORIES=%{_builddir} \ > > %install > rm -rf %{buildroot} > -WITHOUT_NOSETESTS=1 %{__python3} ./setup.py install --root=%{buildroot} > --prefix=/usr --install-lib=%{python_sitelib} > +DEB_PYTHON_INSTALL_LAYOUT=deb_system WITHOUT_NOSETESTS=1 %{__python3} > ./setup.py install --root=%{buildroot} --prefix=/usr > --install-lib=%{python_sitelib} > find %{buildroot} -name __pycache__ | xargs -r rm -r > mkdir -p %{buildroot}/usr/share/%{name} > mv %{buildroot}/usr/bin/gbp-builder-mock %{buildroot}/usr/share/%{name}/ > -- > 2.35.1 >
Bug#1020566: git-buildpackage's autopkg tests fail with setuptools 65
Control: tag -1 + patch Not quite sure what changed in setuptools here to trigger it, but it really seems to be a case of our default install layout breaking non-standard build-systems. This patchset fixes the FTBFS. SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272 From e464acae335f3a0c0c2d04d06f8cb1a8f441cb24 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Thu, 29 Sep 2022 13:10:19 +0200 Subject: [PATCH 1/2] Specify a sysconfig scheme in smoke-rpm Debian uses the posix_local scheme by default, since Python 3.10, causing the rpm to be built with the incorrect layout. --- debian/tests/smoke-rpm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/tests/smoke-rpm b/debian/tests/smoke-rpm index 90598a28..b7694d1e 100755 --- a/debian/tests/smoke-rpm +++ b/debian/tests/smoke-rpm @@ -25,7 +25,7 @@ if python3 -c "import setuptools"; then --git-export-dir="$GBP_TEMPDIR" \ -D'%__python3 /usr/bin/python3' \ -D'%__python /usr/bin/python3' \ - -D'%python_sitelib %(%{__python3} -Ic "from sysconfig import get_path; print(get_path('"'platlib'"'))")' \ + -D'%python_sitelib %(%{__python3} -Ic "from sysconfig import get_path; print(get_path('"'platlib'"', '"'posix_prefix'"'))")' \ -D'%_arch noarch' \ -bb --nodeps fi -- 2.35.1 From f75321fd63fe294d98f79e28e4891e1ad1f97f6a Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Thu, 29 Sep 2022 13:33:43 +0200 Subject: [PATCH 2/2] Explicitly use the deb install layout when building our RPM Debian defaults to installing to /usr/local, unless told otherwise. This is usually done by passing --install-layout=deb to setup.py, when called directly. But that's only an option on Debian systems that have this patch. Set the environment variable equivalent, instead. --- packaging/git-buildpackage.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/git-buildpackage.spec b/packaging/git-buildpackage.spec index 17d6ed44..dbf5567c 100644 --- a/packaging/git-buildpackage.spec +++ b/packaging/git-buildpackage.spec @@ -180,7 +180,7 @@ GIT_CEILING_DIRECTORIES=%{_builddir} \ %install rm -rf %{buildroot} -WITHOUT_NOSETESTS=1 %{__python3} ./setup.py install --root=%{buildroot} --prefix=/usr --install-lib=%{python_sitelib} +DEB_PYTHON_INSTALL_LAYOUT=deb_system WITHOUT_NOSETESTS=1 %{__python3} ./setup.py install --root=%{buildroot} --prefix=/usr --install-lib=%{python_sitelib} find %{buildroot} -name __pycache__ | xargs -r rm -r mkdir -p %{buildroot}/usr/share/%{name} mv %{buildroot}/usr/bin/gbp-builder-mock %{buildroot}/usr/share/%{name}/ -- 2.35.1
Bug#1020566: git-buildpackage's autopkg tests fail with setuptools 65
Package: src:git-buildpackage Version: 0.9.28 Severity: serious Tags: sid bookworm https://ci.debian.net/data/autopkgtest/testing/amd64/g/git-buildpackage/26322072/log.gz [...] running install_scripts creating /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/local/bin copying build/scripts-3.10/gbp-builder-mock -> /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/local/bin copying build/scripts-3.10/git-pbuilder -> /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/local/bin changing mode of /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/local/bin/gbp-builder-mock to 755 changing mode of /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/local/bin/git-pbuilder to 755 Installing gbp script to /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/local/bin + find /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch -name __pycache__ + xargs -r rm -r + mkdir -p /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/share/git-buildpackage + mv /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/bin/gbp-builder-mock /tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/share/git-buildpackage/ mv: cannot stat '/tmp/tmp.weIfNHqOje/BUILDROOT/git-buildpackage-0.9.28-0.noarch/usr/bin/gbp-builder-mock': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.9gx9Va (%install) Bad exit status from /var/tmp/rpm-tmp.9gx9Va (%install) RPM build errors: gbp:error: 'rpmbuild '-D%__python3 /usr/bin/python3' '-D%__python /usr/bin/python3' '-D%python_sitelib %(%{__python3} -Ic "from sysconfig import get_path; print(get_path('"'"'platlib'"'"'))")' '-D%_arch noarch' -bb --nodeps --define '_topdir /tmp/tmp.weIfNHqOje' --define '_specdir %_topdir/SPECS' --define '_sourcedir %_topdir/SOURCES' /tmp/tmp.weIfNHqOje/SPECS/git-buildpackage.spec' failed: it exited with 1 + cleanup + [ -z /tmp/tmp.weIfNHqOje ] + rm -rf /tmp/tmp.weIfNHqOje