From 9e52529025b25fca49d10b7a3ee2d00556ffe99b Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 18 Jun 2019 11:33:05 -0700 Subject: [PATCH] Update the lorax templates to match what lorax provides lorax-creator doesn't ship these, but it uses them for running tests, so make sure they are current. Related: rhbz#1689314 --- share/live/aarch64.tmpl | 4 ++-- share/live/config_files/aarch64/grub2-efi.cfg | 6 +++--- share/live/config_files/ppc/grub.cfg.in | 4 ++-- share/live/config_files/s390/generic.prm | 2 +- share/live/config_files/x86/grub.conf | 4 ++-- share/live/config_files/x86/grub2-efi.cfg | 8 ++++---- share/live/config_files/x86/isolinux.cfg | 8 ++++---- share/live/efi.tmpl | 3 ++- share/live/ppc.tmpl | 9 ++------- share/live/s390.tmpl | 4 +++- share/live/x86.tmpl | 5 +++-- share/ppc.tmpl | 11 +---------- share/runtime-cleanup.tmpl | 4 ++-- share/runtime-install.tmpl | 1 + share/s390.tmpl | 1 + 15 files changed, 33 insertions(+), 41 deletions(-) diff --git a/share/live/aarch64.tmpl b/share/live/aarch64.tmpl index 0fb1240b..cfc555ab 100644 --- a/share/live/aarch64.tmpl +++ b/share/live/aarch64.tmpl @@ -1,4 +1,4 @@ -<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel"/> +<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel, extra_boot_args"/> <% configdir="tmp/config_files/aarch64" PXEBOOTDIR="images/pxeboot" @@ -54,7 +54,7 @@ mkdir ${KERNELDIR} %> treeinfo images-${basearch} ${img|basename} ${img} %endfor - <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=None, efiarch64=efiarch, isolabel=isolabel"/> + <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=None, efiarch64=efiarch, isolabel=isolabel, extra_boot_args=extra_boot_args"/> %endif # Create optional product.img and updates.img diff --git a/share/live/config_files/aarch64/grub2-efi.cfg b/share/live/config_files/aarch64/grub2-efi.cfg index c6a3d686..d0799243 100644 --- a/share/live/config_files/aarch64/grub2-efi.cfg +++ b/share/live/config_files/aarch64/grub2-efi.cfg @@ -27,16 +27,16 @@ search --no-floppy --set=root -l '@ISOLABEL@' ### BEGIN /etc/grub.d/10_linux ### menuentry 'Start @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os { - linux @KERNELPATH@ @ROOT@ rd.live.image quiet + linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet initrd @INITRDPATH@ } menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os { - linux @KERNELPATH@ @ROOT@ rd.live.image rd.live.check quiet + linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet initrd @INITRDPATH@ } submenu 'Troubleshooting -->' { menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os { - linux @KERNELPATH@ @ROOT@ rd.live.image nomodeset quiet + linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image nomodeset quiet initrd @INITRDPATH@ } } diff --git a/share/live/config_files/ppc/grub.cfg.in b/share/live/config_files/ppc/grub.cfg.in index 30d94695..7a0135fb 100644 --- a/share/live/config_files/ppc/grub.cfg.in +++ b/share/live/config_files/ppc/grub.cfg.in @@ -6,12 +6,12 @@ echo -e "\nWelcome to the @PRODUCT@ @VERSION@ installer!\n\n" for BITS in 32 64; do if [ -d "/ppc/ppc${BITS}" ]; then menuentry "Start @PRODUCT@ @VERSION@ (${BITS}-bit kernel)" $BITS --class fedora --class gnu-linux --class gnu --class os { - linux /ppc/ppc${2}/vmlinuz @ROOT@ ro rd.live.image quiet + linux /ppc/ppc${2}/vmlinuz @ROOT@ @EXTRA@ ro rd.live.image quiet initrd /ppc/ppc${2}/initrd.img } menuentry "Test this media & start @PRODUCT@ @VERSION@ (${BITS}-bit kernel)" $BITS --class fedora --class gnu-linux --class gnu --class os { - linux /ppc/ppc${2}/vmlinuz @ROOT@ rd.live.image rd.live.check ro quiet + linux /ppc/ppc${2}/vmlinuz @ROOT@ @EXTRA@ rd.live.image rd.live.check ro quiet initrd /ppc/ppc${2}/initrd.img } diff --git a/share/live/config_files/s390/generic.prm b/share/live/config_files/s390/generic.prm index e1dc3977..4f9ba388 100644 --- a/share/live/config_files/s390/generic.prm +++ b/share/live/config_files/s390/generic.prm @@ -1 +1 @@ -ro ramdisk_size=40000 cio_ignore=all,!condev +ro ramdisk_size=40000 cio_ignore=all,!condev @EXTRA@ diff --git a/share/live/config_files/x86/grub.conf b/share/live/config_files/x86/grub.conf index 2a4b808e..6c4a51f3 100644 --- a/share/live/config_files/x86/grub.conf +++ b/share/live/config_files/x86/grub.conf @@ -5,9 +5,9 @@ timeout 60 hiddenmenu title Start @PRODUCT@ @VERSION@ findiso - kernel @KERNELPATH@ @ROOT@ rd.live.image quiet + kernel @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet initrd @INITRDPATH@ title Test this media & start @PRODUCT@ @VERSION@ findiso - kernel @KERNELPATH@ @ROOT@ rd.live.image rd.live.check quiet + kernel @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet initrd @INITRDPATH@ diff --git a/share/live/config_files/x86/grub2-efi.cfg b/share/live/config_files/x86/grub2-efi.cfg index f99f459c..319895be 100644 --- a/share/live/config_files/x86/grub2-efi.cfg +++ b/share/live/config_files/x86/grub2-efi.cfg @@ -21,20 +21,20 @@ search --no-floppy --set=root -l '@ISOLABEL@' ### BEGIN /etc/grub.d/10_linux ### menuentry 'Start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os { - linuxefi @KERNELPATH@ @ROOT@ rd.live.image quiet + linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet initrdefi @INITRDPATH@ } menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os { - linuxefi @KERNELPATH@ @ROOT@ rd.live.image rd.live.check quiet + linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet initrdefi @INITRDPATH@ } submenu 'Troubleshooting -->' { menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os { - linuxefi @KERNELPATH@ @ROOT@ rd.live.image xdriver=vesa nomodeset quiet + linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image xdriver=vesa nomodeset quiet initrdefi @INITRDPATH@ } menuentry 'Rescue a @PRODUCT@ system' --class fedora --class gnu-linux --class gnu --class os { - linuxefi @KERNELPATH@ @ROOT@ rd.live.image rescue quiet + linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rescue quiet initrdefi @INITRDPATH@ } } diff --git a/share/live/config_files/x86/isolinux.cfg b/share/live/config_files/x86/isolinux.cfg index 3612d811..3691dfe6 100644 --- a/share/live/config_files/x86/isolinux.cfg +++ b/share/live/config_files/x86/isolinux.cfg @@ -61,13 +61,13 @@ menu separator # insert an empty line label linux menu label ^Start @PRODUCT@ @VERSION@ kernel vmlinuz - append initrd=initrd.img @ROOT@ rd.live.image quiet + append initrd=initrd.img @ROOT@ @EXTRA@ rd.live.image quiet label check menu label Test this ^media & start @PRODUCT@ @VERSION@ menu default kernel vmlinuz - append initrd=initrd.img @ROOT@ rd.live.image rd.live.check quiet + append initrd=initrd.img @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet menu separator # insert an empty line @@ -83,7 +83,7 @@ label vesa @PRODUCT@ @VERSION@. endtext kernel vmlinuz - append initrd=initrd.img @ROOT@ rd.live.image xdriver=vesa nomodeset quiet + append initrd=initrd.img @ROOT@ @EXTRA@ rd.live.image xdriver=vesa nomodeset quiet label rescue menu indent count 5 @@ -93,7 +93,7 @@ label rescue and edit config files to try to get it booting again. endtext kernel vmlinuz - append initrd=initrd.img @ROOT@ rd.live.image rescue quiet + append initrd=initrd.img @ROOT@ @EXTRA@ rd.live.image rescue quiet label memtest menu label Run a ^memory test diff --git a/share/live/efi.tmpl b/share/live/efi.tmpl index fcd9e9ad..ee584f60 100644 --- a/share/live/efi.tmpl +++ b/share/live/efi.tmpl @@ -1,4 +1,4 @@ -<%page args="configdir, KERNELDIR, efiarch32, efiarch64, isolabel"/> +<%page args="configdir, KERNELDIR, efiarch32, efiarch64, isolabel, extra_boot_args"/> <% from string import lower EFIBOOTDIR="EFI/BOOT" @@ -53,6 +53,7 @@ ${make_efiboot("images/efiboot.img")} replace @KERNELPATH@ /${kdir}/vmlinuz ${eficonf} replace @INITRDPATH@ /${kdir}/initrd.img ${eficonf} replace @ISOLABEL@ '${isolabel}' ${eficonf} + replace @EXTRA@ '${extra_boot_args}' ${eficonf} %if disk: replace @ROOT@ root=live:LABEL=ANACONDA ${eficonf} %else: diff --git a/share/live/ppc.tmpl b/share/live/ppc.tmpl index af6373e7..b2470aaa 100644 --- a/share/live/ppc.tmpl +++ b/share/live/ppc.tmpl @@ -1,4 +1,4 @@ -<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product, isolabel"/> +<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product, isolabel, extra_boot_args"/> <% configdir="tmp/config_files/ppc" BOOTDIR="ppc" @@ -12,12 +12,6 @@ WRAPPER="usr/sbin/wrapper" WRAPPER_DATA="usr/"+libdir+"/kernel-wrapper" prepboot = "" - -## NOTE: yaboot freaks out and stops parsing its config if it sees a '\', -## so we can't use the udev escape sequences in the root arg. -## Instead we'll just replace any non-ASCII characters in the isolabel -## with '_', which means we won't need any udev escapes. -isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel) %> mkdir ${LIVEDIR} @@ -46,6 +40,7 @@ install ${configdir}/grub.cfg.in ${GRUBDIR}/grub.cfg replace @PRODUCT@ '${product.name}' ${GRUBDIR}/grub.cfg replace @VERSION@ ${product.version} ${GRUBDIR}/grub.cfg replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${GRUBDIR}/grub.cfg +replace @EXTRA@ '${extra_boot_args}' ${GRUBDIR}/grub.cfg ## copy mapping and magic files needed for isos install ${configdir}/mapping ${BOOTDIR} diff --git a/share/live/s390.tmpl b/share/live/s390.tmpl index 375df3ed..658a4314 100644 --- a/share/live/s390.tmpl +++ b/share/live/s390.tmpl @@ -1,4 +1,4 @@ -<%page args="kernels, runtime_img, runtime_base, basearch, outroot"/> +<%page args="kernels, runtime_img, runtime_base, basearch, outroot, extra_boot_args"/> <% configdir="tmp/config_files/s390" BOOTDIR="images" @@ -21,6 +21,7 @@ install ${configdir}/generic.ins . ## configure bootloader replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins +replace @EXTRA@ '${extra_boot_args}' ${BOOTDIR}/generic.prm ## install kernel installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img @@ -34,6 +35,7 @@ treeinfo images-${basearch} initrd.addrsize ${BOOTDIR}/initrd.addrsize treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.prm treeinfo images-${basearch} genericdvd.prm ${BOOTDIR}/genericdvd.prm treeinfo images-${basearch} generic.ins generic.ins +treeinfo images-${basearch} redhat.exec ${BOOTDIR}/redhat.exec # Create optional product.img and updates.img <% imggraft=""; images=["product", "updates"] %> diff --git a/share/live/x86.tmpl b/share/live/x86.tmpl index c6f67e0d..700a52b0 100644 --- a/share/live/x86.tmpl +++ b/share/live/x86.tmpl @@ -1,4 +1,4 @@ -<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/> +<%page args="kernels, runtime_img, basearch, outroot, product, isolabel, extra_boot_args"/> <% configdir="tmp/config_files/x86" SYSLINUXDIR="usr/share/syslinux" @@ -27,6 +27,7 @@ install boot/memtest* ${BOOTDIR}/memtest replace @VERSION@ ${product.version} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg replace @PRODUCT@ '${product.name}' ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg +replace @EXTRA@ '${extra_boot_args}' ${BOOTDIR}/isolinux.cfg ## install kernels mkdir ${KERNELDIR} @@ -66,7 +67,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR} efigraft += " {0}={1}/{0}".format(img,outroot) efihybrid = "--uefi --mac" if domacboot else "--uefi" %> - <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel"/> + <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel, extra_boot_args=extra_boot_args"/> %endif # Create optional product.img and updates.img diff --git a/share/ppc.tmpl b/share/ppc.tmpl index 13c8e5e1..7bbe1bc4 100644 --- a/share/ppc.tmpl +++ b/share/ppc.tmpl @@ -12,15 +12,6 @@ WRAPPER="usr/sbin/wrapper" WRAPPER_DATA="usr/"+libdir+"/kernel-wrapper" prepboot = "" - -## NOTE: yaboot freaks out and stops parsing its config if it sees a '\', -## so we can't use the udev escape sequences in the root arg. -## Instead we'll just replace any non-ASCII characters in the isolabel -## with '_', which means we won't need any udev escapes. -isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel) - -## Anaconda finds the CDROM device automatically -rootarg = "" %> mkdir ${LIVEDIR} @@ -48,7 +39,7 @@ install /usr/lib/grub/powerpc-ieee1275/*.lst ${GRUBDIR}/powerpc-ieee1275 install ${configdir}/grub.cfg.in ${GRUBDIR}/grub.cfg replace @PRODUCT@ '${product.name}' ${GRUBDIR}/grub.cfg replace @VERSION@ ${product.version} ${GRUBDIR}/grub.cfg -replace @ROOT@ "${rootarg}" ${GRUBDIR}/grub.cfg +replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${GRUBDIR}/grub.cfg ## copy mapping and magic files needed for isos install ${configdir}/mapping ${BOOTDIR} diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl index 3470f598..650d4454 100644 --- a/share/runtime-cleanup.tmpl +++ b/share/runtime-cleanup.tmpl @@ -142,7 +142,7 @@ removefrom authconfig /usr/sbin/* /usr/share/* removefrom bash /etc/* /usr/bin/bashbug* /usr/share/* removefrom bind-libs-lite /usr/${libdir}/libirs* removefrom bind-libs-lite /usr/${libdir}/libisccfg-export* -removefrom bind-utils /usr/bin/dig /usr/bin/host /usr/bin/nsupdate +removefrom bind-utils /usr/bin/dig /usr/bin/host /usr/bin/nsupdate /usr/bin/delv removefrom bitmap-fangsongti-fonts /usr/share/fonts/* removefrom ca-certificates /etc/pki/java/* removefrom ca-certificates /etc/pki/tls/certs/ca-bundle.trust.crt /etc/ssl/* @@ -325,7 +325,7 @@ removefrom util-linux --allbut \ /etc/mtab /etc/pam.d/login /etc/pam.d/remote \ /usr/sbin/{agetty,blkid,blockdev,clock,fdisk,fsck,fstrim,hwclock,losetup} \ /usr/sbin/{mkswap,nologin,sfdisk,swapoff,swapon,wipefs,partx,fsfreeze} \ - /usr/bin/{logger,hexdump,flock} + /usr/bin/{logger,hexdump,flock,chmem,lsmem} removefrom volume_key-libs /usr/share/locale/* removefrom wget /etc/* /usr/share/locale/* removefrom xorg-x11-drv-intel /usr/${libdir}/libI* diff --git a/share/runtime-install.tmpl b/share/runtime-install.tmpl index 1cae3e9a..aef26d06 100644 --- a/share/runtime-install.tmpl +++ b/share/runtime-install.tmpl @@ -60,6 +60,7 @@ installpkg anaconda-dracut dracut-network dracut-config-generic dracut-fips installpkg redhat-upgrade-dracut redhat-upgrade-dracut-plymouth log "Looking for extra redhat-upgrade-dracut packages..." -installpkg *-redhat-upgrade-dracut +installpkg redhat-release-eula ## rpcbind or portmap needed by dracut nfs module installpkg rpcbind diff --git a/share/s390.tmpl b/share/s390.tmpl index 795e5c6f..857d9bf7 100644 --- a/share/s390.tmpl +++ b/share/s390.tmpl @@ -40,6 +40,7 @@ treeinfo images-${basearch} initrd.addrsize ${BOOTDIR}/initrd.addrsize treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.prm treeinfo images-${basearch} genericdvd.prm ${BOOTDIR}/genericdvd.prm treeinfo images-${basearch} generic.ins generic.ins +treeinfo images-${basearch} redhat.exec ${BOOTDIR}/redhat.exec # Create optional product.img and updates.img in /images/ <% imggraft=""; images=["product", "updates"] %>