backport upstream fix for UUID issue with latest popt

This commit is contained in:
Dominik 'Rathann' Mierzejewski 2022-05-08 02:25:06 +02:00
parent 39be47acf8
commit 4fb4f6049a
2 changed files with 19 additions and 1 deletions

12
gdisk-libuuid.patch Normal file
View File

@ -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);

View File

@ -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 <dominik@greysector.net> - 1.0.9-2
- backport upstream fix for UUID issue with latest popt
* Sat Apr 16 2022 Terje Rosten <terje.rosten@ntnu.no> - 1.0.9-1
- 1.0.9