diff options
Diffstat (limited to 'sys-fs/lvm2/files')
5 files changed, 190 insertions, 0 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.03.17-dynamic-static-ldflags.patch new file mode 100644 index 000000000000..e3228945a325 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.17-dynamic-static-ldflags.patch @@ -0,0 +1,50 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -32,6 +32,7 @@ + linux*) + # 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" +@@ -1945,6 +1946,7 @@ + AC_SUBST(SYSCONFDIR) + AC_SUBST(SNAPSHOTS) + AC_SUBST(STATICDIR) ++AC_SUBST(STATIC_LDFLAGS) + AC_SUBST(STATIC_LINK) + AC_SUBST(TESTSUITE_DATA) + AC_SUBST(THIN) +--- a/daemons/dmeventd/Makefile.in ++++ b/daemons/dmeventd/Makefile.in +@@ -76,7 +76,7 @@ + + dmeventd.static: $(LIB_STATIC) dmeventd.o + @echo " [CC] $@" +- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static dmeventd.o \ ++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static dmeventd.o \ + -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS) + + ifeq ("@PKGCONFIG@", "yes") +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -64,6 +64,7 @@ + # 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@ +--- a/tools/Makefile.in ++++ b/tools/Makefile.in +@@ -137,7 +137,7 @@ + + lvm.static: $(OBJECTS) lvm-static.o $(LVMINTERNAL_LIBS) + @echo " [CC] $@" +- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \ ++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \ + -o $@ $+ $(LVMLIBS) $(STATIC_LIBS) + + liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.03.17-example.conf.in.patch new file mode 100644 index 000000000000..b63b681e5fab --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.17-example.conf.in.patch @@ -0,0 +1,42 @@ +Add Gentoo specific changes + +--- a/conf/example.conf.in ++++ b/conf/example.conf.in +@@ -170,6 +170,9 @@ + # Example + # Accept every block device: + # filter = [ "a|.*|" ] ++ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel ++ # noise when you probed while not available. ++ filter = [ "r|/dev/nbd.*|", "a|.*|" ] + # Reject the cdrom drive: + # filter = [ "r|/dev/cdrom|" ] + # Work with just loopback devices, e.g. for testing: +@@ -1843,7 +1846,7 @@ + + # Configuration section metadata. + # This configuration section has an automatic default value. +-# metadata { ++metadata { + + # Configuration option metadata/check_pv_device_sizes. + # Check device sizes are not smaller than corresponding PV sizes. +@@ -1888,7 +1891,8 @@ + # + # This configuration option is advanced. + # This configuration option has an automatic default value. +- # pvmetadatacopies = 1 ++ # Gentoo: enable for data safety, but PV resize is then disabled. ++ # pvmetadatacopies = 2 + + # Configuration option metadata/vgmetadatacopies. + # Number of copies of metadata to maintain for each VG. +@@ -1931,7 +1935,7 @@ + # This configuration option is advanced. + # This configuration option has an automatic default value. + # stripesize = 64 +-# } ++} + + # Configuration section report. + # LVM report command output formatting. diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.03.17-locale-muck.patch new file mode 100644 index 000000000000..c672a10e2cf6 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.17-locale-muck.patch @@ -0,0 +1,11 @@ +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -571,7 +571,7 @@ + ( cat $(srcdir)/.exported_symbols; \ + if test -n "$(EXPORTED_HEADER)"; 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 \ + ) > $@ + diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.03.17-pthread-pkgconfig.patch new file mode 100644 index 000000000000..828cf66667b1 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.17-pthread-pkgconfig.patch @@ -0,0 +1,31 @@ +Add pthread to libdevmapper pkgconfig file + +--- a/libdm/libdevmapper.pc.in ++++ b/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_LIBS@ ++Libs.private: -lm @RT_LIBS@ @PTHREAD_LIBS@ +--- a/tools/Makefile.in ++++ b/tools/Makefile.in +@@ -89,6 +89,7 @@ + TARGETS += lvm.static + INSTALL_LVM_TARGETS += install_tools_static + INSTALL_CMDLIB_TARGETS += install_cmdlib_static ++ STATIC_LIBS += @PTHREAD_LIBS@ + endif + + LIB_VERSION = $(LIB_VERSION_LVM) +@@ -114,6 +115,10 @@ + + include $(top_builddir)/make.tmpl + ++ifeq ("@STATIC_LINK@", "yes") ++ STATIC_LIBS += @PTHREAD_LIBS@ ++endif ++ + device-mapper: + + all: device-mapper diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-readelf.patch b/sys-fs/lvm2/files/lvm2-2.03.17-readelf.patch new file mode 100644 index 000000000000..82870b108e09 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.17-readelf.patch @@ -0,0 +1,56 @@ +From 2de7e5c222ff114f41dadcf904061d6c2a77eae2 Mon Sep 17 00:00:00 2001 +From: David Seifert <soap@gentoo.org> +Date: Sat, 19 Nov 2022 17:05:31 +0100 +Subject: [PATCH 1/2] Allow for overriding of `readelf` + +* This allows users to use e.g. `llvm-readelf` on systems with binutils as default. + +Bug: https://bugs.gentoo.org/840628 +--- + configure.ac | 1 + + libdm/Makefile.in | 4 ++-- + libdm/make.tmpl.in | 1 + + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 704772b62..f39c87d08 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,6 +83,7 @@ AC_PROG_LN_S + AC_PROG_MAKE_SET + AC_PROG_MKDIR_P + AC_PROG_RANLIB ++AC_CHECK_TOOL([READELF], [readelf]) + AC_CHECK_TOOL(AR, ar) + AC_PATH_TOOL(CFLOW_CMD, cflow) + AC_PATH_TOOL(CSCOPE_CMD, cscope) +diff --git a/libdm/Makefile.in b/libdm/Makefile.in +index 35115d7f0..2758648e6 100644 +--- a/libdm/Makefile.in ++++ b/libdm/Makefile.in +@@ -71,8 +71,8 @@ libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION): $(LIB_SHAR + # also the older symbol is built-in + .symver_check: $(LIB_SHARED) + @echo " [CHECK] $<" +- $(Q) if readelf -Ws $< | grep -q dm_stats_create_region@@; then \ +- SYM=$$(readelf -Ws $< | grep dm_stats_create_region@DM_1_02_106); \ ++ $(Q) if $(READELF) -Ws $< | grep -q dm_stats_create_region@@; then \ ++ SYM=$$($(READELF) -Ws $< | grep dm_stats_create_region@DM_1_02_106); \ + if test -n "$$SYM"; then touch $@; \ + else echo >&2 "Missing versioned symbols in $<"; false; fi; \ + else touch $@; fi +diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in +index f1c88fac0..095fb028a 100644 +--- a/libdm/make.tmpl.in ++++ b/libdm/make.tmpl.in +@@ -34,6 +34,7 @@ ifeq ($(CC), cc) + endif + + RANLIB = @RANLIB@ ++READELF = @READELF@ + INSTALL = @INSTALL@ + MKDIR_P = @MKDIR_P@ + MSGFMT = @MSGFMT@ +-- +2.38.1 + |