Hello community, here is the log from the commit of package ignition for openSUSE:Factory checked in at 2020-08-12 10:29:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ignition (Old) and /work/SRC/openSUSE:Factory/.ignition.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ignition" Wed Aug 12 10:29:35 2020 rev:15 rq:825412 version:2.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ignition/ignition.changes 2020-05-11 13:44:57.885579234 +0200 +++ /work/SRC/openSUSE:Factory/.ignition.new.3399/ignition.changes 2020-08-12 10:33:55.840214851 +0200 @@ -1,0 +2,443 @@ +Sun Aug 09 22:06:51 UTC 2020 - ku...@suse.de + +- Update to version 2.6.0: + * news: add notes for 2.6.0 + * travis: test container build + * README: always run latest release of ignition-validate container + * release-checklist: update Quay release tag + * build_releases: specialize for container build + * Revert "build_releases: drop script" + * ci: use faster compression for buildextend-live + * cloudstack|openstack: propagate ErrNeedNet + * internal/config: allow Ignition generated key-files for all devices + * dracut/30ignition: Add packages to delete users/groups + * tests/positive: Add test for deleting users + * tests/stubs: Add blackbox testing stub for userdel and groupdel + * config: add ShouldExist to schema + * passwd: allow removing the existing users/groups + * Revert "ci: skip rootfs.uuid test while ratcheting ignition-dracut merge" + * ci: drop cosa compress call +- Add 0001-fix-install-permissions.patch: Fix permissions of installed files +- Add 0003-fix-i386-build.patch: Fix build on 32 Bit x86 machines + +------------------------------------------------------------------- +Tue Jul 28 11:16:55 UTC 2020 - ku...@suse.de + +- Update to version 2.5.0: + Merge of ignition-dracut into ignition; CoreOS specific files have been + removed (they can be found as part of + https://github.com/coreos/fedora-coreos-config now for reference) + * news: add notes for 2.5.0 + * ci: skip rootfs.uuid test while ratcheting ignition-dracut merge + * stages/disks: get filesystem info via device alias + * dracut: remove CoreOS specific modules + * Clean-up post-merge files. + * ci: build metal4k image before live image + * 30ignition: move conditional network startup out of ignition-dracut + * tests/kola: move blackbox tests to its own dir + * build_releases: drop script + * templates: update checklist for current process + * dracut/30ignition: fix typo in udev rule + * dracut/30ignition: add Ignition LUKS + * make: install systemd unit as non-executable + * 30ignition: make var in dracut_func local + * Add new ignition-fetch-offline.service + * ci: test with git master of coreos/ignition + * 30ignition: GPT setup: wait for 'boot' labeled partition + * 30ignition: add wipefs to the initramfs + * Remove OnFailure= from targets, put in services + * ignition-setup-user.service: run before multipathd + * 30ignition: clean up Ignition stages ordering + * coreos-teardown-initramfs: propagate the automatic multipath conf + * 99emergency-timeout: Dump all failed services + * 30ignition: drop hard requirement on qemu_fw_cfg + * 99emergency-timeout: improve readability of Ignition failure message + * 99emergency-timeout: also check ignition-fetch.service for failure + * coreos-teardown-initramfs-network: don't run when emergency.target + * dracut: add logging to systemd generator + * coreos-teardown-initramfs-network: also propagate hostname + * coreos-teardown-initramfs-network: support coreos.no_persist_ip karg + * coreos-teardown-initramfs-network: consider ifcfg files in real root for RHCOS + * coreos-teardown-initramfs-network: also skip local loopback interface + * coreos-teardown-initramfs-network: do SELinux relabel on copied files + * coreos-teardown-initramfs-network: order ExecStop after other ignition units + * coreos-teardown-initramfs-network: remove After=ignition-files.service + * Add ignition-virtio-dump-journal.service + * Add `basename` dependency to dracut module + * coreos-teardown-initramfs-network: enable the service statically + * coreos-teardown-initramfs-network: simplify networking takedown + * coreos-teardown-initramfs-network: take down routes too + * coreos-teardown-initramfs-network: take down teams as well + * coreos-teardown-initramfs-network: remove state files on switch + * coreos-teardown-initramfs-network: also propagate initramfs networking if desired + * coreos-teardown-initramfs-network: refactor into more functions + * add coreos-teardown-initramfs-network.service + * Declare external applications as optional + * Remove obsolete dependencies + * Hook up to CoreOS CI + * Add ignition-diskful-subsequent.target + * Makefile: Remove grub/ install bits + * Make setfiles optional + * dracut: add some bins for s390x zVM instalation + * README.md: add details about the branches here + * units: add ConditionPathExists=/etc/initrd-release everywhere + * Add ConditionPathExists=/etc/initrd-release to targets + * 30ignition: add setfiles + * 30ignition/ignition-setup-user: mount /boot partition ro + * firstboot-complete: tell zipl to run + * coreos-gpt-setup: workaround old lsblk not having PTUUID + * Add `ignition-subsequent.target` for non-Ignition boots + * ignition-firstboot-complete.service: Run as part of basic.target + * Run ignition-disks earlier to avoid race condition + * 30ignition: update ignition-complete.target OnFailure comment + * dracut: Add an ignition-fetch.service + * 30ignition: drop OnFailure handler from ignition-diskful.target + * 30ignition: fix sequencing of target dependencies + * Add RemainAfterExit=yes to systemd units of Type=oneshot + * Makefile: New file implementing `make install` + * 30ignition: move coreos-gpt-setup RemainAfterExit to correct section + * 30ignition: on live images, read config.ign from custom initrd + * 30ignition: make ignition-diskful a dependency of ignition-complete + * 30ignition: fix double slash in ignition-setup-* dest paths + * systemd: don't try to mark live boots complete + * 30ignition: conditionally enable units requiring a boot disk + * README.md: fix download link + * update-bootengine: drop file + * dracut/30ignition: localize some variables + * ignition: fix correct device path when randomizing UUID + * dracut/30ignition: fix typo in module_setup + * ignition: split ignition-setup into base and user + * dracut/30ignition: scramble disk uuid on 1st boot + * grub: drop 02_ignition_firstboot + * dracut: add 99emergency-timeout + * 30ignition: drop CoreOS specific bits + * dracut/30ignition: link to RHBZ in ignition-complete + * dracut/30ignition: add OnFailure= for ExecStop= services + * dracut/30ignition: order ExecStop= units before initrd-switch-root.target + * dracut/30ignition: re-order directives in remount-sysroot + * dracut/30ignition: add missing Before= for mount unit + * dracut/30ignition: order ignition-complete.target before initrd.target + * module_setup: include cdrom rules for openstack + * dracut: add CoreOS integration services + * dracut/30ignition: Add mount stage and drop OSTree-specific bits + * dracut/30ignition: Explicitly add OnFailure=emergency.target + * 30ignition: ignore coreos.randomize_disk_guid + * 30ignition: drop check for coreos.oem.id + * grub: support overriding network kcmdline args + * README.md: update documentation + * 02_ignition_firstboot: Enable networking if Ignition will run + * dracut/30ignition: expect ignition binary in module directory + * dracut/30ignition: add ignition-complete.target + * dracut/30ignition: split out ignition-setup.service + * dracut/30ignition: Only write ignition-setup.service on first boot + * grub: find boot partition and use it directly + * module-setup.sh: Check for module qemu_fw_cfg not build-in, so it works out of box on all arches + * dracut/30ignition: general hack cleanups + * dracut: adapt for s/oem/platform in Ignition + * ignition-setup: don't perform umount, rely on systemd + * ignition-setup: rename copy function + * services: fixup unit deps to more match CL + * ignition-setup: use MountFlags=slave for systemd unit + * ignition-setup: changes from code review + * ignition-setup: mount/unmount boot to grab user.ign + * dracut: add /usr/sbin/ignition-setup to initramfs + * generator: try to get ignition-setup to run on boot + * generator: RemainAfterExit=yes for ignition-setup + * ignition-setup: support boot or platform base/user configs + * ignition-setup: remove support for default configs + * Remove the check for OEM partition, not used + * Always check for boot, needs to exist + * Replace OEM with boot + * Add ability to parse config.ign file on boot + * journal: add clarifying comment for context + * Remount /sysroot rw (#38) + * ignition-firstboot-complete.service: Remount /boot rw + * Rename `coreos.firstboot` kernel cmdline arg to `ignition.firstboot` to make options more distribution neutral. Update dracut/README.txt to take into account recent changes. + * 30ignition: only instmods if module available + * remove ignition-remount-sysroot.service files + * ignition: run files stage at original CL ordering + * ignition-disks.service: drop Requires=network.target + * ignition-ask-var-mount.service: use RemainAfterExit=yes + * module-setup.sh: explicitly install qemu_fw_cfg + * module-setup: Make mkfs.btrfs optional + * 30ignition: add support for ignition-disks + * journal: Don't log to console AND kmsg + * dracut/ignition: remove CL-legacy udev references + * coreos-firstboot-complete: RemainAfterExit=yes + * change the default level of messages send to kmsg + * Add Journald forward to kernel log buffer option + * fixup! Rework how we run Ignition on first boot + * Rework how we run Ignition on first boot + * Drop 'auto-detect' hacks in generator + * Make ignition work on classic systems + * ignition-generator: add hack for openstack support + * Add ignition-ask-var-mount.service + * no disks for now - boot systemd unit ordering issue + * Run ignition-files after ostree-prepare-root.service + * Prefix remount-sysroot.service with "ignition-" + * README.txt: fix rpm-ostree instruction + * update README + * add back in forwarding journal to console + * get rid of usr-generator module + * For now let's assume ec2 if we are running on xen + * module-setup: update module-setup so deps are pulled in + * module-setup: order install list alphabetically + * README: Note instructions are for classic systems + * ignition-quench.clc: add the source for ignition-quench.ign + * add ignition disks stage + * only run Ignition on first boot + * module-setup.sh should install the binaries Ignition depends on + * reset to 863a8f6 + * Try to fix problem + * Revert "use /etc/machine-id to detect firstboot" + * use /etc/machine-id to detect firstboot + * Make it so we will only run once + * Add README that shows people how to use this + * Hack dracut to just do ignition-files. + * remove extra sauce ++++ 246 more lines (skipped) ++++ between /work/SRC/openSUSE:Factory/ignition/ignition.changes ++++ and /work/SRC/openSUSE:Factory/.ignition.new.3399/ignition.changes Old: ---- ignition-2.3.0.tar.xz New: ---- 0001-fix-install-permissions.patch 0003-fix-i386-build.patch 02_ignition_firstboot README.SUSE change-ignition-firstboot-path.conf ignition-2.6.0.tar.xz ignition-enable-network.service ignition-enable-network.sh ignition-mount-initrd-fstab.service ignition-rpmlintrc ignition-setup-user-suse.sh ignition-suse-generator ignition-userconfig-timeout-arm.conf ignition-userconfig-timeout.conf module-setup.sh ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ignition.spec ++++++ --- /var/tmp/diff_new_pack.4ZYCkM/_old 2020-08-12 10:34:02.920218364 +0200 +++ /var/tmp/diff_new_pack.4ZYCkM/_new 2020-08-12 10:34:02.924218366 +0200 @@ -17,15 +17,33 @@ Name: ignition -Version: 2.3.0 +Version: 2.6.0 Release: 0 Summary: First boot installer and configuration tool License: Apache-2.0 Group: System/Management URL: https://github.com/coreos/ignition Source: %{name}-%{version}.tar.xz +Source1: ignition-mount-initrd-fstab.service +Source2: ignition-rpmlintrc +Source3: ignition-suse-generator +Source4: module-setup.sh +Source5: 02_ignition_firstboot +Source6: change-ignition-firstboot-path.conf +Source7: README.SUSE +Source8: ignition-setup-user-suse.sh +Source9: ignition-enable-network.service +Source10: ignition-enable-network.sh +Source20: ignition-userconfig-timeout.conf +Source21: ignition-userconfig-timeout-arm.conf +Patch1: 0001-fix-install-permissions.patch Patch2: 0002-allow-multiple-mounts-of-same-device.patch +Patch3: 0003-fix-i386-build.patch +Requires: %{name}-dracut-grub2 Requires: dracut +Requires: virt-what +Provides: ignition-dracut = 0.0+git20200722.98ed51d +Obsoletes: ignition-dracut < 0.0+git20200722.98ed51d Recommends: /sbin/mkfs.btrfs Recommends: /sbin/mkfs.ext4 Recommends: /sbin/mkfs.vfat @@ -39,7 +57,10 @@ Suggests: /sbin/mdadm BuildRequires: dracut BuildRequires: libblkid-devel +BuildRequires: systemd-rpm-macros +BuildRequires: update-bootloader-rpm-macros BuildRequires: golang(API) >= 1.12 +%{update_bootloader_requires} %description Ignition is an utility to manipulate disks and configuration files @@ -50,24 +71,97 @@ (remote URL, network metadata service, hypervisor bridge, etc.) and applies the configuration. +%package dracut-grub2 +Summary: Files to trigger ignition firstboot with grub2 +Group: System/Management +Requires: grub2 +Requires(post): grub2 +Requires(post): sed + +%description dracut-grub2 +GRUB2 configuration which sets ignition.firstboot based on +/boot/writable/firstboot_happened and ignition.firstboot and a matching service +which creates firstboot_happened after the first boot. + %prep %setup -q +%patch1 -p1 %patch2 -p1 +%patch3 -p1 + +mkdir dracut/30ignition-microos grub systemd_suse +chmod +x %{SOURCE3} %{SOURCE4} %{SOURCE8} +cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE8} %{SOURCE9} %{SOURCE10} dracut/30ignition-microos/ +%ifarch aarch64 %{arm} +cp %{SOURCE21} dracut/30ignition-microos/ignition-userconfig-timeout.conf +%else +cp %{SOURCE20} dracut/30ignition-microos/ignition-userconfig-timeout.conf +%endif +cp %{SOURCE5} grub/ +cp %{SOURCE6} systemd_suse/ +cp %{SOURCE7} . %build sed -i -e 's|go build -ldflags|go build -buildmode=pie -ldflags|g' build env VERSION=%{version} GLDFLAGS='-X github.com/coreos/ignition/v2/internal/distro.selinuxRelabel=false -X github.com/coreos/ignition/v2/internal/distro.writeAuthorizedKeysFragment=false ' bash -x ./build %install -install -d %{buildroot}%{_prefix}/lib/dracut/modules.d/30ignition -install -p -m 0755 bin/*/ignition %{buildroot}%{_prefix}/lib/dracut/modules.d/30ignition -install -d -p %{buildroot}%{_bindir} -install -p -m 0755 bin/*/ignition-validate %{buildroot}%{_bindir} +make -o all install DESTDIR="${RPM_BUILD_ROOT}" + +install -d %{buildroot}%{_sysconfdir}/grub.d +install -d %{buildroot}%{_prefix}/lib/systemd/system/ignition-firstboot-complete.service.d +install -p -m 0755 grub/* %{buildroot}%{_sysconfdir}/grub.d/ +install -p -m 0644 systemd_suse/*.conf %{buildroot}%{_prefix}/lib/systemd/system/ignition-firstboot-complete.service.d/ + +%post +%{?regenerate_initrd_post} +# Trigger creating the firstboot_happened file (in posttrans) on upgrades. +# This is needed for systems where the first boot happened before +# firstboot_happened got introduced and can be removed in the future. +if [ "$1" -ne 1 ]; then + mkdir -p %{_rundir}/ignition-dracut/ + touch %{_rundir}/ignition-dracut/isupgrade +fi + +%posttrans +%{?regenerate_initrd_posttrans} +if [ -f %{_rundir}/ignition-dracut/isupgrade ]; then + # Done in posttrans so that read-only-root-fs could create the subvol + mkdir -p /boot/writable + [ -e /boot/writable/firstboot_happened ] || touch /boot/writable/firstboot_happened +fi + +%pre dracut-grub2 +%service_add_pre ignition-firstboot-complete.service + +%post dracut-grub2 +if [ "$1" = 1 ] ; then + sed -i 's/^\(GRUB_CMDLINE_LINUX_DEFAULT="\)\(.*\)/\1\\$ignition_firstboot \2/' %{_sysconfdir}/default/grub + %{?update_bootloader_refresh_post} +fi +%service_add_post ignition-firstboot-complete.service + +%preun dracut-grub2 +%service_del_preun ignition-firstboot-complete.service + +%postun dracut-grub2 +if [ "$1" = 0 ] ; then + sed -i -E '/^GRUB_CMDLINE_LINUX_DEFAULT="/s/(\\\$)?ignition[._][^[:space:]"]+ ?//g' %{_sysconfdir}/default/grub +fi +%service_del_postun -n ignition-firstboot-complete.service %files %license LICENSE -%doc README.md doc +%doc README.md README.SUSE doc %{_prefix}/lib/dracut/modules.d/30ignition +%{_prefix}/lib/dracut/modules.d/30ignition-microos %{_bindir}/ignition-validate +%files dracut-grub2 +%license LICENSE +%doc README.SUSE +%{_sysconfdir}/grub.d/02_ignition_firstboot +%{_prefix}/lib/systemd/system/ignition-firstboot-complete.service +%{_prefix}/lib/systemd/system/ignition-firstboot-complete.service.d/ + %changelog ++++++ 0001-fix-install-permissions.patch ++++++ commit 2ff83c70c46a22920aa9d5d0e58bbc71a62184ef Author: Ignaz Forster <ifors...@suse.com> Date: Wed Jul 29 09:20:05 2020 +0200 References: (gh#coreos/ignition#1069) Upstream: Submitted Install Dracut modules with correct permissions diff --git a/Makefile b/Makefile index 29e52840..35b0deda 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,17 @@ all: .PHONY: install install: all - for x in dracut/*; do \ - bn=$$(basename $$x); \ - install -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x/*; \ + for x in dracut/*/*.service dracut/*/*.target dracut/*/*.conf dracut/*/*.rules; do \ + bn=$$(dirname $$x); \ + bn=$$(basename $$bn); \ + install -m 0644 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x; \ done - install -D -t $(DESTDIR)/usr/lib/systemd/system systemd/* + for x in dracut/*/*.sh dracut/*/*-generator; do \ + bn=$$(dirname $$x); \ + bn=$$(basename $$bn); \ + install -m 0755 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x; \ + done + install -m 0644 -D -t $(DESTDIR)/usr/lib/systemd/system systemd/* install -m 0755 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/30ignition bin/$(GOARCH)/ignition install -m 0755 -D -t $(DESTDIR)/usr/bin bin/$(GOARCH)/ignition-validate ++++++ 0003-fix-i386-build.patch ++++++ commit f9196c3e0c7b03bedfedeb981987e976f3c59aea Author: Ignaz Forster <ifors...@suse.com> Date: Mon Aug 10 15:33:18 2020 +0200 References: (gh#coreos/ignition#1069) Upstream: Submitted Add support for building on 32 bit x86 archticture diff --git a/Makefile b/Makefile index 35b0deda..d80e0870 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,8 @@ ifeq ($(GOARCH),x86_64) GOARCH=amd64 else ifeq ($(GOARCH),aarch64) GOARCH=arm64 +else ifeq ($(patsubst i%86,386,$(GOARCH)),386) + GOARCH=386 endif .PHONY: all ++++++ 02_ignition_firstboot ++++++ #!/bin/sh exec tail -n +3 $0 # On read-only systems /boot/writable provides a writeable # subvolume which also stores the Ignition flag file. set flagpath="/boot/writable" # Determine if this is a first boot and set the variable # to be used later on the kernel command line. set ignition_firstboot="" if ! [ -f "${flagpath}/firstboot_happened" ]; then # default to dhcp networking parameters to be used with ignition set ignition_network_kcmdline='rd.neednet=1 ip=dhcp' # source in the `ignition.firstboot` file which could override the # above $ignition_network_kcmdline with static networking config. # This override feature is primarily used by coreos-installer to # persist static networking config provided during install to the # first boot of the machine. if [ -e "${flagpath}/ignition.firstboot" ]; then source "${flagpath}/ignition.firstboot" fi set ignition_firstboot="ignition.firstboot $ignition_network_kcmdline" fi ++++++ README.SUSE ++++++ Changes for openSUSE / SLE: * ignition-mount-initrd-fstab.service: Upstream Ignition will only mount partitions or subvolumes explicitly mentioned in the Ignition configuration. A default SUSE system, however, is split over several subvolumes, and most users won't want to define all the partitions again. On the other hand a lot of core functionality (e.g. configuring a SSH certificate for the root user or adding a configuration file) requires access to those subvolumes. For better usability in addition to Ignition's own mount / umount stage all files systems tagged for being mounted in the initrd ("x-initrd.mount" mount flag) will automatically be mounted / umounted. * ignition-setup-user-suse.sh / ignition-userconfig-timeout*.conf: The user configuration can be stored on a device with the label "ignition" (e.g. by attaching a USB flash drive with that name) instead of putting the file onto the root partition. * ignition-suse-generator: Supplements the upstream generator by adding dependencies to ignition-setup-user-suse.sh and ignition-mount-initrd-fstab.service. Additionally it will try to autodect the platform if it is not set on the kernel command line. * 02_ignition_firstboot: This file has been part of upstream ignition-dracut, but has since then been moved to a static CoreOS specific configuration (https://github.com/coreos/coreos-assembler/pull/616); it is now used in a modified version adapted to SUSE's needs. This script will automatically set the kernel parameters to trigger an Ignition run if a flag file does not exist (e.g. on first boot). To trigger an Ignition run manually just delete the file "/boot/writable/firstboot_happened". * change-ignition-firstboot-path.conf: Overwrite CoreOS specific path. * ignition-enable-network.service / ignition-enable-network.sh: Ignition supports detection whether the configuration requires networking 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. ++++++ _service ++++++ --- /var/tmp/diff_new_pack.4ZYCkM/_old 2020-08-12 10:34:03.008218408 +0200 +++ /var/tmp/diff_new_pack.4ZYCkM/_new 2020-08-12 10:34:03.012218409 +0200 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> - <param name="version">2.3.0</param> - <param name="revision">v2.3.0</param> + <param name="version">2.6.0</param> + <param name="revision">v2.6.0</param> <param name="url">git://github.com/coreos/ignition.git</param> <param name="scm">git</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.4ZYCkM/_old 2020-08-12 10:34:03.040218424 +0200 +++ /var/tmp/diff_new_pack.4ZYCkM/_new 2020-08-12 10:34:03.044218426 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/coreos/ignition.git</param> - <param name="changesrevision">ee616d5fb3d21babe288877e842ea137f3e68d0d</param> + <param name="changesrevision">ec53570394424f79bbdd47b33aea3ce6097d63cf</param> </service> </servicedata> \ No newline at end of file ++++++ change-ignition-firstboot-path.conf ++++++ [Service] ExecStart= ExecStart=/usr/bin/touch /boot/writable/firstboot_happened ++++++ ignition-2.3.0.tar.xz -> ignition-2.6.0.tar.xz ++++++ ++++ 450951 lines of diff (skipped) ++++++ ignition-enable-network.service ++++++ [Unit] Description=Start network if needed ConditionPathExists=/etc/initrd-release DefaultDependencies=false After=basic.target # Triggering conditions for cases where we need network ConditionPathExists=|/run/ignition/neednet # Creates /run/ignition/neednet After=ignition-fetch-offline.service # Needs networking Before=ignition-fetch.service # See hack in coreos-enable-network, as well as coreos-copy-firstboot-network.service; # adapted for SUSE / wicked use After=dracut-cmdline.service Before=dracut-initqueue.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/ignition-enable-network ++++++ ignition-enable-network.sh ++++++ #!/bin/bash . /lib/dracut-lib.sh if [ -f /run/ignition/neednet ] && ! getargbool 0 'rd.neednet'; then echo "rd.neednet=1 ip=dhcp" > /etc/cmdline.d/40-ignition-neednet.conf # Re-trigger generation of network rules . /lib/dracut/hooks/pre-udev/60-net-genrules.sh fi ++++++ ignition-mount-initrd-fstab.service ++++++ [Unit] Description=Mount initrd fstab entries for Ignition DefaultDependencies=false Before=ignition-complete.target # Make sure ExecStop= runs before we switch root Before=initrd-switch-root.target After=initrd-root-fs.target After=ignition-remount-sysroot.service # Run only after Ignition's mount stage - mount points configured by Ignition # itself will be skipped below, just mount the rest. Requires=ignition-mount.service After=ignition-mount.service Before=ignition-files.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/sh -c 'eval $(awk '"'"'$4 ~ /x-initrd.mount/ {print "if ! findmnt /sysroot" $2 " >/dev/null; then mount -t " $3 " -o " $4 " " $1 " /sysroot" $2 "; fi;" }'"'"' /sysroot/etc/fstab)' ExecStop=/usr/bin/umount -a -O "x-initrd.mount" ++++++ ignition-rpmlintrc ++++++ # Not meant to be run manually addFilter("suse-missing-rclink") ++++++ ignition-setup-user-suse.sh ++++++ #!/bin/bash set -euo pipefail copy_file_if_exists() { src="${1}"; dst="${2}" if [ -f "${src}" ]; then echo "Copying ${src} to ${dst}" cp "${src}" "${dst}" else echo "File ${src} does not exist.. Skipping copy" fi } destination=/usr/lib/ignition mkdir -p $destination if command -v is-live-image >/dev/null && is-live-image; then # Live image. If the user has supplied a config.ign via an appended # initrd, put it in the right place. copy_file_if_exists "/config.ign" "${destination}/user.ign" else # We will support a user embedded config in the boot partition # under $bootmnt/ignition/config.ign. Note that we mount /boot # but we don't unmount boot because we are run in a systemd unit # with MountFlags=slave so it is unmounted for us. bootmnt=/mnt/boot_partition mkdir -p $bootmnt if [ -e /dev/disk/by-label/ignition ]; then mount /dev/disk/by-label/ignition $bootmnt fi copy_file_if_exists "${bootmnt}/ignition/config.ign" "${destination}/user.ign" fi ++++++ ignition-suse-generator ++++++ #!/bin/bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh set -e # Call upstream generator . /usr/lib/systemd/system-generators/ignition-generator . /run/ignition.env add_requires ignition-mount-initrd-fstab.service ignition-files.service add_requires ignition-enable-network.service ignition-fetch.service if [ -e "${UNIT_DIR}/ignition-setup-user.service.d/diskful.conf" ]; then cat > "${UNIT_DIR}/ignition-setup-user.service.d/diskful.conf" <<EOF [Unit] Wants=dev-disk-by\x2dlabel-ignition.device After=dev-disk-by\x2dlabel-ignition.device [Service] ExecStart= ExecStart=/usr/sbin/ignition-setup-user-suse EOF fi if [ -z "${PLATFORM_ID}" ]; then platform="$(virt-what)" case "${platform}" in *vmware*) platform="vmware" ;; *virtualbox*) platform="virtualbox" ;; *kvm*|*qemu*) platform="qemu" ;; *) platform="metal" ;; esac echo "PLATFORM_ID=${platform}" > /run/ignition.env fi ++++++ ignition-userconfig-timeout-arm.conf ++++++ [Unit] JobTimeoutSec=20 ++++++ ignition-userconfig-timeout.conf ++++++ [Unit] JobTimeoutSec=10 ++++++ module-setup.sh ++++++ #!/bin/bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh depends() { echo ignition } install() { inst_simple "$moddir/ignition-enable-network.service" \ "$systemdsystemunitdir/ignition-enable-network.service" inst_simple "$moddir/ignition-mount-initrd-fstab.service" \ "$systemdsystemunitdir/ignition-mount-initrd-fstab.service" inst_simple "$moddir/ignition-userconfig-timeout.conf" \ "$systemdsystemunitdir/dev-disk-by\x2dlabel-ignition.device.d/ignition-userconfig-timeout.conf" inst_simple "$moddir/ignition-suse-generator" \ "/etc/systemd/system-generators/ignition-generator" inst_script "$moddir/ignition-enable-network.sh" \ "/usr/sbin/ignition-enable-network" inst_script "$moddir/ignition-setup-user-suse.sh" \ "/usr/sbin/ignition-setup-user-suse" inst_multiple awk virt-what /usr/lib/virt-what-cpuid-helper id which dmidecode } installkernel() { hostonly='' instmods iso9660 }