From 668d7e09ec23cc8318273acc9fbadb32c981f5a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Fonzo?= Date: Tue, 4 Apr 2023 19:29:54 -0300 Subject: [PATCH] recipes: tools/gptfdisk: Moved to the 'dragora-extras' repository MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit GPT is already supported by util-linux, we move "gptfdisk" to the dragora-extras repository in case that someone else requires this, or if an included software in 'dragora-main' needs "gptfdisk". Signed-off-by: Matías Fonzo --- patches/gptfdisk/Makefile-ICU.diff | 11 --- .../gptfdisk/gptfdisk-1.0.9-convenience-1.patch | 27 ------ patches/gptfdisk/popt-1.19-follow-up.patch | 37 -------- patches/gptfdisk/popt-1.19.patch | 37 -------- patches/gptfdisk/util-linux-2.38.patch | 25 ----- recipes/00-core.order | 1 - recipes/tools/gptfdisk/recipe | 101 --------------------- sources/SOURCELIST.txt | 1 - sources/gptfdisk-1.0.9.tar.gz.sha256 | 1 - 9 files changed, 241 deletions(-) delete mode 100644 patches/gptfdisk/Makefile-ICU.diff delete mode 100644 patches/gptfdisk/gptfdisk-1.0.9-convenience-1.patch delete mode 100644 patches/gptfdisk/popt-1.19-follow-up.patch delete mode 100644 patches/gptfdisk/popt-1.19.patch delete mode 100644 patches/gptfdisk/util-linux-2.38.patch delete mode 100644 recipes/tools/gptfdisk/recipe delete mode 100644 sources/gptfdisk-1.0.9.tar.gz.sha256 diff --git a/patches/gptfdisk/Makefile-ICU.diff b/patches/gptfdisk/Makefile-ICU.diff deleted file mode 100644 index 4f429178..00000000 --- a/patches/gptfdisk/Makefile-ICU.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- gptfdisk-1.0.9/Makefile.orig 2022-05-04 20:20:23.101863901 +0000 -+++ gptfdisk-1.0.9/Makefile 2022-05-04 20:20:53.010045295 +0000 -@@ -68,7 +68,7 @@ - #CXXFLAGS+=-O2 -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 - CXXFLAGS+=-O2 -Wall -D_FILE_OFFSET_BITS=64 - LDFLAGS+= --LDLIBS+=-luuid #-licuio -licuuc -+LDLIBS+=-luuid -licuio -licuuc - FATBINFLAGS= - THINBINFLAGS= - SGDISK_LDLIBS=-lpopt diff --git a/patches/gptfdisk/gptfdisk-1.0.9-convenience-1.patch b/patches/gptfdisk/gptfdisk-1.0.9-convenience-1.patch deleted file mode 100644 index 3d78b87b..00000000 --- a/patches/gptfdisk/gptfdisk-1.0.9-convenience-1.patch +++ /dev/null @@ -1,27 +0,0 @@ -Submitted By: Bruce Dubbs -Date: 2015-10-19 -Initial Package Version: 1.0.1 -Upstream Status: None. BLFS specific. -Origin: BLFS -Description: Updates Makefile enabling parameter passing. - Rediffed for version 1.0.1 -Updates: Rediffed for version 1.0.3 (P. Labastie) - Patch version 2 for version 1.0.3: Removed ICU - and POPT switches, keeping only the - install target (P. Labastie) - -diff -Naur gptfdisk-1.0.3.old/Makefile gptfdisk-1.0.3.new/Makefile ---- gptfdisk-1.0.3.old/Makefile 2017-07-28 03:41:20.000000000 +0200 -+++ gptfdisk-1.0.3.new/Makefile 2018-04-20 10:04:18.896802047 +0200 -@@ -37,6 +37,11 @@ - clean: #no pre-reqs - rm -f core *.o *~ gdisk sgdisk cgdisk fixparts - -+install: gdisk cgdisk sgdisk fixparts -+ install -dm 755 $(DESTDIR)/sbin $(DESTDIR)/usr/share/man/man8 -+ install -m755 gdisk cgdisk sgdisk fixparts $(DESTDIR)/sbin -+ install -m644 *.8 $(DESTDIR)/usr/share/man/man8 -+ - # what are the source dependencies - depend: $(SRCS) - $(DEPEND) $(SRCS) diff --git a/patches/gptfdisk/popt-1.19-follow-up.patch b/patches/gptfdisk/popt-1.19-follow-up.patch deleted file mode 100644 index 3cee7cc3..00000000 --- a/patches/gptfdisk/popt-1.19-follow-up.patch +++ /dev/null @@ -1,37 +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 ---- - 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/patches/gptfdisk/popt-1.19.patch b/patches/gptfdisk/popt-1.19.patch deleted file mode 100644 index 39468d35..00000000 --- a/patches/gptfdisk/popt-1.19.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 5d5e76d369a412bfb3d2cebb5fc0a7509cef878d 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) - ---- - gptcl.cc | 2 +- - support.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -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) { -diff --git a/support.h b/support.h -index 8ba9ad1..f91f1bc 100644 ---- a/support.h -+++ b/support.h -@@ -8,7 +8,7 @@ - #include - #include - --#define GPTFDISK_VERSION "1.0.9" -+#define GPTFDISK_VERSION "1.0.9.1" - - #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) - // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64 diff --git a/patches/gptfdisk/util-linux-2.38.patch b/patches/gptfdisk/util-linux-2.38.patch deleted file mode 100644 index 7b258aa1..00000000 --- a/patches/gptfdisk/util-linux-2.38.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 127e40dcc2d62ad693cb4e03e1182d0a227d85e1 Mon Sep 17 00:00:00 2001 -From: Evangelos Foutras -Date: Sat, 16 Apr 2022 08:24:58 +0300 -Subject: [PATCH] Fix uuid/uuid.h detection with util-linux 2.38 - -util-linux commit 10f5f79485964ab52272ebe79c3b0047b1f84d82 changed the -header guard in uuid/uuid.h from _UUID_UUID_H to _UL_LIBUUID_UUID_H as -the former was too generic; fix guid.cc to also look for the new name. ---- - 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); diff --git a/recipes/00-core.order b/recipes/00-core.order index 90f2acf8..09a565a9 100644 --- a/recipes/00-core.order +++ b/recipes/00-core.order @@ -260,7 +260,6 @@ tools/btrfs-progs: compressors/zstd libs/lzo tools/squashfs-tools: tools/attr compressors/plzip # Extra disk, partitioning-related utilities (1/2) -tools/gptfdisk: libs/icu libs/popt tools/util-linux tools/parted: tools/lvm2 tools/util-linux tools/ddrescue: diff --git a/recipes/tools/gptfdisk/recipe b/recipes/tools/gptfdisk/recipe deleted file mode 100644 index d6a3af9a..00000000 --- a/recipes/tools/gptfdisk/recipe +++ /dev/null @@ -1,101 +0,0 @@ -# Build recipe for gptfdisk. -# -# Copyright (c) 2022-2023 Matias Fonzo, . -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Exit immediately on any error -set -e - -program=gptfdisk -version=1.0.9 -release=4 - -# Define a category for the output of the package name -pkgcategory=tools - -tarname=${program}-${version}.tar.gz - -# Remote source(s) -fetch=https://sourceforge.net/projects/gptfdisk/files/gptfdisk/${version}/$tarname - -description=" -GPT partitioning and MBR repair software. - -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://www.rodsbooks.com/gdisk/ -license=GPLv2+ - -# Source documentation -docs="COPYING NEWS README" -docsdir="${docdir}/${program}-${version}" - -# Limit parallel jobs for the compiler -jobs=1 - -build() -{ - unpack "${tardir}/$tarname" - - cd "$srcdir" - - # Update in order to build against latest popt package - patch -Np1 -i "${worktree}/patches/gptfdisk/popt-1.19.patch" - patch -Np1 -i "${worktree}/patches/gptfdisk/popt-1.19-follow-up.patch" - - # Update in order to build against util-linux 2.38 - patch -Np1 -i "${worktree}/patches/gptfdisk/util-linux-2.38.patch" - - # This patch modifies the Makefile file - # so that it provides an install target. - # Thanks to "Beyond Linux From Scratch" - patch -Np1 -i "${worktree}/patches/gptfdisk/gptfdisk-1.0.9-convenience-1.patch" - - # Build with ICU support - patch -Np1 -i "${worktree}/patches/gptfdisk/Makefile-ICU.diff" - - # To accommodate paths - sed -i 's|ncursesw/||' gptcurses.cc - sed -i 's|sbin|usr/sbin|' Makefile - - # Set sane permissions - chmod -R u+w,go-w,a+rX-s . - - make -j${jobs} V=1 CPPFLAGS="$QICPPFLAGS" \ - CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" - make -j${jobs} DESTDIR="$destdir" install - - # Compress and link man pages (if needed) - if test -d "${destdir}/$mandir" - then - ( - cd "${destdir}/$mandir" - find . -type f -exec lzip -9 {} + - find . -type l | while read -r file - do - ln -sf "$(readlink -- "$file").lz" "${file}.lz" - rm -- "$file" - done - ) - fi - - # Copy documentation - mkdir -p "${destdir}/$docsdir" - cp -p $docs "${destdir}/$docsdir" -} - diff --git a/sources/SOURCELIST.txt b/sources/SOURCELIST.txt index b9dde6c0..f8db0bf4 100644 --- a/sources/SOURCELIST.txt +++ b/sources/SOURCELIST.txt @@ -351,7 +351,6 @@ https://sourceforge.net/projects/enlightenment/files/imlib2-src/1.10.0/imlib2-1. https://sourceforge.net/projects/expat/files/expat/2.5.0/expat-2.5.0.tar.lz https://sourceforge.net/projects/freeglut/files/freeglut/3.4.0/freeglut-3.4.0.tar.gz https://sourceforge.net/projects/gphoto/files/libgphoto/2.5.30/libgphoto2-2.5.30.tar.bz2 -https://sourceforge.net/projects/gptfdisk/files/gptfdisk/1.0.9/gptfdisk-1.0.9.tar.gz https://sourceforge.net/projects/lcms/files/lcms/2.14/lcms2-2.14.tar.gz https://sourceforge.net/projects/libjpeg-turbo/files/2.1.4/libjpeg-turbo-2.1.4.tar.gz https://sourceforge.net/projects/libtirpc/files/libtirpc/1.3.3/libtirpc-1.3.3.tar.bz2 diff --git a/sources/gptfdisk-1.0.9.tar.gz.sha256 b/sources/gptfdisk-1.0.9.tar.gz.sha256 deleted file mode 100644 index 099e8393..00000000 --- a/sources/gptfdisk-1.0.9.tar.gz.sha256 +++ /dev/null @@ -1 +0,0 @@ -dafead2693faeb8e8b97832b23407f6ed5b3219bc1784f482dd855774e2d50c2 gptfdisk-1.0.9.tar.gz -- 2.11.4.GIT