From b602926e03b164ef422c81d00dc0b356409f7212 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 22 Jul 2020 20:57:49 +0000 Subject: [PATCH] Update to 2020.4 --- .gitignore | 1 + ...andle-EOPNOTSUPP-for-copy_file_range.patch | 38 ----------- ...-lib-commit-Add-more-error-prefixing.patch | 28 -------- ...ount-Neuter-sysroot.readonly-for-now.patch | 33 ---------- ...ename-function-for-staging-dir-check.patch | 64 ------------------- ...-that-dirent-is-a-directory-before-c.patch | 33 ---------- ostree.spec | 13 ++-- sources | 2 +- 8 files changed, 7 insertions(+), 205 deletions(-) delete mode 100644 0001-glnx-fdio-handle-EOPNOTSUPP-for-copy_file_range.patch delete mode 100644 0001-lib-commit-Add-more-error-prefixing.patch delete mode 100644 0001-switchroot-remount-Neuter-sysroot.readonly-for-now.patch delete mode 100644 0002-lib-Rename-function-for-staging-dir-check.patch delete mode 100644 0003-lib-commit-Check-that-dirent-is-a-directory-before-c.patch diff --git a/.gitignore b/.gitignore index 8955ca1..defbd41 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,4 @@ /libostree-2020.1.tar.xz /libostree-2020.2.tar.xz /libostree-2020.3.tar.xz +/libostree-2020.4.tar.xz diff --git a/0001-glnx-fdio-handle-EOPNOTSUPP-for-copy_file_range.patch b/0001-glnx-fdio-handle-EOPNOTSUPP-for-copy_file_range.patch deleted file mode 100644 index 5e3fed3..0000000 --- a/0001-glnx-fdio-handle-EOPNOTSUPP-for-copy_file_range.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 7e3a19958e6af94b764c772a58adf47e6cc4b678 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 16 Jun 2020 12:29:46 -0400 -Subject: [PATCH] glnx-fdio: handle EOPNOTSUPP for copy_file_range - -When using `copy_file_range` to target a source and dest on the same NFS -mount on some older kernel versions, it's possible that we can get -`EOPNOTSUPP` e.g. if the NFS server doesn't support server-side copy. - -We hit this in the FCOS release pipeline where we run `ostree -pull-local` to pull content between two repos on the same mount from -inside an OpenShift cluster on top of RHEL7. - -Nowadays, it seems like the kernel itself falls back to a more generic -version of `copy_file_range()` at least. Though to be compatible with -older kernels, let's add `EOPNOTSUPP` to the list of errors we interpret -as "cfr possibly available, but can't be done for this specific -operation". ---- - libglnx/glnx-fdio.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libglnx/glnx-fdio.c b/libglnx/glnx-fdio.c -index 6ae6ec7..e537a9b 100644 ---- a/libglnx/glnx-fdio.c -+++ b/libglnx/glnx-fdio.c -@@ -826,7 +826,7 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes) - have_cfr = 0; - try_cfr = false; - } -- else if (errno == EXDEV) -+ else if (G_IN_SET (errno, EXDEV, EOPNOTSUPP)) - /* We won't try cfr again for this run, but let's be - * conservative and not mark it as available/unavailable until - * we know for sure. --- -2.26.2 - diff --git a/0001-lib-commit-Add-more-error-prefixing.patch b/0001-lib-commit-Add-more-error-prefixing.patch deleted file mode 100644 index f22e951..0000000 --- a/0001-lib-commit-Add-more-error-prefixing.patch +++ /dev/null @@ -1,28 +0,0 @@ -From bb8fd5a2c4b91d8fd41e831887f053bb63b13ac5 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Fri, 17 Apr 2020 14:18:28 -0400 -Subject: [PATCH 1/3] lib/commit: Add more error prefixing - -We think we're hitting an error in that function in the Fedora infra. -Add some more error prefixing to help debugging. ---- - src/libostree/ostree-repo-commit.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c -index 3f2f2beb..6712b53e 100644 ---- a/src/libostree/ostree-repo-commit.c -+++ b/src/libostree/ostree-repo-commit.c -@@ -1943,6 +1943,9 @@ cleanup_txn_dir (OstreeRepo *self, - GCancellable *cancellable, - GError **error) - { -+ const char *errprefix = glnx_strjoina ("Cleaning up txn dir ", path); -+ GLNX_AUTO_PREFIX_ERROR (errprefix, error); -+ - g_auto(GLnxLockFile) lockfile = { 0, }; - gboolean did_lock; - --- -2.25.1 - diff --git a/0001-switchroot-remount-Neuter-sysroot.readonly-for-now.patch b/0001-switchroot-remount-Neuter-sysroot.readonly-for-now.patch deleted file mode 100644 index 980dca9..0000000 --- a/0001-switchroot-remount-Neuter-sysroot.readonly-for-now.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e35b82fb891daee823fcce421ae8f1442b630ea2 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Wed, 20 May 2020 16:18:45 -0400 -Subject: [PATCH] switchroot/remount: Neuter sysroot.readonly for now - -We're hitting issues with the read-only remounts racing with various -services coming up. Let's neuter it for now until we rework how it -works. - -See: https://github.com/coreos/fedora-coreos-tracker/issues/488 ---- - src/switchroot/ostree-remount.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/switchroot/ostree-remount.c b/src/switchroot/ostree-remount.c -index 326b104f..00e21296 100644 ---- a/src/switchroot/ostree-remount.c -+++ b/src/switchroot/ostree-remount.c -@@ -93,7 +93,10 @@ sysroot_is_configured_ro (void) - if (!g_key_file_load_from_file (keyfile, config_path, 0, NULL)) - return false; - -- return g_key_file_get_boolean (keyfile, "sysroot", "readonly", NULL); -+ if (g_key_file_get_boolean (keyfile, "sysroot", "readonly", NULL)) -+ puts ("Ignoring sysroot.readonly config; see https://github.com/coreos/fedora-coreos-tracker/issues/488."); -+ -+ return false; - } - - int --- -2.25.4 - diff --git a/0002-lib-Rename-function-for-staging-dir-check.patch b/0002-lib-Rename-function-for-staging-dir-check.patch deleted file mode 100644 index ee25668..0000000 --- a/0002-lib-Rename-function-for-staging-dir-check.patch +++ /dev/null @@ -1,64 +0,0 @@ -From df065ad766c325bac2fa9a83ea1af7e1616abe16 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Fri, 17 Apr 2020 14:20:25 -0400 -Subject: [PATCH 2/3] lib: Rename function for staging dir check - -Rename the function to more accurately reflect what it does, which is to -check whether the filename has the `staging-` prefix. ---- - src/libostree/ostree-repo-commit.c | 2 +- - src/libostree/ostree-repo-private.h | 2 +- - src/libostree/ostree-repo.c | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c -index 6712b53e..8c4bd3fe 100644 ---- a/src/libostree/ostree-repo-commit.c -+++ b/src/libostree/ostree-repo-commit.c -@@ -2011,7 +2011,7 @@ cleanup_tmpdir (OstreeRepo *self, - continue; - - /* Handle transaction tmpdirs */ -- if (_ostree_repo_is_locked_tmpdir (dent->d_name)) -+ if (_ostree_repo_has_staging_prefix (dent->d_name)) - { - if (!cleanup_txn_dir (self, dfd_iter.fd, dent->d_name, cancellable, error)) - return FALSE; -diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h -index e52f9f0b..a1c7b7b4 100644 ---- a/src/libostree/ostree-repo-private.h -+++ b/src/libostree/ostree-repo-private.h -@@ -247,7 +247,7 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd, - GError **error); - - gboolean --_ostree_repo_is_locked_tmpdir (const char *filename); -+_ostree_repo_has_staging_prefix (const char *filename); - - gboolean - _ostree_repo_try_lock_tmpdir (int tmpdir_dfd, -diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c -index 97ce95b8..5fd92bb9 100644 ---- a/src/libostree/ostree-repo.c -+++ b/src/libostree/ostree-repo.c -@@ -5959,7 +5959,7 @@ _ostree_repo_maybe_regenerate_summary (OstreeRepo *self, - } - - gboolean --_ostree_repo_is_locked_tmpdir (const char *filename) -+_ostree_repo_has_staging_prefix (const char *filename) - { - return g_str_has_prefix (filename, OSTREE_REPO_TMPDIR_STAGING); - } -@@ -6019,7 +6019,7 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd, - GCancellable *cancellable, - GError **error) - { -- g_return_val_if_fail (_ostree_repo_is_locked_tmpdir (tmpdir_prefix), FALSE); -+ g_return_val_if_fail (_ostree_repo_has_staging_prefix (tmpdir_prefix), FALSE); - - /* Look for existing tmpdir (with same prefix) to reuse */ - g_auto(GLnxDirFdIterator) dfd_iter = { 0, }; --- -2.25.1 - diff --git a/0003-lib-commit-Check-that-dirent-is-a-directory-before-c.patch b/0003-lib-commit-Check-that-dirent-is-a-directory-before-c.patch deleted file mode 100644 index 3b03266..0000000 --- a/0003-lib-commit-Check-that-dirent-is-a-directory-before-c.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8ece36c28a3449de9dce9d43252aeb0ffc166687 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Fri, 17 Apr 2020 14:29:13 -0400 -Subject: [PATCH 3/3] lib/commit: Check that dirent is a directory before - cleaning - -I've only noticed this by inspection. But I think it's possible for -`cleanup_txn_dir` to get called with the `staging-...-lock` file since -it matches the prefix. - -Make the checking here stronger by verifying that it's a directory. If -it's not a directory (lockfile), then follow the default pruning expiry -logic so that we still cleanup stray lockfiles eventually. ---- - src/libostree/ostree-repo-commit.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c -index 8c4bd3fe..7dd68e96 100644 ---- a/src/libostree/ostree-repo-commit.c -+++ b/src/libostree/ostree-repo-commit.c -@@ -2011,7 +2011,7 @@ cleanup_tmpdir (OstreeRepo *self, - continue; - - /* Handle transaction tmpdirs */ -- if (_ostree_repo_has_staging_prefix (dent->d_name)) -+ if (_ostree_repo_has_staging_prefix (dent->d_name) && S_ISDIR (stbuf.st_mode)) - { - if (!cleanup_txn_dir (self, dfd_iter.fd, dent->d_name, cancellable, error)) - return FALSE; --- -2.25.1 - diff --git a/ostree.spec b/ostree.spec index 7e393e3..f92d527 100644 --- a/ostree.spec +++ b/ostree.spec @@ -7,18 +7,12 @@ Summary: Tool for managing bootable, immutable filesystem trees Name: ostree -Version: 2020.3 -Release: 6%{?dist} +Version: 2020.4 +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/ -Patch0: 0001-lib-commit-Add-more-error-prefixing.patch -Patch1: 0002-lib-Rename-function-for-staging-dir-check.patch -Patch2: 0003-lib-commit-Check-that-dirent-is-a-directory-before-c.patch -Patch3: 0001-switchroot-remount-Neuter-sysroot.readonly-for-now.patch -Patch4: 0001-glnx-fdio-handle-EOPNOTSUPP-for-copy_file_range.patch - BuildRequires: git # We always run autogen.sh BuildRequires: autoconf automake libtool @@ -173,6 +167,9 @@ find %{buildroot} -name '*.la' -delete %endif %changelog +* Wed Jul 22 2020 Colin Walters - 2020.4-2 +- https://github.com/ostreedev/ostree/releases/tag/v2020.4 + * Tue Jun 30 2020 Jeff Law - 2020.3-6 Disable LTO diff --git a/sources b/sources index a70fa77..ee516fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libostree-2020.3.tar.xz) = cedda45ced76d469f124bc71217aea8db705299a49bf380a9e48f0c40bc4d50679901d245deb0cac1b2abbc541621d4c555ac043ff4b760f9ee34a0ca694645e +SHA512 (libostree-2020.4.tar.xz) = e1488fda145b2266fd73ebaf272ce35085e578bae55044498bb3b7e94bf18f64f0917f089df4981b199c35601e2f3391fe4423601dee25f5c2e18d5c18d7ead1