[Rpm-maint] [rpm-software-management/rpm] --build-in-place regression in 4.20 (Issue #3135)
Daan De Meyer
notifications at github.com
Thu May 30 19:51:36 UTC 2024
**Describe the bug**
Since rpm 4.20, the rpm build in systemd's mkosi image build fails in the %prep stage when trying to fix the source permissions.
**To Reproduce**
Steps to reproduce the behavior:
```
git clone https://github.com/systemd/systemd
cd systemd
mkosi genkey
mkosi -d fedora -r rawhide -f
```
Please link or attach the packages or spec files involved.
https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec
**Expected behavior**
Build succeeds
**Output**
```
‣ Running build script /home/daandemeyer/projects/systemd/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot…
+ (( NO_BUILD ))
+ . /usr/lib/os-release
++ NAME='Fedora Linux'
++ VERSION='41 (Rawhide Prerelease)'
++ ID=fedora
++ VERSION_ID=41
++ VERSION_CODENAME=
++ PLATFORM_ID=platform:f41
++ PRETTY_NAME='Fedora Linux 41 (Rawhide Prerelease)'
++ ANSI_COLOR='0;38;2;60;110;180'
++ LOGO=fedora-logo-icon
++ CPE_NAME=cpe:/o:fedoraproject:fedora:41
++ DEFAULT_HOSTNAME=fedora
++ HOME_URL=https://fedoraproject.org/
++ DOCUMENTATION_URL=https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/
++ SUPPORT_URL=https://ask.fedoraproject.org/
++ BUG_REPORT_URL=https://bugzilla.redhat.com/
++ REDHAT_BUGZILLA_PRODUCT=Fedora
++ REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
++ REDHAT_SUPPORT_PRODUCT=Fedora
++ REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
++ SUPPORT_END=2025-05-13
+ '[' '!' -f pkg/fedora/systemd.spec ']'
+ '[' -d .git/ ']'
++ git status --porcelain
+ '[' -z ' M mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
M mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot
?? pkg/fedora/' ']'
++ date +%s
+ TS=1717098377
++ rpm --version
++ cut -d ' ' -f3
+ systemd-analyze compare-versions 4.19.91 lt 4.20
+ tee --append /usr/lib/rpm/redhat/macros
%install %{?_enable_debug_packages:%{debug_package}}\
%%install\
%{nil}
++ cat meson.version
+ VERSION=256~rc3
++ date +%Y%m%d%H%M%S --date @1717098377
+ RELEASE=20240530194617
++ rpm --eval %dist
+ DIST=.fc41
++ rpm --eval %_arch
+ ARCH=x86_64
+ SRCDEST=/usr/src/debug/systemd-256~rc3-20240530194617.fc41.x86_64
++ rpm --define '_fortify_level 0' --undefine _lto_cflags --eval %build_cflags
+ CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -O0 -Wp,-U_FORTIFY_SOURCE'
+ (( WITH_DEBUG ))
+ CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -O0 -Wp,-U_FORTIFY_SOURCE -fdebug-prefix-map=../src=/usr/src/debug/systemd-256~rc3-20240530194617.fc41.x86_64'
+ IFS=
++ (( WITH_TESTS ))
++ echo --nocheck
++ (( WITH_DOCS ))
++ (( WITH_DEBUG ))
++ (( WITH_DEBUG ))
+ ANNOBIN=no-active-checks
+ rpmbuild -bb --build-in-place --with upstream --nocheck --define '_topdir /var/tmp' --define '_sourcedir pkg/fedora' --define '_rpmdir /work/out' '--define=_vpath_builddir /work/build' --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' --define '_binary_payload w.ufdio' --define 'version_override 256~rc3' --define 'release_override 20240530194617' --define 'build_cflags -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -O0 -Wp,-U_FORTIFY_SOURCE -fdebug-prefix-map=../src=/usr/src/debug/systemd-256~rc3-20240530194617.fc41.x86_64' --define 'meson_build %{shrink:%{__meson} compile -C %{_vpath_builddir} -j %{_smp_build_ncpus} %{nil}}' --define 'meson_install %{shrink:DESTDIR=%{buildroot} %{__meson} install -C %{_vpath_builddir} --no-rebuild --quiet %{nil}}' --define 'meson_extra_configure_options -D mode=developer -D b_sanitize=none' --define '__brp_compress %{nil}' --define '__brp_mangle_shebangs %{nil}' --define '__brp_strip_comment_note %{nil}' --define '__brp_strip_static_archive %{nil}' --define '__brp_check_rpaths %{nil}' --define '__elf_exclude_path ^/usr/lib/systemd/tests/unit-tests/.*$' --define '__script_requires %{nil}' --define '_find_debuginfo_dwz_opts %{nil}' --define '_fortify_level 0' --undefine _lto_cflags --undefine _package_note_flags --noclean pkg/fedora/systemd.spec
setting SOURCE_DATE_EPOCH=1717027200
Executing(%mkbuilddir): /bin/sh -e /var/tmp/rpm-tmp.Npa5ZU
+ umask 022
+ cd /var/tmp/BUILD/systemd-256~rc3-build
+ test -d /var/tmp/BUILD/systemd-256~rc3-build
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w /var/tmp/BUILD/systemd-256~rc3-build
+ /usr/bin/rm -rf /var/tmp/BUILD/systemd-256~rc3-build
+ /usr/bin/mkdir -p /var/tmp/BUILD/systemd-256~rc3-build
+ /usr/bin/mkdir -p /var/tmp/BUILD/systemd-256~rc3-build/SPECPARTS
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.60nqm7
+ umask 022
+ cd /var/tmp/BUILD/systemd-256~rc3-build
+ ln -s /work/src systemd-256-rc3
+ cd /var/tmp/BUILD/systemd-256~rc3-build
+ cd systemd-256-rc3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
error: Bad exit status from /var/tmp/rpm-tmp.60nqm7 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.60nqm7 (%prep)
‣ "/work/build-script" returned non-zero exit code 1.
```
**Environment**
- OS / Distribution: Fedora rawhide
- Version rpm 4.20
**Additional context**
I'm pretty sure rpm should not be trying to fix source permissions when --build-in-place is used.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3135
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3135 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240530/009ae951/attachment-0001.html>
More information about the Rpm-maint
mailing list