Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/sanlock/
Date: Tue, 19 Oct 2021 05:42:44
Message-Id: 1634622132.a937068f32056abdca67f17d47c534d7716e8dd0.arthurzam@gentoo
1 commit: a937068f32056abdca67f17d47c534d7716e8dd0
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 18 18:23:56 2021 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 19 05:42:12 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a937068f
7
8 sys-cluster/sanlock: add 3.8.4, enable py3.9, enable py3.10
9
10 - EAPI=8
11 - use CONFIG_CHECK for checking kernel option
12 - use cleaner "emake -C" for running make in dir
13
14 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
15
16 sys-cluster/sanlock/Manifest | 1 +
17 sys-cluster/sanlock/sanlock-3.8.4.ebuild | 74 ++++++++++++++++++++++++++++++++
18 2 files changed, 75 insertions(+)
19
20 diff --git a/sys-cluster/sanlock/Manifest b/sys-cluster/sanlock/Manifest
21 index 10286a4b1bf..03cac489bab 100644
22 --- a/sys-cluster/sanlock/Manifest
23 +++ b/sys-cluster/sanlock/Manifest
24 @@ -1 +1,2 @@
25 DIST sanlock-3.8.2.tar.gz 266780 BLAKE2B 5248d08225bcc2a19594a3dcd3872c8c69ca8b217d31f6263f2717e4594180d4ba4685c9679ce2f31b6a2dcb4fe9f3e6a5dd5ac3ed073aea02599e7bbc04390c SHA512 2fa92e16eee4d2f3dac452400522f7e90b93b71349d322564d5957e2d87fb4bd69f0b5617b05f4b296c272d6da9a404fccadbbfff106354a0e302c436593eaac
26 +DIST sanlock-3.8.4.tar.gz 270031 BLAKE2B da011a15d488849d47fe1043df040580652558918dff9549bf4e6cb4077c03b4aaa8f8de5399dbb0e3f2301ae90c0d20599b25bd5e72bae5317b13f79a352333 SHA512 9fca2b18fd3bd504d5186de0b2626ea2c993997528de2384dc042afe52b2b68422a2e4bb79e2409c9e6eccbe5ea8d8939549eb25c5d16aa7fecf6c9a5798340c
27
28 diff --git a/sys-cluster/sanlock/sanlock-3.8.4.ebuild b/sys-cluster/sanlock/sanlock-3.8.4.ebuild
29 new file mode 100644
30 index 00000000000..65418ff6411
31 --- /dev/null
32 +++ b/sys-cluster/sanlock/sanlock-3.8.4.ebuild
33 @@ -0,0 +1,74 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +
39 +PYTHON_COMPAT=( python3_{8..10} )
40 +inherit linux-info python-r1 systemd
41 +
42 +DESCRIPTION="shared storage lock manager"
43 +HOMEPAGE="https://pagure.io/sanlock"
44 +SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.gz"
45 +
46 +LICENSE="LGPL-2+ GPL-2 GPL-2+"
47 +SLOT="0"
48 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
49 +IUSE="python"
50 +
51 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
52 +
53 +DEPEND="
54 + acct-user/${PN}
55 + acct-group/${PN}
56 + dev-libs/libaio
57 + sys-apps/util-linux
58 + python? ( ${PYTHON_DEPS} )
59 +"
60 +RDEPEND="${DEPEND}"
61 +
62 +PATCHES=(
63 + "${FILESDIR}/sanlock-fence_sanlock-LDFLAGS.patch"
64 +)
65 +
66 +CONFIG_CHECK="~SOFT_WATCHDOG"
67 +
68 +src_compile() {
69 + for d in wdmd src fence_sanlock reset; do
70 + emake -C ${d}
71 + done
72 +
73 + if use python; then
74 + python_foreach_impl emake -C python
75 + fi
76 +}
77 +
78 +src_install() {
79 + for d in wdmd src fence_sanlock reset; do
80 + emake -C ${d} DESTDIR="${D}" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
81 + done
82 +
83 + if use python; then
84 + python_foreach_impl emake -C python DESTDIR="${D}" install
85 + fi
86 +
87 + # config
88 + dodir /etc/wdmd.d
89 + dodir /etc/sanlock
90 + insinto /etc/sanlock
91 + doins src/sanlock.conf
92 +
93 + # init
94 + newconfd init.d/sanlock.sysconfig sanlock
95 + newconfd init.d/wdmd.sysconfig wdmd
96 + newinitd "${FILESDIR}"/sanlock.initd sanlock
97 + newinitd "${FILESDIR}"/wdmd.initd wdmd
98 + #doinitd ${FILESDIR}/sanlk-resetd.initd
99 + #doinitd ${FILESDIR}/fence_sanlockd.initd
100 +
101 + # systemd
102 + systemd_newunit init.d/sanlock.service.native sanlock.service
103 + sed -i 's,^ExecStartPre=,#ExecStartPre=,' init.d/wdmd.service.native || die
104 + systemd_newunit init.d/wdmd.service.native wdmd.service
105 + systemd_dounit init.d/sanlk-resetd.service
106 + #systemd_dounit ${FILESDIR}/fence_sanlockd.service
107 +}