From 0ddb34f5c58a28b5cbd48f01d6a7a720cb85427a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 10:05:37 +0000 Subject: import gdisk-0.8.10-3.el7 --- diff --git a/SOURCES/gdisk-0.8.10-exit-code.patch b/SOURCES/gdisk-0.8.10-exit-code.patch new file mode 100644 index 0000000..56ecd31 --- /dev/null +++ b/SOURCES/gdisk-0.8.10-exit-code.patch @@ -0,0 +1,46 @@ +From 09cfc620e6d0135efff53cf01499937b0d496dc8 Mon Sep 17 00:00:00 2001 +From: "Roderick W. Smith" +Date: Sat, 29 Mar 2014 00:45:59 -0400 +Subject: [PATCH] Fixed bug that caused spurious "1" exit condition in gdisk. + +--- + gdisk.cc | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/gdisk.cc b/gdisk.cc +index b3c6240..5768869 100644 +--- a/gdisk.cc ++++ b/gdisk.cc +@@ -15,6 +15,7 @@ int main(int argc, char* argv[]) { + GPTDataTextUI theGPT; + string device = ""; + UnicodeString uString; ++ int isError = 0; + + cout << "GPT fdisk (gdisk) version " << GPTFDISK_VERSION << "\n\n"; + +@@ -47,16 +48,20 @@ int main(int argc, char* argv[]) { + device = (string) argv[1]; + } else { // 3 arguments, but none is "-l" + cerr << "Usage: " << argv[0] << " [-l] device_file\n"; ++ isError = 1; + } // if/elseif/else + if (device != "") { + theGPT.JustLooking(); + if (theGPT.LoadPartitions(device)) + theGPT.DisplayGPTData(); ++ else ++ isError = 1; + } // if + break; + default: + cerr << "Usage: " << argv[0] << " [-l] device_file\n"; ++ isError = 1; + break; + } // switch +- return 1 ; ++ return (isError); + } // main +-- +2.17.2 + diff --git a/SPECS/gdisk.spec b/SPECS/gdisk.spec index 759e04f..796910f 100644 --- a/SPECS/gdisk.spec +++ b/SPECS/gdisk.spec @@ -1,12 +1,15 @@ Summary: An fdisk-like partitioning tool for GPT disks Name: gdisk Version: 0.8.10 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 URL: http://www.rodsbooks.com/gdisk/ Group: System Environment/Base Source0: http://downloads.sourceforge.net/gptfdisk/gptfdisk-%{version}.tar.gz +# fix spurious exit code +Patch0: gdisk-0.8.10-exit-code.patch + BuildRequires: popt-devel BuildRequires: libuuid-devel BuildRequires: ncurses-devel @@ -19,6 +22,7 @@ tables, and the ability to convert MBR disks to GPT format. %prep %setup -q -n gptfdisk-%{version} +%patch0 -p1 chmod 0644 gdisk_test.sh %build @@ -47,6 +51,9 @@ done %{_mandir}/man8/fixparts.8* %changelog +* Wed Dec 05 2018 Nikola Forró - 0.8.10-3 +- Fix spurious exit code (#1656300) + * Mon May 28 2018 Nikola Forró - 0.8.10-2 - Remove libicu build dependency