Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/multipath-tools/, sys-fs/multipath-tools/files/
Date: Mon, 20 Sep 2021 04:12:52
Message-Id: 1632111151.a71d4395773257f18b8b61624bf006097b072c92.sam@gentoo
1 commit: a71d4395773257f18b8b61624bf006097b072c92
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 20 04:12:31 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 20 04:12:31 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a71d4395
7
8 sys-fs/multipath-tools: add 0.8.7
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-fs/multipath-tools/Manifest | 1 +
13 .../multipath-tools-0.8.7-respect-flags.patch | 14 ++++
14 .../multipath-tools/multipath-tools-0.8.7.ebuild | 89 ++++++++++++++++++++++
15 3 files changed, 104 insertions(+)
16
17 diff --git a/sys-fs/multipath-tools/Manifest b/sys-fs/multipath-tools/Manifest
18 index 8ccd861e78f..0a206de7b65 100644
19 --- a/sys-fs/multipath-tools/Manifest
20 +++ b/sys-fs/multipath-tools/Manifest
21 @@ -1 +1,2 @@
22 DIST multipath-tools-0.8.6.tar.gz 519405 BLAKE2B 5aed36550c76bbde0e874e37356b6c5a80a80b876b56dadb69ce09f0fb049a7097fd1c0aca5076f816848e2c2660f96680d7f16d56918a25299017b39f76f777 SHA512 82e5b7307e599ba6b059679c3987a442fb5be4885f0a27c260a99a07cb336b88d48e314b4ec951944e0200e4731522d8da043d98fa566857ecc6d100791c0e38
23 +DIST multipath-tools-0.8.7.tar.gz 523535 BLAKE2B 3f59af86f5b9f9ea524bf0c36e4a4bc3e01f557f2e18486b5278fe10e3bcf10dbc7568768c0e95529885bcdca6bcf04021ad5261bd1e6a3aeae5eb95b9d54801 SHA512 c01aea837b13429d17688455b813947342ca1cabba19b22e13ce640c77e68335a6d410280a8298595e239131e6fcbb655fa6de5ff9857eac99aa175046a450cd
24
25 diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.8.7-respect-flags.patch b/sys-fs/multipath-tools/files/multipath-tools-0.8.7-respect-flags.patch
26 new file mode 100644
27 index 00000000000..43c03883ee0
28 --- /dev/null
29 +++ b/sys-fs/multipath-tools/files/multipath-tools-0.8.7-respect-flags.patch
30 @@ -0,0 +1,14 @@
31 +--- a/Makefile.inc
32 ++++ b/Makefile.inc
33 +@@ -101,8 +101,9 @@ OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4
34 + WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \
35 + -Werror=implicit-function-declaration -Werror=format-security \
36 + $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS)
37 +-CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
38 +-CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
39 ++CPPFLAGS ?= -Wp,-D_FORTIFY_SOURCE=2
40 ++CFLAGS ?= --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe
41 ++CFLAGS += --std=gnu99 \
42 + -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
43 + -MMD -MP
44 + BIN_CFLAGS = -fPIE -DPIE
45
46 diff --git a/sys-fs/multipath-tools/multipath-tools-0.8.7.ebuild b/sys-fs/multipath-tools/multipath-tools-0.8.7.ebuild
47 new file mode 100644
48 index 00000000000..b078cc97d9d
49 --- /dev/null
50 +++ b/sys-fs/multipath-tools/multipath-tools-0.8.7.ebuild
51 @@ -0,0 +1,89 @@
52 +# Copyright 1999-2021 Gentoo Authors
53 +# Distributed under the terms of the GNU General Public License v2
54 +
55 +EAPI="7"
56 +
57 +inherit linux-info systemd toolchain-funcs udev
58 +
59 +DESCRIPTION="Device mapper target autoconfig"
60 +HOMEPAGE="http://christophe.varoqui.free.fr/"
61 +SRC_URI="https://github.com/opensvc/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
62 +
63 +LICENSE="GPL-2"
64 +SLOT="0"
65 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
66 +IUSE="systemd rbd test"
67 +RESTRICT="!test? ( test )"
68 +
69 +RDEPEND="
70 + dev-libs/json-c:=
71 + dev-libs/libaio
72 + dev-libs/userspace-rcu:=
73 + >=sys-fs/lvm2-2.02.45
74 + >=virtual/libudev-232-r3
75 + sys-libs/readline:0=
76 + rbd? ( sys-cluster/ceph )
77 + systemd? ( sys-apps/systemd )
78 +"
79 +DEPEND="${RDEPEND}
80 + test? ( dev-util/cmocka )"
81 +BDEPEND="virtual/pkgconfig"
82 +
83 +CONFIG_CHECK="~DM_MULTIPATH"
84 +
85 +PATCHES=(
86 + "${FILESDIR}"/${PN}-0.8.7-respect-flags.patch
87 + "${FILESDIR}"/${PN}-0.8.6-no-compress-man-pages.patch
88 +)
89 +
90 +src_prepare() {
91 + default
92 +
93 + # The upstream lacks any way to configure the build at present
94 + # and ceph is a huge dependency, so we're using sed to make it
95 + # optional until the upstream has a proper configure system
96 + if ! use rbd ; then
97 + sed \
98 + -e "s/libcheckrbd.so/# libcheckrbd.so/" \
99 + -e "s/-lrados//" \
100 + -i libmultipath/checkers/Makefile \
101 + || die
102 + fi
103 +}
104 +
105 +src_compile() {
106 + tc-export CC
107 +
108 + # LIBDM_API_FLUSH involves grepping files in /usr/include,
109 + # so force the test to go the way we want #411337.
110 + emake \
111 + LIB="${EPREFIX}/$(get_libdir)" \
112 + LIBDM_API_FLUSH=1 \
113 + PKGCONFIG="$(tc-getPKG_CONFIG)"
114 +}
115 +
116 +src_install() {
117 + dodir /sbin /usr/share/man/man{3,5,8}
118 + emake \
119 + DESTDIR="${D}" \
120 + LIB="${EPREFIX}/$(get_libdir)" \
121 + RUN=run \
122 + unitdir="$(systemd_get_systemunitdir)" \
123 + libudevdir='${prefix}'/"$(get_udevdir)" \
124 + pkgconfdir='${prefix}'/usr/'${LIB}'/pkgconfig \
125 + install
126 +
127 + newinitd "${FILESDIR}"/multipathd-r1.rc multipathd
128 + newinitd "${FILESDIR}"/multipath.rc multipath
129 +
130 + einstalldocs
131 +
132 + find "${ED}" -type f -name "*.la" -delete || die
133 +}
134 +
135 +pkg_postinst() {
136 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
137 + elog "If you need multipath on your system, you must"
138 + elog "add 'multipath' into your boot runlevel!"
139 + fi
140 +}