From 76f22a0ea0533b1c0efd6a2cd5dfddd67024045a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 27 Aug 2013 01:00:28 +0200 Subject: [PATCH] Install all available kernels by default (#581) Anaconda/pungi doesn't support multiple versions of the same package at the time, so place all kernels on installation media in separate directory and install them in %post script. --- anaconda/data/post-scripts/40-qubes-alt-kernels.ks | 8 ++++++++ anaconda/data/post-scripts/Makefile.am | 2 +- .../templates/config_files/x86/isolinux.cfg | 2 +- lorax-templates-qubes/templates/x86.tmpl | 5 +++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 anaconda/data/post-scripts/40-qubes-alt-kernels.ks diff --git a/anaconda/data/post-scripts/40-qubes-alt-kernels.ks b/anaconda/data/post-scripts/40-qubes-alt-kernels.ks new file mode 100644 index 0000000..3bd654c --- /dev/null +++ b/anaconda/data/post-scripts/40-qubes-alt-kernels.ks @@ -0,0 +1,8 @@ +%post --nochroot + +for pkg in /run/install/repo/extrakernels/*.rpm; do + name=`basename $pkg .rpm` + rpm --root=$ANA_INSTALL_PATH -q $name > /dev/null || rpm --root=$ANA_INSTALL_PATH -i --oldpackage $pkg +done + +%end diff --git a/anaconda/data/post-scripts/Makefile.am b/anaconda/data/post-scripts/Makefile.am index ab65a49..9140f8c 100644 --- a/anaconda/data/post-scripts/Makefile.am +++ b/anaconda/data/post-scripts/Makefile.am @@ -18,5 +18,5 @@ # Author: Chris Lumens postscriptsdir = $(datadir)/$(PACKAGE_NAME)/post-scripts -dist_postscripts_DATA = 50-qubes.ks 80-setfilecons.ks 90-copy-screenshots.ks 99-copy-logs.ks +dist_postscripts_DATA = 40-qubes-alt-kernels.ks 50-qubes.ks 80-setfilecons.ks 90-copy-screenshots.ks 99-copy-logs.ks MAINTAINERCLEAFILES = Makefile.in diff --git a/lorax-templates-qubes/templates/config_files/x86/isolinux.cfg b/lorax-templates-qubes/templates/config_files/x86/isolinux.cfg index 5ee7343..9f417a5 100644 --- a/lorax-templates-qubes/templates/config_files/x86/isolinux.cfg +++ b/lorax-templates-qubes/templates/config_files/x86/isolinux.cfg @@ -78,6 +78,7 @@ label vesa endtext kernel mboot.c32 append xen.gz --- vmlinuz @ROOT@ xdriver=vesa nomodeset quiet --- initrd.img +@EXTRAKERNELS@ label rescue menu indent count 5 menu label ^Rescue a @PRODUCT@ system @@ -100,7 +101,6 @@ label local menu label Boot from ^local drive localboot 0xffff menu separator # insert an empty line -menu separator # insert an empty line label returntomain menu label Return to ^main menu menu exit diff --git a/lorax-templates-qubes/templates/x86.tmpl b/lorax-templates-qubes/templates/x86.tmpl index af4e639..92393da 100644 --- a/lorax-templates-qubes/templates/x86.tmpl +++ b/lorax-templates-qubes/templates/x86.tmpl @@ -6,6 +6,7 @@ PXEBOOTDIR="images/pxeboot" BOOTDIR="isolinux" KERNELDIR=PXEBOOTDIR LIVEDIR="LiveOS" +EXTRAKERNELS="extrakernels" %> mkdir ${LIVEDIR} @@ -24,6 +25,10 @@ install ${configdir}/grub.conf ${BOOTDIR} install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png install boot/memtest* ${BOOTDIR}/memtest +mkdir ${EXTRAKERNELS} +# bypass "chroot" enforced by Lorax parser +install ../../../../yum/qubes-dom0/rpm/kernel-[0-9]*rpm ${EXTRAKERNELS} + ## install kernels mkdir ${KERNELDIR} %for kernel in kernels: