From 16151b7b197a36b172765954beae986ec3ba32ab Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Thu, 7 Dec 2023 11:02:27 -0500 Subject: [PATCH 1/2] Get system ready for v0.98 release Fix implicite ln in build.sh Add shellcheck disables to allow for build.sh to run until formal fix is done. Signed-off-by: Stephen Smoogen --- initoverlayfs.spec | 7 ++++++- scripts/build.sh | 9 ++++++++- scripts/test.sh | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/initoverlayfs.spec b/initoverlayfs.spec index 2d36653..782791f 100644 --- a/initoverlayfs.spec +++ b/initoverlayfs.spec @@ -1,5 +1,5 @@ Name: initoverlayfs -Version: 0.97 +Version: 0.98 Release: 1%{?dist} Summary: An initial scalable filesystem for Linux operating systems @@ -39,6 +39,11 @@ install -D -m755 lib/dracut/modules.d/81initoverlayfs/module-setup.sh $RPM_BUILD %{_prefix}/lib/dracut/modules.d/81initoverlayfs/ %changelog +* Thu Dec 7 2023 Stephen Smoogen - 0.98-1 +- Release 0.98 +- Improve documentation (PR31 and ecurtin) +- Only wait for bootfs storage device if it is configured (PR32) + * Fri Nov 17 2023 Eric Curtin - 0.97-1 - Raspberry Pi 4 enablement. diff --git a/scripts/build.sh b/scripts/build.sh index 7ab96e5..4e2a713 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,5 +1,12 @@ #!/bin/bash +# https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl... +# this comes up due to us trying to output a shell script which needs to keep its variables. Safe to disable +# shellcheck disable=SC2016 +# this needs a larger set of hand tests to fix. +# https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... +# shellcheck disable=SC2086 + set -e failure() { @@ -73,7 +80,7 @@ install() { sed -i "s/initrd-udevadm-cleanup-db.service/initrd-udevadm-cleanup-db.service mount-sysroot.service/g" /usr/lib/systemd/system/initrd-switch-root.target chcon system_u:object_r:systemd_unit_file_t:s0 /usr/lib/systemd/system/mount-sysroot.service cd /usr/lib/systemd/system/sysinit.target.wants/ -ln -s ../mount-sysroot.service +ln -s ../mount-sysroot.service . cd - systemctl daemon-reload du -sh /boot/initramfs* diff --git a/scripts/test.sh b/scripts/test.sh index 29f8b43..185734d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,4 +1,7 @@ #!/bin/bash +# disable shellcheck for "Double quote to prevent globbing" until tested fix +# shellcheck disable=SC2086 +# set -ex From 60cf46cae20785c7a343b2547d071475b0db1d38 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Thu, 7 Dec 2023 11:09:19 -0500 Subject: [PATCH 2/2] Cleanup whitespace problems found by precheck Signed-off-by: Stephen Smoogen --- README.md | 10 +++++----- initoverlayfs.spec | 2 +- scripts/build.sh | 3 +-- scripts/test.sh | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cb597b1..169ae51 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ A scalable solution for initial filesystems focused on minimal resource usage, s - [Why use initoverlayfs?](#why-use-initoverlayfs) - [Dependancies](#dependancies) - [Installation](#installation) - * [Step 1 - Deploy the software](#step-1---deploy-the-software) - * [Step 2 - Run initoverlayfs-install](#step-2---run-initoverlayfs-install) - * [Step 3 - Reboot to test](#step-3---reboot-to-test) - * [Step 4 - Validating the boot](#step-4---validating-the-boot) + * [Step 1 - Deploy the software](#step-1---deploy-the-software) + * [Step 2 - Run initoverlayfs-install](#step-2---run-initoverlayfs-install) + * [Step 3 - Reboot to test](#step-3---reboot-to-test) + * [Step 4 - Validating the boot](#step-4---validating-the-boot) # What is initoverlayfs? @@ -60,7 +60,7 @@ For illustration, consider a comparison of the sizes using dracut versus initove ``` bash # /usr/bin/initoverlayfs-install # du -sh /boot/initramfs-6.5.5-300.fc39.x86_64.img -13M /boot/initramfs-6.5.5-300.fc39.x86_64.img +13M /boot/initramfs-6.5.5-300.fc39.x86_64.img ^^ <--- from 36M to 13M ``` diff --git a/initoverlayfs.spec b/initoverlayfs.spec index 782791f..980f28c 100644 --- a/initoverlayfs.spec +++ b/initoverlayfs.spec @@ -33,7 +33,7 @@ install -D -m755 lib/dracut/modules.d/81initoverlayfs/module-setup.sh $RPM_BUILD %files %license LICENSE %doc README.md -%attr(0755,root,root) +%attr(0755,root,root) %{_bindir}/initoverlayfs-install %{_prefix}/sbin/storage-init %{_prefix}/lib/dracut/modules.d/81initoverlayfs/ diff --git a/scripts/build.sh b/scripts/build.sh index 4e2a713..bf0cf5b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -61,7 +61,7 @@ extract_initrd_into_initoverlayfs() { fi } -cd +cd #epoch=$(date +%s) # systemd-analyze > systemd-analyze$epoch.txt #journalctl --output=short-monotonic > journalctl$epoch.txt @@ -146,4 +146,3 @@ sudo systemctl daemon-reload #sudo sed -i "s#options #options initoverlayfs=$boot_partition initoverlayfstype=ext4 rdinit=/usr/sbin/storage-init #g" /boot/loader/entries/$bls_file sudo sed -i "s/ quiet/ console=ttyS0/g" /boot/loader/entries/$bls_file sudo cat /boot/loader/entries/$bls_file - diff --git a/scripts/test.sh b/scripts/test.sh index 185734d..d47bcd2 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,7 +1,7 @@ #!/bin/bash # disable shellcheck for "Double quote to prevent globbing" until tested fix # shellcheck disable=SC2086 -# +# set -ex