On Wed, Sep 10, 2025 at 13:43:01 +0100, Daniel P. Berrangé wrote: > On Wed, Sep 10, 2025 at 02:04:39PM +0200, Jiri Denemark via Devel wrote: > > The version of setuptools shipped by Fedora 42 is PEP 625 compliant, > > which requires distribution files to contain a normalized package name. > > Thus the generated tarball is called libvirt_python-$VER.tar.gz rather > > than libvirt-python-$VER.tar.gz created by older setuptools. The source > > directory inside the tarball follows the same naming. > > > > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> > > --- > > .gitlab-ci.yml | 4 ++-- > > Makefile | 2 +- > > libvirt-python.spec.in | 10 ++++++++-- > > 3 files changed, 11 insertions(+), 5 deletions(-) > > > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > > index bc4ff48..1267c47 100644 > > --- a/.gitlab-ci.yml > > +++ b/.gitlab-ci.yml > > @@ -34,7 +34,7 @@ stages: > > - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; > > then > > unset CFLAGS ; > > - rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ; > > + rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt[-_]python*tar.gz ; > > mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ; > > fi > > > > @@ -51,7 +51,7 @@ stages: > > - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; > > then > > unset CFLAGS ; > > - rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ; > > + rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt[-_]python*tar.gz ; > > mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ; > > fi > > > > diff --git a/Makefile b/Makefile > > index 925af40..0b2af28 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -19,4 +19,4 @@ test: all > > tox > > > > rpm: all > > - rpmbuild -ta dist/libvirt-python-$(shell tr -d '\n' < VERSION).tar.gz > > + rpmbuild -ta dist/libvirt[-_]python-$(shell tr -d '\n' < VERSION).tar.gz > > diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in > > index e260eaf..dd0c71b 100644 > > --- a/libvirt-python.spec.in > > +++ b/libvirt-python.spec.in > > @@ -12,11 +12,17 @@ > > %define supported_platform 0 > > %endif > > > > +%if 0%{?rhel} || 0%{?fedora} < 42 > > + %define dist_name %{name} > > +%else > > + %define dist_name libvirt_python > > +%endif > > This isn't correct. The dist name depends on the OS on which we create > the release tarball, not the OS we are building for. IOW, while this > may work in CI, it will break in real builds. Ah, right, originally I changed the spec file unconditionally as I'm going to create the release tarballs on Fedora 42. But then CI failed... I guess we'll need to set this when generating .spec from .spec.in :-/ Jirka