Backport patch for https://bugzilla.redhat.com/show_bug.cgi?id=1862568
This commit is contained in:
parent
fcbcd6373b
commit
16071e2213
@ -0,0 +1,38 @@
|
|||||||
|
From 33eeb7b9ebd858c0246a9155b7a64b9f8a258583 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Colin Walters <walters@verbum.org>
|
||||||
|
Date: Sat, 1 Aug 2020 17:24:28 +0000
|
||||||
|
Subject: [PATCH] remount: Still remount /sysroot writable if not configured ro
|
||||||
|
|
||||||
|
Regression from https://github.com/ostreedev/ostree/pull/2113/commits/35642259175973617da937f3cab6ce5f13c95077
|
||||||
|
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1862568
|
||||||
|
|
||||||
|
We still need to remount writable if it's not configured on;
|
||||||
|
because it may need OS adjustments it needs to be opt-in.
|
||||||
|
---
|
||||||
|
src/switchroot/ostree-remount.c | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/switchroot/ostree-remount.c b/src/switchroot/ostree-remount.c
|
||||||
|
index 5c313c87..cfd270bb 100644
|
||||||
|
--- a/src/switchroot/ostree-remount.c
|
||||||
|
+++ b/src/switchroot/ostree-remount.c
|
||||||
|
@@ -106,11 +106,11 @@ main(int argc, char *argv[])
|
||||||
|
exit (EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Handle remounting /sysroot read-only now */
|
||||||
|
- if (unlink (_OSTREE_SYSROOT_READONLY_STAMP) == 0)
|
||||||
|
- {
|
||||||
|
- do_remount ("/sysroot", false);
|
||||||
|
- }
|
||||||
|
+ /* Handle remounting /sysroot; if it's explicitly marked as read-only (opt in)
|
||||||
|
+ * then ensure it's readonly, otherwise mount writable, the same as /
|
||||||
|
+ */
|
||||||
|
+ bool sysroot_configured_readonly = unlink (_OSTREE_SYSROOT_READONLY_STAMP) == 0;
|
||||||
|
+ do_remount ("/sysroot", !sysroot_configured_readonly);
|
||||||
|
|
||||||
|
/* If /var was created as as an OSTree default bind mount (instead of being a separate filesystem)
|
||||||
|
* then remounting the root mount read-only also remounted it.
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -8,11 +8,14 @@
|
|||||||
Summary: Tool for managing bootable, immutable filesystem trees
|
Summary: Tool for managing bootable, immutable filesystem trees
|
||||||
Name: ostree
|
Name: ostree
|
||||||
Version: 2020.4
|
Version: 2020.4
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz
|
Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://ostree.readthedocs.io/en/latest/
|
URL: https://ostree.readthedocs.io/en/latest/
|
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1862568
|
||||||
|
Patch0: 0001-remount-Still-remount-sysroot-writable-if-not-config.patch
|
||||||
|
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
# We always run autogen.sh
|
# We always run autogen.sh
|
||||||
BuildRequires: autoconf automake libtool
|
BuildRequires: autoconf automake libtool
|
||||||
@ -167,6 +170,9 @@ find %{buildroot} -name '*.la' -delete
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 01 2020 Colin Walters <walters@verbum.org> - 2020.4-4
|
||||||
|
- Backport patch for https://bugzilla.redhat.com/show_bug.cgi?id=1862568
|
||||||
|
|
||||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.4-3
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.4-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user