]> git.pld-linux.org Git - packages/gdisk.git/commitdiff
rel 2; uuid and segv fixees from gentoo master auto/th/gdisk-1.0.9-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 28 Feb 2024 13:54:57 +0000 (14:54 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 28 Feb 2024 13:54:57 +0000 (14:54 +0100)
gdisk.spec
gptfdisk-1.0.9-libuuid.patch [new file with mode: 0644]
gptfdisk-1.0.9-popt_segv.patch [new file with mode: 0644]

index 8b0b8d779bae723753e1788b8b002f0c9185c5a7..e2cf132eb89cdf5aa831df51c4c87ce220b37e01 100644 (file)
@@ -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 (file)
index 0000000..e7a5f68
--- /dev/null
@@ -0,0 +1,37 @@
+From e67faca2c0ca955f56cbd22e90941cdcbdc12597 Mon Sep 17 00:00:00 2001
+From: Rod Smith <rodsmith@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 (file)
index 0000000..470defd
--- /dev/null
@@ -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;
This page took 0.208055 seconds and 4 git commands to generate.