summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2025-03-28 14:36:31 +0100
committerMarc Schiffbauer <mschiff@gentoo.org>2025-03-28 14:37:15 +0100
commita1f02c72655d7b77d36f16db0f628c91b4866c10 (patch)
tree7ea1f72971b98883ecba4dfcf83cc9066b692099
parentd4c3a8ceea7b8a98c811c2899e6a842819b1902d (diff)
downloadgentoo-a1f02c72655d7b77d36f16db0f628c91b4866c10.tar.gz
gentoo-a1f02c72655d7b77d36f16db0f628c91b4866c10.tar.bz2
gentoo-a1f02c72655d7b77d36f16db0f628c91b4866c10.zip
sys-cluster/sanlock: add py3.13
Closes: https://bugs.gentoo.org/952732 Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org>
-rw-r--r--sys-cluster/sanlock/sanlock-3.8.5-r1.ebuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/sys-cluster/sanlock/sanlock-3.8.5-r1.ebuild b/sys-cluster/sanlock/sanlock-3.8.5-r1.ebuild
new file mode 100644
index 000000000000..69b184570572
--- /dev/null
+++ b/sys-cluster/sanlock/sanlock-3.8.5-r1.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit flag-o-matic linux-info python-r1 systemd
+
+DESCRIPTION="shared storage lock manager"
+HOMEPAGE="https://pagure.io/sanlock"
+SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2+ GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="python"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ dev-libs/libaio
+ sys-apps/util-linux
+ python? ( ${PYTHON_DEPS} )
+"
+RDEPEND="
+ acct-user/${PN}
+ acct-group/${PN}
+ ${DEPEND}
+"
+BDEPEND="sys-apps/which"
+
+PATCHES=(
+ "${FILESDIR}/sanlock-fence_sanlock-LDFLAGS.patch"
+ "${FILESDIR}/sanlock-3.8.4-implicit-func-decls.patch"
+)
+
+CONFIG_CHECK="~SOFT_WATCHDOG"
+
+src_compile() {
+ # -Werror=lto-type-mismatch
+ # https://bugs.gentoo.org/863734
+ # https://pagure.io/sanlock/issue/10
+ filter-lto
+
+ for d in wdmd src fence_sanlock reset; do
+ emake -C ${d}
+ done
+
+ if use python; then
+ python_foreach_impl emake -C python
+ fi
+}
+
+src_install() {
+ for d in wdmd src fence_sanlock reset; do
+ emake -C ${d} DESTDIR="${D}" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
+ done
+
+ if use python; then
+ python_foreach_impl emake -C python DESTDIR="${D}" install
+ fi
+
+ # config
+ dodir /etc/wdmd.d
+ dodir /etc/sanlock
+ insinto /etc/sanlock
+ doins src/sanlock.conf
+
+ # init
+ newconfd init.d/sanlock.sysconfig sanlock
+ newconfd init.d/wdmd.sysconfig wdmd
+ newinitd "${FILESDIR}"/sanlock.initd sanlock
+ newinitd "${FILESDIR}"/wdmd.initd wdmd
+ #doinitd ${FILESDIR}/sanlk-resetd.initd
+ #doinitd ${FILESDIR}/fence_sanlockd.initd
+
+ # systemd
+ systemd_newunit init.d/sanlock.service.native sanlock.service
+ sed -i 's,^ExecStartPre=,#ExecStartPre=,' init.d/wdmd.service.native || die
+ systemd_newunit init.d/wdmd.service.native wdmd.service
+ systemd_dounit init.d/sanlk-resetd.service
+ #systemd_dounit ${FILESDIR}/fence_sanlockd.service
+}