From 438c962f39cde858610fb3aab733f22ea7f7049b Mon Sep 17 00:00:00 2001 From: Butta Date: Sat, 22 Aug 2020 01:24:18 +0530 Subject: [PATCH] Revert parted and rhash updates as they will require more patching --- packages/parted/01_devmapper.patch | 54 ++++++++++++++++++++++++++++ packages/parted/build.sh | 6 ++-- packages/rhash/build.sh | 5 +-- packages/rhash/librhash-util.h.patch | 11 ------ 4 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 packages/parted/01_devmapper.patch delete mode 100644 packages/rhash/librhash-util.h.patch diff --git a/packages/parted/01_devmapper.patch b/packages/parted/01_devmapper.patch new file mode 100644 index 000000000..f96564237 --- /dev/null +++ b/packages/parted/01_devmapper.patch @@ -0,0 +1,54 @@ +Fix disabling of libdevmapper. + +Fix bugs related to disabling libdevmapper. Parted is rarely compiled without +devmapper. So couple of syntax errors for the cas3 of disabled devmapper +sneaked in. + +diff -ur src-orig/libparted/arch/linux.c src/libparted/arch/linux.c +--- src-orig/libparted/arch/linux.c 2017-08-31 15:47:07.007674598 +0200 ++++ src/libparted/arch/linux.c 2017-08-31 15:50:01.487860337 +0200 +@@ -2304,6 +2304,7 @@ + return r < 0 ? NULL : resultp; + } + ++#ifdef ENABLE_DEVICE_MAPPER + static char * + dm_canonical_path (PedDevice const *dev) + { +@@ -2326,12 +2327,17 @@ + err: + return NULL; + } ++#endif + + static char* + _device_get_part_path (PedDevice const *dev, int num) + { ++#ifdef ENABLE_DEVICE_MAPPER + char *devpath = (dev->type == PED_DEVICE_DM + ? dm_canonical_path (dev) : dev->path); ++#else ++ char *devpath = dev->path; ++#endif + size_t path_len = strlen (devpath); + char *result; + /* Check for devfs-style /disc => /partN transformation +@@ -2946,10 +2948,18 @@ + + + if (disk->dev->type == PED_DEVICE_DM) { ++#ifdef ENABLE_DEVICE_MAPPER + add_partition = _dm_add_partition; + remove_partition = _dm_remove_partition; + resize_partition = _dm_resize_partition; + get_partition_start_and_length = _dm_get_partition_start_and_length; ++#else ++ ped_exception_throw ( ++ PED_EXCEPTION_BUG, ++ PED_EXCEPTION_CANCEL, ++ "This parted is compiled without devmapper support"); ++ return 0; ++#endif + } else { + add_partition = _blkpg_add_partition; + remove_partition = _blkpg_remove_partition; diff --git a/packages/parted/build.sh b/packages/parted/build.sh index 75373b682..04ae4c079 100644 --- a/packages/parted/build.sh +++ b/packages/parted/build.sh @@ -1,10 +1,10 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/parted/ TERMUX_PKG_DESCRIPTION="Versatile partition editor" TERMUX_PKG_LICENSE="GPL-3.0" -TERMUX_PKG_VERSION=3.3 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_VERSION=3.2 +TERMUX_PKG_REVISION=5 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/parted/parted-${TERMUX_PKG_VERSION}.tar.xz -TERMUX_PKG_SHA256=57e2b4bd87018625c515421d4524f6e3b55175b472302056391c5f7eccb83d44 +TERMUX_PKG_SHA256=858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4 TERMUX_PKG_DEPENDS="libiconv, libuuid, readline" TERMUX_PKG_BREAKS="parted-dev" TERMUX_PKG_REPLACES="parted-dev" diff --git a/packages/rhash/build.sh b/packages/rhash/build.sh index 056cef28c..87e5d9bad 100644 --- a/packages/rhash/build.sh +++ b/packages/rhash/build.sh @@ -1,9 +1,10 @@ TERMUX_PKG_HOMEPAGE=https://github.com/rhash/RHash TERMUX_PKG_DESCRIPTION="Console utility for calculation and verification of magnet links and a wide range of hash sums" TERMUX_PKG_LICENSE="MIT" -TERMUX_PKG_VERSION=1.4.0 +TERMUX_PKG_VERSION=1.3.9 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://github.com/rhash/RHash/archive/v$TERMUX_PKG_VERSION.tar.gz -TERMUX_PKG_SHA256=2ea39540f5c580da0e655f7b483c19e0d31506aed4202d88e8459fa7aeeb8861 +TERMUX_PKG_SHA256=42b1006f998adb189b1f316bf1a60e3171da047a85c4aaded2d0d26c1476c9f6 TERMUX_PKG_DEPENDS="openssl" TERMUX_PKG_CONFLICTS="librhash, rhash-dev" TERMUX_PKG_REPLACES="librhash, rhash-dev" diff --git a/packages/rhash/librhash-util.h.patch b/packages/rhash/librhash-util.h.patch deleted file mode 100644 index 78d142041..000000000 --- a/packages/rhash/librhash-util.h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/librhash/util.h.orig 2020-08-21 15:57:08.729857674 +0000 -+++ src/librhash/util.h 2020-08-21 15:55:12.005382002 +0000 -@@ -39,7 +39,7 @@ - # define rhash_aligned_alloc(alignment, size) _aligned_malloc((size), (alignment)) - # define rhash_aligned_free(ptr) _aligned_free(ptr) - --#elif (__STDC_VERSION__ >= 201112L || defined(_ISOC11_SOURCE)) && !defined(__APPLE__) -+#elif (__STDC_VERSION__ >= 201112L || defined(_ISOC11_SOURCE)) && !defined(__APPLE__) && !defined(__BIONIC__) - - # define HAS_STDC_ALIGNED_ALLOC - # include