From 12345be640c6f11f2771aad79c346abec7010bb4 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 16 Sep 2024 12:26:37 +0100 Subject: [PATCH 1/2] test-mode: Don't pass etc as extra path to live-boot-overlayfs-setup I believe this was needed in the distant path where /etc was handled differently to other mutable paths on live boots, but since commit 4d348fb9b56ff34cf150d68a6012b6ce5778d51a and commit 37d20f1512958ed9ec3f6d7d776c760cbcb6b882 etc has been part of the overlay_dirs list that EXTRA_PATHS is appended to, so passing etc to this script has been redundant. Remove it; and remove the EXTRA_PATHS handling from eos-live-boot-overlayfs-setup, which is now unused. https://phabricator.endlessm.com/T35651 --- eos-live-boot-overlayfs-setup | 4 +--- eos-test-mode | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/eos-live-boot-overlayfs-setup b/eos-live-boot-overlayfs-setup index bd968af..caa2f0f 100755 --- a/eos-live-boot-overlayfs-setup +++ b/eos-live-boot-overlayfs-setup @@ -1,8 +1,6 @@ #!/bin/bash # Mount overlays over any directory that might be written to -EXTRA_PATHS=("$@") - # Create a loopback mount corresponding to persistent.img on the given device map_persistent_img_file() { local root_partition=$1 @@ -145,6 +143,6 @@ fi # (which it always does at the root of the mount!) then overlayfs # returns xattrs from that. overlay_dirs="boot etc srv sysroot/home sysroot/ostree var" -for dir in $overlay_dirs "${EXTRA_PATHS[@]}"; do +for dir in $overlay_dirs; do setup_overlay "$dir" done diff --git a/eos-test-mode b/eos-test-mode index d72d8f2..0fbc317 100755 --- a/eos-test-mode +++ b/eos-test-mode @@ -21,7 +21,7 @@ [ -d /run/eos-live ] && exit 0 # Mount overlays over any directory that might be written to -eos-live-boot-overlayfs-setup etc +eos-live-boot-overlayfs-setup # Disable the updater for this boot systemctl mask --runtime --now eos-autoupdater.timer eos-autoupdater.service From 019bf09e423a1c09d482d9dccb157e5c125132fc Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 16 Sep 2024 12:39:01 +0100 Subject: [PATCH 2/2] live-boot-overlayfs-setup: Remove ostree/flatpak merged repo detection We have a checkpoint that prevents upgrading from EOS 4 to EOS 5 if the flatpak and ostree repos have not been split; and this script is typically only used on fresh installs/live images anyway. https://phabricator.endlessm.com/T35651 --- eos-live-boot-overlayfs-setup | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/eos-live-boot-overlayfs-setup b/eos-live-boot-overlayfs-setup index caa2f0f..7003446 100755 --- a/eos-live-boot-overlayfs-setup +++ b/eos-live-boot-overlayfs-setup @@ -104,19 +104,6 @@ setup_overlay() { "eos-live-$dir" "/$dir" } -# Prior to EOS 4 the system flatpak repo was a symlink to the system -# ostree repo to allow flatpak and OS commits to share objects. The -# repos have been split now, but an updated system may not have been -# successfully migrated. In that case refuse to setup the overlays since -# it requires a complicated configuration that's no longer supported -# here. -flatpak_repo_path=$(readlink -f /var/lib/flatpak/repo) -if [ "${flatpak_repo_path}" = /ostree/repo ]; then - echo "Flatpak repo /var/lib/flatpak/repo has not been split from" \ - "OS repo /ostree/repo" >&2 - exit 1 -fi - # Use persistent storage to back overlayfses, if available storage_partition=$(find_storage_partition) if [ -b "${storage_partition}" ]; then