Created attachment 730816 [details] meson-log.txt On a prefix install (in /home/marienz/gentoo), sys-apps/systemd-tmpfiles-249.2 does not build: >>> Configuring source in /home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/work/systemd-stable-249.2 ... meson setup --buildtype plain --libdir lib64 --localstatedir /home/marienz/gentoo/var/lib --prefix /home/marienz/gentoo/usr --sysconfdir /home/marienz/gentoo/etc --wrap-mode nodownload --build.pkg-config-path /home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/temp/python3.9/pkgconfig:/home/marienz/gentoo/usr/share/pkgconfig --pkg-config-path /home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/temp/python3.9/pkgconfig:/home/marienz/gentoo/usr/share/pkgconfig --native-file /home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/temp/meson.x86_64-pc-linux-gnu.amd64.ini -Dacl=true -Dtmpfiles=true -Dstandalone-binaries=true -Dstatic-libsystemd=true -Dsysvinit-path= -Dadm-group=false -Danalyze=false -Dapparmor=false -Daudit=false -Dbacklight=false -Dbinfmt=false -Dblkid=false -Dbzip2=false -Dcoredump=false -Ddbus=false -Defi=false -Delfutils=false -Denvironment-d=false -Dfdisk=false -Dgcrypt=false -Dglib=false -Dgshadow=false -Dgnutls=false -Dhibernate=false -Dhostnamed=false -Dhwdb=false -Didn=false -Dima=false -Dinitrd=false -Dfirstboot=false -Dkernel-install=false -Dkmod=false -Dldconfig=false -Dlibcryptsetup=false -Dlibcurl=false -Dlibfido2=false -Dlibidn=false -Dlibidn2=false -Dlibiptc=false -Dlink-networkd-shared=false -Dlink-systemctl-shared=false -Dlink-timesyncd-shared=false -Dlink-udev-shared=false -Dlocaled=false -Dlogind=false -Dlz4=false -Dmachined=false -Dmicrohttpd=false -Dnetworkd=false -Dnscd=false -Dnss-myhostname=false -Dnss-resolve=false -Dnss-systemd=false -Doomd=false -Dopenssl=false -Dp11kit=false -Dpam=false -Dpcre2=false -Dpolkit=false -Dportabled=false -Dpstore=false -Dpwquality=false -Drandomseed=false -Dresolve=false -Drfkill=false -Dseccomp=false -Dsmack=false -Dsysext=false -Dsysusers=false -Dtimedated=false -Dtimesyncd=false -Dtpm=false -Dqrencode=false -Dquotacheck=false -Duserdb=false -Dutmp=false -Dvconsole=false -Dwheel-group=false -Dxdg-autostart=false -Dxkbcommon=false -Dxz=false -Dzlib=false -Dzstd=false -Dselinux=false /home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/work/systemd-stable-249.2 /home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/work/systemd-tmpfiles-249.2-build The Meson build system Version: 0.58.1 Source dir: /home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/work/systemd-stable-249.2 Build dir: /home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/work/systemd-tmpfiles-249.2-build Build type: native build Project name: systemd Project version: 249 C compiler for the host machine: x86_64-pc-linux-gnu-gcc (gcc 11.2.0 "x86_64-pc-linux-gnu-gcc (Gentoo 11.2.0 p1) 11.2.0") C linker for the host machine: x86_64-pc-linux-gnu-gcc ld.gold 2.36.1 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program tools/add-git-hook.sh found: YES (/home/marienz/gentoo/var/tmp/portage/sys-apps/systemd-tmpfiles-249.2/work/systemd-stable-249.2/tools/add-git-hook.sh) meson.build:111:8: ERROR: Problem encountered: Prefix is not below root prefix (now rootprefix=/usr prefix=/home/marienz/gentoo/usr) Adding -Drootprefix="${EPREFIX}"/$(usex split-usr '' /usr) to the ebuild seems to help (installing /home/marienz/gentoo/bin/systemd-tmpfiles). But there are two other problems: - The resulting binary loads its configuration from the real /, not its prefix (it checks for things like /etc/systemd/dont-synthesize-nobody and loads files from /usr/lib/tmpfiles.d). It looks like systemd may not support customizing these paths at build time (glancing at systemd-stable-249.2/src/tmpfiles/tmpfiles.c and CONF_PATHS_NULSTR in systemd-stable-249.2/src/basic/def.h). - The three packages in my prefix that created files in /home/marienz/gentoo/usr/lib/tmpfiles.d put paths in them that aren't prefixed. For example, sys-apps/man-db-2.9.4-r1 installed /home/marienz/gentoo/usr/lib/tmpfiles.d/man-db.conf containing "d /var/cache/man 0755 man man 1w", which will result in this systemd-tmpfiles attempting to create that outside the prefix. But the man binary looks at /home/marienz/gentoo/var/cache/man/index.db. So I'm not sure if just fixing the install failure is a good idea, as using the resulting binary probably won't do what the user wants...
Created attachment 730819 [details] emerge --info '=sys-apps/systemd-tmpfiles-249.2::gentoo'
I've dropped the dep for Prefix-guest from the virtual, that should prevent it from being pulled in. This, however, I fear is RAP, so it does pull it it.
*** Bug 811576 has been marked as a duplicate of this bug. ***
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7635275fd64e4f8b848eb348eabc9b45bfac36c4 commit 7635275fd64e4f8b848eb348eabc9b45bfac36c4 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-09-04 14:17:56 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-09-04 14:17:56 +0000 sys-apps/systemd-tmpfiles: add warning for prefix users Bug: https://bugs.gentoo.org/806794 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.2.ebuild | 6 ++++++ 1 file changed, 6 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4609a5793f56be2b6497d6613263f299efaf222f commit 4609a5793f56be2b6497d6613263f299efaf222f Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-09-04 14:11:25 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-09-04 14:11:25 +0000 sys-apps/systemd-tmpfiles: include EPREFIX in rootprefix Bug: https://bugs.gentoo.org/806794 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.2.ebuild | 1 + 1 file changed, 1 insertion(+)
(In reply to Marien Zwart from comment #0) > - The resulting binary loads its configuration from the real /, not its > prefix (it checks for things like /etc/systemd/dont-synthesize-nobody and > loads files from /usr/lib/tmpfiles.d). It looks like systemd may not support > customizing these paths at build time (glancing at > systemd-stable-249.2/src/tmpfiles/tmpfiles.c and CONF_PATHS_NULSTR in > systemd-stable-249.2/src/basic/def.h). This could easily be fixed with a patch for systemd. > - The three packages in my prefix that created files in > /home/marienz/gentoo/usr/lib/tmpfiles.d put paths in them that aren't > prefixed. For example, sys-apps/man-db-2.9.4-r1 installed > /home/marienz/gentoo/usr/lib/tmpfiles.d/man-db.conf containing "d > /var/cache/man 0755 man man 1w", which will result in this systemd-tmpfiles > attempting to create that outside the prefix. But the man binary looks at > /home/marienz/gentoo/var/cache/man/index.db. We would need to adjust the contents of the tmpfiles.d entries, or change systemd-tmpfiles to automatically insert EPREFIX when it processes the files at runtime.