Accepting request 962241 from devel:kubic:ignition

OBS-URL: https://build.opensuse.org/request/show/962241
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ignition?expand=0&rev=31
This commit is contained in:
Dominique Leuenberger 2022-03-18 15:41:37 +00:00 committed by Git OBS Bridge
commit e6f4fbf554
4 changed files with 32 additions and 4 deletions

View File

@ -0,0 +1,21 @@
[Unit]
Description=Disable firstboot wizard if ignition ran
# Make sure ignition completed
After=ignition-complete.target
# Don't race with combustion
After=combustion.service
# Make sure /sysroot/etc and var are available
After=initrd-parse-etc.service
RequiresMountsFor=/sysroot/etc
RequiresMountsFor=/sysroot/var
ConditionPathExists=/sysroot/etc/.ignition-result.json
ConditionPathExists=/sysroot/var/lib/YaST2/reconfig_system
[Service]
Type=oneshot
RemainAfterExit=yes
# Use grep to avoid pulling in jq
ExecStart=/bin/sh -ec 'if grep -q "\\"userConfigProvided\\":.*true" /sysroot/etc/.ignition-result.json; then rm /sysroot/var/lib/YaST2/reconfig_system; fi'

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 4 10:46:21 UTC 2022 - Fabian Vogt <fvogt@suse.com>
- Remove /var/lib/YaST2/reconfig_system if a config was provided:
* ignition-remove-reconfig_system.service
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Mar 4 10:23:10 UTC 2022 - Fabian Vogt <fvogt@suse.com> Fri Mar 4 10:23:10 UTC 2022 - Fabian Vogt <fvogt@suse.com>
@ -71,7 +77,7 @@ Mon Aug 09 08:51:52 UTC 2021 - iforster@suse.com
* go.mod: revendor * go.mod: revendor
* Drop EOL Go versions * Drop EOL Go versions
* internal/distro: drop DiskByIDDir * internal/distro: drop DiskByIDDir
* providers/azure: add support for azure gen2 VMs * providers/azure: add support for azure gen2 VMs [bsc#1196679]
* stages/mount: correctly relabel the root of a fresh ext4 filesystem * stages/mount: correctly relabel the root of a fresh ext4 filesystem
* exec: fix permissions for mountpoints in home dirs * exec: fix permissions for mountpoints in home dirs
* tests: drop os.ModeDir requirement in mode of output directories * tests: drop os.ModeDir requirement in mode of output directories

View File

@ -35,6 +35,7 @@ Source9: ignition-setup-user.service
Source10: ignition-enable-network.service Source10: ignition-enable-network.service
Source11: ignition-enable-network.sh Source11: ignition-enable-network.sh
Source12: ignition-kargs-helper Source12: ignition-kargs-helper
Source13: ignition-remove-reconfig_system.service
Source20: ignition-userconfig-timeout.conf Source20: ignition-userconfig-timeout.conf
Source21: ignition-userconfig-timeout-arm.conf Source21: ignition-userconfig-timeout-arm.conf
Patch2: 0002-allow-multiple-mounts-of-same-device.patch Patch2: 0002-allow-multiple-mounts-of-same-device.patch
@ -82,12 +83,11 @@ GRUB2 configuration which sets ignition.firstboot based on
which creates firstboot_happened after the first boot. which creates firstboot_happened after the first boot.
%prep %prep
%setup -q %autosetup -p1
%patch2 -p1
mkdir dracut/30ignition-microos grub systemd_suse mkdir dracut/30ignition-microos grub systemd_suse
chmod +x %{SOURCE3} %{SOURCE4} %{SOURCE8} %{SOURCE12} chmod +x %{SOURCE3} %{SOURCE4} %{SOURCE8} %{SOURCE12}
cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE8} %{SOURCE9} %{SOURCE10} %{SOURCE11} dracut/30ignition-microos/ cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE8} %{SOURCE9} %{SOURCE10} %{SOURCE11} %{SOURCE13} dracut/30ignition-microos/
%ifarch aarch64 %{arm} %ifarch aarch64 %{arm}
cp %{SOURCE21} dracut/30ignition-microos/ignition-userconfig-timeout.conf cp %{SOURCE21} dracut/30ignition-microos/ignition-userconfig-timeout.conf
%else %else

View File

@ -30,6 +30,7 @@ install() {
inst_script "$moddir/ignition-setup-user.sh" \ inst_script "$moddir/ignition-setup-user.sh" \
"/usr/sbin/ignition-setup-user" "/usr/sbin/ignition-setup-user"
inst_multiple awk systemd-detect-virt inst_multiple awk systemd-detect-virt
install_ignition_unit ignition-remove-reconfig_system.service initrd.target
install_ignition_unit ignition-setup-user.service install_ignition_unit ignition-setup-user.service
} }