Re: Help remove scriptlets from the kernel?

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

 



>>>>> "LA" == Laura Abbott <labbott@xxxxxxxxxx> writes:

LA> The kernel uses a few scriptlets at the moment which will need to be
LA> cleaned up, most likely replaced with file triggers.

I have some experience converting things to file triggers had a quick
look.  It seems we have the following:

The main kernel package messes with /etc/sysconfig/kernel to change
DEFAULTKERNEL in %post and has a %posttrans package to call
/sbin/kernel-install.

The devel packages do some magic with hardlink calls (set up by
%kernel_devel_post).

The modules and modules-extra packages have scriptlets to call depmod
(set up by %kernel_modules_post and %kernel_modules_extra_post).

These are all buried in multiple layers of macros, so getting rid of any
of this is probably a nice thing regardless of any other reasons
scriptlets are problematic.

One fun thing is that I have no idea how file triggers interact with
packages which are installed multiple times.  If it works like I think
it does, each kernel package (or maybe kernel-core package) would have
something like:

%transfiletriggerin -n kernel-core -- /lib/modules/%{KVERREL}/
/sbin/depmod -a %{KVERREL}

%transfiletriggerpostun -n kernel-core -- /lib/modules/%{KVERREL}/
/sbin/depmod -a %{KVERREL}

The modules packages could then drop their scriptlets.  These might need
the variant magic or whatnot.

I don't really know about the hardlink calls; it would be trivial for
something to call hardlink on /usr/src/kernels but optimizing that is
more difficult.

I would think that the bootloader package or systemd-udev would be the
proper place to put a trigger that calls kernel-install.

I don't really understand the modification of /etc/sysconfig/kernel.

In any case, it does seem that there's plenty of opportunity for useful
cleanup here.

 - J<
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux