diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-03-28 07:43:39 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-03-28 07:44:06 +0200 |
commit | cbf1cd6e78ddaa5ac07a2ce681dadcbe2ecbd731 (patch) | |
tree | 6ee025977113a1a6ae322f2596953c2159810c6c /package/lvm/patches | |
parent | c26bc99715d56cb4b50d3557ac14855307746f7c (diff) |
lvm: fix cross-compile on Darwin
Diffstat (limited to 'package/lvm/patches')
-rw-r--r-- | package/lvm/patches/patch-Makefile_in | 20 | ||||
-rw-r--r-- | package/lvm/patches/patch-conf_Makefile_in | 23 | ||||
-rw-r--r-- | package/lvm/patches/patch-configure_in | 45 | ||||
-rw-r--r-- | package/lvm/patches/patch-lib_mm_memlock_c | 12 | ||||
-rw-r--r-- | package/lvm/patches/patch-libdm_Makefile_in | 39 | ||||
-rw-r--r-- | package/lvm/patches/patch-make_tmpl_in | 28 | ||||
-rw-r--r-- | package/lvm/patches/patch-scripts_Makefile_in | 12 | ||||
-rw-r--r-- | package/lvm/patches/patch-tools_Makefile_in | 50 | ||||
-rw-r--r-- | package/lvm/patches/patch-tools_lvmcmdline_c | 10 |
9 files changed, 221 insertions, 18 deletions
diff --git a/package/lvm/patches/patch-Makefile_in b/package/lvm/patches/patch-Makefile_in new file mode 100644 index 000000000..81729e780 --- /dev/null +++ b/package/lvm/patches/patch-Makefile_in @@ -0,0 +1,20 @@ +--- LVM2.2.02.168.orig/Makefile.in 2016-12-01 00:17:28.000000000 +0100 ++++ LVM2.2.02.168/Makefile.in 2017-03-27 20:43:17.000000000 +0200 +@@ -18,7 +18,7 @@ top_builddir = @top_builddir@ + abs_top_builddir = @abs_top_builddir@ + abs_top_srcdir = @abs_top_srcdir@ + +-SUBDIRS = conf daemons include lib libdaemon libdm man scripts tools ++SUBDIRS = conf daemons include lib libdaemon libdm scripts tools + + ifeq ("@UDEV_RULES@", "yes") + SUBDIRS += udev +@@ -67,7 +67,7 @@ liblvm.device-mapper: include.device-map + daemons.device-mapper: libdm.device-mapper + tools.device-mapper: libdm.device-mapper + scripts.device-mapper: include.device-mapper +-device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper ++device-mapper: tools.device-mapper daemons.device-mapper + + ifeq ("@INTL@", "yes") + lib.pofile: include.pofile diff --git a/package/lvm/patches/patch-conf_Makefile_in b/package/lvm/patches/patch-conf_Makefile_in new file mode 100644 index 000000000..5b910dba7 --- /dev/null +++ b/package/lvm/patches/patch-conf_Makefile_in @@ -0,0 +1,23 @@ +--- LVM2.2.02.168.orig/conf/Makefile.in 2016-12-01 00:17:28.000000000 +0100 ++++ LVM2.2.02.168/conf/Makefile.in 2017-03-27 19:47:20.000000000 +0200 +@@ -37,14 +37,16 @@ generate: + + install_conf: $(CONFSRC) + @if [ ! -e $(confdir)/$(CONFDEST) ]; then \ +- echo "$(INSTALL_WDATA) -D $< $(confdir)/$(CONFDEST)"; \ +- $(INSTALL_WDATA) -D $< $(confdir)/$(CONFDEST); \ ++ echo "$(INSTALL_WDATA) $< $(confdir)/$(CONFDEST)"; \ ++ $(INSTALL_DIR) $(confdir); \ ++ $(INSTALL_WDATA) $< $(confdir)/$(CONFDEST); \ + fi + + install_localconf: $(CONFLOCAL) + @if [ ! -e $(confdir)/$(CONFLOCAL) ]; then \ +- echo "$(INSTALL_WDATA) -D $< $(confdir)/$(CONFLOCAL)"; \ +- $(INSTALL_WDATA) -D $< $(confdir)/$(CONFLOCAL); \ ++ echo "$(INSTALL_WDATA) $< $(confdir)/$(CONFLOCAL)"; \ ++ $(INSTALL_DIR) $(confdir); \ ++ $(INSTALL_WDATA) $< $(confdir)/$(CONFLOCAL); \ + fi + + install_profiles: $(PROFILES) diff --git a/package/lvm/patches/patch-configure_in b/package/lvm/patches/patch-configure_in new file mode 100644 index 000000000..6e1148c11 --- /dev/null +++ b/package/lvm/patches/patch-configure_in @@ -0,0 +1,45 @@ +--- LVM2.2.02.168.orig/configure.in 2016-12-01 00:17:28.000000000 +0100 ++++ LVM2.2.02.168/configure.in 2017-03-26 19:18:57.000000000 +0200 +@@ -28,7 +28,7 @@ AC_CANONICAL_TARGET([]) + + AS_IF([test -z "$CFLAGS"], [COPTIMISE_FLAG="-O2"]) + case "$host_os" in +- linux*) ++ *) + CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" + ELDFLAGS="-Wl,--export-dynamic" + # FIXME Generate list and use --dynamic-list=.dlopen.sym +@@ -48,21 +48,6 @@ case "$host_os" in + FSADM=yes + BLKDEACTIVATE=yes + ;; +- darwin*) +- CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" +- CLDFLAGS="$CLDFLAGS" +- ELDFLAGS= +- CLDWHOLEARCHIVE="-all_load" +- CLDNOWHOLEARCHIVE= +- LIB_SUFFIX=dylib +- DEVMAPPER=yes +- ODIRECT=no +- DM_IOCTLS=no +- SELINUX=no +- CLUSTER=none +- FSADM=no +- BLKDEACTIVATE=no +- ;; + esac + + ################################################################################ +@@ -106,10 +91,8 @@ AC_CHECK_HEADERS([assert.h ctype.h diren + AC_CHECK_HEADERS(termios.h sys/statvfs.h sys/timerfd.h linux/magic.h linux/fiemap.h) + + case "$host_os" in +- linux*) ++ *) + AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;; +- darwin*) +- AC_CHECK_HEADERS(machine/endian.h sys/disk.h,,AC_MSG_ERROR(bailing out)) ;; + esac + + ################################################################################ diff --git a/package/lvm/patches/patch-lib_mm_memlock_c b/package/lvm/patches/patch-lib_mm_memlock_c index 8cc6d8514..bfbc8910d 100644 --- a/package/lvm/patches/patch-lib_mm_memlock_c +++ b/package/lvm/patches/patch-lib_mm_memlock_c @@ -1,14 +1,14 @@ ---- LVM2.2.02.114.orig/lib/mm/memlock.c 2014-11-29 00:07:42.000000000 +0100 -+++ LVM2.2.02.114/lib/mm/memlock.c 2015-02-28 09:44:51.000000000 +0100 +--- LVM2.2.02.168.orig/lib/mm/memlock.c 2016-12-01 00:17:29.000000000 +0100 ++++ LVM2.2.02.168/lib/mm/memlock.c 2017-03-26 19:05:36.000000000 +0200 @@ -25,7 +25,6 @@ #include <sys/mman.h> #include <sys/time.h> #include <sys/resource.h> -#include <malloc.h> - #ifndef DEVMAPPER_SUPPORT - -@@ -134,10 +133,8 @@ static void _touch_memory(void *mem, siz + #ifdef HAVE_VALGRIND + #include <valgrind.h> +@@ -151,10 +150,8 @@ static void _touch_memory(void *mem, siz static void _allocate_memory(void) { #ifndef VALGRIND_POOL @@ -20,7 +20,7 @@ /* Check if we could preallocate requested stack */ if ((getrlimit (RLIMIT_STACK, &limit) == 0) && -@@ -146,50 +143,13 @@ static void _allocate_memory(void) +@@ -163,50 +160,13 @@ static void _allocate_memory(void) _touch_memory(stack_mem, _size_stack); /* FIXME else warn user setting got ignored */ diff --git a/package/lvm/patches/patch-libdm_Makefile_in b/package/lvm/patches/patch-libdm_Makefile_in index 2f1ade6c4..4943fab06 100644 --- a/package/lvm/patches/patch-libdm_Makefile_in +++ b/package/lvm/patches/patch-libdm_Makefile_in @@ -1,8 +1,8 @@ ---- LVM2.2.02.106.orig/libdm/Makefile.in 2014-04-10 17:38:45.000000000 +0200 -+++ LVM2.2.02.106/libdm/Makefile.in 2014-05-24 12:42:42.819190264 +0200 -@@ -39,10 +39,7 @@ INCLUDES += @VALGRIND_CFLAGS@ - endif - CFLAGS += $(UDEV_CFLAGS) +--- LVM2.2.02.168.orig/libdm/Makefile.in 2016-12-01 00:17:30.000000000 +0100 ++++ LVM2.2.02.168/libdm/Makefile.in 2017-03-27 20:24:52.000000000 +0200 +@@ -38,10 +38,7 @@ SOURCES =\ + + INCLUDES = -I$(srcdir)/$(interface) -ifeq ("@STATIC_LINK@", "yes") LIB_STATIC = $(interface)/libdevmapper.a @@ -10,8 +10,8 @@ - LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_DM) - TARGETS += libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION) -@@ -71,9 +68,7 @@ libdevmapper.$(LIB_SUFFIX) libdevmapper. + TARGETS = libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION) +@@ -69,9 +66,7 @@ libdevmapper.$(LIB_SUFFIX) libdevmapper. INSTALL_TYPE = install_dynamic @@ -22,3 +22,28 @@ ifeq ("@PKGCONFIG@", "yes") INSTALL_TYPE += install_pkgconfig +@@ -82,7 +77,8 @@ install: $(INSTALL_TYPE) install_include + install_device-mapper: install + + install_include: $(srcdir)/libdevmapper.h +- $(INSTALL_DATA) -D $< $(includedir)/$(<F) ++ $(INSTALL_DIR) $(includedir) ++ $(INSTALL_DATA) $< $(includedir)/$(<F) + + install_dynamic: install_@interface@ + +@@ -91,10 +87,12 @@ install_static: install_@interface@_stat + install_ioctl: install_lib_shared + + install_pkgconfig: libdevmapper.pc +- $(INSTALL_DATA) -D $< $(pkgconfigdir)/devmapper.pc ++ $(INSTALL_DIR) $(pkgconfigdir) ++ $(INSTALL_DATA) $< $(pkgconfigdir)/devmapper.pc + + install_ioctl_static: $(LIB_STATIC) +- $(INSTALL_DATA) -D $< $(usrlibdir)/$(<F) ++ $(INSTALL_DIR) $(usrlibdir) ++ $(INSTALL_DATA) $< $(usrlibdir)/$(<F) + + CLEAN_TARGETS += ioctl/libdevmapper.a + DISTCLEAN_TARGETS += libdevmapper.pc diff --git a/package/lvm/patches/patch-make_tmpl_in b/package/lvm/patches/patch-make_tmpl_in new file mode 100644 index 000000000..71ed5df66 --- /dev/null +++ b/package/lvm/patches/patch-make_tmpl_in @@ -0,0 +1,28 @@ +--- LVM2.2.02.168.orig/make.tmpl.in 2016-12-01 00:17:30.000000000 +0100 ++++ LVM2.2.02.168/make.tmpl.in 2017-03-27 20:32:53.000000000 +0200 +@@ -437,7 +437,8 @@ $(LIB_SHARED): $(LIB_SHARED).$(LIB_VERSI + CLEAN_TARGETS += $(LDDEPS) .exported_symbols_generated + + install_lib_shared: $(LIB_SHARED) +- $(INSTALL_PROGRAM) -D $< $(libdir)/$(<F).$(LIB_VERSION) ++ $(INSTALL_DIR) $(libdir) ++ $(INSTALL_PROGRAM) $< $(libdir)/$(<F).$(LIB_VERSION) + $(INSTALL_DIR) $(usrlibdir) + $(LN_S) -f $(USRLIB_RELPATH)$(<F).$(LIB_VERSION) $(usrlibdir)/$(<F) + +@@ -445,11 +446,13 @@ install_lib_shared: $(LIB_SHARED) + # and for compatibility links in libdir are created + # when the code is fixed links could be removed. + install_dm_plugin: $(LIB_SHARED) +- $(INSTALL_PROGRAM) -D $< $(libdir)/device-mapper/$(<F) ++ $(INSTALL_DIR) $(libdir) ++ $(INSTALL_PROGRAM) $< $(libdir)/device-mapper/$(<F) + $(LN_S) -f device-mapper/$(<F) $(libdir)/$(<F) + + install_lvm2_plugin: $(LIB_SHARED) +- $(INSTALL_PROGRAM) -D $< $(libdir)/lvm2/$(<F) ++ $(INSTALL_DIR) $(libdir) ++ $(INSTALL_PROGRAM) $< $(libdir)/lvm2/$(<F) + $(LN_S) -f lvm2/$(<F) $(libdir)/$(<F) + $(LN_S) -f $(<F) $(libdir)/$(<F).$(LIB_VERSION) + endif diff --git a/package/lvm/patches/patch-scripts_Makefile_in b/package/lvm/patches/patch-scripts_Makefile_in new file mode 100644 index 000000000..af1cea8cb --- /dev/null +++ b/package/lvm/patches/patch-scripts_Makefile_in @@ -0,0 +1,12 @@ +--- LVM2.2.02.168.orig/scripts/Makefile.in 2016-12-01 00:17:31.000000000 +0100 ++++ LVM2.2.02.168/scripts/Makefile.in 2017-03-27 20:49:38.000000000 +0200 +@@ -51,7 +51,8 @@ vpath %.sh $(srcdir) + vpath %.ocf $(srcdir) + + %_install: %.sh +- $(INSTALL_PROGRAM) -D $< $(sbindir)/$(basename $(<F)) ++ $(INSTALL_DIR) $(sbindir) ++ $(INSTALL_PROGRAM) $< $(sbindir)/$(basename $(<F)) + + %_install: %.ocf + $(INSTALL_DIR) $(ocf_scriptdir) diff --git a/package/lvm/patches/patch-tools_Makefile_in b/package/lvm/patches/patch-tools_Makefile_in new file mode 100644 index 000000000..9e420a8b7 --- /dev/null +++ b/package/lvm/patches/patch-tools_Makefile_in @@ -0,0 +1,50 @@ +--- LVM2.2.02.168.orig/tools/Makefile.in 2016-12-01 00:17:32.000000000 +0100 ++++ LVM2.2.02.168/tools/Makefile.in 2017-03-28 03:03:30.000000000 +0200 +@@ -182,18 +182,22 @@ endif + install_dmsetup_dynamic install_dmsetup_static + + install_cmdlib_include: $(srcdir)/lvm2cmd.h +- $(INSTALL_DATA) -D $< $(includedir)/$(<F) ++ $(INSTALL_DIR) $(includedir) ++ $(INSTALL_DATA) $< $(includedir)/$(<F) + + install_cmdlib_dynamic: liblvm2cmd.$(LIB_SUFFIX) +- $(INSTALL_PROGRAM) -D $< $(libdir)/$(<F).$(LIB_VERSION) ++ $(INSTALL_DIR) $(libdir) ++ $(INSTALL_PROGRAM) $< $(libdir)/$(<F).$(LIB_VERSION) + $(INSTALL_DIR) $(usrlibdir) + $(LN_S) -f $(USRLIB_RELPATH)$(<F).$(LIB_VERSION) $(usrlibdir)/$(<F) + + install_cmdlib_static: liblvm2cmd-static.a +- $(INSTALL_DATA) -D $< $(usrlibdir)/liblvm2cmd.a ++ $(INSTALL_DIR) $(usrlibdir) ++ $(INSTALL_DATA) $< $(usrlibdir)/liblvm2cmd.a + + install_tools_dynamic: lvm .commands +- $(INSTALL_PROGRAM) -D lvm $(sbindir)/lvm ++ $(INSTALL_DIR) $(sbindir) ++ $(INSTALL_PROGRAM) lvm $(sbindir)/lvm + @echo Creating symbolic links for individual commands in $(sbindir) + @for v in `cat .commands`; do \ + echo "$(LN_S) -f lvm $(sbindir)/$$v"; \ +@@ -201,14 +205,17 @@ install_tools_dynamic: lvm .commands + done; + + install_tools_static: lvm.static +- $(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F) ++ $(INSTALL_DIR) $(staticdir) ++ $(INSTALL_PROGRAM) $< $(staticdir)/$(<F) + + install_dmsetup_dynamic: dmsetup +- $(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F) ++ $(INSTALL_DIR) $(sbindir) ++ $(INSTALL_PROGRAM) $< $(sbindir)/$(<F) + $(LN_S) -f $(<F) $(sbindir)/dmstats + + install_dmsetup_static: dmsetup.static +- $(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F) ++ $(INSTALL_DIR) $(staticdir) ++ $(INSTALL_PROGRAM) $< $(staticdir)/$(<F) + $(LN_S) -f $(<F) $(sbindir)/dmstats + + install_device-mapper: $(INSTALL_DMSETUP_TARGETS) diff --git a/package/lvm/patches/patch-tools_lvmcmdline_c b/package/lvm/patches/patch-tools_lvmcmdline_c index df9a068cd..715abd951 100644 --- a/package/lvm/patches/patch-tools_lvmcmdline_c +++ b/package/lvm/patches/patch-tools_lvmcmdline_c @@ -1,6 +1,6 @@ ---- LVM2.2.02.114.orig/tools/lvmcmdline.c 2014-11-29 00:07:43.000000000 +0100 -+++ LVM2.2.02.114/tools/lvmcmdline.c 2015-02-28 09:27:09.000000000 +0100 -@@ -1536,9 +1536,12 @@ int lvm_split(char *str, int *argc, char +--- LVM2.2.02.168.orig/tools/lvmcmdline.c 2016-12-01 00:17:32.000000000 +0100 ++++ LVM2.2.02.168/tools/lvmcmdline.c 2017-03-26 19:05:36.000000000 +0200 +@@ -1816,9 +1816,12 @@ int lvm_split(char *str, int *argc, char static int _check_standard_fds(void) { int err = is_valid_fd(STDERR_FILENO); @@ -14,7 +14,7 @@ if (err) perror("stdin stream open"); else -@@ -1548,7 +1551,7 @@ static int _check_standard_fds(void) +@@ -1828,7 +1831,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDOUT_FILENO) && @@ -23,7 +23,7 @@ if (err) perror("stdout stream open"); /* else no stdout */ -@@ -1556,7 +1559,7 @@ static int _check_standard_fds(void) +@@ -1836,7 +1839,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDERR_FILENO) && |