Revert parted and rhash updates as they will require more patching

This commit is contained in:
Butta 2020-08-22 01:24:18 +05:30
parent cb028182a5
commit 438c962f39
4 changed files with 60 additions and 16 deletions

View File

@ -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;

View File

@ -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"

View File

@ -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"

View File

@ -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 <stdlib.h>