Colin Walters 2019-01-11 14:05:40 +00:00
parent 0467f32425
commit cc5874bb72
2 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From 2ccf36ae3ded1da48dd659d46a4ccabdee0e0775 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 4 Jan 2019 15:44:56 +0000
Subject: [PATCH] sysroot: Remove immutable bit from /etc/sysconfig/nfs
Work around for https://src.fedoraproject.org/rpms/nfs-utils/pull-request/7
Currently Fedora-only.
---
src/libostree/ostree-sysroot-cleanup.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/libostree/ostree-sysroot-cleanup.c b/src/libostree/ostree-sysroot-cleanup.c
index 7a352e6b..b8ec9970 100644
--- a/src/libostree/ostree-sysroot-cleanup.c
+++ b/src/libostree/ostree-sysroot-cleanup.c
@@ -271,6 +271,22 @@ _ostree_sysroot_rmrf_deployment (OstreeSysroot *self,
return FALSE;
if (!glnx_shutil_rm_rf_at (self->sysroot_fd, origin_relpath, cancellable, error))
return FALSE;
+
+ /* Special hack for Fedora's NFS package which is abusing the immutable bit
+ * https://src.fedoraproject.org/rpms/nfs-utils/pull-request/7
+ */
+ {
+ glnx_autofd int nfs_sysconfig_fd = -1;
+ if (!ot_openat_ignore_enoent (deployment_fd, "etc/sysconfig/nfs", &nfs_sysconfig_fd, error))
+ return FALSE;
+ if (nfs_sysconfig_fd != -1)
+ {
+ if (!_ostree_linuxfs_fd_alter_immutable_flag (nfs_sysconfig_fd, FALSE,
+ cancellable, error))
+ return FALSE;
+ }
+ }
+
if (!glnx_shutil_rm_rf_at (self->sysroot_fd, deployment_path, cancellable, error))
return FALSE;
--
2.19.2

View File

@ -8,11 +8,14 @@
Summary: Tool for managing bootable, immutable filesystem trees
Name: ostree
Version: 2018.9
Release: 1%{?dist}
Release: 2%{?dist}
Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz
License: LGPLv2+
URL: https://ostree.readthedocs.io/en/latest/
# Work around https://src.fedoraproject.org/rpms/nfs-utils/pull-request/7
Patch0: 0001-sysroot-Remove-immutable-bit-from-etc-sysconfig-nfs.patch
BuildRequires: git
# We always run autogen.sh
BuildRequires: autoconf automake libtool
@ -163,6 +166,9 @@ find %{buildroot} -name '*.la' -delete
%endif
%changelog
* Fri Jan 11 2019 Colin Walters <walters@verbum.org> - 2018.9-2
- Work around https://src.fedoraproject.org/rpms/nfs-utils/pull-request/7
* Thu Oct 25 2018 Colin Walters <walters@verbum.org> - 2018.9-1
- https://github.com/ostreedev/ostree/releases/tag/v2018.9