Hello community,

here is the log from the commit of package ignition-dracut for 
openSUSE:Leap:15.2 checked in at 2020-03-29 14:56:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/ignition-dracut (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.ignition-dracut.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ignition-dracut"

Sun Mar 29 14:56:20 2020 rev:2 rq:789292 version:0.0+git20200325.ea3bdc9

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/ignition-dracut/ignition-dracut.changes        
2020-03-10 17:12:30.393399414 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.ignition-dracut.new.3160/ignition-dracut.changes  
    2020-03-29 14:56:24.931191695 +0200
@@ -1,0 +2,26 @@
+Fri Mar 27 15:06:19 UTC 2020 - [email protected]
+
+- Update to version 0.0+git20200325.ea3bdc9:
+  * Add `basename` dependency to dracut module [boo#1167289]
+  * 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 [boo#1167289]
+  * Remove obsolete dependencies [boo#1167289]
+  * Hook up to CoreOS CI
+  * Add ignition-diskful-subsequent.target
+  * Makefile: Remove grub/ install bits
+  * grub: drop 02_ignition_firstboot
+- As the GRUB module was dropped upstream and is now generated as part of a
+  CoreOS specific module, we will do the same:
+  * Move previous 02_ignition_firstboot to MicroOS dracut module
+  * Merge 0002-Support-different-flagfile-location.patch and
+    01_suse_set_ignition into custom 02_ignition_firstboot
+- Updated README.SUSE to describe all current SUSE modifications
+
+-------------------------------------------------------------------

Old:
----
  0002-Support-different-flagfile-location.patch
  01_suse_set_ignition
  ignition-dracut-0.0+git20200107.e490517.tar.xz

New:
----
  02_ignition_firstboot
  ignition-dracut-0.0+git20200325.ea3bdc9.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ignition-dracut.spec ++++++
--- /var/tmp/diff_new_pack.lLA7u3/_old  2020-03-29 14:56:25.691192287 +0200
+++ /var/tmp/diff_new_pack.lLA7u3/_new  2020-03-29 14:56:25.695192290 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           ignition-dracut
-Version:        0.0+git20200107.e490517
+Version:        0.0+git20200325.ea3bdc9
 Release:        0
 Summary:        Dracut scripts for ignition
 License:        BSD-2-Clause
@@ -27,14 +27,13 @@
 Source1:        ignition-mount-initrd-fstab.service
 Source3:        ignition-suse-generator
 Source4:        module-setup.sh
-Source5:        01_suse_set_ignition
+Source5:        02_ignition_firstboot
 Source6:        change-ignition-firstboot-path.conf
 Source7:        README.SUSE
 Source8:        ignition-setup-user-suse.sh
 Source9:        prevent-boot-cycle.conf
 Source20:       ignition-userconfig-timeout.conf
 Source21:       ignition-userconfig-timeout-arm.conf
-Patch2:         0002-Support-different-flagfile-location.patch
 Patch3:         0003-Disable-resetting-UUID.patch
 BuildRequires:  suse-module-tools
 BuildRequires:  update-bootloader-rpm-macros
@@ -56,9 +55,8 @@
 
 %prep
 %setup -q
-%patch2 -p1
 %patch3 -p1
-mkdir dracut/30ignition-microos
+mkdir dracut/30ignition-microos grub
 chmod +x %{SOURCE3} %{SOURCE4} %{SOURCE8}
 cp %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE8} %{SOURCE9} 
dracut/30ignition-microos/
 %ifarch aarch64 %{arm}
@@ -88,7 +86,7 @@
 %{_sysconfdir}/grub.d
 %{_prefix}/lib/dracut
 %{_prefix}/lib/systemd/system/*
-%config(noreplace) %{_sysconfdir}/grub.d/01_suse_set_ignition
+%config %{_sysconfdir}/grub.d/02_ignition_firstboot
 
 %pre
 %service_add_pre ignition-firstboot-complete.service

++++++ 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}/ignition.firstboot" ]; 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.
    source "${flagpath}/ignition.firstboot"
    
    set ignition_firstboot="ignition.firstboot $ignition_network_kcmdline"
fi
++++++ README.SUSE ++++++
--- /var/tmp/diff_new_pack.lLA7u3/_old  2020-03-29 14:56:25.747192331 +0200
+++ /var/tmp/diff_new_pack.lLA7u3/_new  2020-03-29 14:56:25.751192334 +0200
@@ -1,18 +1,31 @@
 Changes for openSUSE / SLE:
 
 * ignition-mount-initrd-fstab.service / ignition-suse-generator:
-  Ignition has very limited file system support, e.g. it doesn't support
-  btrfs subvolumes (used in any default installation) or overlayfs mounts
-  (Used by MicroOS for mounting /etc). For this reason Ignition's "mount"
-  stage cannot be used for mounting the basic file systems for the "files"
-  stage.
-  To work around this limitation 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 be mounted / umounted.
-* ignition-setup-user-suse.sh / ignition-userconfig-timeout.conf:
+  By default Ignition will only mount partitions or subvolumes explicitly
+  mentioned in the Ignition configuration. On SUSE, however, the system
+  is split over several subvolumes, and most users won't want to define
+  all the partitions again. A lot of core functionality however (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
-* change-ignition-firstboot-path.conf / 01_suse_set_ignition:
-  For triggering an Ignition run manually it is possible to create the file
-  "/boot/writable/ignition.firstboot" (instead of "/boot/ignition.firstboot")
+  file onto the root partition.
+* 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 is set (e.g. on first boot). To trigger an
+  Ignition run manually just create the file
+  "/boot/writable/ignition.firstboot".
+* 0003-Disable-resetting-UUID.patch / change-ignition-firstboot-path.conf:
+  Remove / overwrite CoreOS specific script / path.
+* prevent-boot-cycle.conf:
+  If the "files" stage fails the system will be stuck in an infinite
+  bootcyle (https://github.com/coreos/ignition-dracut/issues/115); this is
+  a workaround to get the system into a defined state.

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.lLA7u3/_old  2020-03-29 14:56:25.787192362 +0200
+++ /var/tmp/diff_new_pack.lLA7u3/_new  2020-03-29 14:56:25.791192365 +0200
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">git://github.com/coreos/ignition-dracut.git</param>
-    <param 
name="changesrevision">e4905173ea54fc6ae3f0a0f0456ea382a19b38c2</param>
+    <param 
name="changesrevision">ea3bdc94076326c6c3d62aa7a19b9bd0ae887b3a</param>
  </service>
 </servicedata>
\ No newline at end of file

++++++ ignition-dracut-0.0+git20200107.e490517.tar.xz -> 
ignition-dracut-0.0+git20200325.ea3bdc9.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-dracut-0.0+git20200107.e490517/.cci.jenkinsfile 
new/ignition-dracut-0.0+git20200325.ea3bdc9/.cci.jenkinsfile
--- old/ignition-dracut-0.0+git20200107.e490517/.cci.jenkinsfile        
1970-01-01 01:00:00.000000000 +0100
+++ new/ignition-dracut-0.0+git20200325.ea3bdc9/.cci.jenkinsfile        
2020-03-25 16:43:46.000000000 +0100
@@ -0,0 +1,6 @@
+// Documentation: 
https://github.com/coreos/coreos-ci/blob/master/README-upstream-ci.md
+
+cosaPod {
+    checkout scm
+    fcosBuild(make: true)
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ignition-dracut-0.0+git20200107.e490517/Makefile 
new/ignition-dracut-0.0+git20200325.ea3bdc9/Makefile
--- old/ignition-dracut-0.0+git20200107.e490517/Makefile        2020-01-07 
18:17:42.000000000 +0100
+++ new/ignition-dracut-0.0+git20200325.ea3bdc9/Makefile        2020-03-25 
16:43:46.000000000 +0100
@@ -9,4 +9,3 @@
          install -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x/*; \
        done
        install -D -t $(DESTDIR)/usr/lib/systemd/system systemd/*
-       install -D -t $(DESTDIR)/etc/grub.d grub/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/coreos-teardown-initramfs-network.service
 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/coreos-teardown-initramfs-network.service
--- 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/coreos-teardown-initramfs-network.service
     1970-01-01 01:00:00.000000000 +0100
+++ 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/coreos-teardown-initramfs-network.service
     2020-03-25 16:43:46.000000000 +0100
@@ -0,0 +1,22 @@
+# Clean up the initramfs networking on first boot
+# so the real network is being brought up
+# 
https://github.com/coreos/fedora-coreos-tracker/issues/394#issuecomment-599721763
+
+[Unit]
+Description=Tear down initramfs networking
+DefaultDependencies=false
+After=ignition-files.service
+Before=ignition-complete.target
+
+# Make sure ExecStop= runs before we switch root
+Conflicts=initrd-switch-root.target umount.target
+Before=initrd-switch-root.target
+
+# Make sure if ExecStart= fails, the boot fails
+OnFailure=emergency.target
+OnFailureJobMode=isolate
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStop=/usr/sbin/coreos-teardown-initramfs-network
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/coreos-teardown-initramfs-network.sh
 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/coreos-teardown-initramfs-network.sh
--- 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/coreos-teardown-initramfs-network.sh
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/coreos-teardown-initramfs-network.sh
  2020-03-25 16:43:46.000000000 +0100
@@ -0,0 +1,82 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+set -euo pipefail
+
+
+# Propagate initramfs networking if desired. The policy here is:
+#
+#    - If a networking configuration was provided before this point
+#      (most likely via Ignition) and exists in the real root then
+#      we do nothing and don't propagate any initramfs networking.
+#    - If a user did not provide any networking configuration
+#      then we'll propagate the initramfs networking configuration
+#      into the real root.
+#
+# See 
https://github.com/coreos/fedora-coreos-tracker/issues/394#issuecomment-599721173
+propagate_initramfs_networking() {
+    if [ -n "$(ls -A /sysroot/etc/NetworkManager/system-connections/)" ]; then
+        echo "info: networking config is defined in the real root"
+        echo "info: will not attempt to propagate initramfs networking"
+    else
+        echo "info: no networking config is defined in the real root"
+        if [ -n "$(ls -A /run/NetworkManager/system-connections/)" ]; then
+            echo "info: propagating initramfs networking config to the real 
root"
+            cp /run/NetworkManager/system-connections/* 
/sysroot/etc/NetworkManager/system-connections/
+        else
+            echo "info: no initramfs networking information to propagate"
+        fi
+    fi
+}
+
+down_interface() {
+    echo "info: taking down network device: $1"
+    # On recommendation from the NM team let's try to delete the device
+    # first and if that doesn't work then set it to down and flush any
+    # associated addresses. Deleting virtual devices (bonds, teams, bridges,
+    # ip-tunnels, etc) will clean up any associated kernel resources. A real
+    # device can't be deleted so that will fail and we'll fallback to setting
+    # it down and flushing addresses.
+    if ! ip link delete $1; then
+        ip link set $1 down
+        ip addr flush dev $1
+    fi
+}
+
+# Iterate through the interfaces in the machine and take them down.
+# Note that in the futre we would like to possibly use `nmcli` networking off`
+# for this. See the following two comments for details:
+# 
https://github.com/coreos/fedora-coreos-tracker/issues/394#issuecomment-599721763
+# 
https://github.com/coreos/fedora-coreos-tracker/issues/394#issuecomment-599746049
+down_interfaces() {
+    if ! [ -z "$(ls /sys/class/net)" ]; then
+        for f in /sys/class/net/*; do
+            interface=$(basename "$f")
+            # The `bonding_masters` entry is not a true interface and thus
+            # cannot be taken down.
+            if [ "$interface" == "bonding_masters" ]; then continue; fi
+            down_interface $interface
+        done
+    fi
+}
+
+main() {
+    # Take down all interfaces set up in the initramfs
+    down_interfaces
+
+    # Clean up all routing
+    echo "info: flushing all routing"
+    ip route flush table main
+    ip route flush cache
+
+    # Propagate initramfs networking if needed
+    propagate_initramfs_networking
+
+    # Now that the configuration has been propagated (or not)
+    # clean it up so that no information from outside of the
+    # real root is passed on to NetworkManager in the real root
+    rm -rf /run/NetworkManager/
+}
+
+main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/ignition-diskful-subsequent.target
 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/ignition-diskful-subsequent.target
--- 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/ignition-diskful-subsequent.target
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/ignition-diskful-subsequent.target
    2020-03-25 16:43:46.000000000 +0100
@@ -0,0 +1,12 @@
+# This target is a combination of ignition-subsequent.target and
+# ignition-diskful.target - units here should only run when we have a
+# boot disk and *aren't* doing the first boot.
+[Unit]
+Description=Ignition Subsequent Boot Disk Setup
+Documentation=https://github.com/coreos/ignition
+ConditionPathExists=/etc/initrd-release
+Before=ignition-subsequent.target
+
+# Make sure we stop all the units before switching root
+Conflicts=initrd-switch-root.target umount.target
+Conflicts=dracut-emergency.service emergency.service emergency.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/ignition-generator
 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/ignition-generator
--- 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/ignition-generator
    2020-01-07 18:17:42.000000000 +0100
+++ 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/ignition-generator
    2020-03-25 16:43:46.000000000 +0100
@@ -59,6 +59,9 @@
     # like `ignition-ostree-mount-sysroot.service`
     # can cleanly distinguish between the two.
     add_requires ignition-subsequent.target initrd.target
+    if ! command -v is-live-image >/dev/null || ! is-live-image; then
+        add_requires ignition-diskful-subsequent.target 
ignition-subsequent.target
+    fi
 fi
 
 echo "PLATFORM_ID=$(cmdline_arg ignition.platform.id)" > /run/ignition.env
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/module-setup.sh 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/module-setup.sh
--- 
old/ignition-dracut-0.0+git20200107.e490517/dracut/30ignition/module-setup.sh   
    2020-01-07 18:17:42.000000000 +0100
+++ 
new/ignition-dracut-0.0+git20200325.ea3bdc9/dracut/30ignition/module-setup.sh   
    2020-03-25 16:43:46.000000000 +0100
@@ -17,24 +17,22 @@
 
 install() {
     inst_multiple \
-        chroot \
+        basename \
+        lsblk
+
+    # Not all features of the configuration may be available on all systems
+    # (e.g. on embedded systems), so only add applications which are actually
+    # present
+    inst_multiple -o \
         groupadd \
-        id \
-        lsblk \
+        mkfs.btrfs \
         mkfs.ext4 \
         mkfs.vfat \
         mkfs.xfs \
         mkswap \
-        mountpoint \
         sgdisk \
-        systemd-detect-virt \
         useradd \
-        usermod \
-        realpath \
-        touch
-
-    # This one is optional; 
https://src.fedoraproject.org/rpms/ignition/pull-request/9
-    inst_multiple -o mkfs.btrfs
+        usermod
 
     # Required by s390x's z/VM installation.
     # Supporting https://github.com/coreos/ignition/pull/865
@@ -59,13 +57,16 @@
     inst_simple "$moddir/ignition-generator" \
         "$systemdutildir/system-generators/ignition-generator"
 
-    inst_simple "$moddir/ignition-complete.target" \
-        "$systemdsystemunitdir/ignition-complete.target"
-    inst_simple "$moddir/ignition-subsequent.target" \
-        "$systemdsystemunitdir/ignition-subsequent.target"
-
-    inst_simple "$moddir/ignition-diskful.target" \
-        "$systemdsystemunitdir/ignition-diskful.target"
+    for x in "complete" "subsequent" "diskful" "diskful-subsequent"; do
+        inst_simple "$moddir/ignition-$x.target" \
+            "$systemdsystemunitdir/ignition-$x.target"
+    done
+
+    # For consistency tear down the network between the initramfs and
+    # real root. See 
https://github.com/coreos/fedora-coreos-tracker/issues/394#issuecomment-599721763
+    inst_script "$moddir/coreos-teardown-initramfs-network.sh" \
+        "/usr/sbin/coreos-teardown-initramfs-network"
+    install_ignition_unit coreos-teardown-initramfs-network.service
 
     install_ignition_unit ignition-setup-base.service
     install_ignition_unit ignition-setup-user.service
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ignition-dracut-0.0+git20200107.e490517/grub/02_ignition_firstboot 
new/ignition-dracut-0.0+git20200325.ea3bdc9/grub/02_ignition_firstboot
--- old/ignition-dracut-0.0+git20200107.e490517/grub/02_ignition_firstboot      
2020-01-07 18:17:42.000000000 +0100
+++ new/ignition-dracut-0.0+git20200325.ea3bdc9/grub/02_ignition_firstboot      
1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-#!/bin/sh
-exec tail -n +3 $0
-# We store the file on the /boot/ partition so find the
-# boot partition. On UEFI this may different than the grub
-# $root so we search for it here.
-# https://github.com/coreos/ignition-dracut/issues/51
-search --set=bootpart --label boot
-# 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 "(${bootpart})/ignition.firstboot" ]; 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.
-    source "(${bootpart})/ignition.firstboot"
-    
-    # we support setting variables in the 
-    set ignition_firstboot="ignition.firstboot $ignition_network_kcmdline"
-fi


Reply via email to