mirror of
https://codeberg.org/kiss-community/repo
synced 2024-07-04 23:12:28 +00:00
lvm2: bump to 2.03.06
This commit is contained in:
parent
521f9e3188
commit
ba69cebee1
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# A painful few patches, some written for KISS and the others
|
|
||||||
# ported and modified from much older versions of LVM.
|
|
||||||
patch -p1 < portability.patch
|
|
||||||
patch -p1 < fix-stdio-usage.patch
|
patch -p1 < fix-stdio-usage.patch
|
||||||
patch -p1 < disable-symver.patch
|
patch -p1 < disable-symver.patch
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
ca52815c999b20c6d25e3192f142f081b93d01f07b9d787e99664b169dba2700 LVM2.2.03.05.tgz
|
91753976ea1b9d94475781680be667a61fe611e89050fc73e1edbebbdc87ed44 LVM2.2.03.06.tgz
|
||||||
1936f44db53a7cd2eea4cb98303994c091aa32349d9d90aa4408f0b89dd32aa6 fix-stdio-usage.patch
|
36b598a65d24b18ae7b7657b37343788c96ae56cb9673a13a09423c031002b32 fix-stdio-usage.patch
|
||||||
d1f78c5a07f0ba66856e00e498c0f62164cabbcd9f0d9abcda1c25501eb235ff portability.patch
|
0eafb3464043c81644c919e42c79f7fbd614ca27a4bf5665b658856008147e59 disable-symver.patch
|
||||||
e785546d0fa6551364ad2a26e50672ace1262d60439727356d28970a80f30a91 disable-symver.patch
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
diff --git a/configure b/configure
|
diff --git a/configure b/configure
|
||||||
index 7d945dfa8..94cd6b1ea 100755
|
index 6dd7eda..ef6a416 100755
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -975,6 +975,7 @@ enable_fsadm
|
@@ -959,6 +959,7 @@ enable_fsadm
|
||||||
enable_blkdeactivate
|
enable_blkdeactivate
|
||||||
enable_dmeventd
|
enable_dmeventd
|
||||||
enable_selinux
|
enable_selinux
|
||||||
|
@ -10,7 +10,7 @@ index 7d945dfa8..94cd6b1ea 100755
|
||||||
enable_nls
|
enable_nls
|
||||||
with_localedir
|
with_localedir
|
||||||
with_confdir
|
with_confdir
|
||||||
@@ -1725,6 +1726,9 @@ Optional Features:
|
@@ -1677,6 +1678,9 @@ Optional Features:
|
||||||
--disable-blkdeactivate disable blkdeactivate
|
--disable-blkdeactivate disable blkdeactivate
|
||||||
--enable-dmeventd enable the device-mapper event daemon
|
--enable-dmeventd enable the device-mapper event daemon
|
||||||
--disable-selinux disable selinux support
|
--disable-selinux disable selinux support
|
||||||
|
@ -18,28 +18,20 @@ index 7d945dfa8..94cd6b1ea 100755
|
||||||
+ enables symbol versioning of the shared library
|
+ enables symbol versioning of the shared library
|
||||||
+ [default=gnu]
|
+ [default=gnu]
|
||||||
--enable-nls enable Native Language Support
|
--enable-nls enable Native Language Support
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
@@ -3156,7 +3160,6 @@ if test -z "$CFLAGS"; then :
|
@@ -3077,7 +3081,6 @@ if test -z "$CFLAGS"; then :
|
||||||
fi
|
fi
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
linux*)
|
linux*)
|
||||||
- CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym"
|
- CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
|
||||||
# equivalent to -rdynamic
|
# equivalent to -rdynamic
|
||||||
ELDFLAGS="-Wl,--export-dynamic"
|
ELDFLAGS="-Wl,--export-dynamic"
|
||||||
# FIXME Generate list and use --dynamic-list=.dlopen.sym
|
# FIXME Generate list and use --dynamic-list=.dlopen.sym
|
||||||
@@ -3178,7 +3181,6 @@ case "$host_os" in
|
@@ -12969,6 +12972,33 @@ done
|
||||||
;;
|
|
||||||
darwin*)
|
|
||||||
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
|
|
||||||
- CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}"
|
|
||||||
ELDFLAGS=
|
|
||||||
CLDWHOLEARCHIVE="-all_load"
|
|
||||||
CLDNOWHOLEARCHIVE=
|
|
||||||
@@ -14401,6 +14403,32 @@ done
|
|
||||||
LIBS=$lvm_saved_libs
|
LIBS=$lvm_saved_libs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
+################################################################################
|
+################################################################################
|
||||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable symbol versioning" >&5
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable symbol versioning" >&5
|
||||||
+$as_echo_n "checking whether to enable symbol versioning... " >&6; }
|
+$as_echo_n "checking whether to enable symbol versioning... " >&6; }
|
||||||
|
@ -65,50 +57,16 @@ index 7d945dfa8..94cd6b1ea 100755
|
||||||
+ linux*) CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" ;;
|
+ linux*) CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" ;;
|
||||||
+ esac
|
+ esac
|
||||||
+fi
|
+fi
|
||||||
|
+
|
||||||
+
|
+
|
||||||
################################################################################
|
################################################################################
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable internationalisation" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable internationalisation" >&5
|
||||||
$as_echo_n "checking whether to enable internationalisation... " >&6; }
|
$as_echo_n "checking whether to enable internationalisation... " >&6; }
|
||||||
diff --git a/include/configure.h.in b/include/configure.h.in
|
|
||||||
index 15fd150ed..7a07a10ef 100644
|
|
||||||
--- a/include/configure.h.in
|
|
||||||
+++ b/include/configure.h.in
|
|
||||||
@@ -147,6 +147,9 @@
|
|
||||||
/* Path to fsadm binary. */
|
|
||||||
#undef FSADM_PATH
|
|
||||||
|
|
||||||
+/* Define to use GNU versioning in the shared library. */
|
|
||||||
+#undef GNU_SYMVER
|
|
||||||
+
|
|
||||||
/* Define to 1 if you have the `alarm' function. */
|
|
||||||
#undef HAVE_ALARM
|
|
||||||
|
|
||||||
diff --git a/lib/misc/lib.h b/lib/misc/lib.h
|
diff --git a/lib/misc/lib.h b/lib/misc/lib.h
|
||||||
index d7fa5c721..7cf98f932 100644
|
index c14f437..79b36a3 100644
|
||||||
--- a/lib/misc/lib.h
|
--- a/lib/misc/lib.h
|
||||||
+++ b/lib/misc/lib.h
|
+++ b/lib/misc/lib.h
|
||||||
@@ -41,16 +41,16 @@
|
@@ -62,7 +62,7 @@
|
||||||
* macro DM_EXPORT_SYMBOL to export the function and bind it to the
|
|
||||||
* specified version string.
|
|
||||||
*
|
|
||||||
- * Since versioning is only available when compiling with GCC the entire
|
|
||||||
- * compatibility version should be enclosed in '#if defined(__GNUC__)',
|
|
||||||
- * for example:
|
|
||||||
+ * Since versioning is only available when compiling with GCC
|
|
||||||
+ * and GLIBC the entire compatibility version should be enclosed
|
|
||||||
+ * in '#if defined(GNU_SYMVER)', for example:
|
|
||||||
*
|
|
||||||
* int dm_foo(int bar)
|
|
||||||
* {
|
|
||||||
* return bar;
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
- * #if defined(__GNUC__)
|
|
||||||
+ * #if defined(GNU_SYMVER)
|
|
||||||
* // Backward compatible dm_foo() version 1.02.104
|
|
||||||
* int dm_foo_v1_02_104(void);
|
|
||||||
* int dm_foo_v1_02_104(void)
|
|
||||||
@@ -67,7 +67,7 @@
|
|
||||||
* versions of library symbols prior to the introduction of symbol
|
* versions of library symbols prior to the introduction of symbol
|
||||||
* versioning: it must never be used for new symbols.
|
* versioning: it must never be used for new symbols.
|
||||||
*/
|
*/
|
||||||
|
@ -118,64 +76,61 @@ index d7fa5c721..7cf98f932 100644
|
||||||
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver )
|
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver )
|
||||||
#define DM_EXPORT_SYMBOL_BASE(func) \
|
#define DM_EXPORT_SYMBOL_BASE(func) \
|
||||||
diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c
|
diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c
|
||||||
index b0826e1eb..2ec3f8f84 100644
|
index 06bd31a..8f36ec7 100644
|
||||||
--- a/libdm/datastruct/bitset.c
|
--- a/libdm/datastruct/bitset.c
|
||||||
+++ b/libdm/datastruct/bitset.c
|
+++ b/libdm/datastruct/bitset.c
|
||||||
@@ -242,7 +242,7 @@ bad:
|
@@ -242,7 +242,7 @@ bad:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
-#if defined(__GNUC__)
|
-#if defined(__GNUC__)
|
||||||
+#if defined(GNU_SYMVER)
|
+#if defined(GNU_SYMVER)
|
||||||
/*
|
/*
|
||||||
* Maintain backward compatibility with older versions that did not
|
* Maintain backward compatibility with older versions that did not
|
||||||
* accept a 'min_num_bits' argument to dm_bitset_parse_list().
|
* accept a 'min_num_bits' argument to dm_bitset_parse_list().
|
||||||
@@ -253,7 +253,4 @@ dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem)
|
@@ -254,6 +254,4 @@ dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem)
|
||||||
return dm_bitset_parse_list(str, mem, 0);
|
|
||||||
}
|
}
|
||||||
DM_EXPORT_SYMBOL(dm_bitset_parse_list, 1_02_129);
|
DM_EXPORT_SYMBOL(dm_bitset_parse_list, 1_02_129);
|
||||||
-
|
|
||||||
-#else /* if defined(__GNUC__) */
|
-#else /* if defined(__GNUC__) */
|
||||||
-
|
-
|
||||||
#endif
|
#endif
|
||||||
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
|
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
|
||||||
index 769b69c1b..28e2eadee 100644
|
index dd46b67..b09abdc 100644
|
||||||
--- a/libdm/ioctl/libdm-iface.c
|
--- a/libdm/ioctl/libdm-iface.c
|
||||||
+++ b/libdm/ioctl/libdm-iface.c
|
+++ b/libdm/ioctl/libdm-iface.c
|
||||||
@@ -2145,7 +2145,7 @@ void dm_lib_exit(void)
|
@@ -2176,7 +2176,7 @@ void dm_lib_exit(void)
|
||||||
_version_checked = 0;
|
_version_checked = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
-#if defined(__GNUC__)
|
-#if defined(__GNUC__)
|
||||||
+#if defined(GNU_SYMVER)
|
+#if defined(GNU_SYMVER)
|
||||||
/*
|
/*
|
||||||
* Maintain binary backward compatibility.
|
* Maintain binary backward compatibility.
|
||||||
* Version script mechanism works with 'gcc' compatible compilers only.
|
* Version script mechanism works with 'gcc' compatible compilers only.
|
||||||
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
|
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
|
||||||
index ab0545659..00651c0b2 100644
|
index ee12da2..08829c5 100644
|
||||||
--- a/libdm/libdm-deptree.c
|
--- a/libdm/libdm-deptree.c
|
||||||
+++ b/libdm/libdm-deptree.c
|
+++ b/libdm/libdm-deptree.c
|
||||||
@@ -3797,7 +3797,7 @@ void dm_tree_node_set_callback(struct dm_tree_node *dnode,
|
@@ -3811,7 +3811,7 @@ void dm_tree_node_set_callback(struct dm_tree_node *dnode,
|
||||||
dnode->callback_data = data;
|
dnode->callback_data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
-#if defined(__GNUC__)
|
-#if defined(__GNUC__)
|
||||||
+#if defined(GNU_SYMVER)
|
+#if defined(GNU_SYMVER)
|
||||||
/*
|
/*
|
||||||
* Backward compatible implementations.
|
* Backward compatible implementations.
|
||||||
*
|
*
|
||||||
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
|
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
|
||||||
index 94ad380e0..76efbbe35 100644
|
index 420e3e1..066bcdf 100644
|
||||||
--- a/libdm/libdm-stats.c
|
--- a/libdm/libdm-stats.c
|
||||||
+++ b/libdm/libdm-stats.c
|
+++ b/libdm/libdm-stats.c
|
||||||
@@ -5065,7 +5065,7 @@ int dm_stats_start_filemapd(int fd, uint64_t group_id, const char *path,
|
@@ -5067,7 +5067,7 @@ int dm_stats_start_filemapd(int fd, uint64_t group_id, const char *path,
|
||||||
* current dm_stats_create_region() version.
|
* current dm_stats_create_region() version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
-#if defined(__GNUC__)
|
-#if defined(__GNUC__)
|
||||||
+#if defined(GNU_SYMVER)
|
+#if defined(GNU_SYMVER)
|
||||||
int dm_stats_create_region_v1_02_106(struct dm_stats *dms, uint64_t *region_id,
|
int dm_stats_create_region_v1_02_106(struct dm_stats *dms, uint64_t *region_id,
|
||||||
uint64_t start, uint64_t len, int64_t step,
|
uint64_t start, uint64_t len, int64_t step,
|
||||||
int precise, const char *program_id,
|
int precise, const char *program_id,
|
||||||
--
|
|
||||||
2.18.0
|
|
||||||
|
|
|
@ -1,72 +1,58 @@
|
||||||
--- ./tools/lvmcmdline.c
|
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
|
||||||
+++ ./tools/lvmcmdline.c
|
index 479d499..7681a5b 100644
|
||||||
@@ -1252,7 +1252,7 @@
|
|
||||||
int err = is_valid_fd(STDERR_FILENO);
|
|
||||||
|
|
||||||
if (!is_valid_fd(STDIN_FILENO) &&
|
|
||||||
- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
|
|
||||||
+ !freopen(_PATH_DEVNULL, "r", stdin)) {
|
|
||||||
if (err)
|
|
||||||
perror("stdin stream open");
|
|
||||||
else
|
|
||||||
@@ -1262,7 +1262,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_valid_fd(STDOUT_FILENO) &&
|
|
||||||
- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
|
|
||||||
+ !freopen(_PATH_DEVNULL, "w", stdout)) {
|
|
||||||
if (err)
|
|
||||||
perror("stdout stream open");
|
|
||||||
/* else no stdout */
|
|
||||||
@@ -1270,7 +1270,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_valid_fd(STDERR_FILENO) &&
|
|
||||||
- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
|
|
||||||
+ !freopen(_PATH_DEVNULL, "w", stderr)) {
|
|
||||||
printf("stderr stream open: %s\n",
|
|
||||||
strerror(errno));
|
|
||||||
return 0;
|
|
||||||
--- a/lib/commands/toolcontext.c
|
--- a/lib/commands/toolcontext.c
|
||||||
+++ b/lib/commands/toolcontext.c
|
+++ b/lib/commands/toolcontext.c
|
||||||
@@ -1649,7 +1649,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
|
@@ -1599,7 +1599,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
|
||||||
/* FIXME Make this configurable? */
|
/* FIXME Make this configurable? */
|
||||||
reset_lvm_errno(1);
|
reset_lvm_errno(1);
|
||||||
|
|
||||||
-#ifndef VALGRIND_POOL
|
-#ifndef VALGRIND_POOL
|
||||||
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
|
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
|
||||||
/* Set in/out stream buffering before glibc */
|
/* Set in/out stream buffering before glibc */
|
||||||
if (set_buffering
|
if (set_buffering
|
||||||
#ifdef SYS_gettid
|
#ifdef SYS_gettid
|
||||||
@@ -2031,7 +2031,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
|
@@ -1980,7 +1980,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
|
||||||
if (cmd->libmem)
|
|
||||||
dm_pool_destroy(cmd->libmem);
|
if (cmd->pending_delete_mem)
|
||||||
|
dm_pool_destroy(cmd->pending_delete_mem);
|
||||||
-#ifndef VALGRIND_POOL
|
-#ifndef VALGRIND_POOL
|
||||||
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
|
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
|
||||||
if (cmd->linebuffer) {
|
if (cmd->linebuffer) {
|
||||||
/* Reset stream buffering to defaults */
|
/* Reset stream buffering to defaults */
|
||||||
if (is_valid_fd(STDIN_FILENO) &&
|
if (is_valid_fd(STDIN_FILENO) &&
|
||||||
|
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
|
||||||
|
index 860e6de..c7539bd 100644
|
||||||
--- a/tools/lvmcmdline.c
|
--- a/tools/lvmcmdline.c
|
||||||
+++ b/tools/lvmcmdline.c
|
+++ b/tools/lvmcmdline.c
|
||||||
@@ -3055,6 +3055,7 @@ int lvm_split(char *str, int *argc, char **argv, int max)
|
@@ -3209,6 +3209,7 @@ int lvm_split(char *str, int *argc, char **argv, int max)
|
||||||
/* Make sure we have always valid filedescriptors 0,1,2 */
|
/* Make sure we have always valid filedescriptors 0,1,2 */
|
||||||
static int _check_standard_fds(void)
|
static int _check_standard_fds(void)
|
||||||
{
|
{
|
||||||
+#ifdef __GLIBC__
|
+#ifdef __GLIBC__
|
||||||
int err = is_valid_fd(STDERR_FILENO);
|
int err = is_valid_fd(STDERR_FILENO);
|
||||||
|
|
||||||
if (!is_valid_fd(STDIN_FILENO) &&
|
if (!is_valid_fd(STDIN_FILENO) &&
|
||||||
@@ -3081,6 +3082,12 @@ static int _check_standard_fds(void)
|
@@ -3236,6 +3237,12 @@ static int _check_standard_fds(void)
|
||||||
strerror(errno));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#else
|
+#else
|
||||||
+ if (!is_valid_fd(STDERR_FILENO) ||
|
+ if (!is_valid_fd(STDERR_FILENO) ||
|
||||||
+ !is_valid_fd(STDOUT_FILENO) ||
|
+ !is_valid_fd(STDOUT_FILENO) ||
|
||||||
+ !is_valid_fd(STDIN_FILENO))
|
+ !is_valid_fd(STDIN_FILENO))
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--- ./lib/mm/memlock.c.orig 2015-03-09 11:18:41.560028850 -0100
|
||||||
|
+++ ./lib/mm/memlock.c 2015-03-09 11:19:54.504373309 -0100
|
||||||
|
@@ -137,7 +137,7 @@
|
||||||
|
|
||||||
|
static void _allocate_memory(void)
|
||||||
|
{
|
||||||
|
-#ifndef VALGRIND_POOL
|
||||||
|
+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
|
||||||
|
void *stack_mem;
|
||||||
|
struct rlimit limit;
|
||||||
|
int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- ./lib/mm/memlock.c.orig 2015-03-09 11:18:41.560028850 -0100
|
|
||||||
+++ ./lib/mm/memlock.c 2015-03-09 11:19:54.504373309 -0100
|
|
||||||
@@ -137,7 +137,7 @@
|
|
||||||
|
|
||||||
static void _allocate_memory(void)
|
|
||||||
{
|
|
||||||
-#ifndef VALGRIND_POOL
|
|
||||||
+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
|
|
||||||
void *stack_mem;
|
|
||||||
struct rlimit limit;
|
|
||||||
int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
|
|
|
@ -1,4 +1,3 @@
|
||||||
https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.2.03.05.tgz
|
https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.2.03.06.tgz
|
||||||
patches/fix-stdio-usage.patch
|
patches/fix-stdio-usage.patch
|
||||||
patches/portability.patch
|
|
||||||
patches/disable-symver.patch
|
patches/disable-symver.patch
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2.03.05 3
|
2.03.06 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user