From d41178f9fea7e4121f582eaec68a6aa308e71b6e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 13 Mar 2024 18:33:21 +0100 Subject: gptfdisk: update 1.0.9 -> 1.0.10 Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...-crash-of-sgdisk-when-compiled-with-lates.patch | 46 ---------------------- ...d.cc-to-deal-with-minor-change-in-libuuid.patch | 27 ------------- .../0001-Use-64bit-time_t-on-linux-as-well.patch | 32 --------------- ...0001-gptcurses-correctly-include-curses.h.patch | 5 +-- .../fdisk/gptfdisk/popt-1.19-follow-up.patch | 41 ------------------- meta/recipes-devtools/fdisk/gptfdisk_1.0.10.bb | 35 ++++++++++++++++ meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb | 39 ------------------ 7 files changed, 37 insertions(+), 188 deletions(-) delete mode 100644 meta/recipes-devtools/fdisk/gptfdisk/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch delete mode 100644 meta/recipes-devtools/fdisk/gptfdisk/0001-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch delete mode 100644 meta/recipes-devtools/fdisk/gptfdisk/0001-Use-64bit-time_t-on-linux-as-well.patch delete mode 100644 meta/recipes-devtools/fdisk/gptfdisk/popt-1.19-follow-up.patch create mode 100644 meta/recipes-devtools/fdisk/gptfdisk_1.0.10.bb delete mode 100644 meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb diff --git a/meta/recipes-devtools/fdisk/gptfdisk/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch b/meta/recipes-devtools/fdisk/gptfdisk/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch deleted file mode 100644 index 095d00b1e2..0000000000 --- a/meta/recipes-devtools/fdisk/gptfdisk/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch +++ /dev/null @@ -1,46 +0,0 @@ -From e7f9c9909c27d6ceed5aa4ca17023a1bc94b620a Mon Sep 17 00:00:00 2001 -From: Rod Smith -Date: Fri, 15 Apr 2022 18:10:14 -0400 -Subject: [PATCH] Fix failure & crash of sgdisk when compiled with latest popt - (commit 740; presumably eventually release 1.19) - -Upstream-Status: Backport [https://sourceforge.net/p/gptfdisk/code/ci/5d5e76d369a412bfb3d2cebb5fc0a7509cef878d/] -Signed-off-by: Alexander Kanavin -Signed-off-by: Mingli Yu ---- - NEWS | 8 ++++++++ - gptcl.cc | 2 +- - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/NEWS b/NEWS -index c7add56..9e153fd 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,11 @@ -+1.0.10 (?/??/2022): -+------------------- -+ -+- Fixed problem that caused sgdisk to crash with errors about being unable -+ to read the disk's partition table when compiled with the latest popt -+ (commit 740, which is pre-release as I type; presumably version 1.19 and -+ later once released). -+ - 1.0.9 (4/14/2022): - ------------------ - -diff --git a/gptcl.cc b/gptcl.cc -index 34c9421..0d578eb 100644 ---- a/gptcl.cc -+++ b/gptcl.cc -@@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { - } // while - - // Assume first non-option argument is the device filename.... -- device = (char*) poptGetArg(poptCon); -+ device = strdup((char*) poptGetArg(poptCon)); - poptResetContext(poptCon); - - if (device != NULL) { --- -2.35.5 - diff --git a/meta/recipes-devtools/fdisk/gptfdisk/0001-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch b/meta/recipes-devtools/fdisk/gptfdisk/0001-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch deleted file mode 100644 index f358081092..0000000000 --- a/meta/recipes-devtools/fdisk/gptfdisk/0001-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c640d9011a8330ebaad501784fb0ee1ce5e7a5ef Mon Sep 17 00:00:00 2001 -From: Rod Smith -Date: Sat, 16 Apr 2022 09:32:04 -0400 -Subject: [PATCH] Updated guid.cc to deal with minor change in libuuid - -Upstream-Status: Backport [https://sourceforge.net/p/gptfdisk/code/ci/6a8416cbd12d55f882bb751993b94f72d338d96f/] -Signed-off-by: Peter Bergin ---- - guid.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/guid.cc b/guid.cc -index 1e73ab7..d3e4fd5 100644 ---- a/guid.cc -+++ b/guid.cc -@@ -141,7 +141,7 @@ void GUIDData::Zero(void) { - void GUIDData::Randomize(void) { - int i, uuidGenerated = 0; - --#ifdef _UUID_UUID_H -+#if defined (_UUID_UUID_H) || defined (_UL_LIBUUID_UUID_H) - uuid_generate(uuidData); - ReverseBytes(&uuidData[0], 4); - ReverseBytes(&uuidData[4], 2); --- -2.34.1 - diff --git a/meta/recipes-devtools/fdisk/gptfdisk/0001-Use-64bit-time_t-on-linux-as-well.patch b/meta/recipes-devtools/fdisk/gptfdisk/0001-Use-64bit-time_t-on-linux-as-well.patch deleted file mode 100644 index 80e6f1bc9c..0000000000 --- a/meta/recipes-devtools/fdisk/gptfdisk/0001-Use-64bit-time_t-on-linux-as-well.patch +++ /dev/null @@ -1,32 +0,0 @@ -From cbdbabcc14e4ae4debcc64e41c0bb97d47b4eeef Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 12 Dec 2022 12:50:07 -0800 -Subject: [PATCH] Use 64bit time_t on linux as well - -Alias 64bit version of stat functions to original functions -we are already passing -D_FILE_OFFSET_BITS=64 in linux Makefile - -Upstream-Status: Submitted [https://sourceforge.net/p/gptfdisk/code/merge-requests/29/] -Signed-off-by: Khem Raj ---- - diskio-unix.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/diskio-unix.cc b/diskio-unix.cc -index 7780aeb..0897c56 100644 ---- a/diskio-unix.cc -+++ b/diskio-unix.cc -@@ -37,8 +37,12 @@ - - using namespace std; - --#ifdef __APPLE__ -+#if defined(__APPLE__) || defined(__linux__) - #define off64_t off_t -+#define stat64 stat -+#define fstat64 fstat -+#define lstat64 lstat -+#define lseek64 lseek - #endif - - // Returns the official "real" name for a shortened version of same. diff --git a/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correctly-include-curses.h.patch b/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correctly-include-curses.h.patch index 266afbfa11..011eec36f9 100644 --- a/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correctly-include-curses.h.patch +++ b/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correctly-include-curses.h.patch @@ -1,17 +1,16 @@ -From 6bc6e867c5b3a774c0d7819ee5a3d2885e97caa9 Mon Sep 17 00:00:00 2001 +From 510d0d27f90dfb1c4afd0722580bb8a828b52b7f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 30 Mar 2020 17:11:19 +0200 Subject: [PATCH] gptcurses: correctly include curses.h Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin - --- gptcurses.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gptcurses.cc b/gptcurses.cc -index 71aa734..4ebfde1 100644 +index b476700..476fc43 100644 --- a/gptcurses.cc +++ b/gptcurses.cc @@ -23,11 +23,7 @@ diff --git a/meta/recipes-devtools/fdisk/gptfdisk/popt-1.19-follow-up.patch b/meta/recipes-devtools/fdisk/gptfdisk/popt-1.19-follow-up.patch deleted file mode 100644 index c7fa965ec9..0000000000 --- a/meta/recipes-devtools/fdisk/gptfdisk/popt-1.19-follow-up.patch +++ /dev/null @@ -1,41 +0,0 @@ -From f5de3401b974ce103ffd93af8f9d43505a04aaf9 Mon Sep 17 00:00:00 2001 -From: Damian Kurek -Date: Thu, 7 Jul 2022 03:39:16 +0000 -Subject: [PATCH] Fix NULL dereference when duplicating string argument - -poptGetArg can return NULL if there are no additional arguments, which -makes strdup dereference NULL on strlen - -Upstream-Status: Submitted [https://sourceforge.net/p/gptfdisk/code/merge-requests/28/] - ---- - gptcl.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/gptcl.cc b/gptcl.cc -index 0d578eb..ab95239 100644 ---- a/gptcl.cc -+++ b/gptcl.cc -@@ -155,10 +155,11 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { - } // while - - // Assume first non-option argument is the device filename.... -- device = strdup((char*) poptGetArg(poptCon)); -- poptResetContext(poptCon); -+ device = (char*) poptGetArg(poptCon); - - if (device != NULL) { -+ device = strdup(device); -+ poptResetContext(poptCon); - JustLooking(); // reset as necessary - BeQuiet(); // Tell called functions to be less verbose & interactive - if (LoadPartitions((string) device)) { -@@ -498,6 +499,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { - cerr << "Error encountered; not saving changes.\n"; - retval = 4; - } // if -+ free(device); - } // if (device != NULL) - poptFreeContext(poptCon); - return retval; - diff --git a/meta/recipes-devtools/fdisk/gptfdisk_1.0.10.bb b/meta/recipes-devtools/fdisk/gptfdisk_1.0.10.bb new file mode 100644 index 0000000000..ba891931ac --- /dev/null +++ b/meta/recipes-devtools/fdisk/gptfdisk_1.0.10.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] = "2abed61bc6d2b9ec498973c0440b8b804b7a72d7144069b5a9209b2ad693a282" + +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 deleted file mode 100644 index cf0a60a1a9..0000000000 --- a/meta/recipes-devtools/fdisk/gptfdisk_1.0.9.bb +++ /dev/null @@ -1,39 +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-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch \ - file://0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch \ - file://0001-Use-64bit-time_t-on-linux-as-well.patch \ - file://popt-1.19-follow-up.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 1.2.3-korg