lvm2 2.02.186
This commit is contained in:
Executable → Regular
+5
-1
@@ -60,10 +60,14 @@ def builddiet():
|
|||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
# Breaks linking when sandbox is disabled
|
# Breaks linking when sandbox is disabled
|
||||||
shelltools.export("CLDFLAGS", get.LDFLAGS())
|
shelltools.export("CLDFLAGS", "%s -lpthread" %get.LDFLAGS())
|
||||||
|
|
||||||
shelltools.export("LIB_PTHREAD", "-lpthread")
|
shelltools.export("LIB_PTHREAD", "-lpthread")
|
||||||
pisitools.dosed("conf/example.conf.in", "use_lvmetad = 0", "use_lvmetad = 1")
|
pisitools.dosed("conf/example.conf.in", "use_lvmetad = 0", "use_lvmetad = 1")
|
||||||
|
|
||||||
|
#shelltools.system(""" sed -i -e "1iAR = $(tc-getAR)" -e "s:CC ?= @CC@:CC = $(tc-getCC):" make.tmpl.in || die """)
|
||||||
|
shelltools.system(""" sed -i -e '/FLAG/s:-O2::' configure || die """)
|
||||||
|
shelltools.system(""" sed -i -e '/FLAG/s:-O2::' configure.ac || die """)
|
||||||
|
|
||||||
autotools.autoreconf("-fi")
|
autotools.autoreconf("-fi")
|
||||||
autotools.configure("--with-thin-check= \
|
autotools.configure("--with-thin-check= \
|
||||||
|
|||||||
Executable → Regular
Executable → Regular
Executable → Regular
@@ -0,0 +1,12 @@
|
|||||||
|
--- a/lib/device/dev-io.c
|
||||||
|
+++ b/lib/device/dev-io.c
|
||||||
|
@@ -505,7 +505,9 @@
|
||||||
|
dev->flags |= DEV_NOT_O_NOATIME;
|
||||||
|
if ((dev->fd = open(name, flags, 0777)) >= 0) {
|
||||||
|
log_debug_devs("%s: Not using O_NOATIME", name);
|
||||||
|
+#ifdef O_DIRECT_SUPPORT
|
||||||
|
goto opened;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/make.tmpl.in b/make.tmpl.in
|
||||||
|
index a40eaaa15..7eea943aa 100644
|
||||||
|
--- a/make.tmpl.in
|
||||||
|
+++ b/make.tmpl.in
|
||||||
|
@@ -53,7 +53,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile
|
||||||
|
|
||||||
|
LIBS = @LIBS@
|
||||||
|
# Extra libraries always linked with static binaries
|
||||||
|
-STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
|
||||||
|
+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS)
|
||||||
|
DEFS += @DEFS@
|
||||||
|
# FIXME set this only where it's needed, not globally?
|
||||||
|
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
--- LVM2.2.02.178/configure.ac
|
||||||
|
+++ LVM2.2.02.178/configure.ac
|
||||||
|
@@ -1238,6 +1238,7 @@
|
||||||
|
PKG_CHECK_MODULES(BLKID, blkid >= 2.24,
|
||||||
|
[ BLKID_WIPING=yes
|
||||||
|
BLKID_PC="blkid"
|
||||||
|
+ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
|
||||||
|
DEFAULT_USE_BLKID_WIPING=1
|
||||||
|
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
|
||||||
|
], [if test "$BLKID_WIPING" = maybe; then
|
||||||
|
@@ -1286,6 +1287,7 @@
|
||||||
|
if test "$UDEV_SYNC" = yes; then
|
||||||
|
pkg_config_init
|
||||||
|
PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
|
||||||
|
+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
|
||||||
|
AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
|
||||||
|
|
||||||
|
AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1,
|
||||||
|
@@ -1564,19 +1566,32 @@
|
||||||
|
if test "$SELINUX" = yes; then
|
||||||
|
AC_CHECK_LIB([sepol], [sepol_check_context], [
|
||||||
|
AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
|
||||||
|
- SELINUX_LIBS="-lsepol"])
|
||||||
|
+ SEPOL_LIBS="-lsepol"])
|
||||||
|
+
|
||||||
|
+ dnl -- init pkgconfig if required
|
||||||
|
+ if test x$PKGCONFIG_INIT != x1; then
|
||||||
|
+ pkg_config_init
|
||||||
|
+ fi
|
||||||
|
+ PKG_CHECK_MODULES(SELINUX, libselinux, [
|
||||||
|
+ SELINUX_PC="libselinux"
|
||||||
|
+ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
|
||||||
|
+ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
|
||||||
|
+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
|
||||||
|
+ ],[
|
||||||
|
+ dnl -- old non-pkgconfig method, is buggy with static builds
|
||||||
|
|
||||||
|
AC_CHECK_LIB([selinux], [is_selinux_enabled], [
|
||||||
|
AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
|
||||||
|
AC_CHECK_HEADERS([selinux/label.h])
|
||||||
|
AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
|
||||||
|
- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
|
||||||
|
+ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
|
||||||
|
SELINUX_PC="libselinux"
|
||||||
|
HAVE_SELINUX=yes ], [
|
||||||
|
AC_MSG_WARN(Disabling selinux)
|
||||||
|
SELINUX_LIBS=
|
||||||
|
SELINUX_PC=
|
||||||
|
HAVE_SELINUX=no ])
|
||||||
|
+ ])
|
||||||
|
fi
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
@@ -1927,6 +1942,7 @@
|
||||||
|
################################################################################
|
||||||
|
AC_SUBST(APPLIB)
|
||||||
|
AC_SUBST(AWK)
|
||||||
|
+AC_SUBST(BLKID_STATIC_LIBS)
|
||||||
|
AC_SUBST(BLKID_PC)
|
||||||
|
AC_SUBST(BUILD_CMIRRORD)
|
||||||
|
AC_SUBST(BUILD_DMEVENTD)
|
||||||
|
@@ -2037,6 +2053,7 @@
|
||||||
|
AC_SUBST(SALCK_LIBS)
|
||||||
|
AC_SUBST(SBINDIR)
|
||||||
|
AC_SUBST(SELINUX_LIBS)
|
||||||
|
+AC_SUBST(SELINUX_STATIC_LIBS)
|
||||||
|
AC_SUBST(SELINUX_PC)
|
||||||
|
AC_SUBST(SYSCONFDIR)
|
||||||
|
AC_SUBST(SYSTEMD_LIBS)
|
||||||
|
@@ -2053,6 +2070,7 @@
|
||||||
|
AC_SUBST(CACHE_DUMP_CMD)
|
||||||
|
AC_SUBST(CACHE_REPAIR_CMD)
|
||||||
|
AC_SUBST(CACHE_RESTORE_CMD)
|
||||||
|
+AC_SUBST(UDEV_STATIC_LIBS)
|
||||||
|
AC_SUBST(UDEV_PC)
|
||||||
|
AC_SUBST(UDEV_RULES)
|
||||||
|
AC_SUBST(UDEV_SYNC)
|
||||||
|
--- LVM2.2.02.178/make.tmpl.in
|
||||||
|
+++ LVM2.2.02.178/make.tmpl.in
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
|
||||||
|
LIBS = @LIBS@
|
||||||
|
# Extra libraries always linked with static binaries
|
||||||
|
-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
|
||||||
|
+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
|
||||||
|
DEFS += @DEFS@
|
||||||
|
# FIXME set this only where it's needed, not globally?
|
||||||
|
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
||||||
|
@@ -75,10 +75,13 @@
|
||||||
|
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||||
|
READLINE_LIBS = @READLINE_LIBS@
|
||||||
|
SELINUX_LIBS = @SELINUX_LIBS@
|
||||||
|
+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
|
||||||
|
UDEV_CFLAGS = @UDEV_CFLAGS@
|
||||||
|
UDEV_LIBS = @UDEV_LIBS@
|
||||||
|
+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
|
||||||
|
BLKID_CFLAGS = @BLKID_CFLAGS@
|
||||||
|
BLKID_LIBS = @BLKID_LIBS@
|
||||||
|
+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
|
||||||
|
SYSTEMD_LIBS = @SYSTEMD_LIBS@
|
||||||
|
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
|
||||||
|
|
||||||
+72
@@ -0,0 +1,72 @@
|
|||||||
|
From a397b69ce33d811aba7d64d54b5c8e0efb86fd15 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
||||||
|
Date: Fri, 10 May 2019 14:40:11 +0200
|
||||||
|
Subject: [PATCH] metadata: allow reading metadata with invalid creation_time
|
||||||
|
|
||||||
|
lvm2 till version 2.02.169 (commit 78d004efa8a1809cea68283e6204edfa9d7c1091)
|
||||||
|
was printing invalid creation_time argument into metadata on 32bit arch.
|
||||||
|
|
||||||
|
However with commit ba9820b14223b731125c83dbc9709aa44fdcdbf1 we started
|
||||||
|
to properly validate all input numbers and thus we refused to accept
|
||||||
|
invalid metadata with 'garbage' string - but this results in the
|
||||||
|
situation where metadata produced on older lvm2 on 32 bit architecture
|
||||||
|
will become unreadable after upgrade.
|
||||||
|
|
||||||
|
To fix this case - extend libdm parser in a way, that whenever we
|
||||||
|
find error integer value, we also check if the parsed value is not for
|
||||||
|
creation_time node and in this case we let the metadata pass through
|
||||||
|
with made-up date 2018-05-24 (release date of 2.02.169).
|
||||||
|
---
|
||||||
|
libdm/libdm-config.c | 18 +++++++++++++++---
|
||||||
|
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libdm/libdm-config.c b/libdm/libdm-config.c
|
||||||
|
index 3f0d2510e..382f86bbf 100644
|
||||||
|
--- a/libdm/libdm-config.c
|
||||||
|
+++ b/libdm/libdm-config.c
|
||||||
|
@@ -51,6 +51,8 @@ struct parser {
|
||||||
|
|
||||||
|
struct dm_pool *mem;
|
||||||
|
int no_dup_node_check; /* whether to disable dup node checking */
|
||||||
|
+ const char *key; /* last obtained key */
|
||||||
|
+ unsigned ignored_creation_time;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct config_output {
|
||||||
|
@@ -176,7 +178,7 @@ static int _do_dm_config_parse(struct dm_config_tree *cft, const char *start, co
|
||||||
|
/* TODO? if (start == end) return 1; */
|
||||||
|
|
||||||
|
struct parser *p;
|
||||||
|
- if (!(p = dm_pool_alloc(cft->mem, sizeof(*p))))
|
||||||
|
+ if (!(p = dm_pool_zalloc(cft->mem, sizeof(*p))))
|
||||||
|
return_0;
|
||||||
|
|
||||||
|
p->mem = cft->mem;
|
||||||
|
@@ -615,6 +617,7 @@ static struct dm_config_node *_section(struct parser *p, struct dm_config_node *
|
||||||
|
match(TOK_SECTION_E);
|
||||||
|
} else {
|
||||||
|
match(TOK_EQ);
|
||||||
|
+ p->key = root->key;
|
||||||
|
if (!(value = _value(p)))
|
||||||
|
return_NULL;
|
||||||
|
if (root->v)
|
||||||
|
@@ -682,8 +685,17 @@ static struct dm_config_value *_type(struct parser *p)
|
||||||
|
errno = 0;
|
||||||
|
v->v.i = strtoll(p->tb, NULL, 0); /* FIXME: check error */
|
||||||
|
if (errno) {
|
||||||
|
- log_error("Failed to read int token.");
|
||||||
|
- return NULL;
|
||||||
|
+ if (errno == ERANGE && p->key &&
|
||||||
|
+ strcmp("creation_time", p->key) == 0) {
|
||||||
|
+ /* Due to a bug in some older 32bit builds (<2.02.169),
|
||||||
|
+ * lvm was able to produce invalid creation_time string */
|
||||||
|
+ v->v.i = 1527120000; /* Pick 2018-05-24 day instead */
|
||||||
|
+ if (!p->ignored_creation_time++)
|
||||||
|
+ log_warn("WARNING: Invalid creation_time found in metadata (repaired with next metadata update).");
|
||||||
|
+ } else {
|
||||||
|
+ log_error("Failed to read int token.");
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
match(TOK_INT);
|
||||||
|
break;
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
https://bugs.gentoo.org/686652
|
||||||
|
|
||||||
|
--- LVM2.2.02.184/tools/Makefile.in
|
||||||
|
+++ LVM2.2.02.184/tools/Makefile.in
|
||||||
|
@@ -220,6 +220,6 @@
|
||||||
|
echo "/* Do not edit. This file is generated by the Makefile. */" && \
|
||||||
|
echo -en "const char _command_input[] =\n\n\"" && \
|
||||||
|
$(EGREP) -v '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \
|
||||||
|
- echo "\\n\";" \
|
||||||
|
+ printf "%s\n" "\\n\";" \
|
||||||
|
) > $@
|
||||||
|
|
||||||
|
$(SOURCES:%.c=%.d) $(SOURCES2:%.c=%.d): command-lines-input.h command-count.h cmds.h
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
From f98f79a047dd1c4980008e0ed6c9ad4e18596cdc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Rajnoha <prajnoha@redhat.com>
|
||||||
|
Date: Tue, 13 Aug 2019 15:18:30 +0200
|
||||||
|
Subject: [PATCH] udev: remove unsupported OPTIONS+="event_timeout" rule
|
||||||
|
|
||||||
|
The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216,
|
||||||
|
that is ~5 years ago.
|
||||||
|
|
||||||
|
Since systemd/udev version 243, there's a new message printed if unsupported
|
||||||
|
OPTIONS value is used:
|
||||||
|
|
||||||
|
Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666
|
||||||
|
---
|
||||||
|
udev/11-dm-lvm.rules.in | 2 --
|
||||||
|
1 file changed, 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in
|
||||||
|
index 91cb991df9..7c589943b7 100644
|
||||||
|
--- a/udev/11-dm-lvm.rules.in
|
||||||
|
+++ b/udev/11-dm-lvm.rules.in
|
||||||
|
@@ -37,8 +37,6 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHE
|
||||||
|
|
||||||
|
ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
|
||||||
|
|
||||||
|
-OPTIONS+="event_timeout=180"
|
||||||
|
-
|
||||||
|
# Do not create symlinks for inappropriate subdevices.
|
||||||
|
ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable"
|
||||||
|
ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"
|
||||||
|
--
|
||||||
|
2.24.0
|
||||||
|
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
--- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000
|
||||||
|
+++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000
|
||||||
|
@@ -54,7 +54,9 @@
|
||||||
|
DEVRAM=/tmp/initrd.$$
|
||||||
|
|
||||||
|
# set defaults
|
||||||
|
-BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"}
|
||||||
|
+LVM=`which lvm.static`
|
||||||
|
+LVM=${LVM:-"`which lvm`"}
|
||||||
|
+BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"}
|
||||||
|
BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"}
|
||||||
|
BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"}
|
||||||
|
MAKEDEV=${MAKEDEV:-"debian"}
|
||||||
|
@@ -119,6 +121,10 @@
|
||||||
|
echo "$PRE Mounting /proc"
|
||||||
|
mount -t proc none /proc
|
||||||
|
|
||||||
|
+# We need /sys for lvm
|
||||||
|
+echo "$PRE Mounting /sys"
|
||||||
|
+mount -t sysfs sysfs /sys
|
||||||
|
+
|
||||||
|
# plug in modules listed in /etc/modules
|
||||||
|
if [ -f /etc/modules ]; then
|
||||||
|
echo -n "$PRE plugging in kernel modules:"
|
||||||
|
@@ -179,26 +185,29 @@
|
||||||
|
# run a shell if we're passed lvm2rescue on commandline
|
||||||
|
grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
- lvm vgchange --ignorelockingfailure -P -a y
|
||||||
|
+ $LVM vgchange --ignorelockingfailure -P -a y
|
||||||
|
do_shell
|
||||||
|
else
|
||||||
|
- lvm vgchange --ignorelockingfailure -a y
|
||||||
|
+ $LVM vgchange --ignorelockingfailure -a y
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$PRE Mounting root filesystem $rootvol ro"
|
||||||
|
mkdir /rootvol
|
||||||
|
if ! mount -t auto -o ro $rootvol /rootvol; then
|
||||||
|
- echo "\t*FAILED*";
|
||||||
|
+ echo "\t*FAILED TRYING TO MOUNT ROOTVOL*";
|
||||||
|
do_shell
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$PRE Umounting /proc"
|
||||||
|
umount /proc
|
||||||
|
|
||||||
|
+echo "$PRE Umounting /sys"
|
||||||
|
+umount /sys
|
||||||
|
+
|
||||||
|
echo "$PRE Changing roots"
|
||||||
|
cd /rootvol
|
||||||
|
if ! pivot_root . initrd ; then
|
||||||
|
- echo "\t*FAILED*"
|
||||||
|
+ echo "\t*FAILED PIVOT TO NEW ROOT*"
|
||||||
|
do_shell
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -356,7 +365,7 @@
|
||||||
|
fi
|
||||||
|
|
||||||
|
verbose "creating basic set of directories in $TMPMNT"
|
||||||
|
-(cd $TMPMNT; mkdir bin dev etc lib proc sbin var)
|
||||||
|
+(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "$cmd -- ERROR creating directories in $TMPMNT"
|
||||||
|
cleanup 1
|
||||||
|
@@ -499,4 +508,3 @@
|
||||||
|
FINALTXT
|
||||||
|
|
||||||
|
cleanup 0
|
||||||
|
-
|
||||||
Executable → Regular
@@ -0,0 +1,18 @@
|
|||||||
|
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=301331
|
||||||
|
X-Gentoo-Bug: 301331
|
||||||
|
|
||||||
|
diff -Nuar LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd
|
||||||
|
--- LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:44:34.182980475 +0000
|
||||||
|
+++ LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:51:27.636312899 +0000
|
||||||
|
@@ -469,9 +469,9 @@
|
||||||
|
rmdir $TMPMNT/lost+found
|
||||||
|
|
||||||
|
echo "$cmd -- ummounting ram disk"
|
||||||
|
-umount $DEVRAM
|
||||||
|
+umount $TMPMNT
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
- echo "$cmd -- ERROR umounting $DEVRAM"
|
||||||
|
+ echo "$cmd -- ERROR umounting $TMPMNT"
|
||||||
|
cleanup 1
|
||||||
|
fi
|
||||||
|
|
||||||
Executable → Regular
@@ -0,0 +1,11 @@
|
|||||||
|
--- LVM2/make.tmpl.in
|
||||||
|
+++ LVM2/make.tmpl.in
|
||||||
|
@@ -395,7 +395,7 @@
|
||||||
|
( cat $(srcdir)/.exported_symbols; \
|
||||||
|
if test x$(EXPORTED_HEADER) != x; then \
|
||||||
|
$(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \
|
||||||
|
- $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
|
||||||
|
+ LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
|
||||||
|
fi \
|
||||||
|
) > $@
|
||||||
|
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
From ab3ae0a22dfbe20e2d17e7dc60e0f76184ec098c Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Robin H. Johnson" <robbat2@gentoo.org>
|
||||||
|
Date: Wed, 24 Jul 2019 11:22:32 +0200
|
||||||
|
Subject: [PATCH] dmeventd configurable idle exit time
|
||||||
|
|
||||||
|
dmeventd nominally exits after 1 hour of idle time. There are use cases for
|
||||||
|
this, esp. with socket activation, but also cases where users don't expect
|
||||||
|
dmeventd to exit.
|
||||||
|
|
||||||
|
Provide a tuning knob via environment variable, DMEVENTD_IDLE_EXIT_TIMEOUT,
|
||||||
|
that can be -1 to not exit, or a configurable time for different idle exit.
|
||||||
|
|
||||||
|
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
||||||
|
Fixes: https://bugs.gentoo.org/682556
|
||||||
|
|
||||||
|
Forward-ported from 2.02.184 to 2.03.05
|
||||||
|
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||||
|
---
|
||||||
|
daemons/dmeventd/dmeventd.c | 16 ++++++++++++++--
|
||||||
|
man/dmeventd.8_main | 4 ++++
|
||||||
|
2 files changed, 18 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
|
||||||
|
index 33859ef414..ac0b9743fc 100644
|
||||||
|
--- a/daemons/dmeventd/dmeventd.c
|
||||||
|
+++ b/daemons/dmeventd/dmeventd.c
|
||||||
|
@@ -2158,6 +2158,18 @@ int main(int argc, char *argv[])
|
||||||
|
.server_path = DM_EVENT_FIFO_SERVER
|
||||||
|
};
|
||||||
|
time_t now, idle_exit_timeout = DMEVENTD_IDLE_EXIT_TIMEOUT;
|
||||||
|
+
|
||||||
|
+ /* Provide a basic way to config the idle timeout */
|
||||||
|
+ char* idle_exit_timeout_env = getenv("DMEVENTD_IDLE_EXIT_TIMEOUT") ? : NULL;
|
||||||
|
+ if(NULL != idle_exit_timeout_env) {
|
||||||
|
+ char* endptr;
|
||||||
|
+ idle_exit_timeout = strtol(idle_exit_timeout_env, &endptr, 10);
|
||||||
|
+ if (errno == ERANGE || *endptr != '\0') {
|
||||||
|
+ fprintf(stderr, "DMEVENTD_IDLE_EXIT_TIMEOUT: bad time input\n");
|
||||||
|
+ exit(EXIT_FAILURE);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
opterr = 0;
|
||||||
|
optind = 0;
|
||||||
|
|
||||||
|
@@ -2253,7 +2265,7 @@ int main(int argc, char *argv[])
|
||||||
|
_process_initial_registrations();
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
- if (_idle_since) {
|
||||||
|
+ if (_idle_since || _exit_now) {
|
||||||
|
if (_exit_now) {
|
||||||
|
if (_exit_now == DM_SCHEDULED_EXIT)
|
||||||
|
break; /* Only prints shutdown message */
|
||||||
|
@@ -2262,7 +2274,7 @@ int main(int argc, char *argv[])
|
||||||
|
(long) (time(NULL) - _idle_since));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
- if (idle_exit_timeout) {
|
||||||
|
+ if (idle_exit_timeout && idle_exit_timeout > 0) {
|
||||||
|
now = time(NULL);
|
||||||
|
if (now < _idle_since)
|
||||||
|
_idle_since = now; /* clock change? */
|
||||||
|
diff --git a/man/dmeventd.8_main b/man/dmeventd.8_main
|
||||||
|
index dc4abf627e..4b0e522041 100644
|
||||||
|
--- a/man/dmeventd.8_main
|
||||||
|
+++ b/man/dmeventd.8_main
|
||||||
|
@@ -178,6 +178,10 @@ is processed.
|
||||||
|
Variable is set by thin and vdo plugin to prohibit recursive interation
|
||||||
|
with dmeventd by any executed lvm2 command from
|
||||||
|
a thin_command, vdo_command environment.
|
||||||
|
+.TP
|
||||||
|
+.B DMEVENTD_IDLE_EXIT_TIMEOUT
|
||||||
|
+Configure the dmeventd idle exit timeout behavior, value in seconds. Default
|
||||||
|
+is 3600 (1 hour). -1 means do not exit.
|
||||||
|
.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
From 93101699f5e1190184c00c99ab7b6e9717e5019a Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Robin H. Johnson" <robbat2@gentoo.org>
|
||||||
|
Date: Wed, 24 Jul 2019 11:11:35 +0200
|
||||||
|
Subject: [PATCH] Add dynamic static ldflags
|
||||||
|
|
||||||
|
Forward-ported from 2.02.178 to 2.03.05
|
||||||
|
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||||
|
---
|
||||||
|
configure.ac | 2 ++
|
||||||
|
daemons/dmeventd/Makefile.in | 2 +-
|
||||||
|
make.tmpl.in | 1 +
|
||||||
|
tools/Makefile.in | 2 +-
|
||||||
|
4 files changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 1e45c0edcb..cc2625294a 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -33,6 +33,7 @@ case "$host_os" in
|
||||||
|
CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym"
|
||||||
|
# equivalent to -rdynamic
|
||||||
|
ELDFLAGS="-Wl,--export-dynamic"
|
||||||
|
+ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
|
||||||
|
# FIXME Generate list and use --dynamic-list=.dlopen.sym
|
||||||
|
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||||
|
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||||
|
@@ -1758,6 +1759,7 @@ AC_SUBST(SYSCONFDIR)
|
||||||
|
AC_SUBST(SYSTEMD_LIBS)
|
||||||
|
AC_SUBST(SNAPSHOTS)
|
||||||
|
AC_SUBST(STATICDIR)
|
||||||
|
+AC_SUBST(STATIC_LDFLAGS)
|
||||||
|
AC_SUBST(STATIC_LINK)
|
||||||
|
AC_SUBST(TESTSUITE_DATA)
|
||||||
|
AC_SUBST(THIN)
|
||||||
|
diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in
|
||||||
|
index 6bd36d0325..a3c30ec1a0 100644
|
||||||
|
--- a/daemons/dmeventd/Makefile.in
|
||||||
|
+++ b/daemons/dmeventd/Makefile.in
|
||||||
|
@@ -66,7 +66,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o
|
||||||
|
|
||||||
|
dmeventd.static: $(LIB_STATIC) dmeventd.o
|
||||||
|
@echo " [CC] $@"
|
||||||
|
- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
|
||||||
|
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
|
||||||
|
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
|
||||||
|
|
||||||
|
ifeq ("@PKGCONFIG@", "yes")
|
||||||
|
diff --git a/make.tmpl.in b/make.tmpl.in
|
||||||
|
index f3332e91c1..1489c2afad 100644
|
||||||
|
--- a/make.tmpl.in
|
||||||
|
+++ b/make.tmpl.in
|
||||||
|
@@ -68,6 +68,7 @@ DEFS += @DEFS@
|
||||||
|
# FIXME set this only where it's needed, not globally?
|
||||||
|
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
||||||
|
LDFLAGS ?= @LDFLAGS@
|
||||||
|
+STATIC_LDFLAGS += @STATIC_LDFLAGS@
|
||||||
|
CLDFLAGS += @CLDFLAGS@
|
||||||
|
ELDFLAGS += @ELDFLAGS@
|
||||||
|
LDDEPS += @LDDEPS@
|
||||||
|
diff --git a/tools/Makefile.in b/tools/Makefile.in
|
||||||
|
index 2620daa17c..e5fc9c4ae4 100644
|
||||||
|
--- a/tools/Makefile.in
|
||||||
|
+++ b/tools/Makefile.in
|
||||||
|
@@ -136,7 +136,7 @@ man-generator: man-generator.o
|
||||||
|
|
||||||
|
lvm.static: $(OBJECTS) lvm-static.o $(LVMINTERNAL_LIBS)
|
||||||
|
@echo " [CC] $@"
|
||||||
|
- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \
|
||||||
|
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \
|
||||||
|
$(DMEVENT_LIBS) $(STATIC_LIBS) $(LVMLIBS)
|
||||||
|
|
||||||
|
liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
From dbb68df8d02eff87f10df331e17bd0940e158f56 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Robin H. Johnson" <robbat2@gentoo.org>
|
||||||
|
Date: Wed, 24 Jul 2019 11:15:59 +0200
|
||||||
|
Subject: [PATCH] Add pthread to libdevmapper pkgconfig file
|
||||||
|
|
||||||
|
Forward-ported from 2.02.176 to 2.03.05
|
||||||
|
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||||
|
---
|
||||||
|
libdm/libdevmapper.pc.in | 2 +-
|
||||||
|
tools/Makefile.in | 5 +++++
|
||||||
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libdm/libdevmapper.pc.in b/libdm/libdevmapper.pc.in
|
||||||
|
index a325aeb9e0..aa0980378f 100644
|
||||||
|
--- a/libdm/libdevmapper.pc.in
|
||||||
|
+++ b/libdm/libdevmapper.pc.in
|
||||||
|
@@ -9,4 +9,4 @@ Version: @DM_LIB_PATCHLEVEL@
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
Libs: -L${libdir} -ldevmapper
|
||||||
|
Requires.private: @SELINUX_PC@ @UDEV_PC@
|
||||||
|
-Libs.private: -lm @RT_LIBS@
|
||||||
|
+Libs.private: -lm @RT_LIBS@ @PTHREAD_LIBS@
|
||||||
|
diff --git a/tools/Makefile.in b/tools/Makefile.in
|
||||||
|
index e5fc9c4ae4..12e4de2c63 100644
|
||||||
|
--- a/tools/Makefile.in
|
||||||
|
+++ b/tools/Makefile.in
|
||||||
|
@@ -87,6 +87,7 @@ ifeq ("@STATIC_LINK@", "yes")
|
||||||
|
TARGETS += lvm.static
|
||||||
|
INSTALL_LVM_TARGETS += install_tools_static
|
||||||
|
INSTALL_CMDLIB_TARGETS += install_cmdlib_static
|
||||||
|
+ STATIC_LIBS += @PTHREAD_LIBS@
|
||||||
|
endif
|
||||||
|
|
||||||
|
LVMLIBS = $(SYSTEMD_LIBS) -L$(top_builddir)/libdm -ldevmapper $(LIBS) -laio
|
||||||
|
@@ -113,6 +114,10 @@ CFLOW_TARGET = lvm
|
||||||
|
|
||||||
|
include $(top_builddir)/make.tmpl
|
||||||
|
|
||||||
|
+ifeq ("@STATIC_LINK@", "yes")
|
||||||
|
+ STATIC_LIBS += @PTHREAD_LIBS@
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
device-mapper:
|
||||||
|
|
||||||
|
all: device-mapper
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
Executable → Regular
Executable → Regular
+24
-2
@@ -12,17 +12,29 @@
|
|||||||
<IsA>app:console</IsA>
|
<IsA>app:console</IsA>
|
||||||
<Summary>Userland logical volume management tools</Summary>
|
<Summary>Userland logical volume management tools</Summary>
|
||||||
<Description>LVM2 includes all of the support for handling read/write operations physical and logical volumes.</Description>
|
<Description>LVM2 includes all of the support for handling read/write operations physical and logical volumes.</Description>
|
||||||
<Archive sha1sum="35b7358ebefefbf1fceb50bf282c328203248bdb" type="targz">ftp://sources.redhat.com/pub/lvm2/LVM2.2.02.167.tgz</Archive>
|
<Archive sha1sum="7a3834ca1ddaa7c4edc3863f18ec604f45722c65" type="targz">http://mirrors.kernel.org/sourceware/lvm2/LVM2.2.02.186.tgz</Archive>
|
||||||
<BuildDependencies>
|
<BuildDependencies>
|
||||||
<Dependency>libutil-linux-devel</Dependency>
|
<Dependency>libutil-linux-devel</Dependency>
|
||||||
<Dependency>eudev-devel</Dependency>
|
<Dependency>eudev-devel</Dependency>
|
||||||
<Dependency>autoconf-archive</Dependency>
|
<Dependency>autoconf-archive</Dependency>
|
||||||
|
<Dependency>libaio-devel</Dependency>
|
||||||
|
<!-- <Dependency>thin-provisioning-tools</Dependency> -->
|
||||||
</BuildDependencies>
|
</BuildDependencies>
|
||||||
<Patches>
|
<Patches>
|
||||||
<!--<Patch level="1">lvm2-2.02.63-always-make-static-libdm.patch</Patch>
|
<!--<Patch level="1">lvm2-2.02.63-always-make-static-libdm.patch</Patch>
|
||||||
<Patch level="1">lvm2-2.02.92-dynamic-static-ldflags.patch</Patch>
|
<Patch level="1">lvm2-2.02.92-dynamic-static-ldflags.patch</Patch>
|
||||||
<Patch level="1">lvm2-2.02.105-pthread-pkgconfig.patch</Patch>
|
<Patch level="1">lvm2-2.02.105-pthread-pkgconfig.patch</Patch>
|
||||||
<Patch>lvm2-2.02.106-static-pkgconfig-libs.patch</Patch>-->
|
<Patch>lvm2-2.02.106-static-pkgconfig-libs.patch</Patch>-->
|
||||||
|
<!-- <Patch level="1">lvm2-2.03.05-pthread-pkgconfig.patch</Patch> -->
|
||||||
|
<!-- <Patch level="1">lvm2-2.03.05-dynamic-static-ldflags.patch</Patch> -->
|
||||||
|
<!-- <Patch level="1">lvm2-2.03.05-dmeventd-no-idle-exit.patch</Patch> -->
|
||||||
|
<Patch level="1">lvm2-2.02.178-static-pkgconfig-libs.patch</Patch>
|
||||||
|
<Patch level="1">lvm2-2.02.56-lvm2create_initrd.patch</Patch>
|
||||||
|
<Patch level="1">lvm2-2.02.67-createinitrd.patch</Patch>
|
||||||
|
<Patch level="1">lvm2-2.02.99-locale-muck.patch</Patch>
|
||||||
|
<Patch level="1">lvm2-2.02.171-static-libm.patch</Patch>
|
||||||
|
<Patch level="1">lvm2-2.02.166-HPPA-no-O_DIRECT.patch</Patch>
|
||||||
|
<Patch level="1">lvm2-2.02.184-mksh_build.patch</Patch>
|
||||||
</Patches>
|
</Patches>
|
||||||
</Source>
|
</Source>
|
||||||
|
|
||||||
@@ -54,7 +66,7 @@
|
|||||||
<Description>Device-mapper-devel contains files needed to develop applications that use the device-mapper libraries.</Description>
|
<Description>Device-mapper-devel contains files needed to develop applications that use the device-mapper libraries.</Description>
|
||||||
<RuntimeDependencies>
|
<RuntimeDependencies>
|
||||||
<Dependency release="current" >device-mapper</Dependency>
|
<Dependency release="current" >device-mapper</Dependency>
|
||||||
<Dependency>eudev-devel</Dependency>
|
<Dependency>eudev-devel</Dependency>
|
||||||
</RuntimeDependencies>
|
</RuntimeDependencies>
|
||||||
<Files>
|
<Files>
|
||||||
<Path fileType="header">/usr/include/libdevmapper.h</Path>
|
<Path fileType="header">/usr/include/libdevmapper.h</Path>
|
||||||
@@ -73,6 +85,9 @@
|
|||||||
<Path fileType="executable">/usr/sbin/dmeventd</Path>
|
<Path fileType="executable">/usr/sbin/dmeventd</Path>
|
||||||
<Path fileType="library">/usr/lib/libdevmapper-event.a</Path>
|
<Path fileType="library">/usr/lib/libdevmapper-event.a</Path>
|
||||||
<Path fileType="library">/usr/lib/libdevmapper-event.so*</Path>
|
<Path fileType="library">/usr/lib/libdevmapper-event.so*</Path>
|
||||||
|
|
||||||
|
<Path fileType="library">/usr/lib/libdevmapper-event-lvm2vdo.so</Path>
|
||||||
|
<Path fileType="library">/usr/lib/device-mapper/libdevmapper-event-lvm2vdo.so</Path>
|
||||||
<Path fileType="library">/usr/lib/libdevmapper-event-lvm2thin.so</Path>
|
<Path fileType="library">/usr/lib/libdevmapper-event-lvm2thin.so</Path>
|
||||||
<Path fileType="library">/usr/lib/device-mapper/libdevmapper-event-lvm2thin.so</Path>
|
<Path fileType="library">/usr/lib/device-mapper/libdevmapper-event-lvm2thin.so</Path>
|
||||||
<Path fileType="man">/usr/share/man/man8/dmeventd.8</Path>
|
<Path fileType="man">/usr/share/man/man8/dmeventd.8</Path>
|
||||||
@@ -189,6 +204,13 @@
|
|||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
<History>
|
<History>
|
||||||
|
<Update release="5">
|
||||||
|
<Date>2019-12-26</Date>
|
||||||
|
<Version>2.02.186</Version>
|
||||||
|
<Comment>Version bump</Comment>
|
||||||
|
<Name>Kamil Atlı</Name>
|
||||||
|
<Email>suvarice@pisilinux.org</Email>
|
||||||
|
</Update>
|
||||||
<Update release="4">
|
<Update release="4">
|
||||||
<Date>2018-07-23</Date>
|
<Date>2018-07-23</Date>
|
||||||
<Version>2.02.167</Version>
|
<Version>2.02.167</Version>
|
||||||
|
|||||||
Executable → Regular
Reference in New Issue
Block a user