Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/multipath-tools/
Date: Wed, 02 Aug 2017 06:35:19
Message-Id: 1501655711.1135f7811bd9d5c1ba2ae36070e20c69b1dff07f.polynomial-c@gentoo
1 commit: 1135f7811bd9d5c1ba2ae36070e20c69b1dff07f
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 2 06:28:38 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 2 06:35:11 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1135f781
7
8 sys-fs/multipath-tools: Revbump to fix bug #624884
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 .../multipath-tools-0.6.4-r1.ebuild | 99 ++++++++++++++++++++++
14 1 file changed, 99 insertions(+)
15
16 diff --git a/sys-fs/multipath-tools/multipath-tools-0.6.4-r1.ebuild b/sys-fs/multipath-tools/multipath-tools-0.6.4-r1.ebuild
17 new file mode 100644
18 index 00000000000..652a8f6a1a6
19 --- /dev/null
20 +++ b/sys-fs/multipath-tools/multipath-tools-0.6.4-r1.ebuild
21 @@ -0,0 +1,99 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit linux-info systemd toolchain-funcs udev vcs-snapshot toolchain-funcs
28 +
29 +DESCRIPTION="Device mapper target autoconfig"
30 +HOMEPAGE="http://christophe.varoqui.free.fr/"
31 +SRC_URI="http://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=${PV};sf=tgz -> ${P}.tar.gz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
36 +IUSE="systemd rbd"
37 +
38 +RDEPEND=">=sys-fs/lvm2-2.02.45
39 + >=virtual/udev-171
40 + dev-libs/libaio
41 + dev-libs/userspace-rcu
42 + sys-libs/readline:0=
43 + rbd? ( sys-cluster/ceph )
44 + systemd? ( sys-apps/systemd )"
45 +DEPEND="${RDEPEND}
46 + virtual/pkgconfig"
47 +
48 +CONFIG_CHECK="~DM_MULTIPATH"
49 +
50 +PATCHES=(
51 + # modprobe fails when modules are compiled statically into the kernel
52 + # https://www.redhat.com/archives/dm-devel/2017-January/msg00043.html
53 + "${FILESDIR}"/${PN}-0.6.2-ignore-modprobe-failures.patch
54 +
55 + # https://bugs.gentoo.org/show_bug.cgi?id=604228
56 + # https://www.redhat.com/archives/dm-devel/2017-January/msg00022.html
57 + "${FILESDIR}"/${P}-sysmacros.patch
58 +)
59 +
60 +get_systemd_pv() {
61 + use systemd && \
62 + $(tc-getPKG_CONFIG) --modversion systemd
63 +}
64 +
65 +pkg_pretend() {
66 + linux-info_pkg_setup
67 +}
68 +
69 +pkg_setup() {
70 + linux-info_pkg_setup
71 +}
72 +
73 +src_prepare() {
74 + default
75 +
76 + # Fix for bug #624884
77 + if grep -qF DM_TABLE_STATE kpartx/kpartx.rules ; then
78 + sed '/DM_TABLE_STATE/d' -i kpartx/kpartx.rules || die
79 + else
80 + elog "DM_TABLE_STATE sed hack is no longer necessary."
81 + fi
82 +
83 + # The upstream lacks any way to configure the build at present
84 + # and ceph is a huge dependency, so we're using sed to make it
85 + # optional until the upstream has a proer configure system
86 + if ! use rbd ; then
87 + sed -i -e "s/libcheckrbd.so/# libcheckrbd.so/" libmultipath/checkers/Makefile
88 + sed -i -e "s/-lrados//" libmultipath/checkers/Makefile
89 + fi
90 +}
91 +
92 +src_compile() {
93 + # LIBDM_API_FLUSH involves grepping files in /usr/include,
94 + # so force the test to go the way we want #411337.
95 + emake \
96 + CC="$(tc-getCC)" \
97 + LIBDM_API_FLUSH=1 SYSTEMD="$(get_systemd_pv)"
98 +}
99 +
100 +src_install() {
101 + dodir /sbin /usr/share/man/man{5,8}
102 + emake \
103 + DESTDIR="${D}" \
104 + SYSTEMD=$(get_systemd_pv) \
105 + unitdir="$(systemd_get_systemunitdir)" \
106 + libudevdir='${prefix}'/"$(get_udevdir)" \
107 + install
108 +
109 + newinitd "${FILESDIR}"/rc-multipathd multipathd
110 + newinitd "${FILESDIR}"/multipath.rc multipath
111 +
112 + einstalldocs
113 +}
114 +
115 +pkg_postinst() {
116 + if [[ -z ${REPLACING_VERSIONS} ]]; then
117 + elog "If you need multipath on your system, you must"
118 + elog "add 'multipath' into your boot runlevel!"
119 + fi
120 +}