diff --git a/.gdisk.metadata b/.gdisk.metadata new file mode 100644 index 0000000..8a72647 --- /dev/null +++ b/.gdisk.metadata @@ -0,0 +1 @@ +87dc5704b19173c7536c7fa991912a81e69c5020 SOURCES/gptfdisk-0.8.6.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/gdisk-0.8.7-add-range-check.patch b/SOURCES/gdisk-0.8.7-add-range-check.patch new file mode 100644 index 0000000..bd9f09c --- /dev/null +++ b/SOURCES/gdisk-0.8.7-add-range-check.patch @@ -0,0 +1,13 @@ +--- gptfdisk-0.8.7.old/gpt.cc 2013-07-09 03:01:09.000000000 +0100 ++++ gptfdisk-0.8.7/gpt.cc 2013-09-13 14:12:19.154495469 +0100 +@@ -1402,6 +1402,10 @@ + + // Show detailed information on the specified partition + void GPTData::ShowPartDetails(uint32_t partNum) { ++ if (partNum >= numParts) { ++ cerr << "Partition number out of range\n"; ++ exit (1); ++ } + if (!IsFreePartNum(partNum)) { + partitions[partNum].ShowDetails(blockSize); + } else { diff --git a/SOURCES/gptfdisk-0.8.1-gcc47.patch b/SOURCES/gptfdisk-0.8.1-gcc47.patch new file mode 100644 index 0000000..392ef4a --- /dev/null +++ b/SOURCES/gptfdisk-0.8.1-gcc47.patch @@ -0,0 +1,11 @@ +--- gptfdisk-0.8.1/diskio-unix.cc~ 2011-10-01 23:52:33.000000000 +0200 ++++ gptfdisk-0.8.1/diskio-unix.cc 2012-01-05 10:14:49.440260712 +0100 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include + diff --git a/SPECS/gdisk.spec b/SPECS/gdisk.spec new file mode 100644 index 0000000..41eebc5 --- /dev/null +++ b/SPECS/gdisk.spec @@ -0,0 +1,135 @@ +Summary: An fdisk-like partitioning tool for GPT disks +Name: gdisk +Version: 0.8.6 +Release: 2%{?dist} +License: GPLv2 +URL: http://www.rodsbooks.com/gdisk/ +Group: System Environment/Base +Source0: http://downloads.sourceforge.net/gptfdisk/gptfdisk-%{version}.tar.gz +Patch0: gptfdisk-0.8.1-gcc47.patch +# Segmentation fault when argument 'partnum' of part-get-gpt-type is too large +# https://bugzilla.redhat.com/show_bug.cgi?id=1007761 +# Fedora RHBZ#1007847 - patch sent upstream on 2013-09-13. +Patch1: gdisk-0.8.7-add-range-check.patch +BuildRequires: popt-devel +BuildRequires: libicu-devel +BuildRequires: libuuid-devel +BuildRequires: ncurses-devel +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +%description +An fdisk-like partitioning tool for GPT disks. GPT fdisk features a +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. + +%prep +%setup -q -n gptfdisk-%{version} +%patch0 -p1 +%patch1 -p1 +chmod 0644 gdisk_test.sh + +%build +%{__make} CXXFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64" + +%install +%{__rm} -rf %{buildroot} +for f in gdisk sgdisk cgdisk fixparts ; do + %{__install} -D -p -m 0755 $f %{buildroot}%{_sbindir}/$f + %{__install} -D -p -m 0644 $f.8 %{buildroot}%{_mandir}/man8/$f.8 +done + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-, root, root, -) +%doc COPYING README gdisk_test.sh +%{_sbindir}/gdisk +%{_sbindir}/cgdisk +%{_sbindir}/sgdisk +%{_sbindir}/fixparts +%{_mandir}/man8/gdisk.8* +%{_mandir}/man8/cgdisk.8* +%{_mandir}/man8/sgdisk.8* +%{_mandir}/man8/fixparts.8* + +%changelog +* Thu Sep 26 2013 Tomas Bzatek - 0.8.6-2 +- Range check -i option (#1007761) + +* Fri Jan 25 2013 Orion Poplawski - 0.8.6-1 +- Update to 0.8.6 + +* Sat Nov 17 2012 Terje Rosten - 0.8.5-1 +- 0.8.5 + +* Thu Jul 19 2012 Fedora Release Engineering - 0.8.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Apr 23 2012 Terje Rosten - 0.8.4-1 +- 0.8.4 + +* Sat Apr 21 2012 Orcan Ogetbil - 0.8.2-3 +- Rebuild for libicu 49.1.1 + +* Tue Feb 28 2012 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for c++ ABI breakage + +* Sun Jan 29 2012 Terje Rosten - 0.8.2-1 +- 0.8.2 + +* Thu Jan 05 2012 Terje Rosten - 0.8.1-3 +- Add patch to build with gcc 4.7 + +* Mon Oct 17 2011 Terje Rosten - 0.8.1-2 +- Add cgdisk and fixparts + +* Mon Oct 17 2011 Terje Rosten - 0.8.1-1 +- 0.8.1 +- Add ncurses-devel to buildreq + +* Thu Sep 08 2011 Orion Poplawski - 0.7.2-2 +- Rebuild for libicu 4.8.1 + +* Sun Jul 10 2011 Terje Rosten - 0.7.2-1 +- 0.7.2 + +* Mon Apr 12 2011 Terje Rosten - 0.7.1-1 +- 0.7.1 + +* Tue Feb 08 2011 Fedora Release Engineering - 0.6.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat Jan 29 2011 Terje Rosten - 0.6.14-1 +- 0.6.14 + +* Thu Nov 11 2010 Terje Rosten - 0.6.13-1 +- 0.6.13 + +* Fri Jun 18 2010 Terje Rosten - 0.6.8-1 +- 0.6.8 + +* Thu Mar 25 2010 Terje Rosten - 0.6.6-1 +- 0.6.6 +- Compile with -D_FILE_OFFSET_BITS=64, recommended upstream + +* Sat Mar 20 2010 Terje Rosten - 0.6.5-1 +- 0.6.5 +- Add alignment patch (bz #575297) + +* Thu Mar 11 2010 Terje Rosten - 0.6.3-2 +- Fix source url + +* Sun Feb 14 2010 Terje Rosten - 0.6.3-1 +- 0.6.3 + +* Sun Jan 31 2010 Terje Rosten - 0.6.2-1 +- 0.6.2 + +* Mon Jan 25 2010 Terje Rosten - 0.6.1-1 +- 0.6.1 +- add popt-devel to buildreq +- random clean up + +* Fri Jan 15 2010 R Smith - 0.6.0 +- created spec file for 0.6.0 release