import CS ostree-2022.2-8.el8

This commit is contained in:
eabdullin 2023-09-27 13:52:02 +00:00
parent ad546eb4da
commit 81ce7d0279
4 changed files with 130 additions and 1 deletions

View File

@ -0,0 +1,57 @@
From 9053aaffab2ec02ed377a82389422cc4e77dff8a Mon Sep 17 00:00:00 2001
From: Abylay Ospan <aospan@amazon.com>
Date: Tue, 6 Jun 2023 02:13:14 +0000
Subject: [PATCH 16/17] commit: fix ostree deployment on 64-bit inode fs
This commit addresses a bug that was causing ostree deployment
to become corrupted on the large fs, when any package was installed using
'rpm-ostree install'.
In such instances, multiple files were assigned the same inode. For
example, the '/home' directory and a regular file 'pkg-get' were
assigned the same inode (2147484070), making the deployment unusable.
A root cause analysis was performed, running the process under gdb,
which revealed a lossy conversion from guint64 to guint32, for example
6442451366 converted to 2147484070:
(gdb) p name
$10 = 0x7fe9224d2d70 "home"
(gdb) p inode
$73 = 6442451366
(gdb) s
device=66311, modifier=0x7fe914791840) at
src/libostree/ostree-repo-commit.c:1590
The conversion resulted in entirely independent files potentially
receiving the same inode.
The issue was discovered on PoC machine equipped with a large NVME
(3.4TB), but the bug can be easily reproduced using `cosa run -m 4000
--qemu-size +3TB', followed by installation of any package using
`rpm-ostree install`. The resulting deployment will be unusable due to
many files being "corrupted" by the aforementioned issue.
(cherry picked from commit de6fddc6adee09a93901243dc7074090828a1912)
---
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 dba98c32..e224d1cb 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -1584,7 +1584,7 @@ static const char *
devino_cache_lookup (OstreeRepo *self,
OstreeRepoCommitModifier *modifier,
guint32 device,
- guint32 inode)
+ guint64 inode)
{
OstreeDevIno dev_ino_key;
OstreeDevIno *dev_ino_val;
--
2.40.1

View File

@ -0,0 +1,33 @@
From 8b86c6c0b520f6856f9f8dba09c97114113d3244 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 20 Jul 2023 09:13:43 -0400
Subject: [PATCH 17/17] Add an always-on `inode64` feature
As I (and others) will be backporting the fix in
https://github.com/ostreedev/ostree/pull/2874/commits/de6fddc6adee09a93901243dc7074090828a1912
pretty far, I want a way for sysadmins and OS builders to
be able to reliably see when their version of ostree has this fix
(Because comparing version numbers isn't portable).
---
configure.ac | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 3bd735ed..b58d0a67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,7 +82,10 @@ AM_COND_IF([BUILDOPT_TSAN],
LT_PREREQ([2.2.4])
LT_INIT([disable-static])
-OSTREE_FEATURES=""
+dnl We have an always-on feature now to signify the fix for
+dnl https://github.com/ostreedev/ostree/pull/2874/commits/de6fddc6adee09a93901243dc7074090828a1912
+dnl "commit: fix ostree deployment on 64-bit inode fs"
+OSTREE_FEATURES="inode64"
AC_SUBST([OSTREE_FEATURES])
GLIB_TESTS
--
2.40.1

View File

@ -0,0 +1,27 @@
From 3443baa6e63b36d169f57027d7e80df614592c8e Mon Sep 17 00:00:00 2001
From: Joseph Marrero <jmarrero@redhat.com>
Date: Fri, 4 Aug 2023 16:09:20 -0400
Subject: [PATCH] Backport: 7f70614a1ac1950ebde3df0e26cc9ab1d72b2f1f
---
src/libostree/ostree-sysroot-deploy.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index 2454a587..4d6d796e 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -1613,9 +1613,8 @@ static void *
sync_in_thread (void *ptr)
{
SyncData *syncdata = ptr;
- // Ensure that the caller is blocked waiting
- g_mutex_lock (&syncdata->mutex);
sync ();
+ g_mutex_lock (&syncdata->mutex);
// Signal success
syncdata->success = true;
g_cond_broadcast (&syncdata->cond);
--
2.41.0

View File

@ -8,7 +8,7 @@
Summary: Tool for managing bootable, immutable filesystem trees Summary: Tool for managing bootable, immutable filesystem trees
Name: ostree Name: ostree
Version: 2022.2 Version: 2022.2
Release: 6%{?dist} Release: 8%{?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/
@ -24,6 +24,11 @@ Patch5: 0006-deploy-Be-a-bit-more-verbose-about-SELinux-bits.patch
Patch6: 0007-backport-GH2694-secure-execution-enablement-s390x.patch Patch6: 0007-backport-GH2694-secure-execution-enablement-s390x.patch
Patch7: 0008-backport-GH2696-ed25519-verify-signatures-minimum-length.patch Patch7: 0008-backport-GH2696-ed25519-verify-signatures-minimum-length.patch
Patch8: 0001-Support-overlayfs-whiteouts-on-checkout.patch Patch8: 0001-Support-overlayfs-whiteouts-on-checkout.patch
# The original intention was to sync to the rhel8 branch upstream; that appears not to have happened
# Patches for https://bugzilla.redhat.com/show_bug.cgi?id=2224102
Patch16: 0016-commit-fix-ostree-deployment-on-64-bit-inode-fs.patch
Patch17: 0017-Add-an-always-on-inode64-feature.patch
Patch18: 0018-Backport-7f70614a1ac1950ebde3df0e26cc9ab1d72b2f1f.patch
BuildRequires: make BuildRequires: make
BuildRequires: git BuildRequires: git
@ -175,6 +180,13 @@ find %{buildroot} -name '*.la' -delete
%endif %endif
%changelog %changelog
* Tue Aug 08 2023 Joseph Marrero <jmarrero@fedoraproject.org> - 2022.2-8
- Backport for https://github.com/ostreedev/ostree/commit/7f70614a1ac1950ebde3df0e26cc9ab1d72b2f1f
- Resolves: rhbz#2229895
* Thu Jul 20 2023 Colin Walters <walters@verbum.org> - 2022.2-7
- Backport for https://bugzilla.redhat.com/show_bug.cgi?id=2224102
* Fri Oct 14 2022 Colin Walters <walters@verbum.org> - 2022.2-6 * Fri Oct 14 2022 Colin Walters <walters@verbum.org> - 2022.2-6
- Backport https://github.com/ostreedev/ostree/commit/0085494e350c72599fc5c0e00422885d80b3c660 - Backport https://github.com/ostreedev/ostree/commit/0085494e350c72599fc5c0e00422885d80b3c660
- Resolves: rhbz#2134629 - Resolves: rhbz#2134629