Re: Re: [PATCH 2/2] make: install/uninstall tools symlinks to kmod

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Jan 2024 at 22:09, Lucas De Marchi <lucas.demarchi@xxxxxxxxx> wrote:
>
> On Mon, Jan 29, 2024 at 05:23:44PM +0000, Emil Velikov wrote:
> >On Mon, 29 Jan 2024 at 16:40, Lucas De Marchi <lucas.demarchi@xxxxxxxxx> wrote:
> >>
> >> On Fri, Jan 26, 2024 at 02:43:51PM +0000, Emil Velikov via B4 Relay wrote:
> >> >From: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
> >> >
> >> >Currently we create symlinks like modprobe (pointing to kmod), during
> >> >the normal `make` build. Although those were never installed.
> >> >
> >> >Add a few lines in the install-exec-hook, to ensure they're present at
> >> >`make install` time. Thus one can actually use those without additional
> >> >changes. As an added bonus, distributions can drop the similar hunk from
> >> >their packaging.
> >>
> >> It was a long time ago and my memory may be fading, but afair the fact
> >> that distros were doing it was what prevented us from adding the
> >> symlinks ourselves.... and then we never re-visited this.
> >>
> >> I'll dig some history before applying to make sure I'm not forgetting
> >> something.
> >>
> >Ack, makes sense. Fwiw I've already opened a MR with the Arch team
> >highlighting these changes.
>
> no wonder my memory faded as it was almost 12 years ago and during  kmod 3 ~ 5.
>
>
> 00fc926 build-sys: create symlinks instead of building separate tools
>
>         when we started using symlinks to a single kmod binary
>
> 7bbf523 build-sys: create symlinks if we are installing tools
> 12fd9cd build-sys: forcefully create links
>
>         when we started creating the symlinks
>
> fe8b067 build-sys: do not create symlinks by default
>
>         stop creating the symlinks since it was not working across
>         distros and creating more problems than solving
>
> Now that distros configure all the paths through configure options,
> we can probably re-attempt this.
>
> Cc'ing some pkg maintainers
>

Thanks for the information. Curiosity got the best of me, so I had a
look across few distros:

Arch - installs kmod in /usr/bin, symlinks are in /usr/bin.

Debian - installs kmod in /usr/bin and symlinks are split across
/usr/bin and /usr/sbin. Cannot find any references if they're aiming
to merge /usr/bin and /usr/sbin.

Fedora - installs kmod in /usr/bin and symlinks are split across
/usr/bin and /usr/sbin. Fedora 40 is aiming to "merge" /usr/bin and
/usr/sbin.

Gentoo - installs kmod in /bin and symlinks are split across /bin and
/sbin. Gentoo has merged /usr (/{,s}bin being a symlink to
/usr/{.s}bin) and merged bin (/usr/sbin is a symlink to /usr/bin in
some instances.
The https://wiki.gentoo.org/wiki/Merge-usr wiki explains the tool
aiming with merge conversions, although it seems to be optional albeit
highly(?) recommended.

TlDr: Distro variations still exist. Arch is fine, Fedora 40 should be
OK. Debian will need an in-package tweak. Gentoo will be fine for most
or at least some instances.

Personally (Arch user here) it makes sense to land and release this,
alongside the /usr/lib/modules support. Although if you think it makes
sense to defer for a later date, that's fine with me.

Regards,
Emil




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux