From 2e269144c9f36a915bd967b33836aeb3da022d51 Mon Sep 17 00:00:00 2001 From: wangmy Date: Tue, 19 Apr 2022 18:31:19 +0800 Subject: gptfdisk: upgrade 1.0.8 -> 1.0.9 0001-gptcurses-correct-ncurses-6.3-errors.patch removed since it's included in 1.0.9. Changelog: =========== - Added support for aligning partitions' end points. This feature affects the default partition size when using n in gdisk; it affects the default partition size in cgdisk; and it's activated by the new -I option in sgdisk. See the programs' respective man pages for details. This feature is intended to help with LUKS2 encryption, which reacts badly to partitions that are not sized as exact multiples of the encryption block size. - Added several new partition type codes: FreeBSD nandfs (0xa506) Apple APFS Pre-Boot (0xaf0b) Apple APFS Recovery (0xaf0c) ChromeOS firmware (0x7f03) ChromeOS mini-OS (0x7f04) ChromeOS hibernate (0x7f05) U-Boot boot loader (0xb000) 27 (!) codes for Fuchsia (0xf100 to 0xf11a) - Added the ability to build sgdisk and cgdisk for Windows. - Added a check for too-small disks (most likely to be an issue when trying to use a too-small disk image); program now aborts if this happens. - Removed stray debugging code that caused partNum is x to be printed when changing a partition's name with sgdisk. - Fixed build problems with recent versions of ncurses. - Fixed bug that caused cgdisk to report incorrect partition attributes. (From OE-Core rev: a0e6ee2b34ae21764f8a5a649916488902016395) Signed-off-by: Wang Mingyu Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- ...0001-gptcurses-correct-ncurses-6.3-errors.patch | 99 ---------------------- meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb | 36 -------- meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb | 35 ++++++++ 3 files changed, 35 insertions(+), 135 deletions(-) delete mode 100644 meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correct-ncurses-6.3-errors.patch delete mode 100644 meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb create mode 100644 meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb (limited to 'meta/recipes-devtools/fdisk') diff --git a/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correct-ncurses-6.3-errors.patch b/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correct-ncurses-6.3-errors.patch deleted file mode 100644 index cbd1365080..0000000000 --- a/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correct-ncurses-6.3-errors.patch +++ /dev/null @@ -1,99 +0,0 @@ -From e301f7dd650c9e56f954a7c49661d938079e1a9b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 25 Oct 2021 17:27:51 +0200 -Subject: [PATCH] gptcurses: correct ncurses 6.3 errors - -Upstream-Status: Submitted [by email to rodsmith@rodsbooks.com] -Signed-off-by: Alexander Kanavin ---- - gptcurses.cc | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -diff --git a/gptcurses.cc b/gptcurses.cc -index d0de024..70be999 100644 ---- a/gptcurses.cc -+++ b/gptcurses.cc -@@ -235,22 +235,22 @@ Space* GPTDataCurses::ShowSpace(int spaceNum, int lineNum) { - ClearLine(lineNum); - if (space->partNum == -1) { // space is empty - move(lineNum, 12); -- printw(BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str()); -+ printw("%s",BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str()); - move(lineNum, 24); -- printw("free space"); -+ printw("%s","free space"); - } else { // space holds a partition - move(lineNum, 3); - printw("%d", space->partNum + 1); - move(lineNum, 12); -- printw(BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str()); -+ printw("%s",BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str()); - move(lineNum, 24); -- printw(space->origPart->GetTypeName().c_str()); -+ printw("%s",space->origPart->GetTypeName().c_str()); - move(lineNum, 50); - #ifdef USE_UTF16 - space->origPart->GetDescription().extract(0, 39, temp, 39); -- printw(temp); -+ printw("%s",temp); - #else -- printw(space->origPart->GetDescription().c_str()); -+ printw("%s",space->origPart->GetDescription().c_str()); - #endif - } // if/else - } // if -@@ -267,10 +267,10 @@ int GPTDataCurses::DisplayParts(int selected) { - - move(lineNum++, 0); - theLine = "Part. # Size Partition Type Partition Name"; -- printw(theLine.c_str()); -+ printw("%s",theLine.c_str()); - move(lineNum++, 0); - theLine = "----------------------------------------------------------------"; -- printw(theLine.c_str()); -+ printw("%s",theLine.c_str()); - numToShow = LINES - RESERVED_TOP - RESERVED_BOTTOM; - pageNum = selected / numToShow; - for (i = pageNum * numToShow; i <= (pageNum + 1) * numToShow - 1; i++) { -@@ -284,7 +284,7 @@ int GPTDataCurses::DisplayParts(int selected) { - } else { - currentSpace = ShowSpace(i, lineNum); - move(lineNum++, 0); -- printw(">"); -+ printw("%s",">"); - } - DisplayOptions(i); - retval = selected; -@@ -632,7 +632,7 @@ void GPTDataCurses::DisplayOptions(char selectedKey) { - } // if/else - } // for - move(LINES - 1, (COLS - optionDesc.length()) / 2); -- printw(optionDesc.c_str()); -+ printw("%s",optionDesc.c_str()); - currentKey = selectedKey; - } // if - } // GPTDataCurses::DisplayOptions() -@@ -744,11 +744,11 @@ void GPTDataCurses::DrawMenu(void) { - - clear(); - move(0, (COLS - title.length()) / 2); -- printw(title.c_str()); -+ printw("%s",title.c_str()); - move(2, (COLS - drive.length()) / 2); -- printw(drive.c_str()); -+ printw("%s",drive.c_str()); - move(3, (COLS - size.str().length()) / 2); -- printw(size.str().c_str()); -+ printw("%s",size.str().c_str()); - DisplayParts(currentSpaceNum); - } // DrawMenu - -@@ -798,7 +798,7 @@ void PromptToContinue(void) { - void Report(string theText) { - clear(); - move(0, 0); -- printw(theText.c_str()); -+ printw("%s", theText.c_str()); - move(LINES - 2, (COLS - 29) / 2); - printw("Press any key to continue...."); - cbreak(); diff --git a/meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb b/meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb deleted file mode 100644 index 67b83b6ead..0000000000 --- a/meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Utility for modifying GPT disk partitioning" -DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks." -HOMEPAGE = "https://sourceforge.net/projects/gptfdisk/" - -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" - -DEPENDS = "util-linux" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \ - file://0001-gptcurses-correctly-include-curses.h.patch \ - file://0001-gptcurses-correct-ncurses-6.3-errors.patch \ - " -SRC_URI[sha256sum] = "95d19856f004dabc4b8c342b2612e8d0a9eebdd52004297188369f152e9dc6df" - -UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/" -UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P(\d+[\.\-_]*)+)/" - -EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}' gdisk fixparts ${PACKAGECONFIG_CONFARGS}" - -PACKAGECONFIG ??= "ncurses popt" -PACKAGECONFIG[ncurses] = "cgdisk,,ncurses" -PACKAGECONFIG[popt] = "sgdisk,,popt" - -do_install() { - install -d ${D}${sbindir} - for f in cgdisk sgdisk; do - if [ -x $f ]; then - install -m 0755 $f ${D}${sbindir} - fi - done - install -m 0755 gdisk ${D}${sbindir} - install -m 0755 fixparts ${D}${sbindir} -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb b/meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb new file mode 100644 index 0000000000..e473b9cd55 --- /dev/null +++ b/meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb @@ -0,0 +1,35 @@ +SUMMARY = "Utility for modifying GPT disk partitioning" +DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks." +HOMEPAGE = "https://sourceforge.net/projects/gptfdisk/" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +DEPENDS = "util-linux" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \ + file://0001-gptcurses-correctly-include-curses.h.patch \ + " +SRC_URI[sha256sum] = "dafead2693faeb8e8b97832b23407f6ed5b3219bc1784f482dd855774e2d50c2" + +UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/" +UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P(\d+[\.\-_]*)+)/" + +EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}' gdisk fixparts ${PACKAGECONFIG_CONFARGS}" + +PACKAGECONFIG ??= "ncurses popt" +PACKAGECONFIG[ncurses] = "cgdisk,,ncurses" +PACKAGECONFIG[popt] = "sgdisk,,popt" + +do_install() { + install -d ${D}${sbindir} + for f in cgdisk sgdisk; do + if [ -x $f ]; then + install -m 0755 $f ${D}${sbindir} + fi + done + install -m 0755 gdisk ${D}${sbindir} + install -m 0755 fixparts ${D}${sbindir} +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf