Bug 433121 - kernel posttrans and preun hooks for other packages
Summary: kernel posttrans and preun hooks for other packages
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 440584
TreeView+ depends on / blocked
 
Reported: 2008-02-16 15:35 UTC by Matt Domsch
Modified: 2008-04-04 07:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-19 20:40:33 UTC


Attachments (Terms of Use)
kernel-posttrans-preun.patch (1.76 KB, patch)
2008-02-16 15:35 UTC, Matt Domsch
no flags Details | Diff

Description Matt Domsch 2008-02-16 15:35:06 UTC
Description of problem:
DKMS would like to have the opportunity to run it's auto-rebuilder/installer
after a new kernel RPM has been installed, without having to wait for a system
restart to run it.  Likewise, when a kernel RPM is removed, it would like to be
able to run to remove modules managed by it.

Debian kernels intentionally run scripts located in /etc/kernel/postinst.d/
following new kernel package installation, /etc/kernel/prerm.d/ before kernel
package removal.  DKMS drops a script into these directories, to perform the
appropriate actions.

I want Fedora and RHEL kernels to do likewise.  Patch attached.


Version-Release number of selected component (if applicable):
kernel-2.6.25-0.50.rc2.fc9.x86_64.rpm

Comment 1 Matt Domsch 2008-02-16 15:35:07 UTC
Created attachment 295073 [details]
kernel-posttrans-preun.patch

Comment 2 Matt Domsch 2008-02-16 15:36:25 UTC
Note this patch implements the same interface as that used for Debian and Ubuntu
kernels.  The scripts are invoked with $1 = kernel version, and $2 = path to
vmlinuz file.  (DKMS doesn't need $2, but I'm keeping the interface the same to
match so people can reuse their scriptlets.)

Comment 3 Matt Domsch 2008-03-19 01:17:04 UTC
mkinitrd-6.0.39-1.fc9.x86_64
now has the actual scripts being invoked by kernel rpm %posttrans and %preun. 
Now it's time for the kernel .spec patch, as discussed on fedora-kernel-list, to
be applied, which adds %posttrans and %preun invocation of /sbin/new-kernel-pkg
--rpmposttrans.

Thanks,
Matt

Comment 4 Matt Domsch 2008-03-19 01:35:16 UTC
https://www.redhat.com/archives/fedora-kernel-list/2008-February/msg00083.html

has the patch, and the kernel.spec dependency on mkinitrd needs to bump to >=
6.0.39-1

Comment 5 Dave Jones 2008-03-19 20:40:33 UTC
applied.


Note You need to log in before you can comment on or make changes to this bug.