diff options
author | 2024-04-30 09:02:25 -0500 | |
---|---|---|
committer | 2024-04-30 09:02:25 -0500 | |
commit | e4ffaa7044363e01337c9f9e1e243dea66667bcd (patch) | |
tree | bb751138d015e135f102ede83d62fc14d82d2dc1 | |
parent | patches/libgcrypt: update for 1.10.3 (diff) | |
download | genkernel-e4ffaa7044363e01337c9f9e1e243dea66667bcd.tar.gz genkernel-e4ffaa7044363e01337c9f9e1e243dea66667bcd.tar.bz2 genkernel-e4ffaa7044363e01337c9f9e1e243dea66667bcd.zip |
patches/lvm: update for 2.03.22
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
10 files changed, 296 insertions, 0 deletions
diff --git a/patches/lvm/2.03.22/lvm2-001-example.conf.in.patch b/patches/lvm/2.03.22/lvm2-001-example.conf.in.patch new file mode 100644 index 0000000..b63b681 --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-001-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/patches/lvm/2.03.22/lvm2-002-always-make-static-libdm.patch b/patches/lvm/2.03.22/lvm2-002-always-make-static-libdm.patch new file mode 100644 index 0000000..5ddcb4e --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-002-always-make-static-libdm.patch @@ -0,0 +1,42 @@ +diff -Nuar --exclude '*~' LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in LVM2.2.02.63/daemons/dmeventd/Makefile.in +--- LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in 2010-04-09 14:42:48.000000000 -0700 ++++ LVM2.2.02.63/daemons/dmeventd/Makefile.in 2010-04-19 11:53:27.000000000 -0700 +@@ -28,11 +28,12 @@ + INSTALL_LIB_TARGETS = install_lib_dynamic + + LIB_NAME = libdevmapper-event ++LIB_STATIC = $(LIB_NAME).a ++INSTALL_LIB_TARGETS += install_lib_static ++TARGETS += $(LIB_STATIC) + ifeq ("@STATIC_LINK@", "yes") +- LIB_STATIC = $(LIB_NAME).a +- TARGETS += $(LIB_STATIC) dmeventd.static ++ TARGETS += dmeventd.static + INSTALL_DMEVENTD_TARGETS += install_dmeventd_static +- INSTALL_LIB_TARGETS += install_lib_static + endif + + LIB_VERSION = $(LIB_VERSION_DM) +diff -Nuar --exclude '*~' LVM2.2.02.63.orig/libdm/Makefile.in LVM2.2.02.63/libdm/Makefile.in +--- LVM2.2.02.63.orig/libdm/Makefile.in 2010-04-09 14:42:51.000000000 -0700 ++++ LVM2.2.02.63/libdm/Makefile.in 2010-04-19 11:52:20.000000000 -0700 +@@ -34,8 +34,8 @@ + + INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir) + +-ifeq ("@STATIC_LINK@", "yes") + LIB_STATIC = $(interface)/libdevmapper.a ++ifeq ("@STATIC_LINK@", "yes") + endif + + LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX) +@@ -63,8 +63,8 @@ + + INSTALL_TYPE = install_dynamic + +-ifeq ("@STATIC_LINK@", "yes") + INSTALL_TYPE += install_static ++ifeq ("@STATIC_LINK@", "yes") + endif + + ifeq ("@PKGCONFIG@", "yes") diff --git a/patches/lvm/2.03.22/lvm2-003-lvm2create_initrd.patch b/patches/lvm/2.03.22/lvm2-003-lvm2create_initrd.patch new file mode 100644 index 0000000..59aaa9b --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-003-lvm2create_initrd.patch @@ -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 +- diff --git a/patches/lvm/2.03.22/lvm2-004-createinitrd.patch b/patches/lvm/2.03.22/lvm2-004-createinitrd.patch new file mode 100644 index 0000000..7f0bfb8 --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-004-createinitrd.patch @@ -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 + diff --git a/patches/lvm/2.03.22/lvm2-005-locale-muck.patch b/patches/lvm/2.03.22/lvm2-005-locale-muck.patch new file mode 100644 index 0000000..fe7ec87 --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-005-locale-muck.patch @@ -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 \ + ) > $@ + diff --git a/patches/lvm/2.03.22/lvm2-011-HPPA-no-O_DIRECT.patch b/patches/lvm/2.03.22/lvm2-011-HPPA-no-O_DIRECT.patch new file mode 100644 index 0000000..0f830e4 --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-011-HPPA-no-O_DIRECT.patch @@ -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 diff --git a/patches/lvm/2.03.22/lvm2-013-fix-stdio-usage.patch b/patches/lvm/2.03.22/lvm2-013-fix-stdio-usage.patch new file mode 100644 index 0000000..8f3835e --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-013-fix-stdio-usage.patch @@ -0,0 +1,22 @@ +diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c +index 2256352..0408808 100644 +--- a/lib/commands/toolcontext.c ++++ b/lib/commands/toolcontext.c +@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd, + /* FIXME Make this configurable? */ + reset_lvm_errno(1); + +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + /* Set in/out stream buffering before glibc */ + if (set_buffering + #ifdef SYS_gettid +@@ -2043,7 +2043,7 @@ void destroy_toolcontext(struct cmd_context *cmd) + dm_hash_destroy(cmd->cft_def_hash); + + dm_device_list_destroy(&cmd->cache_dm_devs); +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + if (cmd->linebuffer) { + /* Reset stream buffering to defaults */ + if (is_valid_fd(STDIN_FILENO) && diff --git a/patches/lvm/2.03.22/lvm2-014-make-malloc-realloc-check-optional.patch b/patches/lvm/2.03.22/lvm2-014-make-malloc-realloc-check-optional.patch new file mode 100644 index 0000000..a5bd48a --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-014-make-malloc-realloc-check-optional.patch @@ -0,0 +1,23 @@ +Breaks cross-compilation + +--- a/configure.ac ++++ b/configure.ac +@@ -154,15 +154,16 @@ AC_FUNC_CLOSEDIR_VOID + AC_FUNC_CHOWN + AC_FUNC_FORK + AC_FUNC_LSTAT +-AC_FUNC_MALLOC + AC_FUNC_MEMCMP + AC_FUNC_MKTIME + AC_FUNC_MMAP +-AC_FUNC_REALLOC + AC_FUNC_STAT + AC_FUNC_STRTOD + AC_FUNC_VPRINTF + ++# Optional functions ++AC_CHECK_FUNCS([malloc realloc]) ++ + ################################################################################ + dnl -- Disable dependency tracking + AC_MSG_CHECKING(whether to enable dependency tracking) diff --git a/patches/lvm/2.03.22/lvm2-016-implement-libc-specific-reopen_stream.patch b/patches/lvm/2.03.22/lvm2-016-implement-libc-specific-reopen_stream.patch new file mode 100644 index 0000000..6034be3 --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-016-implement-libc-specific-reopen_stream.patch @@ -0,0 +1,24 @@ +diff --git a/lib/log/log.c b/lib/log/log.c +index 79fbd7a..0999d10 100644 +--- a/lib/log/log.c ++++ b/lib/log/log.c +@@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_ + * Close and reopen standard stream on file descriptor fd. + */ + int reopen_standard_stream(FILE **stream, const char *mode) ++#ifdef __GLIBC__ + { + int fd, fd_copy, new_fd; + const char *name; +@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) + *stream = new_stream; + return 1; + } ++#else ++{ ++ return (freopen(NULL, mode, *stream) != NULL); ++} ++#endif + + void init_log_fn(lvm2_log_fn_t log_fn) + { diff --git a/patches/lvm/2.03.22/lvm2-018-autoconf-2.72-egrep.patch b/patches/lvm/2.03.22/lvm2-018-autoconf-2.72-egrep.patch new file mode 100644 index 0000000..9ce7d54 --- /dev/null +++ b/patches/lvm/2.03.22/lvm2-018-autoconf-2.72-egrep.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/920798 +https://gitlab.com/lvmteam/lvm2/-/merge_requests/4 + +From 39cb34e56b8c04b4d652eb9dbd643e10a05ff21c Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Mon, 6 Nov 2023 16:44:41 +0800 +Subject: [PATCH] configure.ac: check egrep + +The macro AC_HEADER_STDC which requires AC_PROG_EGREP has been removed +from configure.ac, then it fails to substitute '@EGREP@': + +| [GEN] command-lines-input.h +| /bin/bash: line 2: @EGREP@: command not found +| [GEN] command-count.h + +Call AC_PROG_EGREP to fix the error. + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- a/configure.ac ++++ b/configure.ac +@@ -78,6 +78,7 @@ AC_PROG_LN_S + AC_PROG_MAKE_SET + AC_PROG_MKDIR_P + AC_PROG_RANLIB ++AC_PROG_EGREP + AC_CHECK_TOOL([READELF], [readelf]) + AC_CHECK_TOOL(AR, ar) + AC_PATH_TOOL(CFLOW_CMD, cflow) +-- +GitLab |