Hello community,

here is the log from the commit of package openSUSE-MicroOS for 
openSUSE:Factory checked in at 2019-09-23 12:33:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-MicroOS (Old)
 and      /work/SRC/openSUSE:Factory/.openSUSE-MicroOS.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openSUSE-MicroOS"

Mon Sep 23 12:33:22 2019 rev:4 rq:731673 version:16.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/openSUSE-MicroOS/openSUSE-MicroOS.changes        
2019-08-24 18:45:47.809760827 +0200
+++ 
/work/SRC/openSUSE:Factory/.openSUSE-MicroOS.new.7948/openSUSE-MicroOS.changes  
    2019-09-23 12:37:10.365612377 +0200
@@ -1,0 +2,18 @@
+Mon Sep  9 13:53:08 UTC 2019 - Fabian Vogt <[email protected]>
+
+- Regain sanity: Add replacebootconfig.sh to use the actual GRUB
+  config the system would generate itself
+- Mount by-uuid
+- Add rd.neednet=0 to work around dracut bug
+- Set ignition.platform.id in the cmdline
+- Remove swap for Pine64 and RPi3 and the pointless swapaccount
+  parameter from all flavours (boo#1149663)
+
+-------------------------------------------------------------------
+Thu Aug 29 15:25:19 UTC 2019 - Fabian Vogt <[email protected]>
+
+- Use creative kiwi approach for modifying /etc/fstab (boo#1129566)
+- Use ignition-dracut
+- Add /boot/writable subvolume
+
+-------------------------------------------------------------------

New:
----
  replacebootconfig.sh

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

Other differences:
------------------
++++++ openSUSE-MicroOS.kiwi ++++++
--- /var/tmp/diff_new_pack.Yz4ng5/_old  2019-09-23 12:37:16.593611352 +0200
+++ /var/tmp/diff_new_pack.Yz4ng5/_new  2019-09-23 12:37:16.593611352 +0200
@@ -99,13 +99,14 @@
             bootloader="grub2"
             bootloader_console="gfxterm"
             firmware="uefi"
-            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
net.ifnames=0 swapaccount=1"
+            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
net.ifnames=0 $ignition_firstboot ignition.platform.id=qemu rd.neednet=0"
             bootpartition="false"
             bootkernel="custom"
-            devicepersistency="by-label"
+            devicepersistency="by-uuid"
             btrfs_root_is_snapshot="true"
             btrfs_root_is_readonly_snapshot="true"
             btrfs_quota_groups="false"
+            editbootinstall="replacebootconfig.sh"
         >
             <systemdisk>
                 <volume name="home"/>
@@ -115,6 +116,7 @@
                 <volume name="srv"/>
                 <volume name="boot/grub2/i386-pc"/>
                 <volume name="boot/grub2/x86_64-efi" 
mountpoint="boot/grub2/x86_64-efi"/>
+                <volume name="boot/writable"/>
                 <volume name="usr/local"/>
                 <volume name="var" copy_on_write="false"/>
             </systemdisk>
@@ -134,13 +136,14 @@
             bootloader="grub2"
             bootloader_console="gfxterm"
             firmware="uefi"
-            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
swapaccount=1"
+            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
$ignition_firstboot ignition.platform.id=vmware rd.neednet=0"
             bootpartition="false"
             bootkernel="custom"
-            devicepersistency="by-label"
+            devicepersistency="by-uuid"
             btrfs_root_is_snapshot="true"
             btrfs_root_is_readonly_snapshot="true"
             btrfs_quota_groups="false"
+            editbootinstall="replacebootconfig.sh"
         >
             <systemdisk>
                 <volume name="home"/>
@@ -150,6 +153,7 @@
                 <volume name="srv"/>
                 <volume name="boot/grub2/i386-pc"/>
                 <volume name="boot/grub2/x86_64-efi" 
mountpoint="boot/grub2/x86_64-efi"/>
+                <volume name="boot/writable"/>
                 <volume name="usr/local"/>
                 <volume name="var" copy_on_write="false"/>
             </systemdisk>
@@ -170,13 +174,14 @@
             bootloader="grub2"
             bootloader_console="gfxterm"
             firmware="uefi"
-            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
net.ifnames=0 swapaccount=1"
+            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
net.ifnames=0 $ignition_firstboot ignition.platform.id=openstack rd.neednet=0"
             bootpartition="false"
             bootkernel="custom"
-            devicepersistency="by-label"
+            devicepersistency="by-uuid"
             btrfs_root_is_snapshot="true"
             btrfs_root_is_readonly_snapshot="true"
             btrfs_quota_groups="false"
+            editbootinstall="replacebootconfig.sh"
         >
             <systemdisk>
                 <volume name="home"/>
@@ -186,6 +191,7 @@
                 <volume name="srv"/>
                 <volume name="boot/grub2/i386-pc"/>
                 <volume name="boot/grub2/x86_64-efi" 
mountpoint="boot/grub2/x86_64-efi"/>
+                <volume name="boot/writable"/>
                 <volume name="usr/local"/>
                 <volume name="var" copy_on_write="false"/>
             </systemdisk>
@@ -206,13 +212,14 @@
             bootloader="grub2"
             bootloader_console="gfxterm"
             firmware="uefi"
-            kernelcmdline="plymouth.enable=0 USE_BY_UUID_DEVICE_NAMES=1 
rootdelay=300 console=ttyS0,115200 console=tty0 earlyprintk=ttyS0,115200 
swapaccount=1"
+            kernelcmdline="plymouth.enable=0 rootdelay=300 
console=ttyS0,115200 console=tty0 earlyprintk=ttyS0,115200 $ignition_firstboot 
ignition.platform.id=metal"
             bootpartition="false"
             bootkernel="custom"
             devicepersistency="by-uuid"
             btrfs_root_is_snapshot="true"
             btrfs_root_is_readonly_snapshot="true"
             btrfs_quota_groups="false"
+            editbootinstall="replacebootconfig.sh"
         >
             <systemdisk>
                 <volume name="home"/>
@@ -222,6 +229,7 @@
                 <volume name="srv"/>
                 <volume name="boot/grub2/i386-pc"/>
                 <volume name="boot/grub2/x86_64-efi" 
mountpoint="boot/grub2/x86_64-efi"/>
+                <volume name="boot/writable"/>
                 <volume name="usr/local"/>
                 <volume name="var" copy_on_write="false"/>
             </systemdisk>
@@ -242,9 +250,9 @@
             fsmountoptions="noatime,compress=lzo"
             bootloader="grub2"
             firmware="efi"
-            kernelcmdline="loglevel=3 splash=silent plymouth.enable=0 
console=ttyS0,115200n8"
+            kernelcmdline="loglevel=3 splash=silent plymouth.enable=0 
console=ttyS0,115200n8 $ignition_firstboot ignition.platform.id=metal 
rd.neednet=0"
             bootpartition="false"
-            devicepersistency="by-label"
+            devicepersistency="by-uuid"
             btrfs_root_is_snapshot="true"
             efipartsize="16"
             editbootinstall="editbootinstall_pine64.sh"
@@ -258,14 +266,10 @@
                 <volume name="opt"/>
                 <volume name="srv"/>
                 <volume name="boot/grub2/arm64-efi" 
mountpoint="boot/grub2/arm64-efi"/>
+                <volume name="boot/writable"/>
                 <volume name="usr/local"/>
                 <volume name="var" copy_on_write="false"/>
             </systemdisk>
-            <oemconfig>
-              <oem-swap>true</oem-swap>
-              <oem-swapsize>500</oem-swapsize>
-              <oem-skip-verify>true</oem-skip-verify>
-            </oemconfig>
         </type>
     </preferences>
     <preferences profiles="RaspberryPi">
@@ -282,9 +286,9 @@
             bootloader="grub2"
             bootloader_console="gfxterm"
             firmware="efi"
-            kernelcmdline="plymouth.enable=0 swiotlb=512 cma=64M 
console=ttyS0,115200n8 console=tty"
+            kernelcmdline="plymouth.enable=0 swiotlb=512 cma=64M 
console=ttyS0,115200n8 console=tty $ignition_firstboot 
ignition.platform.id=metal rd.neednet=0"
             bootpartition="false"
-            devicepersistency="by-label"
+            devicepersistency="by-uuid"
             btrfs_root_is_snapshot="true"
             efipartsize="16"
             editbootinstall="editbootinstall_rpi.sh"
@@ -298,14 +302,10 @@
                 <volume name="opt"/>
                 <volume name="srv"/>
                 <volume name="boot/grub2/arm64-efi" 
mountpoint="boot/grub2/arm64-efi"/>
+                <volume name="boot/writable"/>
                 <volume name="usr/local"/>
                 <volume name="var" copy_on_write="false"/>
             </systemdisk>
-            <oemconfig>
-              <oem-swap>true</oem-swap>
-              <oem-swapsize>500</oem-swapsize>
-              <oem-skip-verify>true</oem-skip-verify>
-            </oemconfig>
         </type>
     </preferences>
     <preferences profiles="Vagrant">
@@ -321,13 +321,14 @@
             bootloader="grub2"
             bootloader_console="gfxterm"
             firmware="uefi"
-            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
swapaccount=1 net.ifnames=0"
+            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
net.ifnames=0 $ignition_firstboot ignition.platform.id=metal rd.neednet=0"
             bootpartition="false"
             bootkernel="custom"
-            devicepersistency="by-label"
+            devicepersistency="by-uuid"
             btrfs_root_is_snapshot="true"
             btrfs_root_is_readonly_snapshot="true"
             btrfs_quota_groups="false"
+            editbootinstall="replacebootconfig.sh"
         >
             <systemdisk>
                 <volume name="home"/>
@@ -337,6 +338,7 @@
                 <volume name="srv"/>
                 <volume name="boot/grub2/i386-pc"/>
                 <volume name="boot/grub2/x86_64-efi" 
mountpoint="boot/grub2/x86_64-efi"/>
+                <volume name="boot/writable"/>
                 <volume name="usr/local"/>
                 <volume name="var" copy_on_write="false"/>
             </systemdisk>
@@ -357,13 +359,14 @@
             bootloader="grub2"
             bootloader_console="gfxterm"
             firmware="uefi"
-            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
swapaccount=1"
+            kernelcmdline="plymouth.enable=0 console=ttyS0,115200 console=tty0 
$ignition_firstboot ignition.platform.id=metal rd.neednet=0"
             bootpartition="false"
             bootkernel="custom"
-            devicepersistency="by-label"
+            devicepersistency="by-uuid"
             btrfs_root_is_snapshot="true"
             btrfs_root_is_readonly_snapshot="true"
             btrfs_quota_groups="false"
+            editbootinstall="replacebootconfig.sh"
         >
             <systemdisk>
                 <volume name="home"/>
@@ -373,6 +376,7 @@
                 <volume name="srv"/>
                 <volume name="boot/grub2/i386-pc"/>
                 <volume name="boot/grub2/x86_64-efi" 
mountpoint="boot/grub2/x86_64-efi"/>
+                <volume name="boot/writable"/>
                 <volume name="usr/local"/>
                 <volume name="var" copy_on_write="false"/>
             </systemdisk>
@@ -405,6 +409,7 @@
         <!-- Needed for initial configuration -->
         <namedCollection name="microos_cloud"/>
         <package name="patterns-microos-cloud"/>
+        <package name="ignition-dracut"/>
     </packages>
     <packages type="image" profiles="ContainerHost">
         <namedCollection name="container_runtime"/>

++++++ config.sh ++++++
--- /var/tmp/diff_new_pack.Yz4ng5/_old  2019-09-23 12:37:16.645611343 +0200
+++ /var/tmp/diff_new_pack.Yz4ng5/_new  2019-09-23 12:37:16.649611343 +0200
@@ -140,11 +140,10 @@
        sed -i'' 
's/^NUMBER_LIMIT_IMPORTANT=.*$/NUMBER_LIMIT_IMPORTANT="4-10"/g' 
/etc/snapper/configs/root
 fi
 
-# Hack: Use the legacy fstab.sys for now to work around 
https://github.com/SUSE/kiwi/issues/945
-cat << EOF >> /etc/fstab.sys
-LABEL=ROOT /var btrfs defaults,subvol=@/var 0 0
-overlay /etc overlay 
defaults,lowerdir=/sysroot/etc,upperdir=/sysroot/var/lib/overlay/1/etc,workdir=/sysroot/var/lib/overlay/work-etc
 0 0
-EOF
+# The %post script can't edit /etc/fstab sys due to 
https://github.com/OSInside/kiwi/issues/945
+# so use the kiwi custom hack
+
+cp /usr/sbin/setup-fstab-for-overlayfs /etc/fstab.script
 
 #======================================
 # Configure Pine64 specifics

++++++ editbootinstall_pine64.sh ++++++
--- /var/tmp/diff_new_pack.Yz4ng5/_old  2019-09-23 12:37:16.657611341 +0200
+++ /var/tmp/diff_new_pack.Yz4ng5/_new  2019-09-23 12:37:16.661611341 +0200
@@ -7,6 +7,41 @@
 loopname="${devname%*p2}"
 loopdev=/dev/${loopname#/dev/mapper/*}
 
+## Preparation for replacebootconfig.sh
+root=/tmp/kiwi_mount_manager.asdf
+mkdir ${root}
+mount ${devname} ${root}
+for i in proc dev sys; do mount --bind /${i} ${root}/${i}; done
+for i in tmp var boot/writable; do mount -o subvol=@/${i} ${devname} 
${root}/${i}; done
+findmnt ||:
+# END
+
+## Same as replacebootconfig.sh
+echo "Recreating the bootloader config"
+
+# This is fragile, but better fail hard than silently
+root="$(echo /tmp/kiwi_mount_manager.*/usr)"
+root=${root%/usr}
+rootdev=$(findmnt -nrvo SOURCE "${root}")
+
+# Needed by the snapper integration
+mount -osubvol=@/.snapshots "${rootdev}" "${root}/.snapshots"
+
+# KIWI does not escape the variable
+sed -i 's/ $ig/ \\$ig/g' "${root}/etc/default/grub"
+
+# Make sure the link exists
+ln -s "${rootdev}" "/dev/disk/by-uuid/$(chroot "${root}" grub2-probe / 
--target=fs_uuid)"
+
+chroot "${root}" grub2-mkconfig -o /boot/grub2/grub.cfg
+
+umount "${root}/.snapshots"
+## END Same as replacebootconfig.sh
+
+## Clean up after preparations
+for i in boot/writable proc dev sys tmp var .; do umount ${root}/$i; done
+# END
+
 #==========================================
 # The GPT spans the first 33 sectors, but we need to write our
 # at sector 16. Shrink the GPT to only span 5 sectors

++++++ editbootinstall_rpi.sh ++++++
--- /var/tmp/diff_new_pack.Yz4ng5/_old  2019-09-23 12:37:16.669611339 +0200
+++ /var/tmp/diff_new_pack.Yz4ng5/_new  2019-09-23 12:37:16.669611339 +0200
@@ -1,12 +1,47 @@
 #!/bin/bash
 
-set -x
+set -ex
 
 diskname=$1
 devname="$2"
 loopname="${devname%*p2}"
 loopdev=/dev/${loopname#/dev/mapper/*}
 
+## Preparation for replacebootconfig.sh
+root=/tmp/kiwi_mount_manager.asdf
+mkdir ${root}
+mount ${devname} ${root}
+for i in proc dev sys; do mount --bind /${i} ${root}/${i}; done
+for i in tmp var boot/writable; do mount -o subvol=@/${i} ${devname} 
${root}/${i}; done
+findmnt ||:
+# END
+
+## Same as replacebootconfig.sh
+echo "Recreating the bootloader config"
+
+# This is fragile, but better fail hard than silently
+root="$(echo /tmp/kiwi_mount_manager.*/usr)"
+root=${root%/usr}
+rootdev=$(findmnt -nrvo SOURCE "${root}")
+
+# Needed by the snapper integration
+mount -osubvol=@/.snapshots "${rootdev}" "${root}/.snapshots"
+
+# KIWI does not escape the variable
+sed -i 's/ $ig/ \\$ig/g' "${root}/etc/default/grub"
+
+# Make sure the link exists
+ln -s "${rootdev}" "/dev/disk/by-uuid/$(chroot "${root}" grub2-probe / 
--target=fs_uuid)"
+
+chroot "${root}" grub2-mkconfig -o /boot/grub2/grub.cfg
+
+umount "${root}/.snapshots"
+## END Same as replacebootconfig.sh
+
+## Clean up after preparations
+for i in boot/writable proc dev sys tmp var .; do umount ${root}/$i; done
+# END
+
 #==========================================
 # copy Raspberry Pi firmware to EFI partition
 #------------------------------------------

++++++ replacebootconfig.sh ++++++
#!/bin/bash
set -euxo pipefail

# Note: There is a copy of this in editbootinstall_{rpi,pine64}.sh!

echo "Recreating the bootloader config"

# This is fragile, but better fail hard than silently
root="$(echo /tmp/kiwi_mount_manager.*/usr)"
root=${root%/usr}
rootdev=$(findmnt -nrvo SOURCE "${root}")

# Needed by the snapper integration
mount -osubvol=@/.snapshots "${rootdev}" "${root}/.snapshots"

# KIWI does not escape the variable
sed -i 's/ $ig/ \\$ig/g' "${root}/etc/default/grub"

# Make sure the link exists
ln -s "${rootdev}" "/dev/disk/by-uuid/$(chroot "${root}" grub2-probe / 
--target=fs_uuid)"

chroot "${root}" grub2-mkconfig -o /boot/grub2/grub.cfg

umount "${root}/.snapshots"

Reply via email to