Signed-off-by: Bian Naimeng <bia...@cn.fujitsu.com> --- .../device-mapper-multipath/multipathd.init.patch | 12 +++++ .../device-mapper-multipath_0.5.0.bb | 53 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 meta-cgl-common/recipes-cgl/device-mapper-multipath/device-mapper-multipath/multipathd.init.patch create mode 100644 meta-cgl-common/recipes-cgl/device-mapper-multipath/device-mapper-multipath_0.5.0.bb
diff --git a/meta-cgl-common/recipes-cgl/device-mapper-multipath/device-mapper-multipath/multipathd.init.patch b/meta-cgl-common/recipes-cgl/device-mapper-multipath/device-mapper-multipath/multipathd.init.patch new file mode 100644 index 0000000..84ac0c0 --- /dev/null +++ b/meta-cgl-common/recipes-cgl/device-mapper-multipath/device-mapper-multipath/multipathd.init.patch @@ -0,0 +1,12 @@ +diff -Nurp multipath-tools-0.5.0.orig/multipathd/multipathd.init.debian multipath-tools-0.5.0/multipathd/multipathd.init.debian +--- multipath-tools-0.5.0.orig/multipathd/multipathd.init.debian 2013-12-18 05:40:41.000000000 +0800 ++++ multipath-tools-0.5.0/multipathd/multipathd.init.debian 2014-12-02 15:22:59.171503631 +0800 +@@ -1,7 +1,7 @@ + #!/bin/sh + + PATH=/bin:/usr/bin:/sbin:/usr/sbin +-DAEMON=/usr/bin/multipathd ++DAEMON=/sbin/multipathd + + test -x $DAEMON || exit 0 + diff --git a/meta-cgl-common/recipes-cgl/device-mapper-multipath/device-mapper-multipath_0.5.0.bb b/meta-cgl-common/recipes-cgl/device-mapper-multipath/device-mapper-multipath_0.5.0.bb new file mode 100644 index 0000000..bbdd492 --- /dev/null +++ b/meta-cgl-common/recipes-cgl/device-mapper-multipath/device-mapper-multipath_0.5.0.bb @@ -0,0 +1,53 @@ +SUMMARY = "Tools to manage multipath devices using device-mapper" +DESCRIPTION = "device-mapper-multipath provides tools to manage multipath devices by\ +instructing the device-mapper multipath kernel module what to do.\ +The tools are :\ +* multipath - Scan the system for multipath devices and assemble them.\ +* multipathd - Detects when paths fail and execs multipath to update things." + +HOMEPAGE = "http://christophe.varoqui.free.fr/" +SECTION = "System Environment/Base" +LICENSE = "GPLv2" + +SRC_URI = "http://christophe.varoqui.free.fr/multipath-tools/multipath-tools-0.5.0.tar.bz2 \ + file://multipathd.init.patch" + +SRC_URI[md5sum] = "faf261d4cc717bf4c979557dc7bf5f52" +SRC_URI[sha256sum] = "f13cf1eb84e94e83b2019e68f7965526903c13e94246db43965d181668a0a6f9" + +LIC_FILES_CHKSUM = "file://COPYING;md5=7be2873b6270e45abacc503abbe2aa3d" + +S = "${WORKDIR}/multipath-tools-${PV}" + +DEPENDS = "lvm2 libaio" + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "multipathd.service" +SYSTEMD_AUTO_ENABLE = "enable" + +EXTRA_OEMAKE += "DESTDIR=${D} LIB=${libdir}" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install +} + +do_install_append () { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${S}/multipathd/multipathd.init.debian ${D}${sysconfdir}/init.d/multipathd + + if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/multipathd/multipathd.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/multipathd/multipathd.socket ${D}${systemd_unitdir}/system/ + fi +} + +FILES_${PN} += "${libdir}/ \ + ${base_libdir}/udev/" +FILES_${PN}-dbg += "${libdir}/multipath/.debug/" -- 1.9.1 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto