diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2019-11-28 14:43:05 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2019-11-28 14:44:35 -0800 |
commit | 0a7dcaff7c920619ffce4c0195223cbd9db02411 (patch) | |
tree | 781cfc2ac8f7f485a2e63bc6dabeb08db91e3380 /sys-fs/lvm2/files | |
parent | www-apps/zeppelin-bin: version bump. (diff) | |
download | gentoo-0a7dcaff7c920619ffce4c0195223cbd9db02411.tar.gz gentoo-0a7dcaff7c920619ffce4c0195223cbd9db02411.tar.bz2 gentoo-0a7dcaff7c920619ffce4c0195223cbd9db02411.zip |
sys-fs/lvm2: partial revert of 2161b3a104c9a5664131b9297766db0538e7464e
Bug 690494 shows that the regression is still not fixed in 2.02.186-r2,
so 2.02.145-r2 is still required for some users.
Bug: https://bugs.gentoo.org/show_bug.cgi?id=690494
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'sys-fs/lvm2/files')
4 files changed, 324 insertions, 0 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch new file mode 100644 index 000000000000..239694523b3d --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch @@ -0,0 +1,102 @@ +--- LVM2.2.02.129/configure.in ++++ LVM2.2.02.129/configure.in +@@ -1287,6 +1287,7 @@ + fi]) + if test "$BLKID_WIPING" = yes; then + 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.]) + else +@@ -1332,6 +1333,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.]) + fi + +@@ -1558,19 +1560,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 + + ################################################################################ +@@ -1902,6 +1917,7 @@ + ################################################################################ + AC_SUBST(APPLIB) + AC_SUBST(AWK) ++AC_SUBST(BLKID_STATIC_LIBS) + AC_SUBST(BLKID_PC) + AC_SUBST(BUILD_CMIRRORD) + AC_SUBST(BUILD_DMEVENTD) +@@ -2005,6 +2021,7 @@ + AC_SUBST(SALCK_CFLAGS) + AC_SUBST(SALCK_LIBS) + AC_SUBST(SELINUX_LIBS) ++AC_SUBST(SELINUX_STATIC_LIBS) + AC_SUBST(SELINUX_PC) + AC_SUBST(SNAPSHOTS) + AC_SUBST(STATICDIR) +@@ -2020,6 +2037,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.129/make.tmpl.in ++++ LVM2.2.02.129/make.tmpl.in +@@ -43,7 +43,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@ +@@ -58,10 +58,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@ + VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ + TESTING = @TESTING@ + diff --git a/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch new file mode 100644 index 000000000000..11db632e2e7e --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch @@ -0,0 +1,32 @@ +Make sure that libdm usage always brings in pthread libraries, both in +pkgconfig and during manual build. + +--- LVM2.2.02.130/libdm/libdevmapper.pc.in ++++ LVM2.2.02.130/libdm/libdevmapper.pc.in +@@ -9,4 +9,4 @@ + Cflags: -I${includedir} + Libs: -L${libdir} -ldevmapper + Requires.private: @SELINUX_PC@ @UDEV_PC@ +-Libs.private: -lm @RT_LIB@ ++Libs.private: -lm @RT_LIB@ @PTHREAD_LIBS@ +--- LVM2.2.02.130/tools/Makefile.in ++++ LVM2.2.02.130/tools/Makefile.in +@@ -90,6 +90,7 @@ + INSTALL_LVM_TARGETS += install_tools_static + INSTALL_DMSETUP_TARGETS += install_dmsetup_static + INSTALL_CMDLIB_TARGETS += install_cmdlib_static ++ STATIC_LIBS += @PTHREAD_LIBS@ + endif + + LVMLIBS = $(LVMINTERNAL_LIBS) +@@ -120,6 +121,10 @@ + + include $(top_builddir)/make.tmpl + ++ifeq ("@STATIC_LINK@", "yes") ++ STATIC_LIBS += @PTHREAD_LIBS@ ++endif ++ + device-mapper: $(TARGETS_DM) + + CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS) diff --git a/sys-fs/lvm2/files/lvm2-2.02.139-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.139-dynamic-static-ldflags.patch new file mode 100644 index 000000000000..312e546e2403 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.139-dynamic-static-ldflags.patch @@ -0,0 +1,63 @@ +diff -ur LVM2.2.02.139_O/configure.in LVM2.2.02.139/configure.in +--- LVM2.2.02.139_O/configure.in 2016-01-19 12:54:33.155187005 +0000 ++++ LVM2.2.02.139/configure.in 2016-01-19 12:56:39.487181372 +0000 +@@ -31,6 +31,7 @@ + linux*) + CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" + 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" +@@ -2009,6 +2010,7 @@ + AC_SUBST(SELINUX_PC) + AC_SUBST(SNAPSHOTS) + AC_SUBST(STATICDIR) ++AC_SUBST(STATIC_LDFLAGS) + AC_SUBST(STATIC_LINK) + AC_SUBST(TESTING) + AC_SUBST(TESTSUITE_DATA) +diff -ur LVM2.2.02.139_O/daemons/dmeventd/Makefile.in LVM2.2.02.139/daemons/dmeventd/Makefile.in +--- LVM2.2.02.139_O/daemons/dmeventd/Makefile.in 2016-01-19 12:54:33.278186999 +0000 ++++ LVM2.2.02.139/daemons/dmeventd/Makefile.in 2016-01-19 12:57:44.277178484 +0000 +@@ -67,7 +67,7 @@ + $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic + + dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a +- $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \ ++ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \ + dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS) + + ifeq ("@PKGCONFIG@", "yes") +diff -ur LVM2.2.02.139_O/make.tmpl.in LVM2.2.02.139/make.tmpl.in +--- LVM2.2.02.139_O/make.tmpl.in 2016-01-19 12:54:33.529186988 +0000 ++++ LVM2.2.02.139/make.tmpl.in 2016-01-19 12:58:31.514176378 +0000 +@@ -49,6 +49,7 @@ + # FIXME set this only where it's needed, not globally? + CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ + LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@ ++STATIC_LDFLAGS += @STATIC_LDFLAGS@ + CLDFLAGS += @CLDFLAGS@ + ELDFLAGS += @ELDFLAGS@ + LDDEPS += @LDDEPS@ +diff -ur LVM2.2.02.139_O/tools/Makefile.in LVM2.2.02.139/tools/Makefile.in +--- LVM2.2.02.139_O/tools/Makefile.in 2016-01-08 18:51:21.000000000 +0000 ++++ LVM2.2.02.139/tools/Makefile.in 2016-01-19 13:00:08.349172060 +0000 +@@ -129,7 +129,7 @@ + -o $@ dmsetup.o -ldevmapper $(LIBS) + + dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a +- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \ ++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \ + -o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS) + + all: device-mapper +@@ -146,7 +146,7 @@ + endif + + lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a +- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ ++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ + $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) + + liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o diff --git a/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch b/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch new file mode 100644 index 000000000000..f91dccd5c188 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch @@ -0,0 +1,127 @@ +https://bugs.gentoo.org/580062 + +From 2a1d0fa8ea765604cd8274aac5aa7876f1c145c9 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 19 Apr 2016 23:53:22 -0400 +Subject: [PATCH] convert major/minor/makedev handling + +Most of the files in here use MAJOR/MINOR/MKDEV macros, but a few +missed it. Update the defines in those files to match them. +--- + daemons/cmirrord/functions.c | 16 ++++++++++++---- + daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c | 12 ++++++++++-- + lib/filters/filter-sysfs.c | 6 ++++-- + 3 files changed, 26 insertions(+), 8 deletions(-) + +diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c +index e9d3c09..5b3cb38 100644 +--- a/daemons/cmirrord/functions.c ++++ b/daemons/cmirrord/functions.c +@@ -20,6 +20,14 @@ + #include <time.h> + #include <unistd.h> + ++#ifdef __linux__ ++# include "kdev_t.h" ++#else ++# define MAJOR(x) major((x)) ++# define MINOR(x) minor((x)) ++# define MKDEV(x,y) makedev((x),(y)) ++#endif ++ + #define BYTE_SHIFT 3 + + /* +@@ -333,8 +341,8 @@ static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_pat + continue; + } + if (S_ISBLK(statbuf.st_mode) && +- (major(statbuf.st_rdev) == major) && +- (minor(statbuf.st_rdev) == minor)) { ++ (MAJOR(statbuf.st_rdev) == major) && ++ (MINOR(statbuf.st_rdev) == minor)) { + LOG_DBG(" %s: YES", dep->d_name); + if (closedir(dp)) + LOG_DBG("Unable to closedir /dev/mapper %s", +@@ -1451,7 +1459,7 @@ static int disk_status_info(struct log_c *lc, struct dm_ulog_request *rq) + } + + r = sprintf(data, "3 clustered-disk %d:%d %c", +- major(statbuf.st_rdev), minor(statbuf.st_rdev), ++ MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev), + (lc->log_dev_failed) ? 'D' : 'A'); + if (r < 0) + return r; +@@ -1514,7 +1522,7 @@ static int disk_status_table(struct log_c *lc, struct dm_ulog_request *rq) + } + + r = sprintf(data, "clustered-disk %d:%d %u %s%s ", +- major(statbuf.st_rdev), minor(statbuf.st_rdev), ++ MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev), + lc->region_size, + (lc->sync == DEFAULTSYNC) ? "" : + (lc->sync == NOSYNC) ? "nosync " : "sync ", +diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c +index 7b060ed..4098203 100644 +--- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c ++++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c +@@ -20,6 +20,14 @@ + #include <stdarg.h> + #include <pthread.h> + ++#ifdef __linux__ ++# include "kdev_t.h" ++#else ++# define MAJOR(x) major((x)) ++# define MINOR(x) minor((x)) ++# define MKDEV(x,y) makedev((x),(y)) ++#endif ++ + /* First warning when snapshot is 80% full. */ + #define WARNING_THRESH (DM_PERCENT_1 * 80) + /* Run a check every 5%. */ +@@ -148,8 +156,8 @@ static void _umount(const char *device, int major, int minor) + continue; /* can't stat, skip this one */ + + if (S_ISBLK(st.st_mode) && +- major(st.st_rdev) == major && +- minor(st.st_rdev) == minor) { ++ MAJOR(st.st_rdev) == major && ++ MINOR(st.st_rdev) == minor) { + log_error("Unmounting invalid snapshot %s from %s.", device, words[1]); + if (!_run(UMOUNT_COMMAND, "-fl", words[1], NULL)) + log_error("Failed to umount snapshot %s from %s: %s.", +diff --git a/lib/filters/filter-sysfs.c b/lib/filters/filter-sysfs.c +index 3115f86..5f76e8b 100644 +--- a/lib/filters/filter-sysfs.c ++++ b/lib/filters/filter-sysfs.c +@@ -19,6 +19,8 @@ + + #include <dirent.h> + ++#include "kdev_t.h" ++ + static int _locate_sysfs_blocks(const char *sysfs_dir, char *path, size_t len, + unsigned *sysfs_depth) + { +@@ -120,7 +122,7 @@ static struct dev_set *_dev_set_create(struct dm_pool *mem, + + static unsigned _hash_dev(dev_t dev) + { +- return (major(dev) ^ minor(dev)) & (SET_BUCKETS - 1); ++ return (MAJOR(dev) ^ MINOR(dev)) & (SET_BUCKETS - 1); + } + + /* +@@ -171,7 +173,7 @@ static int _parse_dev(const char *file, FILE *fp, dev_t *result) + return 0; + } + +- *result = makedev(major, minor); ++ *result = MKDEV(major, minor); + return 1; + } + +-- +2.7.4 + |