diff --git a/.lorax-templates-almalinux.metadata b/.lorax-templates-almalinux.metadata
deleted file mode 100644
index 6533b7b..0000000
--- a/.lorax-templates-almalinux.metadata
+++ /dev/null
@@ -1 +0,0 @@
-56b76e781d845382bdf53dd7731075477da5f9a4 SOURCES/lorax-templates-rhel-9.0-39.tar.gz
diff --git a/80-rhel/aarch64.tmpl b/80-rhel/aarch64.tmpl
new file mode 100644
index 0000000..14099d6
--- /dev/null
+++ b/80-rhel/aarch64.tmpl
@@ -0,0 +1,92 @@
+<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel"/>
+<%
+configdir="tmp/config_files/aarch64"
+PXEBOOTDIR="images/pxeboot"
+KERNELDIR=PXEBOOTDIR
+STAGE2IMG="images/install.img"
+LORAXDIR="usr/share/lorax/"
+
+## 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)
+
+import os
+from os.path import basename
+from pylorax.sysutils import joinpaths
+
+# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
+if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
+ isoargs = "-iso-level 3"
+else:
+ isoargs = ""
+%>
+
+mkdir images
+install ${runtime_img} ${STAGE2IMG}
+treeinfo stage2 mainimage ${STAGE2IMG}
+
+## install kernels
+mkdir ${KERNELDIR}
+%for kernel in kernels:
+ ## normal aarch64
+ installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
+ installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+%endfor
+
+#FIXME: this will need adjusted when we have a real bootloader.
+## WHeeeeeeee, EFI.
+## We could remove the basearch restriction someday..
+<% efiargs=""; efigraft="" %>
+%if exists("boot/efi/EFI/*/gcdaa64.efi"):
+ <%
+ efiarch32 = None
+ efiarch64 = 'AA64'
+ efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
+ images = ["images/efiboot.img"]
+ %>
+ %for img in images:
+ <%
+ efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img)
+ efigraft += " {0}={1}/{0}".format(img,outroot)
+ %>
+ treeinfo images-${basearch} ${img|basename} ${img}
+ %endfor
+ <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel"/>
+%endif
+
+# Create optional product.img and updates.img
+<% filegraft=""; images=["product", "updates"] %>
+%for img in images:
+ %if exists("%s/%s/" % (LORAXDIR, img)):
+ installimg ${LORAXDIR}/${img}/ images/${img}.img
+ treeinfo images-${basearch} ${img}.img images/${img}.img
+ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
+ %endif
+%endfor
+
+# Inherit iso-graft/ if it exists from external templates
+<%
+ import os
+ if os.path.exists(workdir + "/iso-graft"):
+ filegraft += " " + workdir + "/iso-graft"
+%>
+
+# Add the license files
+%for f in glob("usr/share/licenses/*-release-common/*"):
+ install ${f} ${f|basename}
+ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
+%endfor
+
+%if exists("boot/efi/EFI/*/gcdaa64.efi"):
+## make boot.iso
+runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
+ ${efiargs} -R -J -V '${isolabel}' \
+ -graft-points \
+ .discinfo=${outroot}/.discinfo \
+ ${KERNELDIR}=${outroot}/${KERNELDIR} \
+ ${STAGE2IMG}=${outroot}/${STAGE2IMG} \
+ ${efigraft} ${filegraft}
+treeinfo images-${basearch} boot.iso images/boot.iso
+%endif
diff --git a/80-rhel/appliance/libvirt.tmpl b/80-rhel/appliance/libvirt.tmpl
new file mode 100644
index 0000000..b6ffc61
--- /dev/null
+++ b/80-rhel/appliance/libvirt.tmpl
@@ -0,0 +1,35 @@
+
+
+ ${name}
+
+
+
+ ${arch}
+
+
+
+
+%for disk, letter in zip(disks, range(97, 123)):
+
+%endfor
+
+
+ ${vcpus}
+ ${memory}
+%for net in networks:
+
+%endfor
+
+
+
+
+%for disk in disks:
+
+ %if disk.checksum:
+ ${disk.checksum}
+ %endif
+
+%endfor
+
+
+
diff --git a/80-rhel/config_files/aarch64/boot.msg b/80-rhel/config_files/aarch64/boot.msg
new file mode 100644
index 0000000..ff54899
--- /dev/null
+++ b/80-rhel/config_files/aarch64/boot.msg
@@ -0,0 +1,5 @@
+
+splash.lss
+
+ - Press the 0107 key to begin the installation process.
+
diff --git a/80-rhel/config_files/aarch64/grub2-efi.cfg b/80-rhel/config_files/aarch64/grub2-efi.cfg
new file mode 100644
index 0000000..1ce5d33
--- /dev/null
+++ b/80-rhel/config_files/aarch64/grub2-efi.cfg
@@ -0,0 +1,46 @@
+set default="1"
+
+function load_video {
+ if [ x$feature_all_video_module = xy ]; then
+ insmod all_video
+ else
+ insmod efi_gop
+ insmod efi_uga
+ insmod ieee1275_fb
+ insmod vbe
+ insmod vga
+ insmod video_bochs
+ insmod video_cirrus
+ fi
+}
+
+load_video
+set gfxpayload=keep
+insmod gzio
+insmod part_gpt
+insmod ext2
+
+set timeout=60
+### END /etc/grub.d/00_header ###
+
+search --no-floppy --set=root -l '@ISOLABEL@'
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ ro
+ initrd @INITRDPATH@
+}
+menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ rd.live.check
+ initrd @INITRDPATH@
+}
+submenu 'Troubleshooting -->' {
+ menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ nomodeset
+ initrd @INITRDPATH@
+ }
+ menuentry 'Rescue a @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ inst.rescue
+ initrd @INITRDPATH@
+ }
+}
diff --git a/80-rhel/config_files/common/91-anaconda-autoconnect-slaves.conf b/80-rhel/config_files/common/91-anaconda-autoconnect-slaves.conf
new file mode 100644
index 0000000..f9c81e6
--- /dev/null
+++ b/80-rhel/config_files/common/91-anaconda-autoconnect-slaves.conf
@@ -0,0 +1,2 @@
+[connection]
+connection.autoconnect-slaves=1
diff --git a/80-rhel/config_files/common/92-anaconda-loglevel-debug.conf b/80-rhel/config_files/common/92-anaconda-loglevel-debug.conf
new file mode 100644
index 0000000..6a6535d
--- /dev/null
+++ b/80-rhel/config_files/common/92-anaconda-loglevel-debug.conf
@@ -0,0 +1,2 @@
+[logging]
+level=DEBUG
diff --git a/80-rhel/config_files/common/bash_history b/80-rhel/config_files/common/bash_history
new file mode 100644
index 0000000..a766df2
--- /dev/null
+++ b/80-rhel/config_files/common/bash_history
@@ -0,0 +1,11 @@
+kill -USR1 `cat /var/run/anaconda.pid`
+kill -USR2 `cat /var/run/anaconda.pid`
+kill -HUP `cat /var/run/anaconda.pid`
+udevadm info --export-db | less
+tail -f /tmp/storage.log
+echo b > /proc/sysrq-trigger
+dmsetup table
+multipath -d
+HOME=/root chroot /mnt/sysimage bash -l -i
+less /tmp/anaconda.log
+grep -v _yum_lock /tmp/packaging.log
diff --git a/80-rhel/config_files/common/i18n b/80-rhel/config_files/common/i18n
new file mode 100644
index 0000000..b254232
--- /dev/null
+++ b/80-rhel/config_files/common/i18n
@@ -0,0 +1 @@
+SYSFONT="eurlatgr"
diff --git a/80-rhel/config_files/common/inst.rngd.service b/80-rhel/config_files/common/inst.rngd.service
new file mode 100644
index 0000000..7b51033
--- /dev/null
+++ b/80-rhel/config_files/common/inst.rngd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Hardware RNG Entropy Gatherer Daemon
+ConditionVirtualization=!container
+ConditionKernelCommandLine=|inst.rngd
+ConditionKernelCommandLine=!inst.rngd=0
+
+# The "-f" option is required for the systemd service rngd to work with Type=simple
+[Service]
+Type=simple
+EnvironmentFile=/etc/sysconfig/rngd
+ExecStart=/usr/sbin/rngd -f $RNGD_ARGS
diff --git a/80-rhel/config_files/common/libuser.conf b/80-rhel/config_files/common/libuser.conf
new file mode 100644
index 0000000..a7a0ef0
--- /dev/null
+++ b/80-rhel/config_files/common/libuser.conf
@@ -0,0 +1,10 @@
+[defaults]
+skeleton = /mnt/sysimage/etc/skel
+mailspooldir = /mnt/sysimage/var/mail
+crypt_style = md5
+modules = files shadow
+create_modules = files shadow
+[files]
+directory = /mnt/sysimage/etc
+[shadow]
+directory = /mnt/sysimage/etc
diff --git a/80-rhel/config_files/common/org.gtk.Settings.Debug.gschema.override b/80-rhel/config_files/common/org.gtk.Settings.Debug.gschema.override
new file mode 100644
index 0000000..fcedd1b
--- /dev/null
+++ b/80-rhel/config_files/common/org.gtk.Settings.Debug.gschema.override
@@ -0,0 +1,2 @@
+[org.gtk.Settings.Debug]
+ enable-inspector-keybinding=true
diff --git a/80-rhel/config_files/common/pam.sshd b/80-rhel/config_files/common/pam.sshd
new file mode 100644
index 0000000..88c019f
--- /dev/null
+++ b/80-rhel/config_files/common/pam.sshd
@@ -0,0 +1,9 @@
+#%PAM-1.0
+auth required pam_env.so
+auth sufficient pam_unix.so likeauth nullok
+auth required pam_deny.so
+account required pam_unix.so
+password sufficient pam_unix.so nullok use_authtok md5 shadow
+password required pam_deny.so
+session required pam_limits.so
+session required pam_unix.so
diff --git a/80-rhel/config_files/common/profile b/80-rhel/config_files/common/profile
new file mode 100644
index 0000000..00a475e
--- /dev/null
+++ b/80-rhel/config_files/common/profile
@@ -0,0 +1,3 @@
+PS1="[anaconda \u@\h \W]\\$ "
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/mnt/sysimage/sbin:/mnt/sysimage/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin
+export PATH PS1
diff --git a/80-rhel/config_files/common/resolv.conf b/80-rhel/config_files/common/resolv.conf
new file mode 100644
index 0000000..e69de29
diff --git a/80-rhel/config_files/common/rsyslog.conf b/80-rhel/config_files/common/rsyslog.conf
new file mode 100644
index 0000000..6e47f41
--- /dev/null
+++ b/80-rhel/config_files/common/rsyslog.conf
@@ -0,0 +1,77 @@
+# minimal rsyslog configuration file for the installer boot.iso
+
+# provides support for local system logging (e.g. via logger command)
+# disables message dropping, we need all of them
+# Turn off message reception via local log socket;
+# local messages are retrieved through imjournal now.
+module(load="imuxsock"
+ SysSock.RateLimit.Interval="0"
+ SysSock.Use="off")
+
+# provides access to the systemd journal
+# Disable rate limiting to the journal, we need all the messages for debugging
+module(load="imjournal"
+ Ratelimit.Interval="0"
+ Ratelimit.Burst="0"
+ StateFile="imjournal.state")
+
+module(load="imfile" mode="inotify")
+input(type="imfile"
+ File="/tmp/X.log"
+ Tag="xserver:"
+ Facility="local1")
+
+input(type="imfile"
+ File="/tmp/anaconda-tb-all.log"
+ Tag="anaconda-tb:"
+ Facility="local1")
+
+module(load="builtin:omfile"
+ Template="RSYSLOG_TraditionalFileFormat"
+)
+
+
+#### GLOBAL DIRECTIVES ####
+
+# Where to place auxiliary files
+global(workDirectory="/var/lib/rsyslog")
+
+# Include all config files in /etc/rsyslog.d/
+include(file="/etc/rsyslog.d/*.conf")
+
+#### TEMPLATES ####
+
+$template anaconda_tty4, "%syslogseverity-text:::uppercase% %programname%:%msg%\n"
+$template anaconda_syslog, "%timestamp:8:$:date-rfc3164%,%timestamp:1:3:date-subseconds% %syslogseverity-text:::uppercase% %programname%:%msg%\n"
+$template virtio_ForwardFormat, "<%PRI%>%TIMESTAMP:::date-rfc3339% localhost %syslogtag:1:32%%msg:::sp-if-no-1st-sp%%msg%\n"
+
+#### RULES ####
+
+# log everything except anaconda-specific records from local1 (those are stored
+# directly into files via python logging)
+
+# discard messages from dracut regenerating initrd
+:programname,isequal,"dracut" stop
+
+*.*;\
+authpriv.none;\
+local1.none /tmp/syslog;anaconda_syslog
+ & /dev/tty4;anaconda_tty4
+
+
+# ### begin forwarding rule ###
+# The statement between the begin ... end define a SINGLE forwarding
+# rule. They belong together, do NOT split them. If you create multiple
+# forwarding rules, duplicate the whole block!
+# Remote Logging (we use TCP for reliable delivery)
+#
+# An on-disk queue is created for this action. If the remote host is
+# down, messages are spooled to disk and sent when it is up again.
+#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
+$ActionQueueMaxDiskSpace 1m # space limit (use as much as possible)
+$ActionQueueSaveOnShutdown off # do not save messages to disk on shutdown
+#$ActionQueueType LinkedList # run asynchronously
+#$ActionResumeRetryCount -1 # infinite retries if host is down
+# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
+#*.* @@remote-host:514
+# ### end of the forwarding rule ###
diff --git a/80-rhel/config_files/common/selinux.config b/80-rhel/config_files/common/selinux.config
new file mode 100644
index 0000000..eac67ab
--- /dev/null
+++ b/80-rhel/config_files/common/selinux.config
@@ -0,0 +1,2 @@
+SELINUX=permissive
+SELINUXTYPE=targeted
diff --git a/80-rhel/config_files/common/spice-vdagentd b/80-rhel/config_files/common/spice-vdagentd
new file mode 100644
index 0000000..e70aa69
--- /dev/null
+++ b/80-rhel/config_files/common/spice-vdagentd
@@ -0,0 +1 @@
+SPICE_VDAGENTD_EXTRA_ARGS=-X
diff --git a/80-rhel/config_files/common/sshd_config.anaconda b/80-rhel/config_files/common/sshd_config.anaconda
new file mode 100644
index 0000000..241ba8f
--- /dev/null
+++ b/80-rhel/config_files/common/sshd_config.anaconda
@@ -0,0 +1,7 @@
+PermitRootLogin yes
+PrintMotd yes
+SyslogFacility AUTHPRIV
+PasswordAuthentication yes
+PermitEmptyPasswords yes
+PermitUserEnvironment yes
+Subsystem sftp internal-sftp
diff --git a/80-rhel/config_files/common/sysctl.conf b/80-rhel/config_files/common/sysctl.conf
new file mode 100644
index 0000000..a95dfc6
--- /dev/null
+++ b/80-rhel/config_files/common/sysctl.conf
@@ -0,0 +1 @@
+kernel.printk=1
diff --git a/80-rhel/config_files/common/vconsole.conf b/80-rhel/config_files/common/vconsole.conf
new file mode 100644
index 0000000..2bd7892
--- /dev/null
+++ b/80-rhel/config_files/common/vconsole.conf
@@ -0,0 +1,2 @@
+KEYMAP=us
+FONT=eurlatgr
diff --git a/80-rhel/config_files/ppc/bootinfo.txt b/80-rhel/config_files/ppc/bootinfo.txt
new file mode 100644
index 0000000..6eac6c4
--- /dev/null
+++ b/80-rhel/config_files/ppc/bootinfo.txt
@@ -0,0 +1,170 @@
+
+grub 2.00
+grub 2.00
+boot &device;:\boot\grub\powerpc-ieee1275\core.elf
+
+ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00
diff --git a/80-rhel/config_files/ppc/grub.cfg.in b/80-rhel/config_files/ppc/grub.cfg.in
new file mode 100644
index 0000000..1b14ede
--- /dev/null
+++ b/80-rhel/config_files/ppc/grub.cfg.in
@@ -0,0 +1,30 @@
+set default=0
+set timeout=60
+
+echo -e "\nWelcome to the @PRODUCT@ @VERSION@ installer!\n\n"
+
+menuentry "Install @PRODUCT@ @VERSION@ (64-bit kernel)" --class fedora --class gnu-linux --class gnu --class os {
+ linux /ppc/ppc64/vmlinuz @ROOT@ ro
+ initrd /ppc/ppc64/initrd.img
+}
+
+menuentry "Test this media & install @PRODUCT@ @VERSION@ (64-bit kernel)" --class fedora --class gnu-linux --class gnu --class os {
+ linux /ppc/ppc64/vmlinuz @ROOT@ rd.live.check ro
+ initrd /ppc/ppc64/initrd.img
+}
+
+menuentry "Rescue a @PRODUCT@ system (64-bit kernel)" --class fedora --class gnu-linux --class gnu --class os {
+ linux /ppc/ppc64/vmlinuz @ROOT@ inst.rescue ro
+ initrd /ppc/ppc64/initrd.img
+}
+
+submenu 'Other options...' {
+ menuentry 'Reboot' {
+ reboot
+ }
+
+ menuentry 'Exit to Open Firmware' {
+ exit
+ }
+}
+
diff --git a/80-rhel/config_files/s390/cdboot.prm b/80-rhel/config_files/s390/cdboot.prm
new file mode 100644
index 0000000..80c034b
--- /dev/null
+++ b/80-rhel/config_files/s390/cdboot.prm
@@ -0,0 +1 @@
+ro @ROOT@
diff --git a/80-rhel/config_files/s390/generic.ins b/80-rhel/config_files/s390/generic.ins
new file mode 100644
index 0000000..756d2ff
--- /dev/null
+++ b/80-rhel/config_files/s390/generic.ins
@@ -0,0 +1,5 @@
+* minimal lpar ins file
+images/kernel.img 0x00000000
+images/initrd.img @INITRD_LOAD_ADDRESS@
+images/genericdvd.prm 0x00010480
+images/initrd.addrsize 0x00010408
diff --git a/80-rhel/config_files/s390/generic.prm b/80-rhel/config_files/s390/generic.prm
new file mode 100644
index 0000000..e1dc397
--- /dev/null
+++ b/80-rhel/config_files/s390/generic.prm
@@ -0,0 +1 @@
+ro ramdisk_size=40000 cio_ignore=all,!condev
diff --git a/80-rhel/config_files/s390/genericdvd.prm b/80-rhel/config_files/s390/genericdvd.prm
new file mode 100644
index 0000000..b5d2731
--- /dev/null
+++ b/80-rhel/config_files/s390/genericdvd.prm
@@ -0,0 +1 @@
+ro ramdisk_size=40000 cio_ignore=all,!condev rd.cmdline=ask
diff --git a/80-rhel/config_files/s390/redhat.exec b/80-rhel/config_files/s390/redhat.exec
new file mode 100644
index 0000000..f1e5931
--- /dev/null
+++ b/80-rhel/config_files/s390/redhat.exec
@@ -0,0 +1,9 @@
+/* */
+'CL RDR'
+'PURGE RDR ALL'
+'SPOOL PUNCH * RDR'
+'PUNCH KERNEL IMG A (NOH'
+'PUNCH GENERIC PRM A (NOH'
+'PUNCH INITRD IMG A (NOH'
+'CH RDR ALL KEEP NOHOLD'
+'I 00C'
diff --git a/80-rhel/config_files/sparc/boot.msg b/80-rhel/config_files/sparc/boot.msg
new file mode 100644
index 0000000..ed74246
--- /dev/null
+++ b/80-rhel/config_files/sparc/boot.msg
@@ -0,0 +1,9 @@
+[H[J
+ Welcome to @PRODUCT@ @VERSION@!
+
+ - To install in graphical mode, press the [7m[m key.
+
+ - To install in text mode, type: [7mlinux text [m.
+
+ - To enter rescue mode type: [7mlinux inst.rescue [m.
+
diff --git a/80-rhel/config_files/sparc/silo.conf b/80-rhel/config_files/sparc/silo.conf
new file mode 100644
index 0000000..159ebb7
--- /dev/null
+++ b/80-rhel/config_files/sparc/silo.conf
@@ -0,0 +1,18 @@
+partition=1
+default=linux
+read-write
+timeout=600
+message=/boot/boot.msg
+image[sun4u]=/boot/vmlinuz
+ label=linux
+ alias=install
+ append="@ROOT@"
+ initrd=/boot/initrd.img
+image[sun4u]=/boot/vmlinuz
+ label=text
+ append="@ROOT@ text"
+ initrd=/boot/initrd.img
+image[sun4u]=/boot/vmlinuz
+ label=ks
+ append="@ROOT@ ks"
+ initrd=/boot/initrd.img
diff --git a/80-rhel/config_files/x86/boot.msg b/80-rhel/config_files/x86/boot.msg
new file mode 100644
index 0000000..ff54899
--- /dev/null
+++ b/80-rhel/config_files/x86/boot.msg
@@ -0,0 +1,5 @@
+
+splash.lss
+
+ - Press the 0107 key to begin the installation process.
+
diff --git a/80-rhel/config_files/x86/grub2-bios.cfg b/80-rhel/config_files/x86/grub2-bios.cfg
new file mode 100644
index 0000000..cfca1bf
--- /dev/null
+++ b/80-rhel/config_files/x86/grub2-bios.cfg
@@ -0,0 +1,43 @@
+set default="1"
+
+function load_video {
+ insmod all_video
+}
+
+load_video
+set gfxpayload=keep
+insmod gzio
+insmod part_gpt
+insmod ext2
+insmod chain
+
+set timeout=60
+### END /etc/grub.d/00_header ###
+
+search --no-floppy --set=root -l '@ISOLABEL@'
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Install @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ quiet
+ initrd @INITRDPATH@
+}
+menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ rd.live.check quiet
+ initrd @INITRDPATH@
+}
+submenu 'Troubleshooting -->' {
+ menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ nomodeset quiet
+ initrd @INITRDPATH@
+ }
+ menuentry 'Rescue a @PRODUCT@ system' --class fedora --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ inst.rescue quiet
+ initrd @INITRDPATH@
+ }
+ menuentry 'Boot first drive' --class fedora --class gnu-linux --class gnu --class os {
+ chainloader (hd0)+1
+ }
+ menuentry 'Boot second drive' --class fedora --class gnu-linux --class gnu --class os {
+ chainloader (hd1)+1
+ }
+}
diff --git a/80-rhel/config_files/x86/grub2-efi.cfg b/80-rhel/config_files/x86/grub2-efi.cfg
new file mode 100644
index 0000000..8c9adad
--- /dev/null
+++ b/80-rhel/config_files/x86/grub2-efi.cfg
@@ -0,0 +1,40 @@
+set default="1"
+
+function load_video {
+ insmod efi_gop
+ insmod efi_uga
+ insmod video_bochs
+ insmod video_cirrus
+ insmod all_video
+}
+
+load_video
+set gfxpayload=keep
+insmod gzio
+insmod part_gpt
+insmod ext2
+
+set timeout=60
+### END /etc/grub.d/00_header ###
+
+search --no-floppy --set=root -l '@ISOLABEL@'
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Install @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi @KERNELPATH@ @ROOT@ quiet
+ initrdefi @INITRDPATH@
+}
+menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi @KERNELPATH@ @ROOT@ rd.live.check quiet
+ initrdefi @INITRDPATH@
+}
+submenu 'Troubleshooting -->' {
+ menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi @KERNELPATH@ @ROOT@ nomodeset quiet
+ initrdefi @INITRDPATH@
+ }
+ menuentry 'Rescue a @PRODUCT@ system' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi @KERNELPATH@ @ROOT@ inst.rescue quiet
+ initrdefi @INITRDPATH@
+ }
+}
diff --git a/80-rhel/config_files/x86/isolinux.cfg b/80-rhel/config_files/x86/isolinux.cfg
new file mode 100644
index 0000000..216d36f
--- /dev/null
+++ b/80-rhel/config_files/x86/isolinux.cfg
@@ -0,0 +1,111 @@
+default vesamenu.c32
+timeout 600
+
+display boot.msg
+
+# Clear the screen when exiting the menu, instead of leaving the menu displayed.
+# For vesamenu, this means the graphical background is still displayed without
+# the menu itself for as long as the screen remains in graphics mode.
+menu clear
+menu background splash.png
+menu title @PRODUCT@ @VERSION@
+menu vshift 8
+menu rows 18
+menu margin 8
+#menu hidden
+menu helpmsgrow 15
+menu tabmsgrow 13
+
+# Border Area
+menu color border * #00000000 #00000000 none
+
+# Selected item
+menu color sel 0 #ffffffff #00000000 none
+
+# Title bar
+menu color title 0 #ff7ba3d0 #00000000 none
+
+# Press [Tab] message
+menu color tabmsg 0 #ff3a6496 #00000000 none
+
+# Unselected menu item
+menu color unsel 0 #84b8ffff #00000000 none
+
+# Selected hotkey
+menu color hotsel 0 #84b8ffff #00000000 none
+
+# Unselected hotkey
+menu color hotkey 0 #ffffffff #00000000 none
+
+# Help text
+menu color help 0 #ffffffff #00000000 none
+
+# A scrollbar of some type? Not sure.
+menu color scrollbar 0 #ffffffff #ff355594 none
+
+# Timeout msg
+menu color timeout 0 #ffffffff #00000000 none
+menu color timeout_msg 0 #ffffffff #00000000 none
+
+# Command prompt text
+menu color cmdmark 0 #84b8ffff #00000000 none
+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@ @VERSION@
+ kernel vmlinuz
+ append initrd=initrd.img @ROOT@ quiet
+
+label check
+ menu label Test this ^media & install @PRODUCT@ @VERSION@
+ menu default
+ kernel vmlinuz
+ append initrd=initrd.img @ROOT@ rd.live.check quiet
+
+menu separator # insert an empty line
+
+# utilities submenu
+menu begin ^Troubleshooting
+ menu title Troubleshooting @PRODUCT@ @VERSION@
+
+label basic
+ menu indent count 5
+ menu label Install using ^basic graphics mode
+ text help
+ Try this option out if you're having trouble installing
+ @PRODUCT@ @VERSION@.
+ endtext
+ kernel vmlinuz
+ append initrd=initrd.img @ROOT@ nomodeset quiet
+
+label rescue
+ menu indent count 5
+ menu label ^Rescue a @PRODUCT@ system
+ text help
+ If the system will not boot, this lets you access files
+ and edit config files to try to get it booting again.
+ endtext
+ kernel vmlinuz
+ append initrd=initrd.img @ROOT@ inst.rescue quiet
+
+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
diff --git a/80-rhel/efi.tmpl b/80-rhel/efi.tmpl
new file mode 100644
index 0000000..80600d2
--- /dev/null
+++ b/80-rhel/efi.tmpl
@@ -0,0 +1,57 @@
+<%page args="configdir, KERNELDIR, efiarch32, efiarch64, isolabel"/>
+<%
+EFIBOOTDIR="EFI/BOOT"
+APPLE_EFI_ICON=inroot+"/usr/share/pixmaps/bootloader/fedora.icns"
+APPLE_EFI_DISKNAME=inroot+"/usr/share/pixmaps/bootloader/fedora-media.vol"
+%>
+
+mkdir ${EFIBOOTDIR}
+mkdir ${EFIBOOTDIR}/fonts/
+%if efiarch64:
+install boot/efi/EFI/*/shim${efiarch64|lower}.efi ${EFIBOOTDIR}/BOOT${efiarch64}.EFI
+install boot/efi/EFI/*/mm${efiarch64|lower}.efi ${EFIBOOTDIR}/
+install boot/efi/EFI/*/gcd${efiarch64|lower}.efi ${EFIBOOTDIR}/grub${efiarch64|lower}.efi
+%endif
+%if efiarch32:
+install boot/efi/EFI/*/shim${efiarch32|lower}.efi ${EFIBOOTDIR}/BOOT${efiarch32}.EFI
+install boot/efi/EFI/*/mm${efiarch32|lower}.efi ${EFIBOOTDIR}/
+install boot/efi/EFI/*/gcd${efiarch32|lower}.efi ${EFIBOOTDIR}/grub${efiarch32|lower}.efi
+%endif
+install usr/share/grub/unicode.pf2 ${EFIBOOTDIR}/fonts/
+
+## actually make the EFI images
+${make_efiboot("images/efiboot.img")}
+
+## This is kinda gross, but then... so's EFI.
+<%def name="make_efiboot(img, include_kernel=False, disk=False, imgtype='default')">
+ <%
+ kdir = EFIBOOTDIR if include_kernel else KERNELDIR
+ eficonf = "%s/grub.cfg" % (EFIBOOTDIR, )
+ args = "--label=ANACONDA --debug"
+ if disk: args += " --disk"
+ %>
+ %if include_kernel:
+ copy ${KERNELDIR}/vmlinuz ${EFIBOOTDIR}
+ copy ${KERNELDIR}/initrd.img ${EFIBOOTDIR}
+ %endif
+ install ${configdir}/grub2-efi.cfg ${eficonf}
+ replace @PRODUCT@ '${product.name}' ${eficonf}
+ replace @VERSION@ ${product.version} ${eficonf}
+ replace @KERNELNAME@ vmlinuz ${eficonf}
+ replace @KERNELPATH@ /${kdir}/vmlinuz ${eficonf}
+ replace @INITRDPATH@ /${kdir}/initrd.img ${eficonf}
+ replace @ISOLABEL@ '${isolabel}' ${eficonf}
+ %if disk:
+ replace @ROOT@ inst.stage2=hd:LABEL=ANACONDA ${eficonf}
+ %else:
+ replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${eficonf}
+ %endif
+ %if efiarch32 == 'IA32':
+ copy ${eficonf} ${EFIBOOTDIR}/BOOT.conf
+ %endif
+ runcmd mkefiboot ${args} ${outroot}/${EFIBOOTDIR} ${outroot}/${img}
+ %if include_kernel:
+ remove ${EFIBOOTDIR}/vmlinuz
+ remove ${EFIBOOTDIR}/initrd.img
+ %endif
+%def>
diff --git a/80-rhel/live/aarch64.tmpl b/80-rhel/live/aarch64.tmpl
new file mode 100644
index 0000000..d1a3f87
--- /dev/null
+++ b/80-rhel/live/aarch64.tmpl
@@ -0,0 +1,84 @@
+<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel, extra_boot_args"/>
+<%
+configdir="tmp/config_files/aarch64"
+PXEBOOTDIR="images/pxeboot"
+KERNELDIR=PXEBOOTDIR
+LIVEDIR="LiveOS"
+LORAXDIR="usr/share/lorax/"
+
+## 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)
+
+import os
+from os.path import basename
+from pylorax.sysutils import joinpaths
+
+# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
+if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
+ isoargs = "-iso-level 3"
+else:
+ isoargs = ""
+%>
+
+mkdir ${LIVEDIR}
+install ${runtime_img} ${LIVEDIR}/squashfs.img
+treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
+
+## install kernels
+mkdir ${KERNELDIR}
+%for kernel in kernels:
+ ## normal aarch64
+ installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
+ installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+%endfor
+
+#FIXME: this will need adjusted when we have a real bootloader.
+## WHeeeeeeee, EFI.
+## We could remove the basearch restriction someday..
+<% efiargs=""; efigraft="" %>
+%if exists("boot/efi/EFI/*/gcdaa64.efi"):
+ <%
+ efiarch32 = None
+ efiarch64 = 'AA64'
+ efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
+ images = ["images/efiboot.img"]
+ %>
+ %for img in images:
+ <%
+ efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img)
+ efigraft += " {0}={1}/{0}".format(img,outroot)
+ %>
+ treeinfo images-${basearch} ${img|basename} ${img}
+ %endfor
+ <%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
+<% filegraft=""; images=["product", "updates"] %>
+%for img in images:
+ %if exists("%s/%s/" % (LORAXDIR, img)):
+ installimg ${LORAXDIR}/${img}/ images/${img}.img
+ treeinfo images-${basearch} ${img}.img images/${img}.img
+ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
+ %endif
+%endfor
+
+# Add the license files
+%for f in glob("usr/share/licenses/*-release-common/*"):
+ install ${f} ${f|basename}
+ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
+%endfor
+
+%if exists("boot/efi/EFI/*/gcdaa64.efi"):
+## make boot.iso
+runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
+ ${efiargs} -R -J -V '${isolabel}' \
+ -graft-points \
+ ${KERNELDIR}=${outroot}/${KERNELDIR} \
+ ${LIVEDIR}=${outroot}/${LIVEDIR} \
+ ${efigraft} ${filegraft}
+treeinfo images-${basearch} boot.iso images/boot.iso
+%endif
diff --git a/80-rhel/live/config_files/aarch64/grub2-efi.cfg b/80-rhel/live/config_files/aarch64/grub2-efi.cfg
new file mode 100644
index 0000000..c874547
--- /dev/null
+++ b/80-rhel/live/config_files/aarch64/grub2-efi.cfg
@@ -0,0 +1,42 @@
+set default="1"
+
+function load_video {
+ if [ x$feature_all_video_module = xy ]; then
+ insmod all_video
+ else
+ insmod efi_gop
+ insmod efi_uga
+ insmod ieee1275_fb
+ insmod vbe
+ insmod vga
+ insmod video_bochs
+ insmod video_cirrus
+ fi
+}
+
+load_video
+set gfxpayload=keep
+insmod gzio
+insmod part_gpt
+insmod ext2
+
+set timeout=60
+### END /etc/grub.d/00_header ###
+
+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@ @EXTRA@ rd.live.image quiet rhgb
+ initrd @INITRDPATH@
+}
+menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
+ 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@ @EXTRA@ rd.live.image nomodeset quiet rhgb
+ initrd @INITRDPATH@
+ }
+}
diff --git a/80-rhel/live/config_files/ppc/bootinfo.txt b/80-rhel/live/config_files/ppc/bootinfo.txt
new file mode 100644
index 0000000..6eac6c4
--- /dev/null
+++ b/80-rhel/live/config_files/ppc/bootinfo.txt
@@ -0,0 +1,170 @@
+
+grub 2.00
+grub 2.00
+boot &device;:\boot\grub\powerpc-ieee1275\core.elf
+
+ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00
diff --git a/80-rhel/live/config_files/ppc/grub.cfg.in b/80-rhel/live/config_files/ppc/grub.cfg.in
new file mode 100644
index 0000000..27b8837
--- /dev/null
+++ b/80-rhel/live/config_files/ppc/grub.cfg.in
@@ -0,0 +1,24 @@
+set default=0
+set timeout=5
+
+echo -e "\nWelcome to the @PRODUCT@ @VERSION@ installer!\n\n"
+
+menuentry "Start @PRODUCT@ @VERSION@ (64-bit kernel)" --class fedora --class gnu-linux --class gnu --class os {
+ linux /ppc/ppc64/vmlinuz @ROOT@ @EXTRA@ ro rd.live.image quiet rhgb
+ initrd /ppc/ppc64/initrd.img
+}
+
+menuentry "Test this media & start @PRODUCT@ @VERSION@ (64-bit kernel)" --class fedora --class gnu-linux --class gnu --class os {
+ linux /ppc/ppc64/vmlinuz @ROOT@ @EXTRA@ rd.live.image rd.live.check ro quiet
+ initrd /ppc/ppc64/initrd.img
+}
+
+submenu 'Other options...' {
+ menuentry 'Reboot' {
+ reboot
+ }
+
+ menuentry 'Exit to Open Firmware' {
+ exit
+ }
+}
diff --git a/80-rhel/live/config_files/s390/cdboot.prm b/80-rhel/live/config_files/s390/cdboot.prm
new file mode 100644
index 0000000..5f572d2
--- /dev/null
+++ b/80-rhel/live/config_files/s390/cdboot.prm
@@ -0,0 +1 @@
+ro @ROOT@ rd.live.image @EXTRA@
diff --git a/80-rhel/live/config_files/s390/generic.ins b/80-rhel/live/config_files/s390/generic.ins
new file mode 100644
index 0000000..756d2ff
--- /dev/null
+++ b/80-rhel/live/config_files/s390/generic.ins
@@ -0,0 +1,5 @@
+* minimal lpar ins file
+images/kernel.img 0x00000000
+images/initrd.img @INITRD_LOAD_ADDRESS@
+images/genericdvd.prm 0x00010480
+images/initrd.addrsize 0x00010408
diff --git a/80-rhel/live/config_files/s390/generic.prm b/80-rhel/live/config_files/s390/generic.prm
new file mode 100644
index 0000000..4f9ba38
--- /dev/null
+++ b/80-rhel/live/config_files/s390/generic.prm
@@ -0,0 +1 @@
+ro ramdisk_size=40000 cio_ignore=all,!condev @EXTRA@
diff --git a/80-rhel/live/config_files/s390/genericdvd.prm b/80-rhel/live/config_files/s390/genericdvd.prm
new file mode 100644
index 0000000..b5d2731
--- /dev/null
+++ b/80-rhel/live/config_files/s390/genericdvd.prm
@@ -0,0 +1 @@
+ro ramdisk_size=40000 cio_ignore=all,!condev rd.cmdline=ask
diff --git a/80-rhel/live/config_files/s390/redhat.exec b/80-rhel/live/config_files/s390/redhat.exec
new file mode 100644
index 0000000..f1e5931
--- /dev/null
+++ b/80-rhel/live/config_files/s390/redhat.exec
@@ -0,0 +1,9 @@
+/* */
+'CL RDR'
+'PURGE RDR ALL'
+'SPOOL PUNCH * RDR'
+'PUNCH KERNEL IMG A (NOH'
+'PUNCH GENERIC PRM A (NOH'
+'PUNCH INITRD IMG A (NOH'
+'CH RDR ALL KEEP NOHOLD'
+'I 00C'
diff --git a/80-rhel/live/config_files/x86/grub2-bios.cfg b/80-rhel/live/config_files/x86/grub2-bios.cfg
new file mode 100644
index 0000000..73d0a56
--- /dev/null
+++ b/80-rhel/live/config_files/x86/grub2-bios.cfg
@@ -0,0 +1,39 @@
+set default="1"
+
+function load_video {
+ insmod all_video
+}
+
+load_video
+set gfxpayload=keep
+insmod gzio
+insmod part_gpt
+insmod ext2
+insmod chain
+
+set timeout=60
+### END /etc/grub.d/00_header ###
+
+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 {
+ linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet rhgb
+ initrd @INITRDPATH@
+}
+menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet
+ initrd @INITRDPATH@
+}
+submenu 'Troubleshooting -->' {
+ menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
+ linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image nomodeset vga=791 quiet rhgb
+ initrd @INITRDPATH@
+ }
+ menuentry 'Boot first drive' --class fedora --class gnu-linux --class gnu --class os {
+ chainloader (hd0)+1
+ }
+ menuentry 'Boot second drive' --class fedora --class gnu-linux --class gnu --class os {
+ chainloader (hd1)+1
+ }
+}
diff --git a/80-rhel/live/config_files/x86/grub2-efi.cfg b/80-rhel/live/config_files/x86/grub2-efi.cfg
new file mode 100644
index 0000000..3906958
--- /dev/null
+++ b/80-rhel/live/config_files/x86/grub2-efi.cfg
@@ -0,0 +1,36 @@
+set default="1"
+
+function load_video {
+ insmod efi_gop
+ insmod efi_uga
+ insmod video_bochs
+ insmod video_cirrus
+ insmod all_video
+}
+
+load_video
+set gfxpayload=keep
+insmod gzio
+insmod part_gpt
+insmod ext2
+
+set timeout=60
+### END /etc/grub.d/00_header ###
+
+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@ @EXTRA@ rd.live.image quiet rhgb
+ initrdefi @INITRDPATH@
+}
+menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
+ 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@ @EXTRA@ rd.live.image nomodeset quiet rhgb
+ initrdefi @INITRDPATH@
+ }
+}
diff --git a/80-rhel/live/efi.tmpl b/80-rhel/live/efi.tmpl
new file mode 100644
index 0000000..813f91e
--- /dev/null
+++ b/80-rhel/live/efi.tmpl
@@ -0,0 +1,58 @@
+<%page args="configdir, KERNELDIR, efiarch32, efiarch64, isolabel, extra_boot_args"/>
+<%
+EFIBOOTDIR="EFI/BOOT"
+APPLE_EFI_ICON=inroot+"/usr/share/pixmaps/bootloader/fedora.icns"
+APPLE_EFI_DISKNAME=inroot+"/usr/share/pixmaps/bootloader/fedora-media.vol"
+%>
+
+mkdir ${EFIBOOTDIR}
+mkdir ${EFIBOOTDIR}/fonts/
+%if efiarch64:
+install boot/efi/EFI/*/shim${efiarch64|lower}.efi ${EFIBOOTDIR}/BOOT${efiarch64}.EFI
+install boot/efi/EFI/*/mm${efiarch64|lower}.efi ${EFIBOOTDIR}/
+install boot/efi/EFI/*/gcd${efiarch64|lower}.efi ${EFIBOOTDIR}/grub${efiarch64|lower}.efi
+%endif
+%if efiarch32:
+install boot/efi/EFI/*/shim${efiarch32|lower}.efi ${EFIBOOTDIR}/BOOT${efiarch32}.EFI
+install boot/efi/EFI/*/mm${efiarch32|lower}.efi ${EFIBOOTDIR}/
+install boot/efi/EFI/*/gcd${efiarch32|lower}.efi ${EFIBOOTDIR}/grub${efiarch32|lower}.efi
+%endif
+install usr/share/grub/unicode.pf2 ${EFIBOOTDIR}/fonts/
+
+## actually make the EFI images
+${make_efiboot("images/efiboot.img")}
+
+## This is kinda gross, but then... so's EFI.
+<%def name="make_efiboot(img, include_kernel=False, disk=False, imgtype='default')">
+ <%
+ kdir = EFIBOOTDIR if include_kernel else KERNELDIR
+ eficonf = "%s/grub.cfg" % (EFIBOOTDIR, )
+ args = "--label=ANACONDA"
+ if disk: args += " --disk"
+ %>
+ %if include_kernel:
+ copy ${KERNELDIR}/vmlinuz ${EFIBOOTDIR}
+ copy ${KERNELDIR}/initrd.img ${EFIBOOTDIR}
+ %endif
+ install ${configdir}/grub2-efi.cfg ${eficonf}
+ replace @PRODUCT@ '${product.name}' ${eficonf}
+ replace @VERSION@ ${product.version} ${eficonf}
+ replace @KERNELNAME@ vmlinuz ${eficonf}
+ 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:
+ replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${eficonf}
+ %endif
+ %if efiarch32 == 'IA32':
+ copy ${eficonf} ${EFIBOOTDIR}/BOOT.conf
+ %endif
+ runcmd mkefiboot ${args} ${outroot}/${EFIBOOTDIR} ${outroot}/${img}
+ %if include_kernel:
+ remove ${EFIBOOTDIR}/vmlinuz
+ remove ${EFIBOOTDIR}/initrd.img
+ %endif
+%def>
diff --git a/80-rhel/live/live-install.tmpl b/80-rhel/live/live-install.tmpl
new file mode 100644
index 0000000..ef514ee
--- /dev/null
+++ b/80-rhel/live/live-install.tmpl
@@ -0,0 +1,25 @@
+## livemedia-creator: Install packages needed for iso creation using per-arch templates
+<%page args="basearch"/>
+
+## arch-specific bootloader packages
+%if basearch == "aarch64":
+ installpkg efibootmgr
+ installpkg grub2-efi-aa64-cdboot shim-aa64
+%endif
+%if basearch == "x86_64":
+ installpkg grub2-tools-efi
+ installpkg efibootmgr
+ installpkg shim-x64 grub2-efi-x64-cdboot
+ installpkg shim-ia32 grub2-efi-ia32-cdboot
+ installpkg biosdevname
+ installpkg grub2-tools grub2-tools-minimal grub2-tools-extra
+ installpkg grub2-pc-modules
+%endif
+%if basearch == "ppc64le":
+ installpkg powerpc-utils
+ installpkg grub2-tools grub2-tools-minimal grub2-tools-extra
+ installpkg grub2-${basearch}
+%endif
+%if basearch == "s390x":
+ installpkg s390utils-base
+%endif
diff --git a/80-rhel/live/ppc64le.tmpl b/80-rhel/live/ppc64le.tmpl
new file mode 100644
index 0000000..0c743f2
--- /dev/null
+++ b/80-rhel/live/ppc64le.tmpl
@@ -0,0 +1,94 @@
+<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product, isolabel, extra_boot_args"/>
+<%
+configdir="tmp/config_files/ppc"
+BOOTDIR="ppc"
+GRUBDIR="boot/grub"
+LIVEDIR="LiveOS"
+LORAXDIR="usr/share/lorax/"
+
+## 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)
+
+import os
+from os.path import basename
+from pylorax.sysutils import joinpaths
+
+# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
+if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
+ isoargs = "-iso-level 3"
+else:
+ isoargs = ""
+%>
+
+mkdir ${LIVEDIR}
+install ${runtime_img} ${LIVEDIR}/squashfs.img
+treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
+
+## install the bootloaders
+## ppc/chrp: for normal PPC systems.
+## uses /ppc/bootinfo.txt in the iso root
+## uses /boot/grub/grub.cfg in the iso root
+mkdir ${BOOTDIR}
+## boot stuff for normal (CHRP/PREP) PPC systems
+install ${configdir}/bootinfo.txt ${BOOTDIR}
+
+mkdir ${GRUBDIR}/powerpc-ieee1275
+install /usr/lib/grub/powerpc-ieee1275/core.elf ${GRUBDIR}/powerpc-ieee1275
+install /usr/lib/grub/powerpc-ieee1275/*.mod ${GRUBDIR}/powerpc-ieee1275
+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@ 'root=live:CDLABEL=${isolabel|udev}' ${GRUBDIR}/grub.cfg
+replace @EXTRA@ '${extra_boot_args}' ${GRUBDIR}/grub.cfg
+
+## Install kernel and bootloader config (in separate places for each arch)
+%for kernel in kernels:
+ <%
+ bits = 64
+ ## separate dirs/images for each arch
+ KERNELDIR=BOOTDIR+"/ppc%s" % bits
+ %>
+ ## install kernel
+ mkdir ${KERNELDIR}
+ installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
+ installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+
+ treeinfo images-${kernel.arch} zimage
+%endfor
+
+# Create optional product.img and updates.img
+<% filegraft=""; images=["product", "updates"] %>
+%for img in images:
+ %if exists("%s/%s/" % (LORAXDIR, img)):
+ installimg ${LORAXDIR}/${img}/ images/${img}.img
+ treeinfo images-${basearch} ${img}.img images/${img}.img
+ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
+ %endif
+%endfor
+
+# Add the license files
+%for f in glob("usr/share/licenses/*-release-common/*"):
+ install ${f} ${f|basename}
+ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
+%endfor
+
+## make boot.iso
+runcmd xorrisofs -v -U -J -R ${isoargs} \
+ -o ${outroot}/images/boot.iso \
+ -r -l -sysid PPC \
+ -A "${product.name} ${product.version}" -V '${isolabel}' \
+ -volset "${product.version}" -volset-size 1 -volset-seqno 1 \
+ -chrp-boot \
+ -graft-points \
+ ${BOOTDIR}=${outroot}/${BOOTDIR} \
+ ${GRUBDIR}=${outroot}/${GRUBDIR} \
+ ${LIVEDIR}=${outroot}/${LIVEDIR} ${filegraft}
+
+%for kernel in kernels:
+ treeinfo images-${kernel.arch} boot.iso images/boot.iso
+%endfor
diff --git a/80-rhel/live/s390.tmpl b/80-rhel/live/s390.tmpl
new file mode 100644
index 0000000..3d2e54b
--- /dev/null
+++ b/80-rhel/live/s390.tmpl
@@ -0,0 +1,91 @@
+<%page args="kernels, runtime_img, runtime_base, basearch, outroot, isolabel, extra_boot_args"/>
+<%
+configdir="tmp/config_files/s390"
+BOOTDIR="images"
+KERNELDIR=BOOTDIR
+INITRD_ADDRESS="0x02000000"
+LIVEDIR="LiveOS"
+LORAXDIR="usr/share/lorax/"
+MKS390IMAGE="/usr/bin/mk-s390image"
+# The assumption seems to be that there is only one s390 kernel, ever
+kernel = kernels[0]
+
+## 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)
+
+from os.path import basename
+import os
+from pylorax.sysutils import joinpaths
+
+# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
+if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
+ isoargs = "-iso-level 3"
+else:
+ isoargs = ""
+%>
+
+mkdir ${LIVEDIR}
+install ${runtime_img} ${LIVEDIR}/squashfs.img
+treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
+
+mkdir ${BOOTDIR}
+## install bootloader (such as it is) and bootloader config
+install ${configdir}/redhat.exec ${BOOTDIR}
+install ${configdir}/generic.prm ${BOOTDIR}
+install ${configdir}/cdboot.prm ${BOOTDIR}
+install ${configdir}/generic.ins .
+
+## configure bootloader
+replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins
+replace @EXTRA@ '${extra_boot_args}' ${BOOTDIR}/generic.prm
+replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${BOOTDIR}/cdboot.prm
+replace @EXTRA@ '${extra_boot_args}' ${BOOTDIR}/cdboot.prm
+
+## install kernel
+installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
+installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+
+## s390 needs some extra boot config
+createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd.addrsize
+
+## s390 also has some special treeinfo data
+treeinfo images-${basearch} initrd.addrsize ${BOOTDIR}/initrd.addrsize
+treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.prm
+treeinfo images-${basearch} generic.ins generic.ins
+treeinfo images-${basearch} redhat.exec ${BOOTDIR}/redhat.exec
+treeinfo images-${basearch} cdboot.prm ${BOOTDIR}/cdboot.prm
+
+# Create optional product.img and updates.img
+<% filegraft=""; images=["product", "updates"] %>
+%for img in images:
+ %if exists("%s/%s/" % (LORAXDIR, img)):
+ installimg ${LORAXDIR}/${img}/ images/${img}.img
+ treeinfo images-${basearch} ${img}.img images/${img}.img
+ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
+ %endif
+%endfor
+
+# Add the license files
+%for f in glob("usr/share/licenses/*-release-common/*"):
+ install ${f} ${f|basename}
+ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
+%endfor
+
+## Make a combined kernel+initrd image for the iso
+runcmd ${MKS390IMAGE} ${outroot}/${KERNELDIR}/kernel.img \
+ ${outroot}/${BOOTDIR}/cdboot.img \
+ -r ${outroot}/${KERNELDIR}/initrd.img \
+ -p ${outroot}/${BOOTDIR}/cdboot.prm
+
+## make boot.iso
+runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
+ -b ${BOOTDIR}/cdboot.img -c ${BOOTDIR}/boot.cat \
+ -boot-load-size 4 -no-emul-boot \
+ -R -J -V '${isolabel}' -graft-points \
+ ${BOOTDIR}=${outroot}/${BOOTDIR} \
+ ${LIVEDIR}=${outroot}/${LIVEDIR} \
+ ${filegraft}
+treeinfo images-${basearch} boot.iso images/boot.iso
diff --git a/80-rhel/live/x86.tmpl b/80-rhel/live/x86.tmpl
new file mode 100644
index 0000000..cf4dad4
--- /dev/null
+++ b/80-rhel/live/x86.tmpl
@@ -0,0 +1,122 @@
+<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel, extra_boot_args"/>
+<%
+configdir="tmp/config_files/x86"
+PXEBOOTDIR="images/pxeboot"
+KERNELDIR=PXEBOOTDIR
+GRUB2DIR="boot/grub2"
+LIVEDIR="LiveOS"
+LORAXDIR="usr/share/lorax/"
+
+## 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)
+
+import os
+from os.path import basename
+from pylorax.sysutils import joinpaths
+
+# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
+if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
+ isoargs = "-iso-level 3"
+else:
+ isoargs = ""
+%>
+
+mkdir ${LIVEDIR}
+install ${runtime_img} ${LIVEDIR}/squashfs.img
+treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
+
+## install kernels
+mkdir ${KERNELDIR}
+%for kernel in kernels:
+ %if kernel.flavor:
+ installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
+ installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
+ %else:
+ installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
+ installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+ %endif
+%endfor
+
+%if basearch == 'x86_64':
+ treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
+ treeinfo images-xen initrd ${KERNELDIR}/initrd.img
+%endif
+
+## configure grub2 config file
+mkdir ${GRUB2DIR}
+install ${configdir}/grub2-bios.cfg ${GRUB2DIR}/grub.cfg
+replace @VERSION@ ${product.version} ${GRUB2DIR}/grub.cfg
+replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
+replace @KERNELPATH@ /${KERNELDIR}/vmlinuz ${GRUB2DIR}/grub.cfg
+replace @INITRDPATH@ /${KERNELDIR}/initrd.img ${GRUB2DIR}/grub.cfg
+replace @ISOLABEL@ '${isolabel}' ${GRUB2DIR}/grub.cfg
+replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${GRUB2DIR}/grub.cfg
+replace @EXTRA@ '${extra_boot_args}' ${GRUB2DIR}/grub.cfg
+
+
+## WHeeeeeeee, EFI.
+<% efiargs=""; efigraft=""; efiarch32=None; efiarch64=None %>
+%if exists("boot/efi/EFI/*/gcdia32.efi"):
+ <% efiarch32 = 'IA32' %>
+%endif
+%if exists("boot/efi/EFI/*/gcdx64.efi"):
+ <% efiarch64 = 'X64' %>
+%endif
+%if (efiarch32 or efiarch64):
+ <%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
+<% filegraft=""; images=["product", "updates"]; compressargs=""; %>
+%for img in images:
+ %if exists("%s/%s/" % (LORAXDIR, img)):
+ installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img
+ treeinfo images-${basearch} ${img}.img images/${img}.img
+ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
+ %endif
+%endfor
+
+# Add the license files
+%for f in glob("usr/share/licenses/*-release-common/*"):
+ install ${f} ${f|basename}
+ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
+%endfor
+
+# Add the livecd-iso-to-disk script if installed
+<% f = "usr/bin/livecd-iso-to-disk" %>
+%if exists(f):
+ install ${f} ${LIVEDIR}/${f|basename}
+%endif
+
+## Make images/eltoritio.img
+runcmd grub2-mkimage -O i386-pc-eltorito -d ${inroot}/usr/lib/grub/i386-pc \
+ -o ${outroot}/images/eltorito.img \
+ -p /${GRUB2DIR} \
+ iso9660 biosdisk
+treeinfo images-${basearch} eltorito.img images/eltorito.img
+
+## make boot.iso
+runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
+ -R -J -V '${isolabel}' \
+ --grub2-mbr ${inroot}/usr/lib/grub/i386-pc/boot_hybrid.img \
+ -partition_offset 16 \
+ -appended_part_as_gpt \
+ -append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B ${outroot}/images/efiboot.img \
+ -iso_mbr_part_type EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 \
+ -c boot.cat --boot-catalog-hide \
+ -b images/eltorito.img \
+ -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \
+ -eltorito-alt-boot \
+ -e '--interval:appended_partition_2:all::' -no-emul-boot \
+ -graft-points \
+ ${KERNELDIR}=${outroot}/${KERNELDIR} \
+ ${LIVEDIR}=${outroot}/${LIVEDIR} \
+ ${filegraft} \
+ ${GRUB2DIR}=${outroot}/${GRUB2DIR} \
+ ${GRUB2DIR}/i386-pc=${inroot}/usr/lib/grub/i386-pc \
+ images/eltorito.img=${outroot}/images/eltorito.img \
+ EFI/BOOT=${outroot}/EFI/BOOT
+treeinfo images-${basearch} boot.iso images/boot.iso
diff --git a/80-rhel/ppc64le.tmpl b/80-rhel/ppc64le.tmpl
new file mode 100644
index 0000000..802ba9d
--- /dev/null
+++ b/80-rhel/ppc64le.tmpl
@@ -0,0 +1,101 @@
+<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product, isolabel"/>
+<%
+configdir="tmp/config_files/ppc"
+BOOTDIR="ppc"
+GRUBDIR="boot/grub"
+STAGE2IMG="images/install.img"
+LORAXDIR="usr/share/lorax/"
+
+## 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)
+
+import os
+from os.path import basename
+from pylorax.sysutils import joinpaths
+
+# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
+if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
+ isoargs = "-iso-level 3"
+else:
+ isoargs = ""
+%>
+
+mkdir images
+install ${runtime_img} ${STAGE2IMG}
+treeinfo stage2 mainimage ${STAGE2IMG}
+
+## install the bootloaders
+## ppc/chrp: for normal PPC systems.
+## uses /ppc/bootinfo.txt in the iso root
+## uses /boot/grub/grub.cfg in the iso root
+mkdir ${BOOTDIR}
+## boot stuff for normal (CHRP/PREP) PPC systems
+install ${configdir}/bootinfo.txt ${BOOTDIR}
+
+mkdir ${GRUBDIR}/powerpc-ieee1275
+install /usr/lib/grub/powerpc-ieee1275/core.elf ${GRUBDIR}/powerpc-ieee1275
+install /usr/lib/grub/powerpc-ieee1275/*.mod ${GRUBDIR}/powerpc-ieee1275
+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@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${GRUBDIR}/grub.cfg
+
+## Install kernel and bootloader config (in separate places for each arch)
+%for kernel in kernels:
+ <%
+ bits = 64
+ ## separate dirs/images for each arch
+ KERNELDIR=BOOTDIR+"/ppc%s" % bits
+ %>
+ ## install kernel
+ mkdir ${KERNELDIR}
+ installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
+ installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+
+ treeinfo images-${kernel.arch} zimage
+%endfor
+
+# Create optional product.img and updates.img
+<% filegraft=""; images=["product", "updates"] %>
+%for img in images:
+ %if exists("%s/%s/" % (LORAXDIR, img)):
+ installimg ${LORAXDIR}/${img}/ images/${img}.img
+ treeinfo images-${basearch} ${img}.img images/${img}.img
+ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
+ %endif
+%endfor
+
+# Inherit iso-graft/ if it exists from external templates
+<%
+ import os
+ if os.path.exists(workdir + "/iso-graft"):
+ filegraft += " " + workdir + "/iso-graft"
+%>
+
+# Add the license files
+%for f in glob("usr/share/licenses/*-release-common/*"):
+ install ${f} ${f|basename}
+ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
+%endfor
+
+## make boot.iso
+runcmd xorrisofs -v -U -J -R ${isoargs} \
+ -o ${outroot}/images/boot.iso \
+ -r -l -sysid PPC \
+ -A "${product.name} ${product.version}" -V '${isolabel}' \
+ -volset "${product.version}" -volset-size 1 -volset-seqno 1 \
+ -chrp-boot \
+ -graft-points \
+ .discinfo=${outroot}/.discinfo \
+ ${BOOTDIR}=${outroot}/${BOOTDIR} \
+ ${GRUBDIR}=${outroot}/${GRUBDIR} \
+ ${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft}
+
+%for kernel in kernels:
+ treeinfo images-${kernel.arch} boot.iso images/boot.iso
+%endfor
diff --git a/80-rhel/pxe-live/pxe-config.tmpl b/80-rhel/pxe-live/pxe-config.tmpl
new file mode 100644
index 0000000..6b841bb
--- /dev/null
+++ b/80-rhel/pxe-live/pxe-config.tmpl
@@ -0,0 +1,3 @@
+# PXE configuration template generated by livemedia-creator
+kernel ${kernel}
+append initrd=${initrd} root=live:/${liveimg} ${addargs}
diff --git a/80-rhel/runtime-cleanup.tmpl b/80-rhel/runtime-cleanup.tmpl
new file mode 100644
index 0000000..cdfbeb3
--- /dev/null
+++ b/80-rhel/runtime-cleanup.tmpl
@@ -0,0 +1,370 @@
+## lorax template file: cleanup for the ramdisk (runtime image)
+<%page args="libdir, branding, root"/>
+
+## remove the sources
+remove usr/share/i18n
+
+## not required packages installed as dependencies
+## perl is needed on s390x
+## perl needed for powerpc-utils
+## perl is needed by /usr/bin/rxe_cfg from libibverbs
+
+## we don't create new initramfs/bootloader conf inside anaconda
+## (that happens inside the target system after we install dracut/grubby)
+removepkg dracut-network grubby anaconda-dracut
+## In order to execute the /usr move on upgrades we need convertfs from dracut
+## We also need dracut-shutdown.service and dracut-initramfs-restore to reboot
+removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh \
+ /usr/lib/dracut/modules.d/99base/dracut-lib.sh \
+ /usr/lib/systemd/* /usr/lib/dracut/modules.d/98dracut-systemd/*.service \
+ /usr/lib/dracut/dracut-initramfs-restore
+## we don't run SELinux (not in enforcing, anyway)
+removepkg selinux-policy libselinux-utils
+
+## selinux checks for the /etc/selinux/config file's existance
+## The removepkg above removes it, create an empty one. See rhbz#1243168
+append etc/selinux/config ""
+
+## keep enough of shadow-utils to create accounts
+removefrom shadow-utils --allbut /usr/bin/chage /usr/sbin/chpasswd \
+ /usr/sbin/groupadd /usr/sbin/useradd
+
+## no services to turn on/off (keep the /etc/init.d link though)
+removefrom initscripts /usr/sbin/* /usr/share/locale/* /usr/share/doc/* /usr/share/man/*
+
+## no storage device monitoring
+removepkg device-mapper-event
+## logrotate isn't useful in anaconda
+remove /etc/logrotate.d
+## anaconda needs this to do media check
+removefrom isomd5sum --allbut /usr/bin/checkisomd5
+
+## there's no need for a bunch of zsh files without zsh,
+## systemd-analyze is quite large and not essential
+removefrom systemd /usr/bin/systemd-analyze /usr/share/zsh/site-functions/*
+
+## we only need syslinux to make the installer image bootable, we don't
+## run anything from it that uses mtools, and that's the only thing
+## that pulls in glibc-gconv-extra
+removepkg mtools glibc-gconv-extra
+
+## various other things we remove to save space
+removepkg diffutils file
+removepkg lvm2-libs
+removepkg mobile-broadband-provider-info
+removepkg rmt rpcbind squashfs-tools
+removepkg xml-common
+removepkg mkfontscale fonttosfnt
+# do not remove this, required for ppc64le and s390x !!!
+removepkg ncurses
+
+## other removals
+remove /home /media /opt /srv /tmp/*
+remove /usr/etc /usr/games /usr/local /usr/tmp
+remove /usr/share/doc /usr/share/info /usr/share/man /usr/share/gnome
+remove /usr/share/mime/application /usr/share/mime/audio /usr/share/mime/image
+remove /usr/share/mime/inode /usr/share/mime/message /usr/share/mime/model
+remove /usr/share/mime/multipart /usr/share/mime/packages /usr/share/mime/text
+remove /usr/share/mime/video /usr/share/mime/x-content /usr/share/mime/x-epoc
+remove /var/db /var/games /var/tmp /var/yp /var/nis /var/opt /var/local
+remove /var/mail /var/spool /var/preserve /var/report
+remove /usr/lib/sysimage/rpm/* /var/lib/rpm/* /var/lib/yum /var/lib/dnf
+## clean up the files created by various '> /dev/null's
+remove /dev/*
+
+## icons cache
+remove /usr/share/icons/*/icon-theme.cache
+
+## clean up kernel modules
+removekmod sound drivers/media drivers/hwmon drivers/iio \
+ net/atm net/bluetooth net/sched net/sctp \
+ net/rds net/l2tp net/decnet net/netfilter net/ipv4 net/ipv6 \
+ drivers/watchdog drivers/rtc drivers/input/joystick \
+ drivers/bluetooth drivers/edac drivers/staging \
+ drivers/usb/serial drivers/usb/host drivers/usb/misc \
+ fs/ocfs2 fs/ceph fs/nfsd fs/ubifs fs/nilfs2 \
+ arch/x86/kvm
+## Need to keep virtio_console.ko and ipmi stuff in drivers/char
+## Also keep virtio-rng so that the installer can get sufficient randomness for
+## LUKS setup. As of 2020-09 this is not built as a module, but keep it in here
+## in case that changes again
+removekmod drivers/char --allbut virtio_console hw_random \
+ virtio-rng ipmi hmcdrv nvram
+removekmod drivers/hid --allbut hid-logitech-dj hid-logitech-hidpp hid-multitouch
+
+## As of 2020-09 most of this are built-in too, but again, keep them listed
+removekmod drivers/video --allbut hyperv_fb syscopyarea sysfillrect sysimgblt fb_sys_fops
+remove lib/modules/*/{build,source,*.map}
+## NOTE: depmod gets re-run after cleanup finishes
+
+## remove unused themes, theme engines, icons, etc.
+removefrom gtk3 /usr/${libdir}/gtk-3.0/*/printbackends/*
+removefrom gtk3 /usr/share/themes/*
+
+## filesystem tools
+removefrom e2fsprogs /usr/share/locale/*
+removefrom xfsprogs /usr/share/locale/* /usr/share/doc/* /usr/share/man/*
+removefrom xfsdump --allbut /usr/sbin/*
+
+## other package specific removals
+removefrom gsettings-desktop-schemas /usr/share/locale/*
+removefrom NetworkManager-libnm /usr/share/locale/*/NetworkManager.mo
+removefrom nm-connection-editor /usr/share/applications/*
+removefrom atk /usr/share/locale/*
+removefrom bash /etc/* /usr/bin/bashbug* /usr/share/*
+removefrom bind-utils /usr/bin/host /usr/bin/nsupdate
+removefrom ca-certificates /etc/pki/java/*
+removefrom ca-certificates /etc/pki/tls/certs/ca-bundle.trust.crt
+removefrom coreutils /usr/bin/link /usr/bin/nice /usr/bin/stty /usr/bin/unlink
+removefrom coreutils /usr/bin/[ /usr/bin/base64 /usr/bin/chcon
+removefrom coreutils /usr/bin/cksum /usr/bin/csplit
+removefrom coreutils /usr/bin/dir /usr/bin/dircolors
+removefrom coreutils /usr/bin/expand /usr/bin/factor
+removefrom coreutils /usr/bin/fold /usr/bin/groups /usr/bin/hostid
+removefrom coreutils /usr/bin/install /usr/bin/join /usr/bin/logname
+removefrom coreutils /usr/bin/mkfifo /usr/bin/nl /usr/bin/nohup /usr/bin/nproc
+removefrom coreutils /usr/bin/pathchk
+removefrom coreutils /usr/bin/pinky /usr/bin/pr /usr/bin/printenv
+removefrom coreutils /usr/bin/printf /usr/bin/ptx /usr/bin/runcon
+removefrom coreutils /usr/bin/sha224sum /usr/bin/sha384sum
+removefrom coreutils /usr/bin/sha512sum /usr/bin/shuf /usr/bin/stat
+removefrom coreutils /usr/bin/stdbuf /usr/bin/sum /usr/bin/test
+removefrom coreutils /usr/bin/timeout /usr/bin/truncate /usr/bin/tsort
+removefrom coreutils /usr/bin/unexpand /usr/bin/users /usr/bin/vdir
+removefrom coreutils /usr/bin/who /usr/bin/whoami /usr/bin/yes
+removefrom coreutils-common /etc/* /usr/share/*
+removefrom cpio /usr/share/*
+removefrom cracklib /usr/sbin/*
+removefrom cracklib-dicts /usr/${libdir}/* /usr/sbin/*
+removefrom cryptsetup /usr/share/*
+removefrom cryptsetup-libs /usr/share/locale/*
+removefrom cyrus-sasl-lib /usr/sbin/* /usr/bin/*
+removefrom dbus-x11 /etc/X11/*
+removefrom dnf /usr/share/locale/*
+removefrom dump /etc/*
+removefrom elfutils-libelf /usr/share/locale/*
+removefrom expat /usr/bin/*
+removefrom fcoe-utils /usr/libexec/fcoe/dcbcheck.sh
+removefrom fcoe-utils /usr/libexec/fcoe/fcc.sh /usr/libexec/fcoe/fcoe-setup.sh
+removefrom fcoe-utils /usr/libexec/fcoe/fcoedump.sh /usr/sbin/fcnsq
+removefrom fcoe-utils /usr/sbin/fcoeadm /usr/sbin/fcping /usr/sbin/fcrls
+removefrom file-libs /usr/share/*
+removefrom findutils /usr/share/*
+removefrom fontconfig /usr/bin/*
+removefrom gawk /usr/libexec/* /usr/share/*
+removefrom gdb /usr/share/* /usr/include/*
+removefrom gdb-headless /usr/share/* /etc/gdbinit*
+removefrom gdk-pixbuf2 /usr/share/locale*
+removefrom glib2 /usr/bin/* /usr/share/locale/*
+removefrom glibc /etc/gai.conf /etc/rpc
+removefrom glibc /${libdir}/libBrokenLocale*
+removefrom glibc /${libdir}/libanl*
+removefrom glibc /${libdir}/libnss_compat*
+# python-pyudev uses ctypes.util.find_library, which uses /sbin/ldconfig
+removefrom glibc /usr/libexec/* /usr/sbin/*
+removefrom glibc-common /usr/bin/gencat
+removefrom glibc-common /usr/bin/getent
+removefrom glibc-common /usr/bin/locale /usr/bin/sprof
+# NB: we keep /usr/bin/localedef so anaconda can inspect payload locale info
+removefrom glibc-common /usr/bin/tzselect
+removefrom glibc-common /usr/sbin/*
+removefrom gnutls /usr/share/locale/*
+removefrom google-noto-sans-cjk-fonts /usr/share/fonts/google-noto-sans-cjk-fonts/NotoSansCJK-{Black,Bold,*Light,Medium,Thin}.ttc
+removefrom google-noto-sans-vf-fonts /usr/share/fonts/google-noto-vf/NotoSans-Italic-VF.ttf
+removefrom google-noto-serif-vf-fonts /usr/share/fonts/google-noto-vf/NotoSerif*
+removefrom grep /etc/* /usr/share/locale/*
+removefrom gtk3 /usr/${libdir}/gtk-3.0/*
+removefrom gtk4 /usr/${libdir}/gtk-4.0/*
+removefrom guile22 /usr/${libdir}/guile/2.2/ccache*
+removefrom gzip /usr/bin/{gzexe,zcmp,zdiff,zegrep,zfgrep,zforce,zgrep,zless,zmore,znew}
+removefrom hwdata /usr/share/hwdata/oui.txt /usr/share/hwdata/pnp.ids
+removefrom iproute --allbut /usr/sbin/{ip,routef,routel,rtpr}
+removefrom kbd --allbut */bin/{dumpkeys,kbd_mode,loadkeys,setfont,unicode_*,chvt}
+removefrom less /etc/*
+removefrom libX11-common /usr/share/X11/XErrorDB
+removefrom libcanberra /usr/${libdir}/libcanberra-*
+removefrom libcanberra-gtk3 /usr/bin/*
+removefrom libcap /usr/sbin/*
+removefrom libconfig /usr/${libdir}/libconfig++*
+removefrom liberation-sans-fonts /usr/share/fonts/liberation-sans/LiberationSans-{Bold*,Italic}.ttf
+removefrom liberation-serif-fonts /usr/share/fonts/liberation-serif/*
+removefrom liberation-mono-fonts /usr/share/fonts/liberation-mono/LiberationMono-{Bold*,Italic}.ttf
+removefrom libgpg-error /usr/bin/* /usr/share/locale/*
+removefrom libibverbs /usr/${libdir}/libmlx4*
+removefrom libidn2 /usr/share/locale/*
+removefrom libnotify /usr/bin/*
+removefrom libsemanage /etc/selinux/*
+removefrom libstdc++ /usr/share/*
+removefrom libxml2 /usr/bin/*
+removefrom brcmfmac-firmware /usr/lib/firmware/brcm/BCM-*
+removefrom linux-firmware /usr/lib/firmware/ttusb-budget/dspbootcode.bin*
+removefrom linux-firmware /usr/lib/firmware/emi26/*
+removefrom linux-firmware /usr/lib/firmware/emi62/*
+removefrom linux-firmware /usr/lib/firmware/cpia2/*
+removefrom linux-firmware /usr/lib/firmware/dabusb/*
+removefrom linux-firmware /usr/lib/firmware/vicam/*
+removefrom linux-firmware /usr/lib/firmware/dsp56k/*
+removefrom linux-firmware /usr/lib/firmware/sun/*
+removefrom linux-firmware /usr/lib/firmware/usbdux*
+removefrom linux-firmware /usr/lib/firmware/f2255usb.bin*
+removefrom linux-firmware /usr/lib/firmware/TDA7706*
+removefrom linux-firmware /usr/lib/firmware/tlg2300_firmware.bin*
+removefrom linux-firmware /usr/lib/firmware/s5p-mfc*
+removefrom linux-firmware /usr/lib/firmware/go7007/*
+removefrom linux-firmware /usr/lib/firmware/intel/IntcSST2.bin*
+removefrom qcom-firmware /usr/lib/firmware/qcom/apq8096/*
+removefrom qcom-firmware /usr/lib/firmware/qcom/sdm845/*
+removefrom qcom-firmware /usr/lib/firmware/qcom/sm8250/*
+removefrom qcom-firmware /usr/lib/firmware/qcom/venus*/*
+removefrom qcom-firmware /usr/lib/firmware/qcom/vpu*/*
+removefrom linux-firmware /usr/lib/firmware/meson/vdec/*
+removefrom linux-firmware /usr/lib/firmware/phanfw.bin*
+## these are for SoCs used in Chromebooks, our kernel does not build the drivers
+removefrom linux-firmware /usr/lib/firmware/mediatek/mt81*/*
+removefrom linux-firmware /usr/lib/firmware/mediatek/sof/*
+removefrom linux-firmware /usr/lib/firmware/mediatek/sof-tplg/*
+## these are old versions that current qed driver will never load
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.10.9.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.10.9.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.14.6.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.18.9.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.20.0.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.30.12.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.33.12.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.37.7.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values-8.40.33.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.10.10.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.10.5.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.15.3.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.20.0.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.33.1.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.33.11.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.37.2.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.37.7.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.4.2.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.42.2.0.bin*
+removefrom linux-firmware /usr/lib/firmware/qed/qed_init_values_zipped-8.7.3.0.bin*
+%if basearch != "aarch64":
+ removefrom linux-firmware /usr/lib/firmware/dpaa2/*
+%endif
+removefrom lldpad /etc/*
+removefrom mdadm /etc/* /usr/lib/systemd/system/mdmonitor*
+## gallium-pipe stuff is for compute (opencl), not needed for video
+removefrom mesa-dri-drivers /usr/${libdir}/dri/*_video.so /usr/lib64/gallium-pipe/*
+removefrom mt-st /usr/sbin/*
+removefrom mtools /etc/*
+removefrom ncurses-libs /usr/${libdir}/libform*
+## libmenu.so is needed by lp_diag binary from ppc64-diag which is a PowerPC specific package
+%if basearch != "ppc64le":
+ removefrom ncurses-libs /usr/${libdir}/libmenu*
+%endif
+removefrom ncurses-libs /usr/${libdir}/libpanel.* /usr/${libdir}/libtic*
+removefrom net-tools */bin/netstat */sbin/ether-wake */sbin/ipmaddr
+removefrom net-tools */sbin/iptunnel */sbin/mii-diag */sbin/mii-tool
+removefrom net-tools */sbin/nameif */sbin/plipconfig */sbin/slattach
+removefrom net-tools /usr/share/locale/*
+removefrom nfs-utils /etc/nfsmount.conf
+removefrom nfs-utils /usr/lib/systemd/system/*
+removefrom nfs-utils /sbin/rpc.statd /usr/sbin/exportfs
+removefrom nfs-utils /usr/sbin/mountstats /usr/sbin/nfsiostat
+removefrom nfs-utils /usr/sbin/nfsstat /usr/sbin/rpc.gssd /usr/sbin/rpc.idmapd
+removefrom nfs-utils /usr/sbin/rpc.mountd /usr/sbin/rpc.nfsd
+removefrom nfs-utils /usr/sbin/rpcdebug
+removefrom nfs-utils /usr/sbin/showmount /usr/sbin/sm-notify
+removefrom nfs-utils /usr/sbin/start-statd /var/lib/nfs/etab
+removefrom nfs-utils /var/lib/nfs/rmtab /var/lib/nfs/statd/state
+removefrom nss-softokn /usr/${libdir}/nss/*
+removefrom openldap /etc/openldap/*
+removefrom openssh /usr/libexec/*
+removefrom openssh-clients /etc/ssh/* /usr/bin/ssh-*
+removefrom openssh-clients /usr/libexec/*
+removefrom openssh-server /etc/ssh/* /usr/libexec/openssh/sftp-server
+removefrom pam /usr/share/locale/*
+removefrom policycoreutils /etc/* /usr/bin/* /usr/share/locale/*
+removefrom polkit /usr/bin/*
+removefrom popt /usr/share/locale/*
+removefrom procps-ng /usr/bin/free /usr/bin/pgrep /usr/bin/pkill
+removefrom procps-ng /usr/bin/pmap /usr/bin/pwdx /usr/bin/skill /usr/bin/slabtop
+removefrom procps-ng /usr/bin/snice /usr/bin/tload /usr/bin/uptime
+removefrom procps-ng /usr/bin/vmstat /usr/bin/w /usr/bin/watch
+removefrom psmisc /usr/share/locale/*
+removefrom python3-kickstart /usr/lib/python*/site-packages/pykickstart/locale/*
+removefrom readline /usr/${libdir}/libhistory*
+removefrom rdma-core /etc/rdma/mlx4.conf
+removefrom rpm /usr/bin/* /usr/share/locale/*
+removefrom rsync /etc/*
+removefrom sed /usr/share/locale/*
+removefrom sil-padauk-fonts /usr/share/fonts/sil-padauk-fonts/Padauk-Bold.ttf
+removefrom smartmontools /etc/* /usr/sbin/smartd
+removefrom smartmontools /usr/sbin/update-smart-drivedb
+removefrom smartmontools /usr/share/smartmontools/*
+removefrom tar /usr/share/locale/*
+removefrom usbutils /usr/bin/*
+removefrom util-linux --allbut \
+ /usr/bin/{chmem,eject,getopt,hexdump,login,lscpu,lsmem,lsblk,setpriv} \
+ /etc/pam.d/login /etc/pam.d/remote \
+ /usr/sbin/{clock,fdisk,fsfreeze,fstrim,hwclock,nologin,sfdisk,swaplabel,wipefs,zramctl}
+removefrom util-linux-core --allbut \
+ /usr/bin/{dmesg,findmnt,flock,kill,logger,more,mount,mountpoint,umount,unshare} \
+ /etc/mtab \
+ /usr/sbin/{agetty,blkid,blockdev,fsck,losetup,mkswap,partx,swapoff,swapon}
+removefrom volume_key-libs /usr/share/locale/*
+removefrom wget /etc/* /usr/share/locale/*
+removefrom wpa_supplicant /usr/sbin/eapol_test
+removefrom yelp /usr/share/yelp/mathjax*
+
+%if branding.release:
+ removefrom ${branding.logos} /usr/share/plymouth/*
+ removefrom ${branding.logos} /etc/*
+ removefrom ${branding.logos} /usr/share/icons/{Bluecurve,oxygen}/*
+ removefrom ${branding.logos} /usr/share/{kde4,pixmaps}/*
+%endif
+
+## cleanup /boot/ leaving vmlinuz, and .*hmac files
+runcmd chroot ${root} find /boot \! -name "vmlinuz*" \
+ -and \! -name ".vmlinuz*" \
+ -and \! -name boot -delete
+
+## remove any broken links in /etc or /usr
+## (broken systemd service links lead to confusing noise at boot)
+## NOTE: not checking /var because we want to keep /var/run
+## NOTE: Excluding /etc/mtab which links to /proc/self/mounts for systemd
+runcmd chroot ${root} find -L /etc /usr -xdev -type l -and \! -name "mtab" \
+ -printf "removing broken symbolic link %p -> %l\n" -delete
+
+## Remove compiled python files, they are recreated as needed anyway
+runcmd find ${root} -name "*.pyo" -type f -delete
+runcmd find ${root} -name "*.pyc" -type f -delete
+
+## Clean up some of the mess pulled in by webkitgtk via yelp
+## libwebkit2gtk links to a handful of libraries in gstreamer and
+## gstreamer-plugins-base. Remove the rest of them.
+removefrom gstreamer1 --allbut /usr/${libdir}/libgstbase-1.0.* \
+ /usr/${libdir}/libgstreamer-1.0.*
+removefrom gstreamer1-plugins-base --allbut \
+ /usr/${libdir}/libgst{allocators,app,audio,fft,gl,pbutils,tag,video}-1.0.*
+
+## We have enough geoip libraries, thanks
+removepkg geoclue2
+
+## And remove the packages that those extra libraries pulled in
+removepkg cdparanoia-libs avahi-glib avahi-libs ModemManager-glib
+
+## Remove build-id links, they are used with debuginfo
+remove /usr/lib/.build-id
+
+## make the image more reproducible
+
+## make machine-id empty but present to avoid systemd populating /etc with
+## preset settings
+remove /etc/machine-id
+append /etc/machine-id ""
+## journalctl message catalog, non-deterministic
+remove /var/lib/systemd/catalog/database
+## non-reproducible caches
+remove /var/cache/ldconfig/aux-cache
+remove /etc/pki/ca-trust/extracted/java/cacerts
+
+## sort groups
+runcmd chroot ${root} /bin/sh -c "LC_ALL=C sort /etc/group > /etc/group- && mv /etc/group- /etc/group"
+runcmd chroot ${root} /bin/sh -c "LC_ALL=C sort /etc/gshadow > /etc/gshadow- && mv /etc/gshadow- /etc/gshadow"
diff --git a/80-rhel/runtime-install.tmpl b/80-rhel/runtime-install.tmpl
new file mode 100644
index 0000000..8f2f3b8
--- /dev/null
+++ b/80-rhel/runtime-install.tmpl
@@ -0,0 +1,170 @@
+## lorax template file: populate the ramdisk (runtime image)
+<%page args="basearch, product"/>
+<%
+# Version 1:2.06-3 of grub2 moves the font directory and is needed to keep the efi template from failing.
+# Version 1:2.06-67 of grub2 includes all needed modules in the signed core.elf for ppc64le
+GRUB2VER="1:2.06-67"
+%>
+
+## anaconda package
+installpkg anaconda anaconda-widgets kdump-anaconda-addon anaconda-install-img-deps
+installpkg redhat-release-eula
+
+## FIXME Pull in device-mapper-multipath
+## This *should* be pulled in by libblockdev-plugins-all and libblockdev-mpath but it is not
+installpkg device-mapper-multipath
+
+## Other available payloads
+installpkg dnf
+installpkg rpm-ostree ostree
+## speed up compression on multicore systems
+installpkg pigz
+
+## kernel and firmware
+## NOTE: Without explicitly including kernel-modules-extra dnf will choose kernel-debuginfo-*
+## to satify a gfs2-utils kmod requirement
+installpkg kernel kernel-modules kernel-modules-extra
+installpkg grubby
+%if basearch != "s390x":
+ ## skip the firmware for sound, video, and scanners, none of which will
+ ## do much good for the installer. Also skip uhd-firmware which is not
+ ## even a kernel firmware package. liquidio and netronome firmwares are
+ ## for enterprise switch devices, netinst deployment does not work on
+ ## these so there is no point shipping them - see
+ ## https://bugzilla.redhat.com/show_bug.cgi?id=2011615
+ ## bfa-firmware contains only obsolete files - see
+ ## https://bugzilla.redhat.com/show_bug.cgi?id=2152202
+ ## Only install qcom-firmware on aarch64
+ ## Exclude the audio firmware which is unused on the boot.iso
+ installpkg --optional *-firmware --except alsa* --except midisport-firmware \
+ --except crystalhd-firmware --except ivtv-firmware \
+ --except cx18-firmware --except iscan-firmware \
+ --except uhd-firmware --except lulzbot-marlin-firmware \
+ --except gnome-firmware --except sigrok-firmware \
+ --except liquidio-firmware --except netronome-firmware \
+ --except mrvlprestera-firmware --except mlxsw_spectrum-firmware \
+ --except hackrf-firmware --except python-virt-firmware \
+ --except python3-virt-firmware --except qcom-firmware \
+ --except dvb-firmware --except intel-vsc-firmware \
+ --except cirrus-audio-firmware --except intel-audio-firmware
+
+%endif
+
+## install all of the glibc langpacks since otherwise we get no locales
+installpkg glibc-all-langpacks
+
+## arch-specific packages (bootloaders etc.)
+%if basearch == "aarch64":
+ installpkg efibootmgr
+ installpkg grub2-efi-aa64-cdboot>=${GRUB2VER}
+ installpkg grub2-tools>=${GRUB2VER}
+ installpkg shim-aa64
+ installpkg qcom-firmware
+%endif
+%if basearch == "x86_64":
+ installpkg grub2-tools-efi>=${GRUB2VER}
+ installpkg efibootmgr
+ installpkg shim-x64
+ installpkg grub2-efi-x64-cdboot>=${GRUB2VER}
+ installpkg biosdevname
+ installpkg grub2-tools>=${GRUB2VER} grub2-tools-minimal>=${GRUB2VER}
+ installpkg grub2-tools-extra>=${GRUB2VER}
+ installpkg grub2-pc-modules>=${GRUB2VER}
+%endif
+%if basearch == "ppc64le":
+ installpkg powerpc-utils lsvpd ppc64-diag
+ installpkg grub2-tools>=${GRUB2VER} grub2-tools-minimal>=${GRUB2VER}
+ installpkg grub2-tools-extra>=${GRUB2VER} grub2-${basearch}>=${GRUB2VER}
+%endif
+%if basearch == "s390x":
+ installpkg lsscsi s390utils-base s390utils-cmsfs-fuse s390utils-hmcdrvfs
+%endif
+
+## yay, plymouth
+installpkg plymouth
+
+## extra dracut modules
+installpkg anaconda-dracut dracut-network dracut-config-generic
+
+## import-state.service for switchroot
+installpkg initscripts
+
+## rescue needs this
+installpkg cryptsetup
+
+## rpcbind or portmap needed by dracut nfs module
+installpkg rpcbind
+
+## required for dracut
+installpkg kbd kbd-misc
+## required for anaconda-dracut (img-lib etc.)
+installpkg tar xz curl bzip2
+
+## this is only recommended by librsvg2 since 2023-07, but in the
+## installer environment many icons used are only present as SVGs,
+## so we really need it
+installpkg rsvg-pixbuf-loader
+
+## basic system stuff
+installpkg rsyslog
+
+## filesystem tools
+installpkg xfsprogs dosfstools
+installpkg device-mapper-persistent-data
+installpkg xfsdump
+
+## extra storage packages
+# hostname is needed for iscsi to work, see RHBZ#1593917
+installpkg udisks2 udisks2-iscsi hostname
+
+## extra libblockdev plugins
+installpkg libblockdev-lvm-dbus
+
+## needed for LUKS escrow
+installpkg volume_key
+installpkg nss-tools
+
+## SELinux support
+installpkg selinux-policy-targeted audit
+
+## network tools/servers
+installpkg ethtool openssh-server nfs-utils openssh-clients
+installpkg net-tools
+installpkg ipcalc
+installpkg nmap-ncat
+installpkg prefixdevname
+
+## hardware utilities/libraries
+installpkg pciutils usbutils ipmitool
+installpkg mt-st smartmontools
+installpkg hdparm
+installpkg rdma-core
+installpkg rng-tools
+%if basearch in ("x86_64", "aarch64"):
+installpkg dmidecode
+%endif
+installpkg nvme-cli
+
+
+## fonts & themes
+installpkg default-fonts-core-sans
+installpkg default-fonts-other-sans
+## We can't go with this because google-noto-sans-cjk-vf-fonts is too big.
+# installpkg default-fonts-cjk-sans
+installpkg google-noto-sans-cjk-fonts
+
+## debugging/bug reporting tools
+installpkg gdb-gdbserver
+installpkg python3-pyatspi
+
+## extra tools not required by anaconda
+installpkg nano
+installpkg vim-minimal strace lsof xz less
+installpkg wget rsync bind-utils ftp mtr
+installpkg spice-vdagent
+installpkg hexedit sg3_utils
+installpkg perl-interpreter
+installpkg restore
+
+## actually install all the requested packages
+run_pkg_transaction
diff --git a/80-rhel/runtime-postinstall.tmpl b/80-rhel/runtime-postinstall.tmpl
new file mode 100644
index 0000000..57e991a
--- /dev/null
+++ b/80-rhel/runtime-postinstall.tmpl
@@ -0,0 +1,133 @@
+## runtime-postinstall.tmpl
+## post-install setup required to make the system work.
+
+<%page args="root, basearch, libdir, configdir"/>
+<%
+configdir = configdir + "/common"
+import os, time
+SOURCE_DATE_EPOCH = os.environ.get('SOURCE_DATE_EPOCH', str(int(time.time())))
+%>
+
+## move_stubs()
+move usr/share/anaconda/list-harddrives-stub usr/bin/list-harddrives
+
+## move_repos()
+move etc/yum.repos.d etc/anaconda.repos.d
+
+## Setup mdadm config to turn off homehost
+remove etc/mdadm.conf
+append etc/mdadm.conf "HOMEHOST \n"
+
+## Configure systemd to start anaconda
+remove etc/systemd/system/default.target
+symlink /lib/systemd/system/anaconda.target etc/systemd/system/default.target
+
+## Make sure tmpfs is enabled
+mkdir etc/systemd/system/local-fs.target.wants/
+symlink /lib/systemd/system/tmp.mount etc/systemd/system/local-fs.target.wants/tmp.mount
+
+## Disable unwanted systemd services
+systemctl disable systemd-readahead-collect.service \
+ systemd-readahead-replay.service \
+ lvm2-monitor.service \
+ dnf-makecache.timer \
+ sshd.socket
+## These services can't be disabled normally (they're linked into place in
+## /usr/lib/systemd rather than /etc/systemd), so we have to mask them.
+systemctl mask fedora-configure.service fedora-loadmodules.service \
+ fedora-autorelabel.service fedora-autorelabel-mark.service \
+ fedora-wait-storage.service media.mount \
+ systemd-tmpfiles-clean.service systemd-tmpfiles-clean.timer \
+ ldconfig.service
+remove usr/lib/systemd/system/rngd.service
+
+## remove because it cannot be disabled
+remove usr/lib/systemd/system-generators/lvm2-activation-generator
+
+## Remove the more terrible parts of systemd-tmpfiles.
+## etc.conf is written with the assumption that /etc/ is empty, which is
+## ridiculous, and it also creates a broken /etc/resolv.conf, which breaks
+## networking.
+remove usr/lib/tmpfiles.d/etc.conf
+
+## Make logind activate anaconda-shell@.service on switch to empty VT
+symlink anaconda-shell@.service lib/systemd/system/autovt@.service
+mkdir usr/lib/systemd/logind.conf.d
+append usr/lib/systemd/logind.conf.d/anaconda-shell.conf "[Login]\nReserveVT=2"
+
+## Don't write the journal to the overlay, just keep it in RAM
+remove var/log/journal
+
+## install some basic configuration files
+append etc/fstab ""
+install ${configdir}/i18n etc/sysconfig
+install ${configdir}/rsyslog.conf etc
+install ${configdir}/bash_history root/.bash_history
+install ${configdir}/profile root/.profile
+install ${configdir}/libuser.conf etc
+install ${configdir}/sysctl.conf etc/sysctl.d/anaconda.conf
+install ${configdir}/spice-vdagentd etc/sysconfig
+mkdir etc/NetworkManager/conf.d
+install ${configdir}/91-anaconda-autoconnect-slaves.conf etc/NetworkManager/conf.d
+install ${configdir}/vconsole.conf etc
+install ${configdir}/92-anaconda-loglevel-debug.conf etc/NetworkManager/conf.d
+
+## set up sshd
+install ${configdir}/sshd_config.anaconda etc/ssh
+install ${configdir}/pam.sshd etc/pam.d/sshd
+install ${configdir}/pam.sshd etc/pam.d/login
+install ${configdir}/pam.sshd etc/pam.d/remote
+
+## set up inst.rngd support
+install ${configdir}/inst.rngd.service etc/systemd/system/inst.rngd.service
+mkdir etc/systemd/system/basic.target.wants/
+symlink /etc/systemd/system/inst.rngd.service etc/systemd/system/basic.target.wants/inst.rngd.service
+
+## set up "install" user account
+append etc/passwd "install:x:0:0:root:/root:/usr/libexec/anaconda/run-anaconda"
+append etc/shadow "install::14438:0:99999:7:::"
+## remove root password
+replace "root:\*:" "root::" etc/shadow
+
+## gsettings settings
+install ${configdir}/org.gtk.Settings.Debug.gschema.override usr/share/glib-2.0/schemas
+runcmd chroot ${root} glib-compile-schemas /usr/share/glib-2.0/schemas
+
+
+## for compatibility with Ancient Anaconda Traditions
+symlink lib/modules /modules
+symlink lib/firmware /firmware
+symlink ../run/install mnt/install
+
+## create_depmod_conf()
+append etc/depmod.d/dd.conf "search updates built-in"
+
+## create multipath.conf so multipath gets auto-started
+append etc/multipath.conf "defaults {\n\tfind_multipaths smart\n\tuser_friendly_names yes\n}\n"
+
+## make lvm auto-activate
+remove etc/lvm/archive/*
+remove etc/lvm/archive
+remove etc/lvm/backup/*
+remove etc/lvm/backup
+remove etc/lvm/cache/*
+remove etc/lvm/cache
+remove etc/lvm/lvm.conf
+append etc/lvm/lvm.conf "global {\n\tuse_lvmetad = 1\n}\n"
+
+## Remove machine specific nvme-cli files
+remove etc/nvme/hostid
+remove etc/nvme/hostnqn
+
+## Record the package versions used to create the image
+## rpm initializes nss, which requires /dev/urandom to be present, hence the mknod
+runcmd chroot ${root} /usr/bin/mknod -m 666 /dev/random c 1 8
+runcmd chroot ${root} /usr/bin/mknod -m 666 /dev/urandom c 1 9
+runcmd chroot ${root} /usr/bin/rpm -qa --pipe "tee /root/lorax-packages.log"
+
+## TODO: we could run prelink here if we wanted?
+
+## fix fonconfig cache containing timestamps
+runcmd chroot ${root} /usr/bin/find /usr/share/fonts -newermt "@${SOURCE_DATE_EPOCH}" -exec \
+ touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" {} +
+runcmd chroot ${root} /usr/bin/fc-cache -f
diff --git a/80-rhel/s390.tmpl b/80-rhel/s390.tmpl
new file mode 100644
index 0000000..a2e9dd4
--- /dev/null
+++ b/80-rhel/s390.tmpl
@@ -0,0 +1,95 @@
+<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot, product, isolabel"/>
+<%
+configdir="tmp/config_files/s390"
+BOOTDIR="images"
+KERNELDIR=BOOTDIR
+INITRD_ADDRESS="0x02000000"
+LORAXDIR="usr/share/lorax/"
+MKS390IMAGE="/usr/bin/mk-s390image"
+# The assumption seems to be that there is only one s390 kernel, ever
+kernel = kernels[0]
+
+## 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)
+
+import os
+from os.path import basename
+from pylorax.sysutils import joinpaths
+
+# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
+if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
+ isoargs = "-iso-level 3"
+else:
+ isoargs = ""
+%>
+
+mkdir images
+install ${runtime_img} images
+treeinfo stage2 mainimage images/${runtime_base}
+
+## install bootloader (such as it is) and bootloader config
+install ${configdir}/redhat.exec ${BOOTDIR}
+install ${configdir}/generic.prm ${BOOTDIR}
+install ${configdir}/genericdvd.prm ${BOOTDIR}
+install ${configdir}/cdboot.prm ${BOOTDIR}
+install ${configdir}/generic.ins .
+
+## configure bootloader
+replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins
+replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${BOOTDIR}/cdboot.prm
+
+## install kernel
+installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
+installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+
+## s390 needs some extra boot config
+createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd.addrsize
+
+## s390 also has some special treeinfo data
+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/
+<% filegraft=""; images=["product", "updates"] %>
+%for img in images:
+ %if exists("%s/%s/" % (LORAXDIR, img)):
+ installimg ${LORAXDIR}/${img}/ images/${img}.img
+ treeinfo images-${basearch} ${img}.img images/${img}.img
+ %endif
+%endfor
+
+# Inherit iso-graft/ if it exists from external templates
+<%
+ import os
+ if os.path.exists(workdir + "/iso-graft"):
+ filegraft += " " + workdir + "/iso-graft"
+%>
+
+# Add the license files
+%for f in glob("usr/share/licenses/*-release-common/*"):
+ install ${f} ${f|basename}
+ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
+%endfor
+
+## Make a combined kernel+initrd image for the iso
+runcmd ${MKS390IMAGE} ${outroot}/${KERNELDIR}/kernel.img \
+ ${outroot}/${BOOTDIR}/cdboot.img \
+ -r ${outroot}/${KERNELDIR}/initrd.img \
+ -p ${outroot}/${BOOTDIR}/cdboot.prm
+
+## make boot.iso
+runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
+ -b ${BOOTDIR}/cdboot.img -c ${BOOTDIR}/boot.cat \
+ -boot-load-size 4 -no-emul-boot \
+ -R -J -V '${isolabel}' -graft-points \
+ .discinfo=${outroot}/.discinfo \
+ generic.ins=${outroot}/generic.ins \
+ ${BOOTDIR}=${outroot}/${BOOTDIR} \
+ ${filegraft}
+treeinfo images-${basearch} boot.iso images/boot.iso
diff --git a/80-rhel/x86.tmpl b/80-rhel/x86.tmpl
new file mode 100644
index 0000000..3945ce4
--- /dev/null
+++ b/80-rhel/x86.tmpl
@@ -0,0 +1,118 @@
+<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot, product, isolabel"/>
+<%
+configdir="tmp/config_files/x86"
+PXEBOOTDIR="images/pxeboot"
+STAGE2IMG="images/install.img"
+GRUB2DIR="boot/grub2"
+KERNELDIR=PXEBOOTDIR
+LORAXDIR="usr/share/lorax/"
+
+## 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)
+
+import os
+from os.path import basename
+from pylorax.sysutils import joinpaths
+
+# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3
+if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
+ isoargs = "-iso-level 3"
+else:
+ isoargs = ""
+%>
+
+mkdir images
+install ${runtime_img} ${STAGE2IMG}
+treeinfo stage2 mainimage images/${runtime_base}
+
+## install kernels
+mkdir ${KERNELDIR}
+%for kernel in kernels:
+ installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
+ installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+%endfor
+
+%if basearch == 'x86_64':
+ treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
+ treeinfo images-xen initrd ${KERNELDIR}/initrd.img
+%endif
+
+## configure grub2 config file
+mkdir ${GRUB2DIR}
+install ${configdir}/grub2-bios.cfg ${GRUB2DIR}/grub.cfg
+replace @VERSION@ ${product.version} ${GRUB2DIR}/grub.cfg
+replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
+replace @KERNELPATH@ /${KERNELDIR}/vmlinuz ${GRUB2DIR}/grub.cfg
+replace @INITRDPATH@ /${KERNELDIR}/initrd.img ${GRUB2DIR}/grub.cfg
+replace @ISOLABEL@ '${isolabel}' ${GRUB2DIR}/grub.cfg
+replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${GRUB2DIR}/grub.cfg
+
+
+## WHeeeeeeee, EFI.
+<% efiarch32=None; efiarch64=None %>
+%if exists("boot/efi/EFI/*/gcdia32.efi"):
+ <% efiarch32 = 'IA32' %>
+%endif
+%if exists("boot/efi/EFI/*/gcdx64.efi"):
+ <% efiarch64 = 'X64' %>
+%endif
+%if (efiarch32 or efiarch64):
+ <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel"/>
+%endif
+
+# Create optional product.img and updates.img
+<% filegraft=""; images=["product", "updates"]; compressargs=""; %>
+%for img in images:
+ %if exists("%s/%s/" % (LORAXDIR, img)):
+ installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img
+ treeinfo images-${basearch} ${img}.img images/${img}.img
+ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
+ %endif
+%endfor
+
+# Inherit iso-graft/ if it exists from external templates
+<%
+ import os
+ if os.path.exists(workdir + "/iso-graft"):
+ filegraft += " " + workdir + "/iso-graft"
+%>
+
+# Add the license files
+%for f in glob("usr/share/licenses/*-release-common/*"):
+ install ${f} ${f|basename}
+ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
+%endfor
+
+## Make images/eltoritio.img
+runcmd grub2-mkimage -O i386-pc-eltorito -d ${inroot}/usr/lib/grub/i386-pc \
+ -o ${outroot}/images/eltorito.img \
+ -p /${GRUB2DIR} \
+ iso9660 biosdisk
+treeinfo images-${basearch} eltorito.img images/eltorito.img
+
+## make boot.iso
+runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
+ -R -J -V '${isolabel}' \
+ --grub2-mbr ${inroot}/usr/lib/grub/i386-pc/boot_hybrid.img \
+ -partition_offset 16 \
+ -appended_part_as_gpt \
+ -append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B ${outroot}/images/efiboot.img \
+ -iso_mbr_part_type EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 \
+ -c boot.cat --boot-catalog-hide \
+ -b images/eltorito.img \
+ -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \
+ -eltorito-alt-boot \
+ -e '--interval:appended_partition_2:all::' -no-emul-boot \
+ -graft-points \
+ .discinfo=${outroot}/.discinfo \
+ ${STAGE2IMG}=${outroot}/${STAGE2IMG} \
+ ${KERNELDIR}=${outroot}/${KERNELDIR} \
+ ${filegraft} \
+ ${GRUB2DIR}=${outroot}/${GRUB2DIR} \
+ ${GRUB2DIR}/i386-pc=${inroot}/usr/lib/grub/i386-pc \
+ images/eltorito.img=${outroot}/images/eltorito.img \
+ EFI/BOOT=${outroot}/EFI/BOOT
+treeinfo images-${basearch} boot.iso images/boot.iso
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9e5497c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,62 @@
+NAME=lorax-templates-rhel
+# RHEL version these templates are designed for
+RHELVER=10.0
+RHPKG=centpkg --release=c10s
+
+# Previous release, override this when new commits are already on c10s
+PREV ?= origin/c10s
+
+# git user.email and user.name must be setup
+GITEMAIL := $(shell git config user.email)
+GITNAME := $(shell git config user.name)
+
+# Serial number for this release
+SERIAL=$(shell [ -f SERIAL ] && cat SERIAL || echo 0)
+
+SPEC=${NAME}.spec
+TARBALL=${NAME}-${RHELVER}-${SERIAL}.tar.gz
+
+tar: ${TARBALL}
+
+${TARBALL}: 80-rhel
+ git archive --prefix='${NAME}-${RHELVER}/' HEAD $ | gzip -c9 > $@
+
+bump: bump-serial
+
+bump-serial:
+ echo $$((${SERIAL}+1)) > SERIAL
+ git add SERIAL
+
+update-spec: clog
+ sed -r -i \
+ -e 's/^(Release:\s+)[^%]+(%.*)$$/\1${SERIAL}\2/' \
+ -e 's/^(Version:\s+).*$$/\1${RHELVER}/' \
+ -e 's/^(Source0:\s+).*$$/\1${TARBALL}/' \
+ -e '/%changelog/ r clog-spec' \
+ ${SPEC}
+
+clog:
+ @echo "* $(shell date '+%a %b %d %Y') ${GITNAME} <${GITEMAIL}> - ${RHELVER}-${SERIAL}" > clog-spec
+ ./tools/git-changelog -t ${PREV} > clog
+ cat clog >> clog-spec
+
+# These need to rerun make to pick up the bumped serial number
+release:
+ $(MAKE) bump-serial && $(MAKE) tar && $(MAKE) update-spec && $(MAKE) commit
+
+release-merge:
+ $(MAKE) bump-serial && $(MAKE) tar && $(MAKE) update-spec && $(MAKE) amend
+
+
+commit:
+ $(RHPKG) new-sources ${TARBALL}
+ git add -u
+ git commit -F clog
+
+amend:
+ $(RHPKG) new-sources ${TARBALL}
+ git add -u
+ git commit --amend
+
+
+.PHONY: tar ${TARBALL} bump-serial update-spec release clog commit
diff --git a/README b/README
new file mode 100644
index 0000000..4cd5580
--- /dev/null
+++ b/README
@@ -0,0 +1,22 @@
+Hi there! If you're trying to fix something here, do the following:
+
+1. Make whatever edits you need to in 80-rhel/
+2. `git commit` the changes with the relevant 'Resolves/Related' bug reference
+3. `make release`
+ This will bump the release, update the spec with changes in this branch,
+ create a new tarball, upload it, and commit the changes.
+ NOTE: If there are commits on c10s since the last build you need to set PREV=
+ so that the changelog will be correct. eg. PREV=ACTUALHASH make release
+4. Examine the changes with 'git show' and make sure they look ok.
+5. Push the changes to your fork of the project with:
+ 'git push REMOTE BRANCHNAME' and follow the instructions to
+ create a merge request in gitlab.
+
+# To rebase from RHEL:
+1. Add "cs" remote: `git remote add cs https://gitlab.com/redhat/centos-stream/rpms/lorax-templates-rhel.git`
+2. `git merge [-X ours] cs/c10s`
+3. `make release-merge`
+4. Edit the %changelog section of lorax-templates-rhel.spec appropriately
+5. `git add lorax-templates-rhel.spec`
+6. `git commit --amend`
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..07214f3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# lorax-templates-rhel
+
+The lorax-templates-rhel package
diff --git a/SERIAL b/SERIAL
new file mode 100644
index 0000000..0691f67
--- /dev/null
+++ b/SERIAL
@@ -0,0 +1 @@
+52
diff --git a/gating.yaml b/gating.yaml
new file mode 100644
index 0000000..58c37f8
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,7 @@
+--- !Policy
+product_versions:
+ - rhel-8
+ - rhel-9
+decision_context: osci_compose_gate
+rules:
+ - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
diff --git a/SPECS/lorax-templates-almalinux.spec b/lorax-templates-almalinux.spec
similarity index 59%
rename from SPECS/lorax-templates-almalinux.spec
rename to lorax-templates-almalinux.spec
index 103fc54..231d855 100644
--- a/SPECS/lorax-templates-almalinux.spec
+++ b/lorax-templates-almalinux.spec
@@ -1,16 +1,22 @@
Name: lorax-templates-almalinux
-Version: 9.0
-Release: 39%{?dist}
-Summary: AlmaLinux 9 build templates for lorax and livemedia-creator
+Version: 10.0
+Release: 52%{?dist}
+Summary: AlmaLinux 10 build templates for lorax and livemedia-creator
License: GPLv2+
URL: https://github.com/weldr/lorax
BuildArch: noarch
-Source0: lorax-templates-rhel-9.0-39.tar.gz
+
+# This tarball is generated from the contents of this dist-git repository
+# by running the command `make tar`.
+# See README for full details of how to update this package
+Source0: lorax-templates-rhel-10.0-52.tar.gz
# Required for the template branding support
Requires: lorax >= 34.9.1
+Provides: lorax-templates = %{version}-%{release}
+
# Where are these supposed to end up?
%define templatedir %{_datadir}/lorax/templates.d/70-almalinux
@@ -38,14 +44,5 @@ cp -a 80-rhel/* $RPM_BUILD_ROOT/%{templatedir}
%{templatedir}/*
%changelog
-* Thu Aug 08 2024 Andrew Lukoshko - 9.0-39
-- Sync with lorax-templates-rhel-9.0-39
-
-* Wed Apr 12 2023 Andrew Lukoshko - 9.0-37
-- Update for AlmaLinux 9.2 beta
-
-* Tue Oct 18 2022 Andrew Lukoshko - 9.0-35
-- Update for AlmaLinux 9.1 beta
-
-* Fri Mar 11 2022 Andrew Lukoshko - 9.0-33
-- Initial build for AlmaLinux 9.0 beta
+* Wed Aug 21 2024 Eduard Abdullin - 10.0-52
+- Initial build for AlmaLinux 10
diff --git a/sources b/sources
new file mode 100644
index 0000000..3fed9e2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (lorax-templates-rhel-10.0-52.tar.gz) = 4ea157c43045fadc42c8c0eb0099785984c859c8cb10c1ac8d49b777221c1e9de9ff75c749661c68ddecb36d21e1cd6c963dda04f66e49d0863a450cce296f18
diff --git a/tests/.fmf/version b/tests/.fmf/version
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/.fmf/version
@@ -0,0 +1 @@
+1
diff --git a/tests/provision.fmf b/tests/provision.fmf
new file mode 100644
index 0000000..dd69f34
--- /dev/null
+++ b/tests/provision.fmf
@@ -0,0 +1,5 @@
+---
+
+standard-inventory-qcow2:
+ qemu:
+ m: 4G
diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh
new file mode 100755
index 0000000..5e130a3
--- /dev/null
+++ b/tests/scripts/run_tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -eux
+
+if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then
+ echo "Failed to find lorax-templates-rhel templates in /usr/share/lorax/templates.d/"
+ exit 1
+fi
+
+# Gather up the list of system repo files and use them for lorax
+# Skip fedora.repo
+REPOS=$(find /etc/yum.repos.d/ -maxdepth 1 -type f -name '*\.repo' ! -name 'fedora.repo' -exec echo -n "--repo {} " \;)
+if [ -z "$REPOS" ]; then
+ echo "No system repos found"
+ exit 1
+fi
+
+# The c10s tmt systems have started using $stream in the repo urls as of 6/2024, substitute
+# 10-stream for this variable so that they can be passed to lorax
+sed -i 's/$stream/10-stream/g' /etc/yum.repos.d/*.repo
+
+# Run lorax using the host's repository configuration file
+lorax --product="Red Hat Enterprise Linux" --version=10 --release=10 --volid="RHEL-10-test" \
+ $REPOS --isfinal --nomacboot /var/tmp/lorax-rhel10-iso/
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..d39d256
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,15 @@
+---
+# Run lorax with the new templates
+- hosts: localhost
+ roles:
+ - role: standard-test-basic
+ tags:
+ - classic
+
+ required_packages:
+ - lorax
+
+ tests:
+ - simple:
+ dir: scripts
+ run: ./run_tests.sh
diff --git a/tools/git-changelog b/tools/git-changelog
new file mode 100755
index 0000000..c53d6c3
--- /dev/null
+++ b/tools/git-changelog
@@ -0,0 +1,130 @@
+#!/usr/bin/python3
+#
+# git-changelog - Output a rpm changelog
+#
+# Copyright (C) 2009 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see .
+#
+# Author: David Cantrell
+# Author: Brian C. Lane
+
+import os
+import re
+import subprocess
+import sys
+import textwrap
+from argparse import ArgumentParser
+
+
+
+class ChangeLog:
+ def __init__(self, tag):
+ self.tag = tag
+ self.ignore = None
+
+ def _getCommitDetail(self, commit, field, long=False):
+ proc = subprocess.Popen(['git', 'log', '-1',
+ "--pretty=format:%s" % field, commit],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).communicate()
+
+ ret = proc[0].decode("utf8").strip("\n").split('\n')
+
+ if long:
+ return ret
+
+ if len(ret) == 1 and ret[0].find('@') != -1:
+ ret = ret[0].split('@')[0]
+ elif len(ret) == 1:
+ ret = ret[0]
+ else:
+ ret = filter(lambda x: x != '', ret)
+
+ return ret
+
+ def getBugs(self, msg):
+ """Get the Resolves/Related bugs from the commit.
+ Bug in first line is considered Resolves
+ """
+ bugs = []
+ if not msg:
+ return []
+
+ # summary line format is ^.*#([0-9]+).*
+ # Make sure the bz# isn't likely to be a github issue
+ for line in msg:
+ m = re.match(r"^(Resolves|Related|Conflicts):\ +(rhbz#|RHEL-)(\d+)", line)
+ if m and m.group(1) and m.group(2) and m.group(3):
+ bugs.append((m.group(1), m.group(2), m.group(3)))
+ else:
+ # Assume summary line references are still rhbz# only
+ m = re.match(r"^.*#(\d+).*", line)
+ if m and m.group(1) and int(m.group(1)) > 100000:
+ bugs.append(("Resolves", "rhbz#", m.group(1)))
+
+ return bugs
+
+ def getLog(self):
+ rev_range = "%s.." % (self.tag)
+ proc = subprocess.Popen(['git', 'log', '--pretty=oneline', rev_range],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).communicate()
+ lines = filter(lambda x: x.find('l10n: ') != 41 and \
+ x.find('Merge commit') != 41 and \
+ x.find('Merge branch') != 41,
+ proc[0].decode("utf8").strip('\n').split('\n'))
+
+ if self.ignore and self.ignore != '':
+ for commit in self.ignore.split(','):
+ lines = filter(lambda x: not x.startswith(commit), lines)
+
+ log = []
+ for line in lines:
+ fields = line.split(' ')
+ commit = fields[0]
+
+ summary = self._getCommitDetail(commit, "%s")
+ long = self._getCommitDetail(commit, "%b", True)
+ author = self._getCommitDetail(commit, "%aE")
+
+ msg = ["%s (%s)" % (summary.strip(), author)]
+ for r, kind, bz in self.getBugs(long):
+ msg.append("%s: %s%s" % (r, kind, bz))
+ log.append(msg)
+
+ return log
+
+ def formatLog(self):
+ s = ""
+ for msg in self.getLog():
+ sublines = textwrap.wrap(msg[0], 120)
+
+ s = s + "- %s\n" % sublines[0]
+ for line in sublines[1:] + msg[1:]:
+ s = s + " %s\n" % line
+
+ return s
+
+def main():
+ parser = ArgumentParser(description="Generate changelog entries from git commits")
+ parser.add_argument("-t", "--tag", dest="tag",
+ help="Last tag, changelog is commits after this tag")
+ args = parser.parse_args()
+
+ cl = ChangeLog(args.tag)
+ print(cl.formatLog())
+
+if __name__ == "__main__":
+ main()