From 6790dd4e80e8643dc8d03a16a2e29a3e6ca6031a Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 2 Mar 2026 07:29:56 +0000 Subject: [PATCH] sys-fs/multipath-tools: Sync with Gentoo It's from Gentoo commit 8ff2f54b2437d549c99f998354fa698bb915d1bc. Signed-off-by: Flatcar Buildbot --- .../sys-fs/multipath-tools/Manifest | 1 + .../multipath-tools-0.14.3.ebuild | 107 ++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/multipath-tools/multipath-tools-0.14.3.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/multipath-tools/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/multipath-tools/Manifest index 8a61ea0267..c59e1baaab 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/multipath-tools/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-fs/multipath-tools/Manifest @@ -1 +1,2 @@ +DIST multipath-tools-0.14.3.tar.gz 623654 BLAKE2B b59cb622f50299b3f0c0c6ede89fed5dc3641a8833b57369a1878468912bece7472be226a52d16008f71ac78fedd903d474dfb4d536b0a6e697e4d57edaad25b SHA512 8434396da58636d0f7082fdbca2ee8f1e50c38e39d9c1e00a8a235f18d3bc34973a3d7c6c011ba8a1a48454a3b9366c5a7ccce57d2ddc0ed2decc013a8f9728e DIST multipath-tools-0.9.8.tar.gz 580531 BLAKE2B 66bc6b78795c08b4fe5f4bc718330be51b073dddb597998f384ccaf746c0b9e53e21d674623df03ed7f9ccd9800fe988add8068e0eaaeace076c00395453ba0a SHA512 4d73bcf6bce769a829c306c609b206ddba65a708620f458106e406dd18d12f9a9d97f400662daa8e6a75c9fdf7decb6dcbda92cb807b6c53522c7b4b2795b627 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/multipath-tools/multipath-tools-0.14.3.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/multipath-tools/multipath-tools-0.14.3.ebuild new file mode 100644 index 0000000000..9540fdcd05 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/multipath-tools/multipath-tools-0.14.3.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic linux-info systemd tmpfiles toolchain-funcs udev + +DESCRIPTION="Device mapper target autoconfig" +HOMEPAGE="http://christophe.varoqui.free.fr/" +SRC_URI="https://github.com/opensvc/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +IUSE="systemd test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/json-c:= + dev-libs/libaio + dev-libs/userspace-rcu:= + >=sys-fs/lvm2-2.02.45 + sys-libs/readline:= + >=virtual/libudev-232-r3 + systemd? ( sys-apps/systemd ) +" +DEPEND=" + ${RDEPEND} + test? ( dev-util/cmocka ) +" +BDEPEND="virtual/pkgconfig" + +CONFIG_CHECK="~DM_MULTIPATH" + +myemake() { + local myemakeargs=( + prefix="${EPREFIX}" + usr_prefix="${EPREFIX}/usr" + LIB="$(get_libdir)" + RUN=run + plugindir="${EPREFIX}/$(get_libdir)/multipath" + unitdir="$(systemd_get_systemunitdir)" + libudevdir="${EPREFIX}$(get_udevdir)" + GENTOO_CFLAGS="${CFLAGS}" + GENTOO_CPPFLAGS="${CPPFLAGS}" + FORTIFY_OPT= + OPTFLAGS= + FAKEVAR=1 + WERROR= + V=1 + ) + + if ! use systemd; then + # Bug 956025 + myemakeargs+=( SYSTEMD= ) + fi + + emake "${myemakeargs[@]}" "$@" +} + +src_prepare() { + default + + sed -r -i -e '/^(CPPFLAGS|CFLAGS)\>/s,^(CPPFLAGS|CFLAGS)\>[[:space:]]+:=,\1 := $(GENTOO_\1),' \ + "${S}"/Makefile.inc || die +} + +src_compile() { + tc-export CC + # Breaks with always_inline + filter-flags -fno-semantic-interposition + # Breaks because of use of wrapping (-Wl,-wrap, wrap_*) + # https://github.com/opensvc/multipath-tools/issues/18 + filter-lto + myemake +} + +src_test() { + myemake test +} + +src_install() { + dodir /sbin + + myemake DESTDIR="${ED}" install + + einstalldocs + + newinitd "${FILESDIR}"/multipathd-r1.rc multipathd + newinitd "${FILESDIR}"/multipath.rc multipath + + find "${ED}" -type f -name '*.la' -delete || die +} + +pkg_postinst() { + tmpfiles_process /usr/lib/tmpfiles.d/multipath.conf + udev_reload + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "If you need multipath on your system, you must" + elog "add 'multipath' into your boot runlevel!" + fi +} + +pkg_postrm() { + udev_reload +}