Compare commits

...

12 Commits

Author SHA1 Message Date
David Abdurachmanov fdabead2d0
Remove more shim from templates
mm<arch> is also coming from shim.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-09-01 12:46:35 +03:00
David Abdurachmanov b5cf4528b4
Fix GRUB install.
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-09-01 07:15:02 +03:00
David Abdurachmanov e794c2781f
Update riscv64 patch
We have no shim support yet, but older PR exist on GH (also requires
3.0.17 gnu-efi + backports from master).

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-08-31 18:30:05 +03:00
David Abdurachmanov e0fea715e5
Allow broken symlinks in /usr
This is causing infinite system loop, which will result in exist code 1
from find.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-08-31 15:40:04 +03:00
David Abdurachmanov e8e15a39d4
Add riscv64 support
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-08-31 09:10:54 +03:00
Brian C. Lane cdb2169949 - Exclude more obsoleted libertas firmware packages (awilliam@redhat.com) 2023-08-09 10:56:52 -07:00
Brian C. Lane 74a75df0b6 - runtime-install: excluded renamed olpc firmware package (awilliam@redhat.com)
- runtime-install: exclude renamed iwl firmware packages (awilliam@redhat.com)
- remove included patch for renamed iwl firmware
2023-08-07 15:05:13 -07:00
Adam Williamson 3bab39892f Backport PR #1332 to handle renamed iwl firmware packages 2023-07-04 13:29:47 -07:00
Brian C. Lane f4c1b70ef1 Fix tmt test to use Fedora 38 repos instead of rawhide 2023-05-31 13:40:04 -07:00
Brian C. Lane f3c9b3b5b4 clog 2023-03-27 14:19:26 -07:00
Brian C. Lane 5b281544a1 - Add setpriv as ostree containers dependency (#2125655) (jkonecny@redhat.com) 2023-03-14 11:25:58 -07:00
Brian C. Lane a0059d73b4 Most of these changes were already built by adamw, this build includes them upstream. It
also includes build 38.7 which was skipped because I noticed a few more things to update
for the new upstream Fedora 38 branch.

- New lorax documentation - 38.8 (bcl@redhat.com)
- workflow: Update list of push branches for workflow tests (bcl@redhat.com)
- Use Fedora 38 container for running podman tests (bcl@redhat.com)
- Update default releasever and platform id for Fedora 38 (bcl@redhat.com)
- Don't strip gtk4 binaries or libtiff (#2170716) (awilliam@redhat.com)
- image-minimizer: Use RuntimeError instead of Exception (bcl@redhat.com)
- creator: Use RuntimeError instead of Exception (bcl@redhat.com)
- treebuilder: Use RuntimeError instead of Exception (bcl@redhat.com)
- mount: Use RuntimeError instead of Exception (bcl@redhat.com)
- ltmpl: Use RuntimeError instead of Exception (bcl@redhat.com)
- spec: Use autosetup to make patching easier (bcl@redhat.com)
- Revert "templates.d/99-generic/live: Enable automatic persistence for live media" (awilliam@redhat.com)
- Strip some things from gtk4 (awilliam@redhat.com)
2023-02-20 12:13:55 -08:00
8 changed files with 461 additions and 242 deletions

5
.gitignore vendored
View File

@ -229,3 +229,8 @@
/lorax-38.4.tar.gz
/lorax-38.5.tar.gz
/lorax-38.6.tar.gz
/lorax-38.8.tar.gz
/lorax-38.9.tar.gz
/lorax-38.10.tar.gz
/lorax-38.11.tar.gz
/lorax-38.12.tar.gz

View File

@ -1,42 +0,0 @@
From b42349eada5674b84604592c2a32e749750fbf81 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Fri, 17 Feb 2023 08:55:02 -0800
Subject: [PATCH] Don't strip gtk4 binaries or libtiff (#2170716)
It turns out that, somehow, stripping the gtk4 binaries caused:
https://bugzilla.redhat.com/show_bug.cgi?id=2170716
at least, I tested a scratch build with this change and that bug
didn't seem to happen any more. This puts the gtk4 binaries back,
and also stops stripping libtiff, because gtk4-launch depends on
it so we need to keep it in. This doesn't seem to cause too much
of a size difference; I see 723417088 bytes for the netinst with
this change, compared to 723197952 bytes for today's nightly.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
share/templates.d/99-generic/runtime-cleanup.tmpl | 2 --
1 file changed, 2 deletions(-)
diff --git a/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl
index 6e0d8e88..6577a45c 100644
--- a/share/templates.d/99-generic/runtime-cleanup.tmpl
+++ b/share/templates.d/99-generic/runtime-cleanup.tmpl
@@ -53,7 +53,6 @@ removepkg mtools glibc-gconv-extra
## various other things we remove to save space
removepkg diffutils file
removepkg libasyncns
-removepkg libtiff
removepkg lvm2-libs
removepkg mobile-broadband-provider-info
removepkg rmt rpcbind squashfs-tools
@@ -180,7 +179,6 @@ removefrom google-noto-sans-vf-fonts /usr/share/fonts/google-noto-vf/NotoSans-It
removefrom grep /etc/* /usr/share/locale/*
removefrom gtk3 /usr/${libdir}/gtk-3.0/*
removefrom gtk4 /usr/${libdir}/gtk-4.0/*
-removefrom gtk4 /usr/bin/*
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
--
2.39.1

View File

@ -1,144 +0,0 @@
From 55aabe2102263465e4ecb8274697bab22cae780c Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Thu, 16 Feb 2023 09:53:05 -0800
Subject: [PATCH] Revert "templates.d/99-generic/live: Enable automatic
persistence for live media"
This reverts commit 7bedf613db8fbaf38747146775f00a2042f8424e.
Initial testing indicates it's busted:
https://bugzilla.redhat.com/show_bug.cgi?id=2170544
---
.../live/config_files/aarch64/grub2-efi.cfg | 26 ++++---------------
.../live/config_files/x86/grub2-bios.cfg | 26 ++++---------------
.../live/config_files/x86/grub2-efi.cfg | 26 ++++---------------
3 files changed, 15 insertions(+), 63 deletions(-)
diff --git a/share/templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg b/share/templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg
index d4f7bf5e..c874547f 100644
--- a/share/templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg
+++ b/share/templates.d/99-generic/live/config_files/aarch64/grub2-efi.cfg
@@ -26,32 +26,16 @@ set timeout=60
search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
-menuentry 'Start @PRODUCT@ @VERSION@ with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist quiet rhgb
+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@ with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.check quiet
- initrd @INITRDPATH@
-}
-menuentry 'Delete existing persistence & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.overlay.reset=1 quiet rhgb
+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 'Start @PRODUCT@ @VERSION@ without automatic persistence' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet rhgb
- initrd @INITRDPATH@
- }
- menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist nomodeset quiet rhgb
- initrd @INITRDPATH@
- }
- menuentry 'Delete existing persistence & start @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.overlay.reset=1 nomodeset quiet rhgb
- initrd @INITRDPATH@
- }
- menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode without automatic persistence' --class fedora --class gnu-linux --class gnu --class os {
+ 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/share/templates.d/99-generic/live/config_files/x86/grub2-bios.cfg b/share/templates.d/99-generic/live/config_files/x86/grub2-bios.cfg
index 486d8548..5987cf62 100644
--- a/share/templates.d/99-generic/live/config_files/x86/grub2-bios.cfg
+++ b/share/templates.d/99-generic/live/config_files/x86/grub2-bios.cfg
@@ -17,32 +17,16 @@ set timeout=60
search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
-menuentry 'Start @PRODUCT@ @VERSION@ with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist quiet rhgb
+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@ with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.check quiet
- initrd @INITRDPATH@
-}
-menuentry 'Delete existing persistence & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.overlay.reset=1 quiet rhgb
+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@ without automatic persistence' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet rhgb
- initrd @INITRDPATH@
- }
- menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist nomodeset quiet rhgb
- initrd @INITRDPATH@
- }
- menuentry 'Delete existing persistence & start @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.overlay.reset=1 nomodeset quiet rhgb
- initrd @INITRDPATH@
- }
- menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode without automatic persistence' --class fedora --class gnu-linux --class gnu --class os {
+ 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 quiet rhgb
initrd @INITRDPATH@
}
diff --git a/share/templates.d/99-generic/live/config_files/x86/grub2-efi.cfg b/share/templates.d/99-generic/live/config_files/x86/grub2-efi.cfg
index 7595571e..39069585 100644
--- a/share/templates.d/99-generic/live/config_files/x86/grub2-efi.cfg
+++ b/share/templates.d/99-generic/live/config_files/x86/grub2-efi.cfg
@@ -20,32 +20,16 @@ set timeout=60
search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
-menuentry 'Start @PRODUCT@ @VERSION@ with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist quiet rhgb
+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@ with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.check quiet
- initrdefi @INITRDPATH@
-}
-menuentry 'Delete existing persistence & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.overlay.reset=1 quiet rhgb
+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@ without automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet rhgb
- initrdefi @INITRDPATH@
- }
- menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode with automatic data persistence' --class fedora --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist nomodeset quiet rhgb
- initrdefi @INITRDPATH@
- }
- menuentry 'Delete existing persistence & start @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.overlay.overlayfs rd.live.overlay=LABEL=fedorapersist rd.live.overlay.reset=1 nomodeset quiet rhgb
- initrdefi @INITRDPATH@
- }
- menuentry 'Start @PRODUCT@ @VERSION@ in basic graphics mode without automatic persistence' --class fedora --class gnu-linux --class gnu --class os {
+ 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@
}
--
2.39.1

View File

@ -1,31 +0,0 @@
From 633af4499c1387692fbd5e5760d0a42bb5fb70a2 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Wed, 15 Feb 2023 21:20:34 -0800
Subject: [PATCH] Strip some things from gtk4
gtk4 is now getting sucked into installer images because mutter
depends on it (since 44-beta). Strip some stuff the installer
env currently doesn't need. The /usr/bin/* removal may not be
safe long-term, but it should be OK for now.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
share/templates.d/99-generic/runtime-cleanup.tmpl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl
index 31dd44ee..6e0d8e88 100644
--- a/share/templates.d/99-generic/runtime-cleanup.tmpl
+++ b/share/templates.d/99-generic/runtime-cleanup.tmpl
@@ -179,6 +179,8 @@ removefrom google-noto-sans-cjk-fonts /usr/share/fonts/google-noto-sans-cjk-font
removefrom google-noto-sans-vf-fonts /usr/share/fonts/google-noto-vf/NotoSans-Italic-VF.ttf
removefrom grep /etc/* /usr/share/locale/*
removefrom gtk3 /usr/${libdir}/gtk-3.0/*
+removefrom gtk4 /usr/${libdir}/gtk-4.0/*
+removefrom gtk4 /usr/bin/*
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
--
2.39.1

View File

@ -3,8 +3,8 @@
%define debug_package %{nil}
Name: lorax
Version: 38.6
Release: 4%{?dist}
Version: 38.12
Release: 1.4.riscv64%{?dist}
Summary: Tool for creating the anaconda install images
License: GPL-2.0-or-later
@ -14,21 +14,8 @@ URL: https://github.com/weldr/lorax
# git checkout -b archive-branch lorax-%%{version}-%%{release}
# tito build --tgz
Source0: %{name}-%{version}.tar.gz
# Strip some stuff from gtk4, necessary for compose to work since
# gtk4-launch requires libtiff which is stripped itself...
# https://github.com/weldr/lorax/pull/1309
# https://pagure.io/releng/failed-composes/issue/4611
Patch0: 0001-Strip-some-things-from-gtk4.patch
# ...only it turns out we really need at least one of the binaries
# or a window in anaconda doesn't open, so this puts them back
# and stops stripping libtiff
# https://github.com/weldr/lorax/pull/1312
# https://bugzilla.redhat.com/show_bug.cgi?id=2170716
Patch1: 0001-Don-t-strip-gtk4-binaries-or-libtiff-2170716.patch
# Disable default persistence, it's busted:
# https://bugzilla.redhat.com/show_bug.cgi?id=2170544
# https://github.com/weldr/lorax/pull/1310
Patch2: 0001-Revert-templates.d-99-generic-live-Enable-automatic-.patch
Patch1: lorax_riscv.patch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -183,14 +170,50 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
%{_datadir}/lorax/templates.d/*
%changelog
* Fri Feb 17 2023 Adam Williamson <awilliam@redhat.com> - 38.6-4
- Backport PR #1312 to put gtk4 binaries and libtiff back in (#2170716)
* Fri Sep 01 2023 David Abdurachmanov <davidlt@rivosinc.com> 38.12-4.0.riscv64
- Remove more shim for riscv64.
* Thu Feb 16 2023 Adam Williamson <awilliam@redhat.com> - 38.6-3
- Backport PR #1310 to disable persistence again, it's busted (#2170544)
* Fri Sep 01 2023 David Abdurachmanov <davidlt@rivosinc.com> 38.12-3.0.riscv64
- Fix GRUB install.
* Wed Feb 15 2023 Adam Williamson <awilliam@redhat.com> - 38.6-2
- Backport PR #1309 to strip stuff from gtk4, fix Rawhide compose
* Thu Aug 31 2023 David Abdurachmanov <davidlt@rivosinc.com> 38.12-2.0.riscv64
- Update riscv64 templates (we have no shim yet)
* Thu Aug 31 2023 David Abdurachmanov <davidlt@rivosinc.com> 38.12-1.0.riscv64
- Allow broken symlinks in /usr (system loop detected causes exist code 1)
* Thu Aug 31 2023 David Abdurachmanov <davidlt@rivosinc.com> 38.12-1.0.riscv64
- Add riscv64 support
* Wed Aug 09 2023 Brian C. Lane <bcl@redhat.com> 38.12-1
- Exclude more obsoleted libertas firmware packages (awilliam@redhat.com)
* Mon Aug 07 2023 Brian C. Lane <bcl@redhat.com> 38.11-1
- runtime-install: excluded renamed olpc firmware package (awilliam@redhat.com)
- runtime-install: exclude renamed iwl firmware packages (awilliam@redhat.com)
* Mon Mar 27 2023 Brian C. Lane <bcl@redhat.com> 38.10-1
- Pass vga=791 for live basic graphics mode on BIOS (#2176782) (awilliam@redhat.com)
* Tue Mar 14 2023 Brian C. Lane <bcl@redhat.com> 38.9-1
- Add setpriv as ostree containers dependency (#2125655) (jkonecny@redhat.com)
* Mon Feb 20 2023 Brian C. Lane <bcl@redhat.com> 38.8-1
- New lorax documentation - 38.8 (bcl@redhat.com)
- workflow: Update list of push branches for workflow tests (bcl@redhat.com)
- Use Fedora 38 container for running podman tests (bcl@redhat.com)
- Update default releasever and platform id for Fedora 38 (bcl@redhat.com)
* Mon Feb 20 2023 Brian C. Lane <bcl@redhat.com> 38.7-1
- Don't strip gtk4 binaries or libtiff (#2170716) (awilliam@redhat.com)
- image-minimizer: Use RuntimeError instead of Exception (bcl@redhat.com)
- creator: Use RuntimeError instead of Exception (bcl@redhat.com)
- treebuilder: Use RuntimeError instead of Exception (bcl@redhat.com)
- mount: Use RuntimeError instead of Exception (bcl@redhat.com)
- ltmpl: Use RuntimeError instead of Exception (bcl@redhat.com)
- spec: Use autosetup to make patching easier (bcl@redhat.com)
- Revert "templates.d/99-generic/live: Enable automatic persistence for live media" (awilliam@redhat.com)
- Strip some things from gtk4 (awilliam@redhat.com)
* Tue Feb 14 2023 Brian C. Lane <bcl@redhat.com> 38.6-1
- templates.d/99-generic/live: Enable automatic persistence for live media (ngompa@fedoraproject.org)

408
lorax_riscv.patch Normal file
View File

@ -0,0 +1,408 @@
diff --git a/share/templates.d/99-generic/config_files/riscv64/boot.msg b/share/templates.d/99-generic/config_files/riscv64/boot.msg
new file mode 100644
index 0000000..ff54899
--- /dev/null
+++ b/share/templates.d/99-generic/config_files/riscv64/boot.msg
@@ -0,0 +1,5 @@
+
+splash.lss
+
+ - Press the 01<ENTER>07 key to begin the installation process.
+
diff --git a/share/templates.d/99-generic/config_files/riscv64/grub2-efi.cfg b/share/templates.d/99-generic/config_files/riscv64/grub2-efi.cfg
new file mode 100644
index 0000000..1ce5d33
--- /dev/null
+++ b/share/templates.d/99-generic/config_files/riscv64/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/share/templates.d/99-generic/efi.tmpl b/share/templates.d/99-generic/efi.tmpl
index 80600d2..4bf890f 100644
--- a/share/templates.d/99-generic/efi.tmpl
+++ b/share/templates.d/99-generic/efi.tmpl
@@ -8,8 +8,7 @@ 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}/BOOT${efiarch64}.EFI
install boot/efi/EFI/*/gcd${efiarch64|lower}.efi ${EFIBOOTDIR}/grub${efiarch64|lower}.efi
%endif
%if efiarch32:
diff --git a/share/templates.d/99-generic/live/config_files/riscv64/grub2-efi.cfg b/share/templates.d/99-generic/live/config_files/riscv64/grub2-efi.cfg
new file mode 100644
index 0000000..c874547
--- /dev/null
+++ b/share/templates.d/99-generic/live/config_files/riscv64/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/share/templates.d/99-generic/live/efi.tmpl b/share/templates.d/99-generic/live/efi.tmpl
index 813f91e..8870c55 100644
--- a/share/templates.d/99-generic/live/efi.tmpl
+++ b/share/templates.d/99-generic/live/efi.tmpl
@@ -8,8 +8,7 @@ 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}/BOOT${efiarch64}.EFI
install boot/efi/EFI/*/gcd${efiarch64|lower}.efi ${EFIBOOTDIR}/grub${efiarch64|lower}.efi
%endif
%if efiarch32:
diff --git a/share/templates.d/99-generic/live/live-install.tmpl b/share/templates.d/99-generic/live/live-install.tmpl
index ef514ee..2367d1d 100644
--- a/share/templates.d/99-generic/live/live-install.tmpl
+++ b/share/templates.d/99-generic/live/live-install.tmpl
@@ -6,6 +6,10 @@
installpkg efibootmgr
installpkg grub2-efi-aa64-cdboot shim-aa64
%endif
+%if basearch == "riscv64":
+ installpkg efibootmgr
+ installpkg grub2-efi-riscv64-cdboot
+%endif
%if basearch == "x86_64":
installpkg grub2-tools-efi
installpkg efibootmgr
diff --git a/share/templates.d/99-generic/live/riscv64.tmpl b/share/templates.d/99-generic/live/riscv64.tmpl
new file mode 100644
index 0000000..6d8784d
--- /dev/null
+++ b/share/templates.d/99-generic/live/riscv64.tmpl
@@ -0,0 +1,84 @@
+<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel, extra_boot_args"/>
+<%
+configdir="tmp/config_files/riscv64"
+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/*/gcdriscv64.efi"):
+ <%
+ efiarch32 = None
+ efiarch64 = 'riscv64'
+ 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/*/gcdriscv64.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/share/templates.d/99-generic/riscv64.tmpl b/share/templates.d/99-generic/riscv64.tmpl
new file mode 100644
index 0000000..4edee89
--- /dev/null
+++ b/share/templates.d/99-generic/riscv64.tmpl
@@ -0,0 +1,86 @@
+<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel"/>
+<%
+configdir="tmp/config_files/riscv64"
+PXEBOOTDIR="images/pxeboot"
+KERNELDIR=PXEBOOTDIR
+STAGE2IMG="images/install.img"
+LORAXDIR="usr/share/lorax/"
+
+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/*/gcdriscv64.efi"):
+ <%
+ efiarch32 = None
+ efiarch64 = 'riscv64'
+ 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/*/gcdriscv64.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/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl
index 7afb9d9..8c56c87 100644
--- a/share/templates.d/99-generic/runtime-cleanup.tmpl
+++ b/share/templates.d/99-generic/runtime-cleanup.tmpl
@@ -341,7 +341,7 @@ runcmd chroot ${root} find /boot \! -name "vmlinuz*" \
## (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" \
+runcmd chroot ${root} find -L /etc -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
diff --git a/share/templates.d/99-generic/runtime-install.tmpl b/share/templates.d/99-generic/runtime-install.tmpl
index cf879fc..2967774 100644
--- a/share/templates.d/99-generic/runtime-install.tmpl
+++ b/share/templates.d/99-generic/runtime-install.tmpl
@@ -68,6 +68,13 @@ installpkg glibc-all-langpacks
installpkg shim-aa64
installpkg uboot-tools
%endif
+%if basearch == "riscv64":
+ installpkg efibootmgr
+ installpkg grub2-efi-riscv64-cdboot>=${GRUB2VER}
+ installpkg grub2-tools>=${GRUB2VER}
+ installpkg uboot-tools
+%endif
+
%if basearch == "x86_64":
installpkg grub2-tools-efi>=${GRUB2VER}
installpkg efibootmgr
@@ -149,12 +156,12 @@ installpkg nmap-ncat
installpkg pciutils usbutils ipmitool
installpkg mt-st smartmontools
installpkg hdparm
-%if basearch not in ("aarch64", "ppc64le", "s390x"):
+%if basearch not in ("aarch64", "ppc64le", "s390x", "riscv64"):
installpkg pcmciautils
%endif
installpkg libmlx4 rdma-core
installpkg rng-tools
-%if basearch in ("x86_64", "aarch64"):
+%if basearch in ("x86_64", "aarch64", "riscv64"):
installpkg dmidecode
%endif
diff --git a/src/pylorax/installer.py b/src/pylorax/installer.py
index 452439a..885ca09 100644
--- a/src/pylorax/installer.py
+++ b/src/pylorax/installer.py
@@ -138,7 +138,8 @@ class QEMUInstall(object):
# Mapping of arch to qemu command
QEMU_CMDS = {"x86_64": "qemu-system-x86_64",
"aarch64": "qemu-system-aarch64",
- "ppc64le": "qemu-system-ppc64"
+ "ppc64le": "qemu-system-ppc64",
+ "riscv64": "qemu-system-riscv64"
}
def __init__(self, opts, iso, ks_paths, disk_img, img_size=2048,
diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py
index 6d3b974..1871115 100644
--- a/src/pylorax/treebuilder.py
+++ b/src/pylorax/treebuilder.py
@@ -39,6 +39,7 @@ templatemap = {
'ppc64le': 'ppc64le.tmpl',
's390x': 's390.tmpl',
'aarch64': 'aarch64.tmpl',
+ 'riscv64': 'riscv64.tmpl',
}
def generate_module_info(moddir, outfile=None):

View File

@ -1 +1 @@
SHA512 (lorax-38.6.tar.gz) = 1dc0f61203fa73f0bb923c6bc75ef9b2edad72b4b753c2340f0f3c6074bbcf3e3d9c4e98a59d9bb79d8e6bf139d9c720802e4a1bcd37d03f091f08b06b8933b2
SHA512 (lorax-38.12.tar.gz) = 07efb664dc4dc56b417aad9aa1f69cf9b4eeef29e72628ffeb80977602cf630e4361b914a5203a24c6abb8cecec9572f479c6ed28b9d9f25b5c2d765af5cdf3b

View File

@ -230,7 +230,7 @@ fi
# Run lorax using the host's repository configuration file
if [ ! -e "$BOOTISO" ]; then
running "Build boot.iso with lorax"
lorax --product="Fedora" --version=rawhide --release=rawhide --volid="Fedora-rawhide-test" \
lorax --product="Fedora" --version=38 --release=38 --volid="Fedora-38-test" \
$REPOS --isfinal --nomacboot /var/tmp/lorax-fedora-iso/ || exit 1
fi