Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940564 - x11-drivers/nvidia-drivers: emerging nvidia-drivers in a container fails: "10-nvidia-drivers.conf: No such file or directory"
Summary: x11-drivers/nvidia-drivers: emerging nvidia-drivers in a container fails: "10...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-30 18:53 UTC by Alan J. Wylie
Modified: 2024-09-30 19:31 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan J. Wylie 2024-09-30 18:53:08 UTC
emerging nvidia-drivers in a container, with the use flag "-modules" and dracut not installed, the install phase tries to access a dracut configuration file and errors.

wine64 ~ # emerge -1v nvidia-drivers --ignore-default-opts

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 3.56 s (backtrack: 0/20).

[ebuild     U  ] x11-drivers/nvidia-drivers-550.107.02-r1:0/550::gentoo [550.107.02:0/550::gentoo] USE="X static-libs strip -dist-kernel -kernel-open -modules -modules-compress -modules-sign -persistenced -powerd -tools -wayland" ABI_X86="32 (64)" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

...

install -m 755 out/nvidia-xconfig /var/tmp/portage/x11-drivers/nvidia-drivers-550.107.02-r1/image/usr/bin/nvidia-xconfig
install -m 644 out/nvidia-xconfig.1 /var/tmp/portage/x11-drivers/nvidia-drivers-550.107.02-r1/image/usr/share/man/man1/nvidia-xconfig.1
make: Leaving directory '/var/tmp/portage/x11-drivers/nvidia-drivers-550.107.02-r1/work/nvidia-xconfig'
/var/tmp/portage/x11-drivers/nvidia-drivers-550.107.02-r1/temp/environment: line 3992: /var/tmp/portage/x11-drivers/nvidia-drivers-550.107.02-r1/image/usr/lib/dracut/dracut.conf.d/10-nvidia-drivers.conf: No such file or directory


Reproducible: Always

Steps to Reproduce:
1. use systemd-nspawn to create a container
2. in the container, try to emerge nvidia-drivers

Actual Results:  
emerge fails (see above)

Expected Results:  
emerge succeeded

Kernel is 6.11.1

This did not happen with nvidia-drivers-550.107.02

This is the offending change in nvidia-drivers-550.107.02-r1.ebuild

Should it be conditional on the "modules" use flag?

>       # Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
>       # to ensure that the nouveau blacklist is applied
>       # https://github.com/dracut-ng/dracut-ng/issues/674
>       # https://bugs.gentoo.org/932781
>       echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
>               "${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
Comment 1 Ionen Wolkens gentoo-dev 2024-09-30 19:11:28 UTC
Oh thanks, hadn't tested -modules in a while and kind of forgot. I do need -modules myself but hadn't updated the system that needs this in some time.

CC'ing andrew just ftr in case there's more packages that had similar changes but I'd think it's just nvidia (I'll fix that one myself)
Comment 2 Larry the Git Cow gentoo-dev 2024-09-30 19:31:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aefba1ed1e6cd2be0caa41abb600b0a492499424

commit aefba1ed1e6cd2be0caa41abb600b0a492499424
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-09-30 19:25:45 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-09-30 19:30:14 +0000

    x11-drivers/nvidia-drivers: fix build with USE=-modules
    
    At same time update/shorten comment a bit, esp. to mention that it may
    not be included without initramfs regen and this is more of a best
    effort solution (thankfully *most* users would include neither modules
    on an initramfs and it wouldn't matter).
    
    Fixes: dacc7d5a54fa46a732fd358a0a771eb06b6aeeb0
    Closes: https://bugs.gentoo.org/940564
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild    | 13 +++++++------
 .../nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild      | 13 +++++++------
 .../nvidia-drivers/nvidia-drivers-525.147.05-r1.ebuild      | 13 +++++++------
 .../nvidia-drivers/nvidia-drivers-535.183.01-r1.ebuild      | 13 +++++++------
 .../nvidia-drivers/nvidia-drivers-550.107.02-r1.ebuild      | 13 +++++++------
 x11-drivers/nvidia-drivers/nvidia-drivers-550.120.ebuild    | 13 +++++++------
 x11-drivers/nvidia-drivers/nvidia-drivers-550.40.75.ebuild  | 13 +++++++------
 .../nvidia-drivers/nvidia-drivers-560.35.03-r1.ebuild       | 13 +++++++------
 8 files changed, 56 insertions(+), 48 deletions(-)