From 24019c7bb1ecd507fb08ae09fec4bc5f199a812c Mon Sep 17 00:00:00 2001 From: changtao Date: Sun, 22 Sep 2024 02:39:37 +0800 Subject: [PATCH 1/2] Updated guid.cc to deal with minor change in libuuid --- ...to-deal-with-minor-change-in-libuuid.patch | 39 +++++++++++++++++++ gdisk.spec | 6 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0003-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch diff --git a/0003-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch b/0003-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch new file mode 100644 index 0000000..d9ffef4 --- /dev/null +++ b/0003-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch @@ -0,0 +1,39 @@ +From 6a8416cbd12d55f882bb751993b94f72d338d96f Mon Sep 17 00:00:00 2001 +From: Rod Smith +Date: Sun, 22 Sep 2024 02:33:45 +0800 +Subject: [PATCH] Updated guid.cc to deal with minor change in libuuid. + +--- + NEWS | 2 ++ + guid.cc | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/NEWS b/NEWS +index c7add56..5de933d 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,6 +1,8 @@ + 1.0.9 (4/14/2022): + ------------------ + ++- Updated guid.cc to deal with minor change in libuuid. ++ + - Removed stray debugging code that caused "partNum is {x}" to be printed + when changing a partition's name with sgdisk (-c/--change-name). + +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.43.0 + diff --git a/gdisk.spec b/gdisk.spec index 81e738e..93dc603 100644 --- a/gdisk.spec +++ b/gdisk.spec @@ -1,6 +1,6 @@ Name: gdisk Version: 1.0.9 -Release: 2 +Release: 3 Summary: GPT fdisk(consisting of the gdisk,sgdisk,cgdisk) is a set of text-mode partitioning tools License: GPLv2 URL: http://www.rodsbooks.com/gdisk @@ -10,6 +10,7 @@ BuildRequires:ncurses-devel util-linux-devel gcc-c++ popt-devel Patch0001: 0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch Patch0002: 0002-Fix-NULL-dereference-when-duplicating-string-argumen.patch +Patch0003: 0003-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch %description GPT fdisk(consisting of the gdisk,sgdisk,cgdisk) is a set of text-mode partitioning tools. @@ -51,6 +52,9 @@ install -Dp -m 0644 fixparts.8 %{buildroot}%{_mandir}/man8/fixparts.8 %{_mandir}/man8/* %changelog +* Sun Sep 29 2024 lvyy - 1.0.9-3 +- DESC: Updated guid.cc to deal with minor change in libuuid + * Tue Sep 24 2024 lvyy - 1.0.9-2 - DESC: fix problem that caused sgdisk to crash when using the latest popt -- Gitee From cc6e23f7257fa0a59de8564f24c3c5a6afb78961 Mon Sep 17 00:00:00 2001 From: changtao Date: Tue, 8 Oct 2024 05:52:16 +0000 Subject: [PATCH 2/2] update gdisk.spec. Signed-off-by: changtao --- gdisk.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdisk.spec b/gdisk.spec index 93dc603..0b3efec 100644 --- a/gdisk.spec +++ b/gdisk.spec @@ -52,7 +52,7 @@ install -Dp -m 0644 fixparts.8 %{buildroot}%{_mandir}/man8/fixparts.8 %{_mandir}/man8/* %changelog -* Sun Sep 29 2024 lvyy - 1.0.9-3 +* Sun Sep 29 2024 changtao - 1.0.9-3 - DESC: Updated guid.cc to deal with minor change in libuuid * Tue Sep 24 2024 lvyy - 1.0.9-2 -- Gitee