From 2a7ae9b190a7d2441afa493a3fd5ad284f303bb3af62faa2bb9e5cbe62de8613 Mon Sep 17 00:00:00 2001 From: Ignaz Forster Date: Wed, 7 Jul 2021 16:05:13 +0000 Subject: [PATCH 1/4] Accepting request 896386 from home:susnux:branches:devel:kubic:ignition Update to version 2.10.1 OBS-URL: https://build.opensuse.org/request/show/896386 OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=72 --- _service | 5 +++-- _servicedata | 2 +- ignition-2.10.1.tar.xz | 3 +++ ignition-2.9.0.tar.xz | 3 --- ignition.changes | 15 +++++++++++++++ ignition.spec | 4 ++-- 6 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 ignition-2.10.1.tar.xz delete mode 100644 ignition-2.9.0.tar.xz diff --git a/_service b/_service index eb074ed..0a28e3e 100644 --- a/_service +++ b/_service @@ -1,7 +1,8 @@ - 2.9.0 - v2.9.0 + @PARENT_TAG@ + v(.*) + 3885b9f07c96baf7dcc12c85b914ded151c8fd6e git://github.com/coreos/ignition.git git enable diff --git a/_servicedata b/_servicedata index 9930e95..04c5c5c 100644 --- a/_servicedata +++ b/_servicedata @@ -1,6 +1,6 @@ git://github.com/coreos/ignition.git - ef3afc9ee461fa581dae2d65603c312542e03204 + df082938ffe384268d07352174c2509dc18e8f4f \ No newline at end of file diff --git a/ignition-2.10.1.tar.xz b/ignition-2.10.1.tar.xz new file mode 100644 index 0000000..437edab --- /dev/null +++ b/ignition-2.10.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fae155cd5260737239f85bb4d24215a01278941e15a7c5614bbb4db31e11187e +size 2277352 diff --git a/ignition-2.9.0.tar.xz b/ignition-2.9.0.tar.xz deleted file mode 100644 index 762e71c..0000000 --- a/ignition-2.9.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:64dce5cc31b8dd4fe524299f018231b397c0a38494fe5a09dc2526edd59d0dd7 -size 2271132 diff --git a/ignition.changes b/ignition.changes index b76a3ae..20c34d2 100644 --- a/ignition.changes +++ b/ignition.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Mon May 31 14:57:06 UTC 2021 - rpm@fthiessen.de + +- Update to version 2.10.1: + * Breaking Changes: + * Rename Custom struct to ClevisCustom + * Embed Clevis and ClevisCustom structs in parents + * Always include interior nodes in merge transcript + * Add kernel argument support + * Fix fetching userdata on AWS when IMDSv1 is disabled + * Fix creating Tang-based LUKS volumes before network is up + * Document storage.filesystems.wipeFilesystem default + * Fix file mode of ignition-kargs-helper script +- Fix Go dependency, 1.13+ is required + ------------------------------------------------------------------- Wed Mar 31 16:03:16 UTC 2021 - hello@anthonyrabbito.com diff --git a/ignition.spec b/ignition.spec index 0e60727..b11a9ce 100644 --- a/ignition.spec +++ b/ignition.spec @@ -17,7 +17,7 @@ Name: ignition -Version: 2.9.0 +Version: 2.10.1 Release: 0 Summary: First boot installer and configuration tool License: Apache-2.0 @@ -41,7 +41,7 @@ BuildRequires: dracut BuildRequires: libblkid-devel BuildRequires: systemd-rpm-macros BuildRequires: update-bootloader-rpm-macros -BuildRequires: golang(API) >= 1.12 +BuildRequires: golang(API) >= 1.13 Requires: %{name}-dracut-grub2 Requires: dracut Recommends: %{_sbindir}/groupadd From b6323ddc45c41f0d0cf947b7702c6ff5ac9980d387e20c3f4e2b14bd6f6911ac Mon Sep 17 00:00:00 2001 From: Ignaz Forster Date: Wed, 7 Jul 2021 16:27:38 +0000 Subject: [PATCH 2/4] Accepting request 904616 from home:fos:branches:home:susnux:branches:devel:kubic:ignition Implement missing ignition-kargs-helper script for kernel argument support OBS-URL: https://build.opensuse.org/request/show/904616 OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=73 --- README.SUSE | 2 ++ ignition-kargs-helper | 70 +++++++++++++++++++++++++++++++++++++++++++ ignition.changes | 6 ++++ ignition.spec | 4 ++- 4 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 ignition-kargs-helper diff --git a/README.SUSE b/README.SUSE index 43f414a..34aa941 100644 --- a/README.SUSE +++ b/README.SUSE @@ -35,3 +35,5 @@ Changes for openSUSE / SLE: to avoid having to boot with networking enabled even when it isn't necessary; the actual implementation to start the network is left to the distribution. +* ignition-kargs-helper: + Distribution specific helper script to implement kernel argument support. diff --git a/ignition-kargs-helper b/ignition-kargs-helper new file mode 100644 index 0000000..b266eb0 --- /dev/null +++ b/ignition-kargs-helper @@ -0,0 +1,70 @@ +#!/bin/bash +# Based on Ignition's examples/ignition-kargs-helper + +set -euxo pipefail + +grubcfg="/sysroot/etc/default/grub" + +# Mount root file system. Note that we mount /boot but we don't unmount it +# because we are run in a systemd unit with MountFlags=slave so it is unmounted +# for us. +. /dracut-state.sh +mount "${root#block:}" "${NEWROOT}" +# Also mount x-initrd.mount flagged mounts to get the current /etc state +awk '$4 ~ /x-initrd.mount/ { system("findmnt /sysroot" $2 " >/dev/null || mount -t " $3 " -o " $4 " " $1 " /sysroot" $2) }' /sysroot/etc/fstab + +orig_kernelopts="$(grep GRUB_CMDLINE_LINUX_DEFAULT "${grubcfg}")" +orig_kernelopts="${orig_kernelopts#*=}" +# trim the leading and trailing quote +orig_kernelopts="${orig_kernelopts:1:-1}" + +# add leading and trailing whitespace to allow for easy sed replacements +kernelopts=" $orig_kernelopts " + +while [[ $# -gt 0 ]] +do + key="$1" + + case $key in + --should-exist) + arg="$2" + # don't repeat the arg + if [[ ! "${kernelopts[*]}" =~ " ${arg} " ]]; then + kernelopts="$kernelopts$arg " + fi + shift 2 + ;; + --should-not-exist) + kernelopts="$(echo "$kernelopts" | sed "s| $2 | |g")" + shift 2 + ;; + *) + echo "Unknown option" + exit 1 + ;; + esac +done + +# trim the leading and trailing whitespace +kernelopts="$(echo "$kernelopts" | sed -e 's,^[[:space:]]*,,' -e 's,[[:space:]]*$,,')" + +# only apply the changes & reboot if changes have been made +if [[ "$kernelopts" != "$orig_kernelopts" ]]; then + combustiondir="/run/combustion/mount/combustion" + mkdir -p "${combustiondir}" + # escape escapes to survive the multiple shell invocations + kernelopts="${kernelopts//\\/\\\\\\\\}" + kernelopts="${kernelopts//$/\\\$}" + cat << EOF > "${combustiondir}/script" +sed -i "s|^\(GRUB_CMDLINE_LINUX_DEFAULT=\).*|\1\"$kernelopts\"|" /etc/default/grub +/usr/sbin/grub2-mkconfig > /boot/grub2/grub.cfg +EOF + SYSTEMD_OFFLINE=1 combustion + + # Reset health-checker to prevent an unintended rollback + echo "Clearing GRUB flag" + chroot /sysroot grub2-editenv - set health_checker_flag=0 || true + + reboot +fi + diff --git a/ignition.changes b/ignition.changes index 20c34d2..1febc99 100644 --- a/ignition.changes +++ b/ignition.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 7 16:05:49 UTC 2021 - Ignaz Forster + +- Implement missing ignition-kargs-helper script for kernel + argument support + ------------------------------------------------------------------- Mon May 31 14:57:06 UTC 2021 - rpm@fthiessen.de diff --git a/ignition.spec b/ignition.spec index b11a9ce..3dd2161 100644 --- a/ignition.spec +++ b/ignition.spec @@ -34,6 +34,7 @@ Source7: README.SUSE Source8: ignition-setup-user-suse.sh Source9: ignition-enable-network.service Source10: ignition-enable-network.sh +Source11: ignition-kargs-helper Source20: ignition-userconfig-timeout.conf Source21: ignition-userconfig-timeout-arm.conf Patch2: 0002-allow-multiple-mounts-of-same-device.patch @@ -85,7 +86,7 @@ which creates firstboot_happened after the first boot. %patch2 -p1 mkdir dracut/30ignition-microos grub systemd_suse -chmod +x %{SOURCE3} %{SOURCE4} %{SOURCE8} +chmod +x %{SOURCE3} %{SOURCE4} %{SOURCE8} %{SOURCE11} cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE8} %{SOURCE9} %{SOURCE10} dracut/30ignition-microos/ %ifarch aarch64 %{arm} cp %{SOURCE21} dracut/30ignition-microos/ignition-userconfig-timeout.conf @@ -95,6 +96,7 @@ cp %{SOURCE20} dracut/30ignition-microos/ignition-userconfig-timeout.conf cp %{SOURCE5} grub/ cp %{SOURCE6} systemd_suse/ cp %{SOURCE7} . +cp %{SOURCE11} dracut/30ignition/ignition-kargs-helper.sh %build sed -i -e 's|go build -ldflags|go build -buildmode=pie -ldflags|g' build From 1d10eb3817d23b6d80f055bc20757a73d4703e754eb9d85bffc2c2d8a68c6a73 Mon Sep 17 00:00:00 2001 From: Ignaz Forster Date: Wed, 7 Jul 2021 17:06:33 +0000 Subject: [PATCH 3/4] - Update to version 2.11.0: * news: add notes for 2.11.0 * Upgraded docs * config/*: return report from previous parser when chaining * config/*: re-order testcases by version * tree: update for stable v3.3.0 and new v3.4.0-experimental * config/v3_4_experimental: adapt for experimental * config/v3_4_experimental: copy from config/v3_3 * config/v3_3: adapt for stabilization * config/v3_3_experimental: rename to config/v3_3 * config/v3_3_exp: pointerify ClevisCustom Config and Pin * config/v3_3_exp: pointerify Raid.Level * config/v3_3_exp: pointerify LinkEmbedded1.Target * stages/disks: simplify a check * config/v3_1/translate: don't point to field from input struct * config/v3_3_exp: drop devices from schema "required" field * config/*: validate that storage.raid.devices is non-empty * config/*/types: add RAID validation tests * config/shared/errors: fix ErrSparesUnsupportedForLevel message * config: fix comment * *: formally bump Go to 1.13 * platform: add powervs platform * internal/providers/*stack: drop dead timeout code * stages/disks: improve error reporting for LUKS device reuse * ignition-setup-user.service: drop Before=multipathd.service * Dockerfile: build ignition-validate container using Fedora * workflows: test on Go 1.16 * ... - Refreshed to match new Ignition spec * 0002-allow-multiple-mounts-of-same-device.patch OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=74 --- ...allow-multiple-mounts-of-same-device.patch | 31 +++++++++----- _service | 5 +-- _servicedata | 2 +- ignition-2.10.1.tar.xz | 3 -- ignition-2.11.0.tar.xz | 3 ++ ignition.changes | 40 +++++++++++++++++++ ignition.spec | 2 +- 7 files changed, 69 insertions(+), 17 deletions(-) delete mode 100644 ignition-2.10.1.tar.xz create mode 100644 ignition-2.11.0.tar.xz diff --git a/0002-allow-multiple-mounts-of-same-device.patch b/0002-allow-multiple-mounts-of-same-device.patch index 13d491d..3cd3b8b 100644 --- a/0002-allow-multiple-mounts-of-same-device.patch +++ b/0002-allow-multiple-mounts-of-same-device.patch @@ -6,10 +6,10 @@ Upstream: Ticket opened [gh#coreos/ignition#890] e.g. to mount several subvolumes from a Btrfs device or bind mounting the device to multiple places, by also adding the path to the key. -Index: ignition-2.3.0/config/v3_1/types/filesystem.go +Index: ignition-2.4.0/config/v3_1/types/filesystem.go =================================================================== ---- ignition-2.3.0.orig/config/v3_1/types/filesystem.go -+++ ignition-2.3.0/config/v3_1/types/filesystem.go +--- ignition-2.4.0.orig/config/v3_1/types/filesystem.go ++++ ignition-2.4.0/config/v3_1/types/filesystem.go @@ -23,7 +23,7 @@ import ( ) @@ -19,10 +19,10 @@ Index: ignition-2.3.0/config/v3_1/types/filesystem.go } func (f Filesystem) IgnoreDuplicates() map[string]struct{} { -Index: ignition-2.3.0/config/v3_2/types/filesystem.go +Index: ignition-2.4.0/config/v3_2/types/filesystem.go =================================================================== ---- ignition-2.3.0.orig/config/v3_2/types/filesystem.go -+++ ignition-2.3.0/config/v3_2/types/filesystem.go +--- ignition-2.4.0.orig/config/v3_2/types/filesystem.go ++++ ignition-2.4.0/config/v3_2/types/filesystem.go @@ -23,7 +23,7 @@ import ( ) @@ -32,10 +32,23 @@ Index: ignition-2.3.0/config/v3_2/types/filesystem.go } func (f Filesystem) IgnoreDuplicates() map[string]struct{} { -Index: ignition-2.3.0/config/v3_3_experimental/types/filesystem.go +Index: ignition-2.4.0/config/v3_3/types/filesystem.go =================================================================== ---- ignition-2.3.0.orig/config/v3_3_experimental/types/filesystem.go -+++ ignition-2.3.0/config/v3_3_experimental/types/filesystem.go +--- ignition-2.4.0.orig/config/v3_3/types/filesystem.go ++++ ignition-2.4.0/config/v3_3/types/filesystem.go +@@ -23,7 +23,7 @@ import ( + ) + + func (f Filesystem) Key() string { +- return f.Device ++ return f.Device + *f.Path + } + + func (f Filesystem) IgnoreDuplicates() map[string]struct{} { +Index: ignition-2.4.0/config/v3_4_experimental/types/filesystem.go +=================================================================== +--- ignition-2.4.0.orig/config/v3_4_experimental/types/filesystem.go ++++ ignition-2.4.0/config/v3_4_experimental/types/filesystem.go @@ -23,7 +23,7 @@ import ( ) diff --git a/_service b/_service index 0a28e3e..e840cad 100644 --- a/_service +++ b/_service @@ -1,8 +1,7 @@ - @PARENT_TAG@ - v(.*) - 3885b9f07c96baf7dcc12c85b914ded151c8fd6e + 2.11.0 + v2.11.0 git://github.com/coreos/ignition.git git enable diff --git a/_servicedata b/_servicedata index 04c5c5c..45a8dd1 100644 --- a/_servicedata +++ b/_servicedata @@ -1,6 +1,6 @@ git://github.com/coreos/ignition.git - df082938ffe384268d07352174c2509dc18e8f4f + c10c5d4ed00ea05d42223e2877d8f9bdb9f1ce49 \ No newline at end of file diff --git a/ignition-2.10.1.tar.xz b/ignition-2.10.1.tar.xz deleted file mode 100644 index 437edab..0000000 --- a/ignition-2.10.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fae155cd5260737239f85bb4d24215a01278941e15a7c5614bbb4db31e11187e -size 2277352 diff --git a/ignition-2.11.0.tar.xz b/ignition-2.11.0.tar.xz new file mode 100644 index 0000000..527c4db --- /dev/null +++ b/ignition-2.11.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3f05956d04ce608d8f613313c5462e9bcddcbdc9feb2671ac73925a3c1dace9 +size 2280028 diff --git a/ignition.changes b/ignition.changes index 1febc99..ea2d78b 100644 --- a/ignition.changes +++ b/ignition.changes @@ -1,3 +1,43 @@ +------------------------------------------------------------------- +Wed Jul 07 16:39:04 UTC 2021 - iforster@suse.com + +- Update to version 2.11.0: + * news: add notes for 2.11.0 + * Upgraded docs + * config/*: return report from previous parser when chaining + * config/*: re-order testcases by version + * tree: update for stable v3.3.0 and new v3.4.0-experimental + * config/v3_4_experimental: adapt for experimental + * config/v3_4_experimental: copy from config/v3_3 + * config/v3_3: adapt for stabilization + * config/v3_3_experimental: rename to config/v3_3 + * config/v3_3_exp: pointerify ClevisCustom Config and Pin + * config/v3_3_exp: pointerify Raid.Level + * config/v3_3_exp: pointerify LinkEmbedded1.Target + * stages/disks: simplify a check + * config/v3_1/translate: don't point to field from input struct + * config/v3_3_exp: drop devices from schema "required" field + * config/*: validate that storage.raid.devices is non-empty + * config/*/types: add RAID validation tests + * config/shared/errors: fix ErrSparesUnsupportedForLevel message + * config: fix comment + * *: formally bump Go to 1.13 + * platform: add powervs platform + * internal/providers/*stack: drop dead timeout code + * stages/disks: improve error reporting for LUKS device reuse + * ignition-setup-user.service: drop Before=multipathd.service + * Dockerfile: build ignition-validate container using Fedora + * workflows: test on Go 1.16 + * tests/*: verify deletion of block device w/o creating a FS + * *: allow erasing block device without creating a filesystem + * *: rename other projects' master branches to main + * *: rename master branch to main + * config/*: add export functions for parsing any config version < N + * config/*: refactor config.go's Parse() to use GetConfigVersion + * config/* : minor cleanup +- Refreshed to match new Ignition spec + * 0002-allow-multiple-mounts-of-same-device.patch + ------------------------------------------------------------------- Wed Jul 7 16:05:49 UTC 2021 - Ignaz Forster diff --git a/ignition.spec b/ignition.spec index 3dd2161..a247198 100644 --- a/ignition.spec +++ b/ignition.spec @@ -17,7 +17,7 @@ Name: ignition -Version: 2.10.1 +Version: 2.11.0 Release: 0 Summary: First boot installer and configuration tool License: Apache-2.0 From 60460da4e026b88f93df94f119ace6f871e8eb2ef77bdca6fe915fc2fbc52e1a Mon Sep 17 00:00:00 2001 From: Ignaz Forster Date: Thu, 8 Jul 2021 11:18:19 +0000 Subject: [PATCH 4/4] - If a Combustion device was mounted, then unmount it in ignition-kargs-helper - the replacement script will be put on the same location OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=75 --- ignition-kargs-helper | 9 +++++++++ ignition.changes | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/ignition-kargs-helper b/ignition-kargs-helper index b266eb0..22e8934 100644 --- a/ignition-kargs-helper +++ b/ignition-kargs-helper @@ -51,6 +51,15 @@ kernelopts="$(echo "$kernelopts" | sed -e 's,^[[:space:]]*,,' -e 's,[[:space:]]* # only apply the changes & reboot if changes have been made if [[ "$kernelopts" != "$orig_kernelopts" ]]; then combustiondir="/run/combustion/mount/combustion" + # The Combustion script may be located on an external device; if so the + # device is guaranteed to mounted here already: + # combustion-prepare: Before=dracutinitqueue.service + # ignition-fetch: After=basic.target + # Unmount the device, as the new Combustion script will be put at the + # same location below. + if findmnt "${combustiondir}"/.. >/dev/null; then + umount "${combustiondir}"/.. + fi mkdir -p "${combustiondir}" # escape escapes to survive the multiple shell invocations kernelopts="${kernelopts//\\/\\\\\\\\}" diff --git a/ignition.changes b/ignition.changes index ea2d78b..de40eaa 100644 --- a/ignition.changes +++ b/ignition.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 8 10:47:50 UTC 2021 - Ignaz Forster + +- If a Combustion device was mounted, then unmount it in + ignition-kargs-helper - the replacement script will be put on + the same location + ------------------------------------------------------------------- Wed Jul 07 16:39:04 UTC 2021 - iforster@suse.com