Add upstream patch to fix partition filter on s390x

This commit is contained in:
Richard W.M. Jones 2023-08-30 16:59:00 +01:00
parent f72cb5c449
commit bbec0865fb
2 changed files with 42 additions and 2 deletions

View File

@ -0,0 +1,37 @@
From 47aebc247e6553ffb593512b65296b4e2a8eac0a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 30 Aug 2023 15:53:16 +0000
Subject: [PATCH] partition: Byte-swap partition_entries_lba in test
Fixes: commit 7b9301a4c569456a4f96784229a2cd48e8957662
Fixes: https://gitlab.com/nbdkit/nbdkit/-/merge_requests/38#note_1535695896
---
filters/partition/partition-gpt.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/filters/partition/partition-gpt.c b/filters/partition/partition-gpt.c
index ea02e504c..80acddb44 100644
--- a/filters/partition/partition-gpt.c
+++ b/filters/partition/partition-gpt.c
@@ -59,12 +59,12 @@ get_gpt_header (uint8_t *sector,
* the header, rather than looking in the header to see what LBA
* they actually start at. Let's at least check for that now.
*/
- if (header->partition_entries_lba != 2) {
- nbdkit_error ("non-standard GPT layout: "
- "partition entries are not adjacent to header");
- return -1;
- }
- return 0;
+ if (le64toh (header->partition_entries_lba) != 2) {
+ nbdkit_error ("non-standard GPT layout: "
+ "partition entries are not adjacent to header");
+ return -1;
+ }
+ return 0;
}
static void
--
2.41.0

View File

@ -60,7 +60,7 @@ ExclusiveArch: x86_64
Name: nbdkit
Version: 1.35.11
Release: 1%{?dist}
Release: 2%{?dist}
Summary: NBD server
License: BSD-3-Clause
@ -86,6 +86,9 @@ Source3: copy-patches.sh
Source4: nbdkit.attr
Source5: nbdkit-find-provides
# Upstream patch to fix partition filter on s390x
Patch1: 0001-partition-Byte-swap-partition_entries_lba-in-test.patch
BuildRequires: make
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool
@ -1250,7 +1253,7 @@ export LIBGUESTFS_TRACE=1
%changelog
* Wed Aug 30 2023 Richard W.M. Jones <rjones@redhat.com> - 1.35.11-1
* Wed Aug 30 2023 Richard W.M. Jones <rjones@redhat.com> - 1.35.11-2
- New upstream development version 1.35.11
* Sat Aug 12 2023 Richard W.M. Jones <rjones@redhat.com> - 1.35.10-1