diff --git a/download b/download index a09b5705ef9cdd91c3d49e3e34336ef535e0a63a..c8844e0bc44ba72c0c78fc09b88839c57c769a9f 100644 --- a/download +++ b/download @@ -1 +1 @@ -07b625a583b66c8c5840be5923f3e3fe gptfdisk-1.0.3.tar.gz +9ce09147b75866ac1877d417092d21e4 gptfdisk-1.0.7.tar.gz diff --git a/gdisk-1.0.3-byteswap.patch b/gdisk-1.0.7-byteswap.patch similarity index 88% rename from gdisk-1.0.3-byteswap.patch rename to gdisk-1.0.7-byteswap.patch index 865091a47da34fed8393ec18f6fd368895d050b0..454c8814dafc892ce0be78f20eac5d70a9550504 100644 --- a/gdisk-1.0.3-byteswap.patch +++ b/gdisk-1.0.7-byteswap.patch @@ -1,24 +1,24 @@ -From a7eaefd9bc4a91a4ca26146f784d40725cfe15fa Mon Sep 17 00:00:00 2001 +From 49ed9305afae9865d9b748ef419b4f923ae4e86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= -Date: Wed, 29 Sep 2021 15:33:33 +0200 +Date: Wed, 29 Sep 2021 15:46:37 +0200 Subject: [PATCH] Fix incorrect byte order of partition names on big-endian systems --- gdisk.8 | 8 ++++++++ gptcl.cc | 11 +++++++++++ - gptpart.cc | 14 +++++++------- + gptpart.cc | 13 +++++++------ gptpart.h | 1 + gpttext.cc | 20 ++++++++++++++++++++ gpttext.h | 1 + sgdisk.8 | 8 ++++++++ - 7 files changed, 56 insertions(+), 7 deletions(-) + 7 files changed, 56 insertions(+), 6 deletions(-) diff --git a/gdisk.8 b/gdisk.8 -index c2cf83d..071756c 100644 +index 62f6bd2..0029b75 100644 --- a/gdisk.8 +++ b/gdisk.8 -@@ -416,6 +416,14 @@ set features for each partition. \fBgdisk\fR supports four attributes: +@@ -419,6 +419,14 @@ set features for each partition. \fBgdisk\fR supports four attributes: aren't translated into anything useful. In practice, most OSes seem to ignore these attributes. @@ -34,7 +34,7 @@ index c2cf83d..071756c 100644 .B c Change partition GUID. You can enter a custom unique GUID for a partition diff --git a/gptcl.cc b/gptcl.cc -index 6c36738..58afc8a 100644 +index 2304091..65a99e9 100644 --- a/gptcl.cc +++ b/gptcl.cc @@ -64,6 +64,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { @@ -70,18 +70,10 @@ index 6c36738..58afc8a 100644 SaveGPTBackup(backupFile); free(backupFile); diff --git a/gptpart.cc b/gptpart.cc -index 17d6f15..82aeab0 100644 +index b268cf0..b83254d 100644 --- a/gptpart.cc +++ b/gptpart.cc -@@ -83,7 +83,6 @@ string GPTPart::GetDescription(void) { - size_t pos = 0 ; - while ( ( pos < NAME_SIZE ) && ( name[ pos ] != 0 ) ) { - uint16_t cp = name[ pos ++ ] ; -- if ( ! IsLittleEndian() ) ReverseBytes( & cp , 2 ) ; - // first to utf32 - uint32_t uni ; - if ( cp < 0xd800 || cp > 0xdfff ) { -@@ -234,7 +233,6 @@ void GPTPart::SetName(const string & theName) { +@@ -242,7 +242,6 @@ void GPTPart::SetName(const string & theName) { // then to utf16le if ( uni < 0x10000 ) { name[ pos ] = (uint16_t) uni ; @@ -89,7 +81,7 @@ index 17d6f15..82aeab0 100644 pos ++ ; } // if else { -@@ -244,10 +242,8 @@ void GPTPart::SetName(const string & theName) { +@@ -252,10 +251,8 @@ void GPTPart::SetName(const string & theName) { } // if uni -= 0x10000 ; name[ pos ] = (uint16_t)( uni >> 10 ) | 0xd800 ; @@ -100,7 +92,7 @@ index 17d6f15..82aeab0 100644 pos ++ ; } } // for -@@ -407,14 +403,18 @@ int GPTPart::DoTheyOverlap(const GPTPart & other) { +@@ -415,14 +412,18 @@ int GPTPart::DoTheyOverlap(const GPTPart & other) { // Reverse the bytes of integral data types and of the UTF-16LE name; // used on big-endian systems. void GPTPart::ReversePartBytes(void) { @@ -123,10 +115,10 @@ index 17d6f15..82aeab0 100644 /**************************************** * Functions requiring user interaction * diff --git a/gptpart.h b/gptpart.h -index 657b3f9..ac8a725 100644 +index fac514e..51bfb38 100644 --- a/gptpart.h +++ b/gptpart.h -@@ -93,6 +93,7 @@ class GPTPart { +@@ -94,6 +94,7 @@ class GPTPart { void BlankPartition(void); // empty partition of data int DoTheyOverlap(const GPTPart & other); // returns 1 if there's overlap void ReversePartBytes(void); // reverse byte order of all integer fields @@ -135,7 +127,7 @@ index 657b3f9..ac8a725 100644 // Functions requiring user interaction void ChangeType(void); // Change the type code diff --git a/gpttext.cc b/gpttext.cc -index 732d861..6de7121 100644 +index ea34444..a5f0fd8 100644 --- a/gpttext.cc +++ b/gpttext.cc @@ -341,6 +341,22 @@ int GPTDataTextUI::SetName(uint32_t partNum) { @@ -180,7 +172,7 @@ index 732d861..6de7121 100644 cout << "d\tdisplay the sector alignment value\n"; cout << "e\trelocate backup data structures to the end of the disk\n"; diff --git a/gpttext.h b/gpttext.h -index 98e59af..db27246 100644 +index afe4651..6bd22cf 100644 --- a/gpttext.h +++ b/gpttext.h @@ -49,6 +49,7 @@ class GPTDataTextUI : public GPTData { @@ -192,7 +184,7 @@ index 98e59af..db27246 100644 int DestroyGPTwPrompt(void); // Returns 1 if user proceeds void ShowDetails(void); diff --git a/sgdisk.8 b/sgdisk.8 -index 2cb18b9..3bc51f2 100644 +index 59a3d3c..3fb7ae6 100644 --- a/sgdisk.8 +++ b/sgdisk.8 @@ -182,6 +182,14 @@ backup will reflect your changes. If the GPT data structures are damaged, @@ -211,5 +203,5 @@ index 2cb18b9..3bc51f2 100644 .B \-c, \-\-change\-name=partnum:name Change the GPT name of a partition. This name is encoded as a UTF\-16 -- -2.35.1 +2.32.0 diff --git a/gdisk.spec b/gdisk.spec index 1d88f7402105f70f730d2835f99aedef62e672be..db77b047caf0203e7b91fb68e23e16e65a3985e1 100644 --- a/gdisk.spec +++ b/gdisk.spec @@ -1,19 +1,16 @@ -%define anolis_release .0.1 - Summary: An fdisk-like partitioning tool for GPT disks Name: gdisk -Version: 1.0.3 -Release: 9%{anolis_release}%{?dist} +Version: 1.0.7 +Release: 5%{?dist} License: GPLv2 URL: http://www.rodsbooks.com/gdisk/ -Group: System Environment/Base Source0: http://downloads.sourceforge.net/gptfdisk/gptfdisk-%{version}.tar.gz -Patch0: gdisk-1.0.3-byteswap.patch -BuildRequires: popt-devel +Patch0: gdisk-1.0.7-byteswap.patch +BuildRequires: gcc-c++ BuildRequires: libuuid-devel +BuildRequires: make BuildRequires: ncurses-devel -Provides: /usr/sbin/gdisk -Requires: glibc +BuildRequires: popt-devel %description An fdisk-like partitioning tool for GPT disks. GPT fdisk features a @@ -21,14 +18,6 @@ command-line interface, fairly direct manipulation of partition table structures, recovery tools to help you deal with corrupt partition tables, and the ability to convert MBR disks to GPT format. -%package doc -Summary: Documents for %{name} -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description doc -Doc pages for %{name}. - %prep %setup -q -n gptfdisk-%{version} %patch0 -p1 @@ -45,7 +34,7 @@ done %files %license COPYING -%doc gdisk_test.sh +%doc NEWS README gdisk_test.sh %{_sbindir}/gdisk %{_sbindir}/cgdisk %{_sbindir}/sgdisk @@ -55,24 +44,54 @@ done %{_mandir}/man8/sgdisk.8* %{_mandir}/man8/fixparts.8* -%files doc -%doc NEWS README - %changelog -* Sun Jul 17 2022 DengXiewei - 1.0.3-9.0.1 -- Add doc sub package - -* Tue Mar 15 2022 Nikola Forró - 1.0.3-9 -- Fix double byteswap on big-endian systems also while reading partition names - related: #1899990 - -* Mon Oct 25 2021 Nikola Forró - 1.0.3-8 +* Mon Oct 25 2021 Nikola Forró - 1.0.7-5 - Add upstream tests as a gating test - related: #1899990 + related: #2006964 -* Wed Sep 29 2021 Nikola Forró - 1.0.3-7 +* Wed Sep 29 2021 Nikola Forró - 1.0.7-4 - Fix incorrect byte order of partition names on big-endian systems - resolves: #1899990 + resolves: #2006964 + +* Mon Aug 09 2021 Mohan Boddu - 1.0.7-3 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Thu Apr 15 2021 Mohan Boddu - 1.0.7-2 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Thu Mar 11 2021 Terje Rosten - 1.0.7-1 +- 1.0.7 + +* Tue Jan 26 2021 Fedora Release Engineering - 1.0.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jan 19 2021 Terje Rosten - 1.0.6-1 +- 1.0.6 + +* Mon Jul 27 2020 Fedora Release Engineering - 1.0.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun Mar 22 2020 Terje Rosten - 1.0.5-1 +- 1.0.5 + +* Tue Jan 28 2020 Fedora Release Engineering - 1.0.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 1.0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 1.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Terje Rosten - 1.0.4-3 +- Add c++ compiler + +* Fri Jul 13 2018 Fedora Release Engineering - 1.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sun Jul 08 2018 Terje Rosten - 1.0.4-1 +- 1.0.4 * Fri Feb 23 2018 Florian Weimer - 1.0.3-6 - Use LDFLAGS from redhat-rpm-config