PATCH: scripts/package/mkspec
From: Kevin Fenzi (kevin_at_tummy.com)
Date: 12/31/04
- Previous message: Jeniffer Donald: "GREETINGS AND CONGRATULATIONS"
- Next in thread: Wichert Akkerman: "Re: PATCH: scripts/package/mkspec"
- Reply: Wichert Akkerman: "Re: PATCH: scripts/package/mkspec"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Dec 2004 20:33:20 -0700 To: linux-kernel@vger.kernel.org
This is a patch against 2.6.10's mkspec script.
This patch adds %post and a %preun sections to the rpm spec that
mkspec generates for the kernel (for 'make rpm').
So, after installing the kernel rpm it checks for /sbin/mkinitrd and
makes an initrd file for the newly installed kernel rpm. It also
checks for a /sbin/new-kernel-package command and runs it on the new
kernel if it exists to add the new kernel/initrd to grub/lilo.
For preun, before the kernel rpm is removed, /sbin/new-kernel-package
is called to remove the kernel from the lilo or grub config and to
remove the initrd (if any).
I am using Fedora Core based machines, so I don't know how well these
translate to {mandrake|suse|connectiva|others}. Anyone using those
systems care to comment?
This patch works fine for me on Fedora based systems, and shouldn't
harm any machines without /sbin/mkinitrd and
/sbin/new-kernel-package.
Comments?
kevin
-- diff -Nru linux-2.6.10.orig/scripts/package/mkspec linux-2.6.10/scripts/package/mkspec --- linux-2.6.10.orig/scripts/package/mkspec 2004-12-24 14:33:49.000000000 -0700 +++ linux-2.6.10/scripts/package/mkspec 2004-12-30 20:19:04.954634842 -0700 @@ -73,6 +73,14 @@ echo "" echo "%clean" echo '#echo -rf $RPM_BUILD_ROOT' + +echo "%post" +echo '[ -x /sbin/mkinitrd ] && /sbin/mkinitrd /boot/initrd-'"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"'.img '"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" +echo '[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --install --initrdfile=/boot/initrd-'"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"'.img --make-default '"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" +echo "" +echo "%preun" +echo '[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --remove '"$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" + echo "" echo "%files" echo '%defattr (-, root, root)' - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Jeniffer Donald: "GREETINGS AND CONGRATULATIONS"
- Next in thread: Wichert Akkerman: "Re: PATCH: scripts/package/mkspec"
- Reply: Wichert Akkerman: "Re: PATCH: scripts/package/mkspec"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: custom kernel
... >> I made an attempt to custom build a kernel from the src.rpm. ... .config:4478:
trying to assign nonexistent symbol X86_LONGHAUL ... echo "Patch #1:" ...
(Fedora) - Re: [PATCH 2/3] exporting capability name/code pairs (final#2)
... Who can pick up this patch to the upstreamed tree? ... I'm not an expert of
kernel makefiles. ... | A newer kernel sometimes adds new capabilities, ...
| +echo '#ifndef CAP_NAMES_H' ... (Linux-Kernel) - Re: [PATCH] exporting capability code/name pairs (try #5.1)
... This patch enables to export code/name of capabilities supported ... A newer
kernel sometimes adds new capabilities, ... +echo '#ifndef CAP_NAMES_H' ...
(Linux-Kernel) - Re: [PATCH] exporting capability code/name pairs (try #5.1)
... This patch enables to export code/name of capabilities supported ... A newer
kernel sometimes adds new capabilities, ... +echo '#ifndef CAP_NAMES_H' ...
(Linux-Kernel) - Re: Patching a fedora stock kernel howto!
... after that alter the spec file and hook in the patch into the spec ... build
a new rpm from the spec file with rpmbuild and there ya ... > instructions for patch
a stock fedora kernel source and then recompile ... (Fedora)