SHA256
1
0
forked from pool/ignition

Accepting request 904751 from devel:kubic:ignition

- If a Combustion device was mounted, then unmount it in
  ignition-kargs-helper - the replacement script will be put on
  the same location
- 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
- Implement missing ignition-kargs-helper script for kernel
  argument support
- 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

OBS-URL: https://build.opensuse.org/request/show/904751
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ignition?expand=0&rev=23
This commit is contained in:
Dominique Leuenberger 2021-07-08 20:49:08 +00:00 committed by Git OBS Bridge
commit 41e622f22e
9 changed files with 182 additions and 18 deletions

View File

@ -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 (
)

View File

@ -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.

View File

@ -1,7 +1,7 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="version">2.9.0</param>
<param name="revision">v2.9.0</param>
<param name="version">2.11.0</param>
<param name="revision">v2.11.0</param>
<param name="url">git://github.com/coreos/ignition.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>

View File

@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/coreos/ignition.git</param>
<param name="changesrevision">ef3afc9ee461fa581dae2d65603c312542e03204</param>
<param name="changesrevision">c10c5d4ed00ea05d42223e2877d8f9bdb9f1ce49</param>
</service>
</servicedata>

3
ignition-2.11.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d3f05956d04ce608d8f613313c5462e9bcddcbdc9feb2671ac73925a3c1dace9
size 2280028

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64dce5cc31b8dd4fe524299f018231b397c0a38494fe5a09dc2526edd59d0dd7
size 2271132

79
ignition-kargs-helper Normal file
View File

@ -0,0 +1,79 @@
#!/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"
# 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//\\/\\\\\\\\}"
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

View File

@ -1,3 +1,71 @@
-------------------------------------------------------------------
Thu Jul 8 10:47:50 UTC 2021 - Ignaz Forster <iforster@suse.com>
- 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
- 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 <iforster@suse.com>
- Implement missing ignition-kargs-helper script for kernel
argument support
-------------------------------------------------------------------
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

View File

@ -17,7 +17,7 @@
Name: ignition
Version: 2.9.0
Version: 2.11.0
Release: 0
Summary: First boot installer and configuration tool
License: Apache-2.0
@ -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
@ -41,7 +42,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
@ -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