diff --git a/0001-ignore-missing-qemu-blockdev.patch b/0001-ignore-missing-qemu-blockdev.patch index b35fd53..6323207 100644 --- a/0001-ignore-missing-qemu-blockdev.patch +++ b/0001-ignore-missing-qemu-blockdev.patch @@ -1,5 +1,5 @@ -Author: Ignaz Forster -Date: Thu, 9 Feb 2023 16:05:27 +0100 +From: Ignaz Forster +Date: Thu, 9 Feb 2023 16:05:27 +0100 Upstream: Ticket opened [gh#coreos/ignition#1556] Continue with empty config on missing QEMU device diff --git a/0002-allow-multiple-mounts-of-same-device.patch b/0002-allow-multiple-mounts-of-same-device.patch index 3f5de14..6454f7b 100644 --- a/0002-allow-multiple-mounts-of-same-device.patch +++ b/0002-allow-multiple-mounts-of-same-device.patch @@ -1,5 +1,5 @@ -Author: Ignaz Forster -Date: Wed Jan 14 17:57:52 2020 +0100 +From: Ignaz Forster +Date: Wed Jan 14 17:57:52 2020 +0100 Upstream: Ticket opened [gh#coreos/ignition#890] Implement poor man's solution for mounting a device multiple times, @@ -10,12 +10,14 @@ Index: ignition-2.15.0/config/v3_1/types/filesystem.go =================================================================== --- ignition-2.15.0.orig/config/v3_1/types/filesystem.go +++ ignition-2.15.0/config/v3_1/types/filesystem.go -@@ -23,7 +23,7 @@ import ( +@@ -23,7 +23,10 @@ import ( ) func (f Filesystem) Key() string { -- return f.Device -+ return f.Device + *f.Path ++ if (f.Path != nil) { ++ f.Device += *f.Path ++ } + return f.Device } func (f Filesystem) IgnoreDuplicates() map[string]struct{} { @@ -23,12 +25,14 @@ Index: ignition-2.15.0/config/v3_2/types/filesystem.go =================================================================== --- ignition-2.15.0.orig/config/v3_2/types/filesystem.go +++ ignition-2.15.0/config/v3_2/types/filesystem.go -@@ -23,7 +23,7 @@ import ( +@@ -23,7 +23,10 @@ import ( ) func (f Filesystem) Key() string { -- return f.Device -+ return f.Device + *f.Path ++ if (f.Path != nil) { ++ f.Device += *f.Path ++ } + return f.Device } func (f Filesystem) IgnoreDuplicates() map[string]struct{} { @@ -36,12 +40,14 @@ Index: ignition-2.15.0/config/v3_3/types/filesystem.go =================================================================== --- ignition-2.15.0.orig/config/v3_3/types/filesystem.go +++ ignition-2.15.0/config/v3_3/types/filesystem.go -@@ -23,7 +23,7 @@ import ( +@@ -23,7 +23,10 @@ import ( ) func (f Filesystem) Key() string { -- return f.Device -+ return f.Device + *f.Path ++ if (f.Path != nil) { ++ f.Device += *f.Path ++ } + return f.Device } func (f Filesystem) IgnoreDuplicates() map[string]struct{} { @@ -49,12 +55,14 @@ Index: ignition-2.15.0/config/v3_4/types/filesystem.go =================================================================== --- ignition-2.15.0.orig/config/v3_4/types/filesystem.go +++ ignition-2.15.0/config/v3_4/types/filesystem.go -@@ -23,7 +23,7 @@ import ( +@@ -23,7 +23,10 @@ import ( ) func (f Filesystem) Key() string { -- return f.Device -+ return f.Device + *f.Path ++ if (f.Path != nil) { ++ f.Device += *f.Path ++ } + return f.Device } func (f Filesystem) IgnoreDuplicates() map[string]struct{} { @@ -62,12 +70,14 @@ Index: ignition-2.15.0/config/v3_5_experimental/types/filesystem.go =================================================================== --- ignition-2.15.0.orig/config/v3_5_experimental/types/filesystem.go +++ ignition-2.15.0/config/v3_5_experimental/types/filesystem.go -@@ -23,7 +23,7 @@ import ( +@@ -23,7 +23,10 @@ import ( ) func (f Filesystem) Key() string { -- return f.Device -+ return f.Device + *f.Path ++ if (f.Path != nil) { ++ f.Device += *f.Path ++ } + return f.Device } func (f Filesystem) IgnoreDuplicates() map[string]struct{} { diff --git a/0003-Move-the-GTP-header-on-resized-disks.patch b/0003-Move-the-GTP-header-on-resized-disks.patch new file mode 100644 index 0000000..a762c6e --- /dev/null +++ b/0003-Move-the-GTP-header-on-resized-disks.patch @@ -0,0 +1,23 @@ +From: Ignaz Forster +Date: Tue, 22 Aug 2023 16:13:07 +0200 +Subject: [PATCH] Move the GTP header on resized disks + +--- + internal/sgdisk/sgdisk.go | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/internal/sgdisk/sgdisk.go b/internal/sgdisk/sgdisk.go +index 29915809..9be5a9e6 100644 +--- a/internal/sgdisk/sgdisk.go ++++ b/internal/sgdisk/sgdisk.go +@@ -138,6 +138,7 @@ func (op Operation) buildOptions() []string { + } + + for _, p := range op.parts { ++ opts = append(opts, "--move-second-header") + opts = append(opts, fmt.Sprintf("--new=%d:%s:+%s", p.Number, partitionGetStart(p), partitionGetSize(p))) + if p.Label != nil { + opts = append(opts, fmt.Sprintf("--change-name=%d:%s", p.Number, *p.Label)) +-- +2.41.0 + diff --git a/ignition.changes b/ignition.changes index 3bef9f0..f15dd65 100644 --- a/ignition.changes +++ b/ignition.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Aug 23 13:33:29 UTC 2023 - Ignaz Forster + +- Fix segmentation fault if filesystem section of Ignition JSON + doesn't contain path entry +- Add 0003-Move-the-GTP-header-on-resized-disks.patch to make it + possible to create partitions on resized disk images +- Add dm and crypt modules as dependencies to make it possible to + configure a luks device +- Fix patch file metadata + ------------------------------------------------------------------- Thu Jul 13 20:08:51 UTC 2023 - iforster@suse.com diff --git a/ignition.spec b/ignition.spec index 669b936..98c3930 100644 --- a/ignition.spec +++ b/ignition.spec @@ -43,6 +43,7 @@ Source20: ignition-userconfig-timeout.conf Source21: ignition-userconfig-timeout-arm.conf Patch1: 0001-ignore-missing-qemu-blockdev.patch Patch2: 0002-allow-multiple-mounts-of-same-device.patch +Patch3: 0003-Move-the-GTP-header-on-resized-disks.patch BuildRequires: dracut BuildRequires: libblkid-devel BuildRequires: systemd-rpm-macros diff --git a/module-setup.sh b/module-setup.sh index 118fc1e..4ab867c 100644 --- a/module-setup.sh +++ b/module-setup.sh @@ -3,7 +3,7 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh depends() { - echo ignition + echo ignition dm crypt } install_ignition_unit() { @@ -33,7 +33,7 @@ install() { "/usr/sbin/ignition-enable-network" inst_script "$moddir/ignition-setup-user.sh" \ "/usr/sbin/ignition-setup-user" - inst_multiple awk systemd-detect-virt + inst_multiple awk systemd-detect-virt cryptsetup install_ignition_unit ignition-remove-reconfig_system.service initrd.target install_ignition_unit ignition-setup-user.service }