Backport #5460 to fix ostree btrfs installs (#2262892)

This commit is contained in:
Adam Williamson 2024-02-07 08:57:52 -08:00
parent 78d8d1a538
commit 1c40849d33
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From c8c29ebbf867e507405247eb62e82b8b9cfa60bc Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
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 <awilliam@redhat.com>
---
.../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

View File

@ -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 <awilliam@redhat.com> - 40.21-2
- Backport PR #5460 to fix ostree btrfs installs with new util-linux (#2262892)
* Tue Feb 06 2024 Packit <hello@packit.dev> - 40.21-1
- Update translations from Weblate for master (github-actions)
- Deprecate timezone --isUtc, --ntpservers and --nontp kickstart options