From e48b9a9084d25459d4c6496c89f8bc61bc11af7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 31 May 2015 19:34:29 +0200 Subject: [PATCH] lorax: update templates based on lorax-22.11-1.fc22 --- .../templates/config_files/x86/isolinux.cfg | 21 +++++++-- .../templates/runtime-cleanup.tmpl | 25 ++++++++-- .../templates/runtime-install.tmpl | 46 ++++++++++++------- lorax-templates-qubes/templates/x86.tmpl | 8 +++- 4 files changed, 72 insertions(+), 28 deletions(-) diff --git a/lorax-templates-qubes/templates/config_files/x86/isolinux.cfg b/lorax-templates-qubes/templates/config_files/x86/isolinux.cfg index b7c7645..3f6a56f 100644 --- a/lorax-templates-qubes/templates/config_files/x86/isolinux.cfg +++ b/lorax-templates-qubes/templates/config_files/x86/isolinux.cfg @@ -54,27 +54,32 @@ menu color cmdline 0 #ffffffff #00000000 none # Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message. menu tabmsg Press Tab for full configuration options on menu items. + menu separator # insert an empty line menu separator # insert an empty line + label linux - menu label ^Install @PRODUCT@ + menu label ^Install @PRODUCT@ @VERSION@ kernel mboot.c32 append xen.gz console=none --- vmlinuz @ROOT@ i915.preliminary_hw_support=1 quiet rhgb --- initrd.img label check - menu label Test this ^media & install @PRODUCT@ + menu label Test this ^media & install @PRODUCT@ @VERSION@ menu default kernel mboot.c32 append xen.gz console=none --- vmlinuz @ROOT@ i915.preliminary_hw_support=1 quiet rhgb rd.live.check --- initrd.img + menu separator # insert an empty line + # utilities submenu menu begin ^Troubleshooting menu title Troubleshooting + label vesa menu indent count 5 - menu label Install @PRODUCT@ in ^basic graphics mode + menu label Install @PRODUCT@ @VERSION@ in ^basic graphics mode text help Try this option out if you're having trouble installing - @PRODUCT@. + @PRODUCT@ @VERSION@. endtext kernel mboot.c32 append xen.gz --- vmlinuz @ROOT@ xdriver=vesa nomodeset quiet --- initrd.img @@ -88,6 +93,7 @@ label rescue endtext kernel mboot.c32 append xen.gz --- vmlinuz @ROOT@ rescue quiet --- initrd.img + label memtest menu label Run a ^memory test text help @@ -96,13 +102,18 @@ label memtest see if the memory is working correctly. endtext kernel memtest + menu separator # insert an empty line + 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 -menu end +menu end diff --git a/lorax-templates-qubes/templates/runtime-cleanup.tmpl b/lorax-templates-qubes/templates/runtime-cleanup.tmpl index 0964c2d..aab4f0a 100644 --- a/lorax-templates-qubes/templates/runtime-cleanup.tmpl +++ b/lorax-templates-qubes/templates/runtime-cleanup.tmpl @@ -27,7 +27,8 @@ removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh \ ## we don't run SELinux (not in enforcing, anyway) removepkg checkpolicy selinux-policy libselinux-utils ## anaconda has its own repo files -removefrom fedora-release --allbut /etc/os-release +removefrom fedora-release --allbut /etc/os-release /usr/lib/os-release \ + /usr/lib/os.release.d/* removepkg fedora-release-rawhide ## no user accounts = no account management removepkg usermode usermode-gtk passwd shadow-utils @@ -49,7 +50,7 @@ removefrom isomd5sum --allbut /usr/bin/checkisomd5 ## various other things we remove to save space removepkg avahi-autoipd coreutils-libs dash db4-utils diffutils file -removepkg genisoimage gnome-python2 info iptables +removepkg genisoimage info iptables removepkg jasper-libs libXxf86misc removepkg libasyncns libhbaapi libhbalinux removepkg libmcpp libpcap libtiff libutempter linux-atm-libs @@ -92,7 +93,21 @@ arch/x86/kvm %endfor remove lib/modules/*/{build,source,*.map} ## Need to keep virtio_console.ko and ipmi stuff in drivers/char -runcmd chroot ${root} find /lib/modules -regex ".*/kernel/drivers/char/.*" \! -name virtio_console.ko\* \! -name ipmi* -delete +## Also keep virtio-rng so that the installer can get sufficient randomness for +## LUKS setup. +runcmd chroot ${root} find /lib/modules \ + -regex ".*/kernel/drivers/char/.*" \ + \! -name virtio_console.ko\* \ + \! -name hw_random \ + \! -name virtio-rng.ko\* \ + \! -name ipmi\* \ + -delete +# Remove all of drivers/hid except for logitech modules. +runcmd chroot ${root} find /lib/modules \ + -regex ".*/kernel/drivers/hid/.*" \ + \! -name hid-logitech-hidpp.ko\* \ + \! -name hid-logitech-dj.ko\* \ + -delete ## NOTE: depmod gets re-run after cleanup finishes ## do not include plymouth 'label' plugin (no text used in installer theme) @@ -107,6 +122,7 @@ removefrom gtk2-engines --allbut /usr/${libdir}/*/libclearlooks.so \ /usr/share/themes/Clearlooks/* removefrom gtk3 /usr/${libdir}/gtk-3.0/*/printbackends/* removefrom gtk3 /usr/share/themes/* +removefrom metacity --allbut /usr/bin/* /usr/${libdir}/* /etc/* ## the Fedora icon theme inherits from Mist, so we need that removefrom gnome-themes --allbut /usr/share/icons/Mist/* \ /usr/share/themes/Clearlooks/* @@ -182,7 +198,7 @@ removefrom gdisk /usr/share/* removefrom gdk-pixbuf2 /usr/share/locale* removefrom gfs2-utils /usr/sbin/* removefrom glib2 /etc/* /usr/bin/* /usr/share/locale/* -removefrom glibc /etc/gai.conf /etc/ld.so.conf /etc/localtime /etc/rpc +removefrom glibc /etc/gai.conf /etc/localtime /etc/rpc removefrom glibc /lib/*/nosegneg/* /${libdir}/libBrokenLocale* removefrom glibc /${libdir}/libSegFault* /${libdir}/libanl* removefrom glibc /${libdir}/libcidn* /${libdir}/libnss_compat* @@ -202,7 +218,6 @@ removefrom gnome-keyring /etc/xdg/* /usr/bin/* /usr/${libdir}/* /usr/libexec/* removefrom gnome-keyring /usr/share/GConf/* /usr/share/gcr-3/* removefrom gnome-keyring /usr/share/glib-2.0/* /usr/share/gnome-keyring* removefrom gnome-keyring /usr/share/locale/* -removefrom gnome-python2-gconf /usr/share/pygtk/* removefrom gnutls /usr/share/locale/* removefrom gpgme /usr/${libdir}/libgpgme-* removefrom grep /etc/* /usr/share/locale/* diff --git a/lorax-templates-qubes/templates/runtime-install.tmpl b/lorax-templates-qubes/templates/runtime-install.tmpl index 6549c95..05c2df3 100644 --- a/lorax-templates-qubes/templates/runtime-install.tmpl +++ b/lorax-templates-qubes/templates/runtime-install.tmpl @@ -4,18 +4,19 @@ installpkg python ## anaconda package -installpkg anaconda +installpkg anaconda anaconda-widgets ## anaconda deps that aren't in the RPM installpkg tmux installpkg iscsi-initiator-utils +## Other available payloads +installpkg dnf +installpkg rpm-ostree ## speed up compression on multicore systems installpkg pigz -## firstaidkit (rescue mode) packages -installpkg firstaidkit-plugin-{passwd,key-recovery,mdadm-conf} - ## kernel and firmware installpkg kernel +installpkg grubby %if basearch != "s390x": installpkg linux-firmware %endif @@ -23,7 +24,7 @@ installpkg xen-hypervisor ## arch-specific packages (bootloaders etc.) %if basearch in ("arm", "armhfp"): - installpkg kernel-highbank kernel-imx kernel-kirkwood kernel-mvebu kernel-omap kernel-tegra + installpkg kernel-lpae installpkg uboot-tools %endif %if basearch == "i386": @@ -33,16 +34,13 @@ installpkg xen-hypervisor installpkg efibootmgr grub2-efi shim shim-unsigned %endif %if basearch in ("i386", "x86_64"): - installpkg grub2 grub2-tools shim grub2-efi efibootmgr biosdevname memtest86+ syslinux + installpkg grub2 grub2-tools memtest86+ syslinux syslinux-nonlinux %endif -%if basearch in ("ppc", "ppc64"): - installpkg grub2 grub2-tools yaboot fbset hfsutils kernel-bootwrapper ppc64-utils +%if basearch in ("ppc", "ppc64", "ppc64le"): + installpkg grub2 grub2-tools fbset hfsutils kernel-bootwrapper ppc64-utils %endif %if basearch == "s390x": - installpkg lsscsi modutils s390utils-base s390utils-cmsfs-fuse -%endif -%if basearch == "sparc": - installpkg silo tilo + installpkg lsscsi s390utils-base s390utils-cmsfs-fuse %endif ## yay, plymouth @@ -53,6 +51,8 @@ installpkg anaconda-dracut dracut-network dracut-config-generic ## fedup-dracut handles upgrades ##installpkg fedup-dracut fedup-dracut-plymouth *-fedup-dracut +## fedup and rescue need this +installpkg cryptsetup ## rpcbind or portmap needed by dracut nfs module installpkg rpcbind @@ -85,12 +85,17 @@ installpkg btrfs-progs jfsutils xfsprogs reiserfs-utils gfs2-utils ntfs-3g ntfsp installpkg python-volume_key volume_key installpkg system-storage-manager installpkg device-mapper-persistent-data +installpkg xfsdump + +## needed for LUKS escrow +installpkg python-volume_key volume_key +installpkg python-nss ## SELinux support installpkg selinux-policy-targeted audit libsemanage-python ## network tools/servers -installpkg python-ethtool ethtool openssh-server nfs-utils +installpkg python-ethtool ethtool openssh-server nfs-utils openssh-clients installpkg tigervnc-server-minimal %if basearch != "s390x": installpkg tigervnc-server-module @@ -103,7 +108,7 @@ installpkg mt-st smartmontools %if basearch != "s390x": installpkg hdparm pcmciautils %endif -installpkg libmlx4 +installpkg libmlx4 rdma ## translations & language packs installpkg yum-langpacks @@ -114,7 +119,14 @@ installpkg dejavu-sans-fonts dejavu-sans-mono-fonts installpkg kacst-farsi-fonts installpkg kacst-qurn-fonts installpkg lklug-fonts -installpkg lohit-*-fonts +installpkg lohit-assamese-fonts +installpkg lohit-bengali-fonts +installpkg lohit-devanagari-fonts +installpkg lohit-gu*-fonts +installpkg lohit-kannada-fonts +installpkg lohit-odia-fonts +installpkg lohit-tamil-fonts +installpkg lohit-telugu-fonts installpkg madan-fonts installpkg nhn-nanum-gothic-fonts installpkg smc-meera-fonts @@ -123,7 +135,9 @@ installpkg vlgothic-fonts installpkg wqy-microhei-fonts installpkg sil-abyssinica-fonts installpkg xorg-x11-fonts-misc -installpkg gnome-themes-standard gnome-icon-theme-legacy +installpkg gnome-icon-theme-legacy +installpkg aajohan-comfortaa-fonts +installpkg abattis-cantarell-fonts ## debugging/bug reporting tools installpkg gdb-gdbserver diff --git a/lorax-templates-qubes/templates/x86.tmpl b/lorax-templates-qubes/templates/x86.tmpl index 03bc0aa..435a3d2 100644 --- a/lorax-templates-qubes/templates/x86.tmpl +++ b/lorax-templates-qubes/templates/x86.tmpl @@ -7,9 +7,13 @@ BOOTDIR="isolinux" KERNELDIR=PXEBOOTDIR LIVEDIR="LiveOS" EXTRAKERNELS="extrakernels" -%> -<%! from distutils.version import LooseVersion + +## Don't allow spaces or escape characters in the iso label +def valid_label(ch): + return ch.isalnum() or ch == '_' + +isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel) %> mkdir ${LIVEDIR}