From 4fb4f6049a6121eb94b005881bf5a3ab44f827c9 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Sun, 8 May 2022 02:25:06 +0200 Subject: [PATCH] backport upstream fix for UUID issue with latest popt --- gdisk-libuuid.patch | 12 ++++++++++++ gdisk.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 gdisk-libuuid.patch diff --git a/gdisk-libuuid.patch b/gdisk-libuuid.patch new file mode 100644 index 0000000..4538f81 --- /dev/null +++ b/gdisk-libuuid.patch @@ -0,0 +1,12 @@ +diff -up gptfdisk-1.0.9/guid.cc.orig gptfdisk-1.0.9/guid.cc +--- gptfdisk-1.0.9/guid.cc.orig 2022-04-15 01:17:12.000000000 +0200 ++++ gptfdisk-1.0.9/guid.cc 2022-05-08 02:12:21.042712891 +0200 +@@ -141,7 +141,7 @@ void GUIDData::Zero(void) { + void GUIDData::Randomize(void) { + int i, uuidGenerated = 0; + +-#ifdef _UUID_UUID_H ++#if defined (_UUID_UUID_H) || defined (_UL_LIBUUID_UUID_H) + uuid_generate(uuidData); + ReverseBytes(&uuidData[0], 4); + ReverseBytes(&uuidData[4], 2); diff --git a/gdisk.spec b/gdisk.spec index a18560c..91a340b 100644 --- a/gdisk.spec +++ b/gdisk.spec @@ -1,10 +1,12 @@ Summary: An fdisk-like partitioning tool for GPT disks Name: gdisk Version: 1.0.9 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 URL: http://www.rodsbooks.com/gdisk/ Source0: http://downloads.sourceforge.net/gptfdisk/gptfdisk-%{version}.tar.gz +# https://sourceforge.net/p/gptfdisk/code/ci/6a8416cbd12d55f882bb751993b94f72d338d96f/ +Patch0: gdisk-libuuid.patch BuildRequires: gcc-c++ BuildRequires: libuuid-devel BuildRequires: make @@ -20,6 +22,7 @@ tables, and the ability to convert MBR disks to GPT format. %prep %setup -q -n gptfdisk-%{version} chmod 0644 gdisk_test.sh +%patch0 -p1 -b .orig %build make CXXFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64" LDFLAGS="%{build_ldflags}" @@ -43,6 +46,9 @@ done %{_mandir}/man8/fixparts.8* %changelog +* Sat May 07 2022 Dominik Mierzejewski - 1.0.9-2 +- backport upstream fix for UUID issue with latest popt + * Sat Apr 16 2022 Terje Rosten - 1.0.9-1 - 1.0.9