diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/0024-printf.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/0024-printf.patch new file mode 100644 index 00000000000..9fabd2d065c --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/files/0024-printf.patch @@ -0,0 +1,54 @@ +From cae210b50372c63a03ff221f7d00c0e3139f4cf4 Mon Sep 17 00:00:00 2001 +From: Kai Lueke +Date: Tue, 21 Nov 2023 17:39:23 +0100 +Subject: [PATCH] printf + +--- + internal/exec/stages/disks/partitions.go | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/internal/exec/stages/disks/partitions.go b/internal/exec/stages/disks/partitions.go +index 97591c2f..3d5ee8f3 100644 +--- a/internal/exec/stages/disks/partitions.go ++++ b/internal/exec/stages/disks/partitions.go +@@ -433,6 +433,7 @@ func (s stage) partitionDisk(dev types.Disk, devAlias string) error { + if inUse && len(activeParts) == 0 { + return fmt.Errorf("refusing to operate on directly active disk %q", devAlias) + } ++ fmt.Printf("PRINT: inUse: %v activeParts: %v", inUse, activeParts) + if cutil.IsTrue(dev.WipeTable) { + op := sgdisk.Begin(s.Logger, devAlias) + s.Logger.Info("wiping partition table requested on %q", devAlias) +@@ -459,6 +460,7 @@ func (s stage) partitionDisk(dev types.Disk, devAlias string) error { + if err != nil { + return fmt.Errorf("failed to resolve %q: %v", devAlias, err) + } ++ fmt.Printf("PRINT: blockDevResolved: %v", blockDevResolved) + + // get a list of parititions that have size and start 0 replaced with the real sizes + // that would be used if all specified partitions were to be created anew. +@@ -527,6 +529,7 @@ func (s stage) partitionDisk(dev types.Disk, devAlias string) error { + if partInUse && modification { + return fmt.Errorf("refusing to modfiy active partition %d on %q", part.Number, devAlias) + } ++ fmt.Printf("PRINT: partInUse %v, modification %v", partInUse, modification) + } + + if err := op.Commit(); err != nil { +@@ -538,10 +541,13 @@ func (s stage) partitionDisk(dev types.Disk, devAlias string) error { + // kernel partition table with BLKPG but only uses BLKRRPART which fails + // as soon as one partition of the disk is mounted + cmd := exec.Command(distro.PartxCmd(), "-u", "-", blockDevResolved) ++ fmt.Printf("PRINT: cmd: %v", cmd) + if _, err := s.Logger.LogCmd(cmd, "triggering partition table reread on %q", devAlias); err != nil { + return fmt.Errorf("re-reading partitions failed: %v", err) + } ++ fmt.Printf("PRINT: partx ran") + } ++ fmt.Printf("PRINT: wait for udev") + + // It's best to wait here for the /dev/ABC entries to be + // (re)created, not only for other parts of the initramfs but +-- +2.42.0 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/ignition-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/ignition-9999.ebuild index 6807ae0a70e..272fea36c45 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/ignition-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/ignition/ignition-9999.ebuild @@ -65,6 +65,7 @@ PATCHES=( "${FILESDIR}/0021-internal-exec-stages-mount-Mount-oem.patch" "${FILESDIR}/0022-disks-Refuse-to-modify-disks-partitions-in-use.patch" "${FILESDIR}/0023-sgdisk-Run-partx-after-partition-changes.patch" + "${FILESDIR}/0024-printf.patch" ) src_compile() {