From 1c40849d33fb891a99ec86310085cef685d93ec9 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 7 Feb 2024 08:57:52 -0800 Subject: [PATCH] Backport #5460 to fix ostree btrfs installs (#2262892) --- ...-in-ostree-install-bind-mount-destin.patch | 29 +++++++++++++++++++ anaconda.spec | 10 ++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0001-Resolve-symlinks-in-ostree-install-bind-mount-destin.patch diff --git a/0001-Resolve-symlinks-in-ostree-install-bind-mount-destin.patch b/0001-Resolve-symlinks-in-ostree-install-bind-mount-destin.patch new file mode 100644 index 0000000..f93681c --- /dev/null +++ b/0001-Resolve-symlinks-in-ostree-install-bind-mount-destin.patch @@ -0,0 +1,29 @@ +From c8c29ebbf867e507405247eb62e82b8b9cfa60bc Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Tue, 6 Feb 2024 15:19:02 -0800 +Subject: [PATCH] Resolve symlinks in ostree install bind mount destinations + (#2262892) + +Signed-off-by: Adam Williamson +--- + .../modules/payloads/payload/rpm_ostree/installation.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py b/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py +index 1c8af4d93f..0ac8583b78 100644 +--- a/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py ++++ b/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py +@@ -160,6 +160,10 @@ class PrepareOSTreeMountTargetsTask(Task): + + # Canonicalize dest to the full path + dest = self._sysroot + dest ++ # Resolve symlinks as bind mounting over symlinks does not ++ # seem to work on btrfs: ++ # https://bugzilla.redhat.com/show_bug.cgi?id=2262892 ++ dest = os.path.realpath(dest) + + if bind_ro: + safe_exec_with_redirect("mount", ["--bind", src, src]) +-- +2.43.0 + diff --git a/anaconda.spec b/anaconda.spec index 2fbd270..6f60f46 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,7 +1,7 @@ Summary: Graphical system installer Name: anaconda Version: 40.21 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-2.0-or-later URL: http://fedoraproject.org/wiki/Anaconda @@ -12,6 +12,11 @@ URL: http://fedoraproject.org/wiki/Anaconda # make dist Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{version}-1/%{name}-%{version}.tar.bz2 +# https://github.com/rhinstaller/anaconda/pull/5460 +# https://bugzilla.redhat.com/show_bug.cgi?id=2262892 +# Fix ostree installs to btrfs with util-linux 2.40+ +Patch: 0001-Resolve-symlinks-in-ostree-install-bind-mount-destin.patch + # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -465,6 +470,9 @@ rm -rf \ %{_prefix}/libexec/anaconda/dd_* %changelog +* Tue Feb 06 2024 Adam Williamson - 40.21-2 +- Backport PR #5460 to fix ostree btrfs installs with new util-linux (#2262892) + * Tue Feb 06 2024 Packit - 40.21-1 - Update translations from Weblate for master (github-actions) - Deprecate timezone --isUtc, --ntpservers and --nontp kickstart options