Hello community,

here is the log from the commit of package ignition-dracut for openSUSE:Factory 
checked in at 2020-06-30 21:58:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ignition-dracut (Old)
 and      /work/SRC/openSUSE:Factory/.ignition-dracut.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ignition-dracut"

Tue Jun 30 21:58:04 2020 rev:14 rq:817785 version:0.0+git20200504.7ff38d9

Changes:
--------
--- /work/SRC/openSUSE:Factory/ignition-dracut/ignition-dracut.changes  
2020-06-29 21:19:02.333909046 +0200
+++ 
/work/SRC/openSUSE:Factory/.ignition-dracut.new.3060/ignition-dracut.changes    
    2020-06-30 21:58:58.575225169 +0200
@@ -1,0 +2,13 @@
+Mon Jun 29 13:48:31 UTC 2020 - Ignaz Forster <ifors...@suse.com>
+
+- Overwrite Ignition's systemd generator by putting a file of the
+  same name into /etc/systemd/systemd-generators (instead of
+  installing a second generator) and source the original generator
+  from there; this will remove some redundant code.
+- Move autodetection of platform from %post script to initrd
+  generator; this will remove the hack to modify /etc/default/grub
+  with sed [boo#1149701]
+- Overwrite generated diskful.conf instead of installing another
+  one with higher priority
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ ignition-dracut.spec ++++++
--- /var/tmp/diff_new_pack.qO1Kxc/_old  2020-06-30 21:59:00.971232584 +0200
+++ /var/tmp/diff_new_pack.qO1Kxc/_new  2020-06-30 21:59:00.975232597 +0200
@@ -39,8 +39,10 @@
 BuildRequires:  systemd-rpm-macros
 BuildRequires:  update-bootloader-rpm-macros
 Requires:       %{name}-grub2
+Requires:       dmidecode
 Requires:       gptfdisk
 Requires:       ignition
+Requires:       virt-what
 %{update_bootloader_requires}
 
 %description
@@ -58,7 +60,6 @@
 Requires:       grub2
 Requires(post): grub2
 Requires(post): sed
-Requires(post): virt-what
 
 %description grub2
 GRUB2 configuration which sets ignition.firstboot based on
@@ -114,26 +115,12 @@
 %service_add_pre ignition-firstboot-complete.service
 
 %post grub2
-if [ "$1" = 1 ] ; then
-    platform="$(virt-what)"
-    case "${platform}" in
-        *vmware*)     platform="vmware" ;;
-        *virtualbox*) platform="virtualbox" ;;
-        *kvm*|*qemu*) platform="qemu" ;;
-        *)            platform="metal" ;;
-    esac
-    sed -i 
's/^\(GRUB_CMDLINE_LINUX_DEFAULT="\)\(.*\)/\1ignition.platform.id='${platform}' 
\\$ignition_firstboot \2/' %{_sysconfdir}/default/grub
-    %{?update_bootloader_refresh_post}
-fi
 %service_add_post ignition-firstboot-complete.service
 
 %preun grub2
 %service_del_preun ignition-firstboot-complete.service
 
 %postun 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
 
 %posttrans grub2

++++++ README.SUSE ++++++
--- /var/tmp/diff_new_pack.qO1Kxc/_old  2020-06-30 21:59:01.035232783 +0200
+++ /var/tmp/diff_new_pack.qO1Kxc/_new  2020-06-30 21:59:01.035232783 +0200
@@ -1,19 +1,24 @@
 Changes for openSUSE / SLE:
 
-* ignition-mount-initrd-fstab.service / ignition-suse-generator:
-  By default Ignition will only mount partitions or subvolumes explicitly
-  mentioned in the Ignition configuration. On SUSE, however, the system
+* 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. A lot of core functionality however (e.g.
+  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
+  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

++++++ ignition-suse-generator ++++++
--- /var/tmp/diff_new_pack.qO1Kxc/_old  2020-06-30 21:59:01.139233105 +0200
+++ /var/tmp/diff_new_pack.qO1Kxc/_new  2020-06-30 21:59:01.139233105 +0200
@@ -6,22 +6,13 @@
 
 UNIT_DIR="${1:-/tmp}"
 
-add_requires() {
-    local name="$1"; shift
-    local requires_dir="${UNIT_DIR}/ignition-files.service.requires"
-    mkdir -p "${requires_dir}"
-    ln -sf "../${name}" "${requires_dir}/${name}"
-}
-
-add_requires ignition-mount-initrd-fstab.service
-
-# Overwrite static /boot dependency by upstream igniton-dracut with a more
-# generic "ignition" device to fetch the user configuration; can not be put
-# into UNIT_DIR, as systemd generators are running simultaneously, so use a
-# directory with a higher priority. May still be overwritten by the admin by
-# putting the same file into /etc.
-mkdir -p "/run/systemd/system/ignition-setup-user.service.d"
-cat > "/run/systemd/system/ignition-setup-user.service.d/diskful.conf" <<EOF
+# Call upstream generator
+. /usr/lib/systemd/system-generators/ignition-generator
+. /run/ignition.env
+
+add_requires ignition-mount-initrd-fstab.service ignition-files.service
+
+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
@@ -30,3 +21,14 @@
 ExecStart=
 ExecStart=/usr/sbin/ignition-setup-user-suse
 EOF
+
+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

++++++ module-setup.sh ++++++
--- /var/tmp/diff_new_pack.qO1Kxc/_old  2020-06-30 21:59:01.179233228 +0200
+++ /var/tmp/diff_new_pack.qO1Kxc/_new  2020-06-30 21:59:01.179233228 +0200
@@ -14,10 +14,10 @@
     inst_simple "$moddir/prevent-boot-cycle.conf" \
        
"$systemdsystemunitdir/ignition-complete.target.d/prevent-boot-cycle.conf"
     inst_simple "$moddir/ignition-suse-generator" \
-        "$systemdutildir/system-generators/ignition-suse-generator"
+        "/etc/systemd/system-generators/ignition-generator"
     inst_script "$moddir/ignition-setup-user-suse.sh" \
         "/usr/sbin/ignition-setup-user-suse"
-    inst_multiple awk
+    inst_multiple awk virt-what /usr/lib/virt-what-cpuid-helper id which 
dmidecode
 }
 
 installkernel() {


Reply via email to