[packages/gdisk] rel 2; uuid and segv fixees from gentoo

arekm arekm at pld-linux.org
Wed Feb 28 15:38:10 CET 2024


commit fd9d721d0520b60d97100f3a0377f23c346d03b1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Feb 28 14:54:57 2024 +0100

    rel 2; uuid and segv fixees from gentoo

 gdisk.spec                     |  6 +++++-
 gptfdisk-1.0.9-libuuid.patch   | 37 +++++++++++++++++++++++++++++++++++++
 gptfdisk-1.0.9-popt_segv.patch | 22 ++++++++++++++++++++++
 3 files changed, 64 insertions(+), 1 deletion(-)
---
diff --git a/gdisk.spec b/gdisk.spec
index 8b0b8d7..e2cf132 100644
--- a/gdisk.spec
+++ b/gdisk.spec
@@ -2,11 +2,13 @@ Summary:	An fdisk-like partitioning tool for GPT disks
 Summary(pl.UTF-8):	Podobne do fdiska narzędzie do partycjonowania dysków GPT
 Name:		gdisk
 Version:	1.0.9
-Release:	1
+Release:	2
 License:	GPL v2
 Group:		Base
 Source0:	https://downloads.sourceforge.net/gptfdisk/gptfdisk-%{version}.tar.gz
 # Source0-md5:	01c11ecfa454096543562e3068530e01
+Patch0:		gptfdisk-1.0.9-libuuid.patch
+Patch1:		gptfdisk-1.0.9-popt_segv.patch
 URL:		http://www.rodsbooks.com/gdisk/
 BuildRequires:	libstdc++-devel
 BuildRequires:	libuuid-devel
@@ -30,6 +32,8 @@ formatu GPT.
 
 %prep
 %setup -q -n gptfdisk-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 %{__make} \
diff --git a/gptfdisk-1.0.9-libuuid.patch b/gptfdisk-1.0.9-libuuid.patch
new file mode 100644
index 0000000..e7a5f68
--- /dev/null
+++ b/gptfdisk-1.0.9-libuuid.patch
@@ -0,0 +1,37 @@
+From e67faca2c0ca955f56cbd22e90941cdcbdc12597 Mon Sep 17 00:00:00 2001
+From: Rod Smith <rodsmith at rodsbooks.com>
+Date: Sat, 16 Apr 2022 09:32:04 -0400
+Subject: [PATCH] Updated guid.cc to deal with minor change in libuuid
+
+---
+ NEWS    | 3 +++
+ guid.cc | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/NEWS b/NEWS
+index c7add56..3d90d9a 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,6 @@
++
++- Updated guid.cc to deal with minor change in libuuid.
++
+ 1.0.9 (4/14/2022):
+ ------------------
+ 
+diff --git a/guid.cc b/guid.cc
+index 1e73ab7..d3e4fd5 100644
+--- a/guid.cc
++++ b/guid.cc
+@@ -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);
+-- 
+2.36.1
+
diff --git a/gptfdisk-1.0.9-popt_segv.patch b/gptfdisk-1.0.9-popt_segv.patch
new file mode 100644
index 0000000..470defd
--- /dev/null
+++ b/gptfdisk-1.0.9-popt_segv.patch
@@ -0,0 +1,22 @@
+--- a/gptcl.cc
++++ b/gptcl.cc
+@@ -156,9 +156,10 @@
+ 
+    // Assume first non-option argument is the device filename....
+    device = (char*) poptGetArg(poptCon);
+-   poptResetContext(poptCon);
+ 
+    if (device != NULL) {
++      device = strdup(device);
++      poptResetContext(poptCon);
+       JustLooking(); // reset as necessary
+       BeQuiet(); // Tell called functions to be less verbose & interactive
+       if (LoadPartitions((string) device)) {
+@@ -498,6 +499,7 @@
+          cerr << "Error encountered; not saving changes.\n";
+          retval = 4;
+       } // if
++      free(device);
+    } // if (device != NULL)
+    poptFreeContext(poptCon);
+    return retval;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gdisk.git/commitdiff/fd9d721d0520b60d97100f3a0377f23c346d03b1



More information about the pld-cvs-commit mailing list