Backport patch to fix bare → bare imports
Fixes regression from https://github.com/ostreedev/ostree/pull/1771
This commit is contained in:
		
							parent
							
								
									aa172840e9
								
							
						
					
					
						commit
						8cbd7fc123
					
				
							
								
								
									
										38
									
								
								0001-lib-commit-Fix-bare-bare-imports.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								0001-lib-commit-Fix-bare-bare-imports.patch
									
									
									
									
									
										Normal file
									
								
							| @ -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 | ||||
| 
 | ||||
| @ -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 @@ find %{buildroot} -name '*.la' -delete | ||||
| %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 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user