On Oct 22, Andras Korn <korn-debb...@elan.rulez.org> wrote:

> Unfortunately the current output can't, as I see it, be parsed to 
> obtain a list of dependencies, because the 'install' commands can be 
> arbitrary command lines with arbitrary side effects, any of which 
> might be loading a module that isn't even named in the command line.
It can be parsed like I suggested, but not reliably.
Still, this would be better than nothing.

> 1. packages that obfuscate module dependencies by supplying 'install' 
> commands for modules that other modules may depend on should be 
> required to include initramfs (and dracut?) hooks that install all 
> dependencies in the initramfs if a depending module is installed in 
> it. This is arguably the correct solution; in the case of 
Yes, but users can legitimately use the install directive themselves.

> nfs-kernel-server, for example, the 'install' command wants to invoke 
> sysctl --pattern, but the busybox sysctl installed in the initramfs by 
> default doesn't support --pattern. So the package would need to force 
> initramfs to include the /sbin/sysctl from procps, and maybe also any 
> pertinent files from /etc/sysctl.d.
Looks like this is a different problem.

> 2. in addition to looking at modprobe output, mkinitramfs should also 
> look at the depends: line in modinfo(8) output to find dependencies, 
> and transitively close the set of modules it includes. This seems like 
> a relatively easy workaround but it's not correct in that it won't 
> cause /sbin/sysctl to be included even if an 'install' command calls 
> it (or whatever other binary and configuration may be needed).
This may be the correct workaround for the modprobe issue, but 
nfs-kernel-server should still have an hook to add /sbin/sysctl to the 
initramfs.

> 3. Debian could forbid including 'install' commands for modules that 
> other modules depend on and that may (frequently?) need to be included 
> in an initramfs (requiring, for example, the kind of udev rule Marco 
> proposed).
I still suspect that the udev rule would be more elegant than the 
modprobe.d install directive, but this would still not solve the case of 
users using the install directive.
So maybe initramfs-tools should still be changed to use modinfo.

-- 
ciao,
Marco

Attachment: signature.asc
Description: PGP signature

Reply via email to