#13 Backport patch to fix bare → bare imports
Closed 5 years ago by jlebon. Opened 5 years ago by sinnykumari.
rpms/ sinnykumari/ostree f29  into  f29

@@ -0,0 +1,38 @@ 

+ From c79d792fd583e92750bdaabcbc9275866bda9976 Mon Sep 17 00:00:00 2001

+ From: Colin Walters <walters@verbum.org>

+ Date: Wed, 16 Jan 2019 08:30:53 -0500

+ Subject: [PATCH 1/2] =?UTF-8?q?lib/commit:=20Fix=20bare=20=E2=86=92=20bare?=

+  =?UTF-8?q?=20imports?=

+ MIME-Version: 1.0

+ Content-Type: text/plain; charset=UTF-8

+ Content-Transfer-Encoding: 8bit

+ 

+ Regression from https://github.com/ostreedev/ostree/pull/1771

+ 

+ This broke rpmostreepayload in Anaconda where we import a bare repo:

+ https://openqa.fedoraproject.org/tests/345339#step/_do_install_and_reboot/4

+ 

+ Reported-by: Adam Williamson <adamwill@fedoraproject.org>

+ 

+ Closes: #1803

+ Approved by: jlebon

+ ---

+  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 533cf03a..c95e0b61 100644

+ --- a/src/libostree/ostree-repo-commit.c

+ +++ b/src/libostree/ostree-repo-commit.c

+ @@ -4269,7 +4269,7 @@ import_one_object_direct (OstreeRepo    *dest_repo,

+          G_IN_SET (src_repo->mode, OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_BARE_USER);

+        if (src_is_bare_or_bare_user && !OSTREE_OBJECT_TYPE_IS_META(objtype))

+          {

+ -          if (src_repo == OSTREE_REPO_MODE_BARE)

+ +          if (src_repo->mode == OSTREE_REPO_MODE_BARE)

+              {

+                g_autoptr(GVariant) xattrs = NULL;

+                if (!glnx_fd_get_all_xattrs (src_fd, &xattrs,

+ -- 

+ 2.20.1

+ 

@@ -0,0 +1,33 @@ 

+ From c63ee3cef4fc77f995999035bcc57833653a94b0 Mon Sep 17 00:00:00 2001

+ From: Colin Walters <walters@verbum.org>

+ Date: Wed, 16 Jan 2019 08:36:55 -0500

+ Subject: [PATCH 2/2] =?UTF-8?q?lib/commit:=20Set=20xattr=20on=20correct=20?=

+  =?UTF-8?q?fd=20for=20bare-user=20=E2=86=92=20bare-user=20imports?=

+ MIME-Version: 1.0

+ Content-Type: text/plain; charset=UTF-8

+ Content-Transfer-Encoding: 8bit

+ 

+ Another fix to https://github.com/ostreedev/ostree/pull/1771

+ 

+ Closes: #1803

+ Approved by: jlebon

+ ---

+  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 c95e0b61..dfdd4853 100644

+ --- a/src/libostree/ostree-repo-commit.c

+ +++ b/src/libostree/ostree-repo-commit.c

+ @@ -4287,7 +4287,7 @@ import_one_object_direct (OstreeRepo    *dest_repo,

+                if (bytes == NULL)

+                  return FALSE;

+  

+ -              if (TEMP_FAILURE_RETRY (fsetxattr (src_fd, "user.ostreemeta",

+ +              if (TEMP_FAILURE_RETRY (fsetxattr (tmp_dest.fd, "user.ostreemeta",

+                                                   (char*)g_bytes_get_data (bytes, NULL),

+                                                   g_bytes_get_size (bytes), 0)) != 0)

+                  return glnx_throw_errno_prefix (error, "fsetxattr");

+ -- 

+ 2.20.1

+ 

file modified
+7 -1
@@ -8,13 +8,15 @@ 

  Summary: Tool for managing bootable, immutable filesystem trees

  Name: ostree

  Version: 2019.1

- Release: 2%{?dist}

+ Release: 3%{?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

+ Patch1: 0001-lib-commit-Fix-bare-bare-imports.patch

+ Patch2: 0002-lib-commit-Set-xattr-on-correct-fd-for-bare-user-bar.patch

  

  BuildRequires: git

  # We always run autogen.sh
@@ -166,6 +168,10 @@ 

  %endif

  

  %changelog

+ * Thu Jan 17 2019 Sinny Kumari <ksinny@gmail.com> - 2019.1-3

+ - Backport patch to fix bare → bare imports

+ - Backport patch to Set xattr on correct fd for bare-user → bare-user imports

+ 

  * Fri Jan 11 2019 Colin Walters <walters@verbum.org> - 2019.1-2

  - https://github.com/ostreedev/ostree/releases/tag/v2019.1

  

Fixes regression from https://github.com/ostreedev/ostree/pull/1771

Required to fix FAH ISO installation reported by openqa - https://openqa.fedoraproject.org/tests/345339#step/_do_install_and_reboot/4
Scratch build with patch looks good - http://koji.fedoraproject.org/koji/taskinfo?taskID=32088933
Tested locally ISO built including this ostree patch, iso install finishes successfully.

If we're backporting stuff, might as well backport at least https://github.com/ostreedev/ostree/pull/1803/commits/f36e2f60ab02f16679e8978cdd65707110402c0f too? It's pretty low-risk and a clear regression for the bare-user path.

If we're backporting stuff, might as well backport at least https://github.com/ostreedev/ostree/pull/1803/commits/f36e2f60ab02f16679e8978cdd65707110402c0f too? It's pretty low-risk and a clear regression for the bare-user path.

+1

I missed the remaining two commits mentioned at https://github.com/ostreedev/ostree/pull/1803/commits. Should I include https://github.com/ostreedev/ostree/pull/1803/commits/a5a8569bc033b4abbb796a01655af3fb8b7fa59f as well?

Sure, if you'd like! That one is not strictly a regression, so I'll leave it up to you. :)

rebased onto 1365367422b8bf37e2d0ae155e67ceaaba052b72

5 years ago

Sure, if you'd like! That one is not strictly a regression, so I'll leave it up to you. :)

Not including https://github.com/ostreedev/ostree/pull/1803/commits/a5a8569bc033b4abbb796a01655af3fb8b7fa59f as it is not part of regression.

Updated the PR with required changes

rebased onto 8cbd7fc

5 years ago

I merged this one manually by just fast-forwarding f29 to master.

Pull-Request has been closed by jlebon

5 years ago