rpm-software-management / rpm

The RPM package manager
http://rpm.org
Other
484 stars 358 forks source link

rpm 4.20.0 alpha fallout #2 : perl-RPM4's testsuite is broken by new rpm : empty %build fails with "cd" when simumating "rpm -bp" #3143

Open soig opened 1 month ago

soig commented 1 month ago

We are hitting issues on Mageia with 4.20.x. The new alpha breaks perl-RPM4's testsuite: See https://gitweb.mageia.org/software/rpm/perl-RPM4/tree/RPM4/t/04spec.t#n57 This can be run with: cd RPM4; perl Makefile.PL; make && make test

With rpm-4.19:

ok 13 - simulate rpm -bp (check prep) Executing(%build): /bin/sh -e /tmp/7ICL2x4Fnn/rpm-tmp.MpqXIY

With rpm-4.20:

+not ok 13 - simulate rpm -bp (check prep) +# Failed test 'simulate rpm -bp (check prep)' +# at t/04spec.t line 57. +Executing(%build): /bin/sh -e /tmp/Cb7Sykk9CP/rpm-tmp.H778zX +/tmp/Cb7Sykk9CP/rpm-tmp.H778zX: line 31: cd: /tmp/Cb7Sykk9CP/test-rpm-1.0-build: No such file or directory +error: Bad exit status from /tmp/Cb7Sykk9CP/rpm-tmp.H778zX (%build)

There's a regression here: it doesn't create the directory anymore. Is this a rpm regression or does RPM4 needs to be adjusted? Both builddir and topdir are absolute The test spec file it loads is https://gitweb.mageia.org/software/rpm/perl-RPM4/tree/RPM4/t/test-rpm.spec I'd really like to have a feedback for this one.

Note that we all those upstream patches have been backported: 0001-Ensure-noarch-packages-don-t-get-debuginfo.patch 0001-Fix-noprep-regression-from-introducing-mkbuilddir.patch 0002-Drop-an-accidentally-added-duplicated-test.patch 0003-Make-build-in-place-much-less-of-a-hack-and-also-wor.patch 0001-Fix-incomplete-header-on-plain-src.rpm-build-modes-r.patch 0001-Hammer-in-no-debuginfo-for-noarch-packages-damn-it-r.patch 0001-Fix-regression-on-subpackage-debuginfo-RPMTAG_SOURCE.patch 0001-Fix-a-buildroot-regression-on-an-early-__spec_instal.patch

soig commented 1 month ago

Probably because of commit 9d35c8df497534e1fbd806a4dc78802bcf35d7cb

pmatilai commented 1 month ago

Right, it says "mimick rpm(build) -bp", in that case it'll need to be updated to do what rpmbuild does wrt the new directory. See the ba->buildAmount |= RPMBUILD_MKBUILDDIR; tweaks to tools/rpmbuild.c in https://github.com/rpm-software-management/rpm/commit/9d35c8df497534e1fbd806a4dc78802bcf35d7cb

pmatilai commented 1 month ago

The logic split between tools/rpmbuild.c and build/build.c on all those flags probably is more than a little shade and not entirely sensical, but just now I don't dare to touch any of it...