summaryrefslogtreecommitdiff
path: root/sys-apps/gptfdisk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-17 10:35:54 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-17 10:35:54 +0000
commit463397cf1e064185110fe57c568d73f99a06f5d1 (patch)
tree9aa75eefc5154eaf0e3c33658b830fc54dc68052 /sys-apps/gptfdisk
parentc8d60dada2ec8eb48b2d2b290cd6683ccec40e39 (diff)
gentoo resync : 17.02.2021
Diffstat (limited to 'sys-apps/gptfdisk')
-rw-r--r--sys-apps/gptfdisk/Manifest2
-rw-r--r--sys-apps/gptfdisk/files/gptfdisk-1.0.6.1-spurious_mbr_warnings.patch71
-rw-r--r--sys-apps/gptfdisk/gptfdisk-1.0.6-r1.ebuild60
3 files changed, 133 insertions, 0 deletions
diff --git a/sys-apps/gptfdisk/Manifest b/sys-apps/gptfdisk/Manifest
index 4655b08372b7..52b0380342e9 100644
--- a/sys-apps/gptfdisk/Manifest
+++ b/sys-apps/gptfdisk/Manifest
@@ -1,7 +1,9 @@
+AUX gptfdisk-1.0.6.1-spurious_mbr_warnings.patch 2708 BLAKE2B 538ee3c542fc7d0cfbb8f5857afa19be417ac9f93cf3feb0c5800a813690e453266d560a934c7066ad2aae0a83b08554cfe59eeecfb60a6f64a5c8fed800311c SHA512 11d7d990d8068f1310ceefc3d59069d9e563125b02011b6b6d6833c2bbcb101c45163c9371d698ab8d489bac0621f5454030f27c70773d7f30daad7aabace682
DIST gptfdisk-1.0.4.tar.gz 204075 BLAKE2B 45be16bd4e8312e4797a70c07447702a7f966edec94a9e9e17cff89eee51bf33cb9418dcac2a103e68ea2ebb8df4e7a997fd006bfa4109cfd774838bd4bd7d19 SHA512 2df6db6974c06a6677a155d32566b8b46dad0df7781131e9018072db9acce5e41f6c4e7024b0e5f236dd43350a63572be34fb4b6fdb580cd9b946619a7a683bf
DIST gptfdisk-1.0.5.tar.gz 205973 BLAKE2B e026dd4b4f2b63ca660feef34a1fdfb14034d0d64e4828fddf4a0c63756cbc840b3292231838f0c016256be2358069bde8a17ef0e33dec355c48406a9a930e75 SHA512 3d3a59e3488dd3d6bda5d103b9ad8b7936752210346b9787ddc936681498fba90577b6ae950c471d09a01bf6405fce32038ff1777c52db0b21e5277737fe3703
DIST gptfdisk-1.0.6.tar.gz 207017 BLAKE2B d00e0f00dc8dce3b6088250aa39e05f41c96bee2218eec1dca34a160e70129d1006abc4341031994c53e77068b5de510b923c69858903627ccf786f3cc848a86 SHA512 a3bf95c813f707d9d41513295c3419916301a0e88b4c6ade70ad7d9422a507d519e092e68a3868d53092428d159bdbb248817c4f40d8ac88b0175d5afbd79dbc
EBUILD gptfdisk-1.0.4.ebuild 1244 BLAKE2B 5e1ed279d0996ac37fb669a8025334a7d2168cb2956604eed0212fa6031ff97654b402d4c88434b90b9718b8993ac289c4889216a8b2dddf8097a372f6684b9d SHA512 74bbf5c72a625e7b8bc2cb6c219712bbde4e58679d3c1c0e56c2dde58a556ec25e7fe9c59c87042f419094db81b33fa85647a75246fcd398a91d3ae758ff2cba
EBUILD gptfdisk-1.0.5.ebuild 1251 BLAKE2B 47a900ddfdf051e80f28f9c0ed3cb4649e7d1c8009aa978aba5f31c38565388249b5aa192173a8409fbd868a5a568f9a8b78c577b4f726e1f353516eac232dd8 SHA512 54a7a0f1ed2ca43c78261925be662a8ed46502a6e8f457aaed42da151e2b2804a92b0ef73db1a167e83cc9f8edd199b22e9bbae93c8167ab0bc7f2b52acb59f3
+EBUILD gptfdisk-1.0.6-r1.ebuild 1309 BLAKE2B 3e3bcabf9aa3e2542a8600aaf54202de4eec37dac7ed37cb278484912e4a2e6e98ed8b93b334388e5ca95b2a1e173f8963871c7300f454c05efb3b9594a35684 SHA512 21cd7814b85231bd3e981c8c0d2ebeef04b2397002a60ed153c454ce61b5e2529d19ed7cadbf1c25ea3906edb01a460ea99256207bc17ba6c78ecc774038a177
EBUILD gptfdisk-1.0.6.ebuild 1252 BLAKE2B 31480c49e299e1dc5b3f533998d6a473c930cf18652a62ced07c6a0b27cf82d571972b47ca42f1402d4c30ae9b8b044ef3385d59a828920dc0c24c9255612375 SHA512 8392f645d7fa03a51a243bcb8c42dbee4dc7832ac32fb84d3c61016f96825dffffb2d440f1765d70da89ab498de38e874d9eaf890b922ae93b9090653b90d79c
MISC metadata.xml 339 BLAKE2B 3f08c8aa6a482a6d923388fcbf800cac3282c5c864b9fe27868491d10e7edb75ed04f8d7bc86f5295c90e338d99d59b275ae79813b4d549a04331992526c6979 SHA512 d8334a3e741adf97739f9fef66d7b38bfab9e2d189ac5fbc96ab27a7c1551938b6184ebb08b03ef8b6864f6e43d536836f373e03f3491cacc8f6ee3496f615b5
diff --git a/sys-apps/gptfdisk/files/gptfdisk-1.0.6.1-spurious_mbr_warnings.patch b/sys-apps/gptfdisk/files/gptfdisk-1.0.6.1-spurious_mbr_warnings.patch
new file mode 100644
index 000000000000..e60aa9feeffb
--- /dev/null
+++ b/sys-apps/gptfdisk/files/gptfdisk-1.0.6.1-spurious_mbr_warnings.patch
@@ -0,0 +1,71 @@
+From f063fe08e424c99f133df18bf9dce49c851bcb0a Mon Sep 17 00:00:00 2001
+From: Rod Smith <rodsmith@rodsbooks.com>
+Date: Mon, 1 Feb 2021 10:19:50 -0500
+Subject: [PATCH] Fix spurious warnings of problems on MBR disks
+
+---
+ NEWS | 7 +++++++
+ gpt.cc | 18 +++++++++++++-----
+ support.h | 2 +-
+ 3 files changed, 21 insertions(+), 6 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index f74bad0..a7131aa 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,10 @@
++1.0.7 (?/??/2021):
++------------------
++
++- Fixed bug that caused spurious warnings about the partition table
++ header claiming an invalid size of partition entries when reading
++ some MBR disks.
++
+ 1.0.6 (1/13/2021):
+ ------------------
+
+diff --git a/gpt.cc b/gpt.cc
+index 1b4e10f..842dfb1 100644
+--- a/gpt.cc
++++ b/gpt.cc
+@@ -1042,11 +1042,19 @@ int GPTData::LoadHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector
+ *crcOk = CheckHeaderCRC(&tempHeader);
+
+ if (tempHeader.sizeOfPartitionEntries != sizeof(GPTPart)) {
+- cerr << "Warning: Partition table header claims that the size of partition table\n";
+- cerr << "entries is " << tempHeader.sizeOfPartitionEntries << " bytes, but this program ";
+- cerr << " supports only " << sizeof(GPTPart) << "-byte entries.\n";
+- cerr << "Adjusting accordingly, but partition table may be garbage.\n";
+- tempHeader.sizeOfPartitionEntries = sizeof(GPTPart);
++ // Print the below warning only if the CRC is OK -- but correct the
++ // problem either way. The warning is printed only on a valid CRC
++ // because otherwise this warning will display inappropriately when
++ // reading MBR disks. If the CRC is invalid, then a warning about
++ // that will be shown later, so the user will still know that
++ // something is wrong.
++ if (*crcOk) {
++ cerr << "Warning: Partition table header claims that the size of partition table\n";
++ cerr << "entries is " << tempHeader.sizeOfPartitionEntries << " bytes, but this program ";
++ cerr << " supports only " << sizeof(GPTPart) << "-byte entries.\n";
++ cerr << "Adjusting accordingly, but partition table may be garbage.\n";
++ }
++ tempHeader.sizeOfPartitionEntries = sizeof(GPTPart);
+ }
+
+ if (allOK && (numParts != tempHeader.numParts) && *crcOk) {
+diff --git a/support.h b/support.h
+index d87fe9a..e3e1e12 100644
+--- a/support.h
++++ b/support.h
+@@ -8,7 +8,7 @@
+ #include <stdlib.h>
+ #include <string>
+
+-#define GPTFDISK_VERSION "1.0.6"
++#define GPTFDISK_VERSION "1.0.6.1"
+
+ #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
+ // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64
+--
+2.30.1
+
diff --git a/sys-apps/gptfdisk/gptfdisk-1.0.6-r1.ebuild b/sys-apps/gptfdisk/gptfdisk-1.0.6-r1.ebuild
new file mode 100644
index 000000000000..120bdc16b00f
--- /dev/null
+++ b/sys-apps/gptfdisk/gptfdisk-1.0.6-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="GPT partition table manipulator for Linux"
+HOMEPAGE="https://www.rodsbooks.com/gdisk/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="kernel_linux ncurses static"
+
+# libuuid from util-linux is required.
+RDEPEND="!static? (
+ dev-libs/popt
+ ncurses? ( >=sys-libs/ncurses-5.7-r7:0=[unicode] )
+ kernel_linux? ( sys-apps/util-linux )
+ )"
+DEPEND="
+ ${RDEPEND}
+ static? (
+ dev-libs/popt[static-libs(+)]
+ ncurses? ( >=sys-libs/ncurses-5.7-r7:0=[unicode,static-libs(+)] )
+ kernel_linux? ( sys-apps/util-linux[static-libs(+)] )
+ )
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}.1-spurious_mbr_warnings.patch"
+)
+
+src_prepare() {
+ default
+
+ tc-export CXX PKG_CONFIG
+
+ if ! use ncurses ; then
+ sed -i \
+ -e '/^all:/s: cgdisk::' \
+ Makefile || die
+ fi
+
+ sed \
+ -e '/g++/s:=:?=:g' \
+ -e 's:-lncursesw:$(shell $(PKG_CONFIG) --libs ncursesw):g' \
+ -i Makefile || die
+
+ use static && append-ldflags -static
+}
+
+src_install() {
+ dosbin gdisk sgdisk $(usex ncurses cgdisk '') fixparts
+ doman *.8
+ dodoc NEWS README
+}