Bug#1051187: [Pkg-zfsonlinux-devel] Bug#1051187: Avoid building module for kernels that have appropriate zfs-modules- package installed

2024-01-05 Thread Andras Korn
On Fri, Jan 05, 2024 at 07:04:02AM +, 陈 晟祺 wrote:

Hi,

> > zfs-dkms is the failsafe in case the zfs-modules- package is 
> > *not* installed
> > (for example, because this is the first slow box I'm installing this kernel 
> > or this version of
> > zfs-dkms on and I don't yet have a corresponding zfs-modules package).
> 
> Let's imagine you install modules pkg first, then dkms pkg, which skips 
> building because you have
> "same" modules installed. After some days you accidentally uninstalled the 
> modules pkg, then how
> would the dkms pkg know and start the building? There is no such mechanism 
> according to my knowledge.

I'd like to start by saying that installing a zfs-modules- 
package is something only few people would probably do, people who have good 
reasons for going off the beaten path.

I submit that it's not unreasonable to expect such people to be extra careful 
and be aware of the risks inherent in what they are doing.

That said, I suppose a dpkg trigger could be used; or the postrm script of the 
zfs-modules- package could trigger the module build if zfs-dkms 
is installed. But frankly, I'm a great believer in allowing people to shoot 
themselves in the foot if they so desire. Expert features (which this would be) 
don't call for nanny automation.

> Even though such mechanism can be implemented by dkms, let's dig deeper into 
> details: how would dkms
> know that your prebuilt version and dkms source files are "the exact same" 
> and decide to skip? Designing
> such a mechanism would be either cumbersome for developers, or confusing for 
> users, I suppose.

I don't think it needs to do that. If the zfs-modules- package 
is installed, that means the admin is taking care of things.

If they have outdated kernel modules installed, it's their problem and not up 
to dkms or zfs-dkms maintainers to fix for them. You don't have to do 
everything for everyone.

I'd say it would be sufficient to document that installing a 
zfs-modules- package is not officially supported, and has the 
following consequences:

 1. zfs-dkms won't build a new module for ;
 2. if you subsequently remove zfs-modules-, you'll be left 
without a zfs module for  unless you trigger a zfs-dkms build 
yourself.

FWIW, you could also look at it from a green angle: building the modules when 
it's not necessary consumes extra electricity and is thus wasteful.

Best regards,

András

-- 
  I break into song if I can't find the key.



Bug#1051187: [Pkg-zfsonlinux-devel] Bug#1051187: Avoid building module for kernels that have appropriate zfs-modules- package installed

2024-01-04 Thread 陈 晟祺
Control: severity -1 wishlist
Control: tag -1 + wontfix

> zfs-dkms is the failsafe in case the zfs-modules- package is 
> *not* installed
> (for example, because this is the first slow box I'm installing this kernel 
> or this version of
> zfs-dkms on and I don't yet have a corresponding zfs-modules package).

Let's imagine you install modules pkg first, then dkms pkg, which skips 
building because you have
"same" modules installed. After some days you accidentally uninstalled the 
modules pkg, then how
would the dkms pkg know and start the building? There is no such mechanism 
according to my knowledge.

Even though such mechanism can be implemented by dkms, let's dig deeper into 
details: how would dkms
know that your prebuilt version and dkms source files are "the exact same" and 
decide to skip? Designing
such a mechanism would be either cumbersome for developers, or confusing for 
users, I suppose.

Thanks,
Shengqi Chen



Bug#1051187: [Pkg-zfsonlinux-devel] Bug#1051187: Avoid building module for kernels that have appropriate zfs-modules- package installed

2023-09-04 Thread Andras Korn
On Mon, Sep 04, 2023 at 08:19:45AM +0200, Petter Reinholdtsen wrote:

> [Andras Korn]
> > I have computers that take forever to build kernel modules; therefore,
> > while I have zfs-dkms installed as a failsafe, I also strive to always
> > install zfs-modules- preemptively.
> 
> How do you imagine zfs-dkms should work as a failsafe if it is not built
> when the zfs-modules- package is installed?

That's not the case I need the failsafe for. :)

zfs-dkms is the failsafe in case the zfs-modules- package is 
*not* installed (for example, because this is the first slow box I'm installing 
this kernel or this version of zfs-dkms on and I don't yet have a corresponding 
zfs-modules package).

András

-- 
Need an ark to save two of every species of animal? I noah guy.



Bug#1051187: [Pkg-zfsonlinux-devel] Bug#1051187: Avoid building module for kernels that have appropriate zfs-modules- package installed

2023-09-04 Thread Petter Reinholdtsen
[Andras Korn]
> I have computers that take forever to build kernel modules; therefore,
> while I have zfs-dkms installed as a failsafe, I also strive to always
> install zfs-modules- preemptively.

How do you imagine zfs-dkms should work as a failsafe if it is not built
when the zfs-modules- package is installed?

-- 
Happy hacking
Petter Reinholdtsen