I am not exactly sure if this is specific to my machine or if it's arch-dependent. After upgrading to 4.1.0-r2 and fetching a new sys-kernel/gentoo-sources-5.4.60 today, I tried to build the initramfs using $ genkernel --zfs --mdadm --install initramfs I was greeted with the message: ERROR: Something went wrong: Did not found any udev-related files for sys-fs/zfs! and could not find anything useful in genkernel.log. Digging into gen_initramfs.sh I ran into commit 73689f8 where some udev stuff is added. The command "get_udevdir" returns "/lib/udev" for me, and "qlist -e sys-fs/zfs:0 | grep udev" gives me a bunch of "/lib/udev/..." entries. However, passing it through realpath, as happens in gen_initramfs.sh, changes those paths into "/lib64/udev/..." (because /lib is a symlink to /lib64 on my system) and the subsequent grep on /lib/udev returns nothing. I am not sure which logs or command outputs could be relevant for this but I think this report us sufficient on its own. Passing the local udevdir variable through realpath before using it fixes the problem for me. I guess this is something that should happen in gen_funcs.sh get_udevdir before returning it. I assume this problem applies to the other very similar piece of code regarding sys-fs/multipath-tools as well. Reproducible: Always
Which profile (eselect profile show) are you using?
# eselect profile show Current /etc/portage/make.profile symlink: default/linux/amd64/17.0/hardened
Could you please test the following patch (just for zfs yet): > --- a/gen_initramfs.sh > +++ b/gen_initramfs.sh > @@ -1021,10 +1021,10 @@ append_zfs() { > > copy_binaries "${TDIR}" /sbin/{mount.zfs,zdb,zfs,zpool} > > - local udevdir=$(get_udevdir) > + local udevdir="$(realpath "$(get_udevdir)")" > local udevdir_initramfs="/usr/lib/udev" > local udev_files=( $(qlist -e sys-fs/zfs:0 \ > - | xargs --no-run-if-empty realpath \ > + | xargs --no-run-if-empty realpath 2>/dev/null \ > | grep -E -- "^${udevdir}") > ) > >
That is almost identical to how I changed it myself, and it works fine.
Thank you for testing, but I think this one will be better (because in theory something in udev dir could be a symlink in which case we would skip the 'copy' but the symlink name could still be referenced in udev rule): > @@ -1024,7 +1025,6 @@ append_zfs() { > local udevdir=$(get_udevdir) > local udevdir_initramfs="/usr/lib/udev" > local udev_files=( $(qlist -e sys-fs/zfs:0 \ > - | xargs --no-run-if-empty realpath \ > | grep -E -- "^${udevdir}") > ) Can you confirm that this is still working for you?
That works too
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=34893756f574a8a51037e3290bbb58e03951eed2 commit 34893756f574a8a51037e3290bbb58e03951eed2 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-08-24 11:41:39 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-08-24 11:41:39 +0000 gen_initramfs.sh: append_zfs(): don't check package file list with realpath Bug: https://bugs.gentoo.org/738740 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> gen_initramfs.sh | 1 - 1 file changed, 1 deletion(-)
Thank you for the report and tests, will be part of next release.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66c1419df0c7adcd7a6436199f5229de8e6b8ece commit 66c1419df0c7adcd7a6436199f5229de8e6b8ece Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-08-26 22:59:23 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-08-26 22:59:31 +0000 sys-kernel/genkernel: bump to v4.1.1 Closes: https://bugs.gentoo.org/738922 Closes: https://bugs.gentoo.org/738740 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> sys-kernel/genkernel/Manifest | 3 + sys-kernel/genkernel/genkernel-4.1.1.ebuild | 303 ++++++++++++++++++++++++++++ sys-kernel/genkernel/genkernel-9999.ebuild | 5 +- 3 files changed, 310 insertions(+), 1 deletion(-)