From 7e10c8905ee28c186cc297842905def856e1a25e Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 3 Apr 2018 11:08:32 +0200 Subject: [PATCH] Backport a patch to avoid writing to parent repo This fixes installing via flatpak system helper on systems where the host fs supports reflinks. https://github.com/ostreedev/ostree/pull/1524 --- 0001-Don-t-write-to-parent-repo.patch | 35 +++++++++++++++++++++++++++ ostree.spec | 7 +++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 0001-Don-t-write-to-parent-repo.patch diff --git a/0001-Don-t-write-to-parent-repo.patch b/0001-Don-t-write-to-parent-repo.patch new file mode 100644 index 0000000..772e41a --- /dev/null +++ b/0001-Don-t-write-to-parent-repo.patch @@ -0,0 +1,35 @@ +From 28c7bc6d0e153a0b07bdb82d25473a490765067f Mon Sep 17 00:00:00 2001 +From: Alexander Larsson +Date: Thu, 29 Mar 2018 15:19:33 +0200 +Subject: [PATCH] Don't write to parent repo + +In _try_clone_from_payload_link, don't try to do the clone in the +parent repo, because we don't want to modify that. parent repos are +typically used when you want a shared, immutable base. + +For example in flatpak, the parent repo is the system repo which you +don't have write access to, so any modification to it will fail with +EACCES, making it impossible to install via the system helper. + +Closes: #1524 +Approved by: cgwalters +--- + src/libostree/ostree-repo-commit.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c +index 12c4103dc1d9..7eb5ca93492c 100644 +--- a/src/libostree/ostree-repo-commit.c ++++ b/src/libostree/ostree-repo-commit.c +@@ -777,8 +777,6 @@ _try_clone_from_payload_link (OstreeRepo *self, + return TRUE; + } + } +- if (self->parent_repo) +- return _try_clone_from_payload_link (self->parent_repo, payload_checksum, file_info, tmpf, cancellable, error); + + return TRUE; + } +-- +2.16.2 + diff --git a/ostree.spec b/ostree.spec index f71c310..e5ecc03 100644 --- a/ostree.spec +++ b/ostree.spec @@ -1,8 +1,10 @@ Summary: Tool for managing bootable, immutable filesystem trees Name: ostree Version: 2018.3 -Release: 1%{?dist} +Release: 2%{?dist} Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz +# Backported from upstream +Patch0: 0001-Don-t-write-to-parent-repo.patch License: LGPLv2+ URL: https://ostree.readthedocs.io/en/latest/ @@ -153,6 +155,9 @@ find %{buildroot} -name '*.la' -delete %{_libexecdir}/libostree/ostree-trivial-httpd %changelog +* Tue Apr 03 2018 Kalev Lember - 2018.3-2 +- Backport a patch to avoid writing to parent repo + * Wed Mar 21 2018 Colin Walters - 2018.3-1 - https://github.com/ostreedev/ostree/releases/tag/v2018.3