package/multipath-tools: new package
PATCH v4 1/1 package/multipath-tools: new package
--- DEVELOPERS | 3 + package/Config.in | 1 + ...ath-use-pkg-config-to-get-path-to-he.patch | 59 +++++++++++++++++++ ...bmpathpersist-depend-on-libmultipath.patch | 31 ++++++++++ ...3-fix-boolean-value-with-json-c-0.14.patch | 41 +++++++++++++ ...ools-Makefile-add-install-dependency.patch | 34 +++++++++++ package/multipath-tools/Config.in | 31 ++++++++++ package/multipath-tools/S60multipathd | 47 +++++++++++++++ package/multipath-tools/multipath-tools.hash | 3 + package/multipath-tools/multipath-tools.mk | 32 ++++++++++ 10 files changed, 282 insertions(+) create mode 100644 package/multipath-tools/0001-kpartx-libmultipath-use-pkg-config-to-get-path-to-he.patch create mode 100644 package/multipath-tools/0002-libmpathpersist-depend-on-libmultipath.patch create mode 100644 package/multipath-tools/0003-fix-boolean-value-with-json-c-0.14.patch create mode 100644 package/multipath-tools/0004-multipath-tools-Makefile-add-install-dependency.patch create mode 100644 package/multipath-tools/Config.in create mode 100644 package/multipath-tools/S60multipathd create mode 100644 package/multipath-tools/multipath-tools.hash create mode 100644 package/multipath-tools/multipath-tools.mk
DEVELOPERS +3 -0
@@ -142,6 +142,9 @@ F: package/fastd/ F: package/libuecc/ F: package/putty/ +N: Alexander Egorenkov <[email protected]> +F: package/multipath-tools/ + N: Alexander Kurz <[email protected]> F: package/minimodem/
package/Config.in +1 -0
@@ -2392,6 +2392,7 @@ menu "System tools" source "package/mender-grubenv/Config.in" source "package/mfoc/Config.in" source "package/monit/Config.in" + source "package/multipath-tools/Config.in" source "package/ncdu/Config.in" source "package/netifrc/Config.in" source "package/numactl/Config.in"
package/multipath-tools/0001-kpartx-libmultipath-use-pkg-config-to-get-path-to-he.patch new file +59 -0
59 lines not on this page · raw message
package/multipath-tools/0002-libmpathpersist-depend-on-libmultipath.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 48f537b9fef4f9db761466b8951fb63243f06602 Mon Sep 17 00:00:00 2001 +From: Christian Hesse <[email protected]> +Date: Wed, 6 May 2020 09:35:47 +0200 +Subject: [PATCH] libmpathpersist: depend on libmultipath + +Without this the build fails with: + +/usr/bin/ld: cannot find -lmultipath + +Signed-off-by: Christian Hesse <[email protected]> +Signed-off-by: Alexander Egorenkov <[email protected]> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 1dee3680..ba1d73ba 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,7 +28,7 @@ all: $(BUILDDIRS) + $(BUILDDIRS): + $(MAKE) -C $@ + +-multipath multipathd mpathpersist: libmultipath ++libmpathpersist multipath multipathd mpathpersist: libmultipath + mpathpersist: libmpathpersist + + $(BUILDDIRS.clean): +-- +2.28.0 +
package/multipath-tools/0003-fix-boolean-value-with-json-c-0.14.patch new file +41 -0
41 lines not on this page · raw message
package/multipath-tools/0004-multipath-tools-Makefile-add-install-dependency.patch new file +34 -0
@@ -0,0 +1,34 @@ +From ec2b935d2af33651f34de8bd6e428156005c2e3d Mon Sep 17 00:00:00 2001 +From: Martin Wilck <[email protected]> +Date: Tue, 12 May 2020 22:13:51 +0200 +Subject: [PATCH] multipath-tools Makefile: add install dependency + +$(libdir) must exist before running "make install" on prioritizer, checker, +and foreign libraries. + +Cc: Christian Hesse <[email protected]> + +Signed-off-by: Martin Wilck <[email protected]> +Signed-off-by: Alexander Egorenkov <[email protected]> +--- + Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Makefile b/Makefile +index fec3b73b..8bcaba66 100644 +--- a/Makefile ++++ b/Makefile +@@ -32,6 +32,10 @@ libmultipath libdmmp: libmpathcmd + libmpathpersist multipath multipathd: libmultipath + mpathpersist multipathd: libmpathpersist + ++libmultipath/checkers.install \ ++ libmultipath/prioritizers.install \ ++ libmultipath/foreign.install: libmultipath.install ++ + $(BUILDDIRS.clean): + $(MAKE) -C ${@:.clean=} clean + +-- +2.28.0 +
package/multipath-tools/Config.in new file +31 -0
@@ -0,0 +1,31 @@ +comment "multipath-tools needs a uClibc or glibc toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_USES_MUSL + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_MULTIPATH_TOOLS + bool "multipath-tools" + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBURCU + select BR2_PACKAGE_LIBAIO + select BR2_PACKAGE_LVM2 + select BR2_PACKAGE_LVM2_STANDARD_INSTALL + select BR2_PACKAGE_READLINE + help + This package provides the following binaries to drive + the Device Mapper multipathing driver: + * multipath - Device mapper target autoconfig. + * multipathd - Multipath daemon. + * mpathpersist - Manages SCSI persistent reservations on + dm multipath devices. + * kpartx - Create device maps from partition tables. + + https://github.com/openSUSE/multipath-tools
package/multipath-tools/S60multipathd new file +47 -0
47 lines not on this page · raw message
package/multipath-tools/multipath-tools.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed: +sha256 ccd73bf67621161d9e42d1a770c3a7efff6e252433e8b8ed5f64a88cb5e7151d multipath-tools-0.8.4.tar.gz +sha256 b7993225104d90ddd8024fd838faf300bea5e83d91203eab98e29512acebd69c COPYING
package/multipath-tools/multipath-tools.mk new file +32 -0
@@ -0,0 +1,32 @@ +################################################################################ +# +# multipath-tools +# +################################################################################ + +MULTIPATH_TOOLS_VERSION = 0.8.4 +MULTIPATH_TOOLS_SITE = $(call github,openSUSE,multipath-tools,$(MULTIPATH_TOOLS_VERSION)) +MULTIPATH_TOOLS_LICENSE = LGPL-2.0 +MULTIPATH_TOOLS_LICENSE_FILES = COPYING +MULTIPATH_TOOLS_DEPENDENCIES = lvm2 json-c readline udev liburcu libaio host-pkgconf + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +MULTIPATH_TOOLS_DEPENDENCIES += systemd +endif + +define MULTIPATH_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + OPTFLAGS="" STACKPROT="" +endef + +define MULTIPATH_TOOLS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install \ + DESTDIR="$(TARGET_DIR)" +endef + +define MULTIPATH_TOOLS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/multipath-tools/S60multipathd \ + $(TARGET_DIR)/etc/init.d/S60multipathd +endef + +$(eval $(generic-package))
Signature · 1 line
2.28.0
PATCH v4 1/1 package/multipath-tools: new package
Hello Aleksander,
Quoted 1 line · On Sat, 5 Sep 2020 21:20:15 +0200 Alexander Egorenkov…
Signed-off-by Alexander Egorenkov <[email protected]>
Thanks for this new iteration. Unfortunately, it still doesn't build here :-/
I get:
uxsock.c:20:10: fatal error: systemd/sd-daemon.h: No such file or directory
#include <systemd/sd-daemon.h>
^~~~~~~~~~~~~~~~~~~~~compilation terminated.
This is due to how SYSTEMD is detected:
ifndef SYSTEMD
ifeq ($(shell pkg-config --modversion libsystemd >/dev/null 2>&1 && echo 1), 1)
SYSTEMD = $(shell pkg-config --modversion libsystemd)
else
ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1)
SYSTEMD = $(shell systemctl --version 2> /dev/null | \
sed -n 's/systemd \([0-9]*\).*/\1/p')
endif
endifendif
Indeed, if systemd is found using pkg-config, then it falls back to using systemctl.. and since my Fedora uses systemd, the multipath-tools build system thinks it should enable systemd support.. but I don't have systemd enabled in my Buildroot configuration.
And the problem is that there is no way to explicitly disable SYSTEMD support...
Also, there are two other things that we should pass explicitly. If you look at the Makefile, it does this:
ifndef LIB
ifeq ($(shell test -d /lib64 && echo 1),1)
LIB=lib64
else
LIB=lib
endifendif
ifndef RUN
ifeq ($(shell test -L /var/run -o ! -d /var/run && echo 1),1)
RUN=run
else
RUN=var/run
endifendif
So for LIB and RUN, it looks at what exists on the build machine... which doesn't make sense when cross-compiling. So I think we want t pass LIB=lib and RUN=run explicitly.
Could you have a look at the systemd ? Just build a Buildroot configuration without systemd, on a build machine that uses systemd, and you'll get the failure.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v4 1/1 package/multipath-tools: new package
Quoted 48 lines · Thomas Petazzoni
I get:
uxsock.c:20:10: fatal error:
systemd/sd-daemon.h: No such file or directory#include <systemd/sd-daemon.h> ^~~~~~~~~~~~~~~~~~~~~compilation terminated.
This is due to how SYSTEMD is detected:
ifndef SYSTEMD
ifeq ($(shell pkg-config --modversion libsystemd >/dev/null 2>&1 && echo 1), 1) SYSTEMD = $(shell pkg-config --modversion libsystemd) else ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1) SYSTEMD = $(shell systemctl --version 2> /dev/null | \ sed -n 's/systemd \([0-9]*\).*/\1/p') endif endifendif
Indeed, if systemd is found using pkg-config, then it falls back to using systemctl.. and since my Fedora uses systemd, the multipath-tools build system thinks it should enable systemd support.. but I don't have systemd enabled in my Buildroot configuration.
And the problem is that there is no way to explicitly disable SYSTEMD support...
Also, there are two other things that we should pass explicitly. If you look at the
Makefile, it does this:ifndef LIB
ifeq ($(shell test -d /lib64 && echo 1),1) LIB=lib64 else LIB=lib endifendif
ifndef RUN
ifeq ($(shell test -L /var/run -o ! -d /var/run && echo 1),1) RUN=run else RUN=var/run endifendif
Quoted 7 lines
So for LIB and RUN, it looks at what exists on the build machine... which doesn't make sense when cross-compiling. So I think we want t pass LIB=lib and RUN=run explicitly.
Could you have a look at the systemd ? Just build a Buildroot configuration without systemd, on a build machine that uses systemd, and you'll get the failure.
No problem, i'll look into it. I admit i have a machine w/o systemd :) Best to setup fedora Docker container.
Thanks for feedback
Regards
Alex
PATCH v4 1/1 package/multipath-tools: new package
In reply to Thomas PetazzoniQuoted 5 lines
uxsock.c:20:10: fatal error:
systemd/sd-daemon.h: No such file or directory#include <systemd/sd-daemon.h> ^~~~~~~~~~~~~~~~~~~~~compilation terminated.
I can confirm it. It is reproducible inside a Fedora Container with the packages systemd-devel & pkf-config installed. I'll fix it and report back.
Regards
Alex
PATCH v4 1/1 package/multipath-tools: new package
In reply to Thomas PetazzoniHi Thomas,
i fixed all the issues and tested on Fedora 32 with and without systemd enabled. Please check out the 5th iteration of the patch i sent to the mailing list.
Thank you
Regards
Alex