New in sys-apps/kmod-28 is the `zstd` USE-flag, which gives `modprobe` et. al a dependency on app-arch/zstd. However, app-arch/zstd installs libzstd library to `/usr/lib64`, meaning that any system which: * Has a non-monolithic kernel configuration requiring kernel modules to be loaded in order to boot; * Has a separate `/usr` partition; * Has sys-apps/kmod built with USE=zstd ... will fail to start once rebooted, as `modprobe` now requires /usr/lib64/libzstd* in order to execute. Suggested solution: Use `usr-ldscript` to relocate zstd libraries back to the root filesystem, issue a warning to users not to reboot without upgrading. Also consider an additional QA check that nothing deployed to /bin/ or /sbin/ (or /lib64?) has a dynamic dependency on libraries which exist within the /usr tree?
(In reply to Stuart Shelton from comment #0) > Also consider an additional QA check that nothing deployed to /bin/ or > /sbin/ (or /lib64?) has a dynamic dependency on libraries which exist within > the /usr tree? Supporting this is not a requirement in Gentoo, see: https://projects.gentoo.org/qa/policy-guide/filesystem.html#pg0202 So handling this (or not) is up to maintainer(s) of individual packages.
Assigning to kmod for now to know direction want to take, but a fix would have to be forwarded to zstd.
I am relabeling this as a request to move libzstd to /lib, and punting this to the zstd maintainer.
Would this be why sys-kernel/genkernel-4.2.1-r1::gentoo fails to gkbuild kmod-28 with the following error? * >> Can keep using existing zstd-1.4.9 binpkg from '/var/cache/genkernel/4.2.1/zstd-1.4.9-x86_64.tar.xz'! * >> Binpkg of zstd-1.4.9 is ready; Adding to list 'CHECK_L1_REQUIRED_BINPKGS' ... * > Binpkg '/var/cache/genkernel/4.2.1/kmod-28-x86_64.tar.xz' does NOT exist; Need to build kmod-28 ... /usr/share/genkernel/gen_funcs.sh: line 1466: [[: \6: syntax error: operand expected (error token is "\6") /usr/share/genkernel/gen_worker.sh: line 134: [[: \1: syntax error: operand expected (error token is "\1") * Trying to determine gkbuild for kmod-28 ... * '/usr/share/genkernel/gkbuilds/kmod-28.gkbuild' not found; Skipping ... * Will use '/usr/share/genkernel/gkbuilds/kmod.gkbuild' to build kmod-28 ... * SYSROOT set to '/'! * kmod-28: >> Unpacking source ... * kmod-28: >> Preparing source ... * kmod-28: >> No patches found in '/usr/share/genkernel/patches/kmod/28'; Skipping ... COMMAND: ELT_LOGDIR='/var/tmp/genkernel/gk_tX05rmtU/kmod/temp' LD='x86_64-pc-linux-gnu-ld' eltpatch * Running elibtoolize in: var/tmp/genkernel/gk_tX05rmtU/kmod/kmod-28/ * Applying ppc64le/2.4.4 patch ... * Running elibtoolize in: var/tmp/genkernel/gk_tX05rmtU/kmod/kmod-28/build-aux/ * Applying portage/1.2.0 patch ... * Applying sed/1.5.6 patch ... * Applying as-needed/2.4.3 patch ... * kmod-28: >> Configuring source ... * kmod-28: >> Updating kmod-28/build-aux/config.sub with /usr/share/gnuconfig/config.sub ... * kmod-28: >> Updating kmod-28/build-aux/config.guess with /usr/share/gnuconfig/config.guess ... COMMAND: ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/kmod-28 --htmldir=/usr/share/doc/kmod-28/html --with-sysroot='/var/tmp/genkernel/gk_tX05rmtU/kmod/buildroot/usr:/' --enable-static --disable-python --disable-tools --with-xz --with-zlib --with-zstd --without-openssl checking for x86_64-pc-linux-gnu-gcc... /usr/bin/ccache gcc checking whether the C compiler works... yes ... checking whether _Noreturn is supported... yes checking for libzstd... no configure: error: Package requirements (libzstd >= 1.4.4) were not met: Package 'libzstd', required by 'virtual:world', not found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables libzstd_CFLAGS and libzstd_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. * ERROR: Command './configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/kmod-28 --htmldir=/usr/share/doc/kmod-28/html --with-sysroot='/var/tmp/genkernel/gk_tX05rmtU/kmod/buildroot/usr:/' --enable-static --disable-python --disable-tools --with-xz --with-zlib --with-zstd --without-openssl' failed! * ERROR: create_initramfs(): append_data(): append_eudev(): populate_binpkg(): populate_binpkg(): gkbuild(): Failed to create binpkg of kmod-28! * Please consult '/var/log/genkernel.log' for more information and any * errors that were reported above. * * Report any genkernel bugs to bugs.gentoo.org and * assign your bug to genkernel@gentoo.org. Please include * as much information as you can in your bug report; attaching * '/var/log/genkernel.log' so that your issue can be dealt with effectively. * * Please do *not* report kernel compilation failures as genkernel bugs! *
Please ignore my prev. comment, I didn't realize those messages were a genkernel bug: the args between [[ and ]] shouldn't be quoted. And is thus unrelated to this bug.
(In reply to Adjudicator Darren from comment #5) > Please ignore my prev. comment, I didn't realize those messages were a > genkernel bug: the args between [[ and ]] shouldn't be quoted. And is thus > unrelated to this bug. ok, that is correct in bash and it's not a genkernel bug, it's just that my bash was broken (don't use the git version kids) I was using: probably commit b304aabc92d3f8f2a4f6ebbc35fa4614bbb83ea8 branch 'devel' of https://git.savannah.gnu.org/git/bash GNU bash, version 5.1.4(1)-maint (x86_64-pc-linux-gnu) 2021-05-11T09:05:49 >>> app-shells/bash-99999: 42s Sorry for the noise, gahhh
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80ef1c05eaf312a05e91c56acd56b20464eed81e commit 80ef1c05eaf312a05e91c56acd56b20464eed81e Author: Sam James <sam@gentoo.org> AuthorDate: 2022-06-16 15:29:03 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-16 15:29:59 +0000 sys-apps/kmod: enable zstd support by default And depends on newer zstd w/ split-usr support. Portage already depends on app-arch/zstd so this doesn't extend @system at all. Closes: https://bugs.gentoo.org/771078 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/kmod/kmod-29-r1.ebuild | 204 ++++++++++++++++++++++++++++++++++++++++ sys-apps/kmod/kmod-9999.ebuild | 21 +++-- 2 files changed, 215 insertions(+), 10 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ae31721af31ad1eff932f9de790e2584fdd3a9f commit 1ae31721af31ad1eff932f9de790e2584fdd3a9f Author: Sam James <sam@gentoo.org> AuthorDate: 2022-06-16 15:25:44 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-16 15:25:46 +0000 app-arch/zstd: add split-usr support Done with some reluctance, as I don't really want to be introducing more of these, but it blocks being able to turn on zstd by default safely in kmod, and it's a simple enough fix that I can't justify breaking things - it'd be gratuitious. Not tested on a split-usr system though, so it's really best-effort. (split-usr being "/usr is a separate partition and therefore libraries need to be in /$(get_libdir) for boot to bring it up", and not anything to do with "merged-usr"). Closes: https://bugs.gentoo.org/771078 Signed-off-by: Sam James <sam@gentoo.org> app-arch/zstd/zstd-1.5.1-r3.ebuild | 81 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5f5a24567c083d7615486bf0c58c968e01052ed commit e5f5a24567c083d7615486bf0c58c968e01052ed Author: Sam James <sam@gentoo.org> AuthorDate: 2022-06-18 13:04:43 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-18 13:04:53 +0000 sys-apps/kmod: tighten zstd dep Closes: https://bugs.gentoo.org/852860 Bug: https://bugs.gentoo.org/771078 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/kmod/{kmod-29-r1.ebuild => kmod-29-r2.ebuild} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0655eb884a394fdd8048617b8888b8be74adc5e commit b0655eb884a394fdd8048617b8888b8be74adc5e Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-02-06 05:13:57 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-02-06 22:49:28 +0000 app-arch/zstd: remove usr-ldscript support Per news item 2024-01-05-usr-initramfs, we no longer support this use case. It is fragile and hacky and leads to bizarre forms of load errors. The functionality is, despite being called "split-usr", not really about split-usr at all. [sam: Added bug #771078 ref.] [sam: See also https://github.com/trofi/nix-guix-gentoo/commit/8f194519982fbfabb6b3ca84c0806b1a379b5d06 and https://github.com/trofi/nix-guix-gentoo/commit/43d84cc00af530ef912d9c98448b64d6b5282907]. Bug: https://bugs.gentoo.org/771078 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> app-arch/zstd/zstd-1.5.5-r1.ebuild | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+)