diff options
author | Marc Schiffbauer <mschiff@gentoo.org> | 2017-01-02 01:16:38 +0100 |
---|---|---|
committer | Marc Schiffbauer <mschiff@gentoo.org> | 2017-01-02 01:17:14 +0100 |
commit | 54c9e81337a454689d400a290d416f4590d32c97 (patch) | |
tree | d88995318de5f5ec88c4678642584cd219890085 /sys-cluster/sanlock | |
parent | a406d1eebaee39daa7b2fcdaeac0da5b6c4c42fe (diff) | |
download | gentoo-54c9e81337a454689d400a290d416f4590d32c97.tar.gz gentoo-54c9e81337a454689d400a290d416f4590d32c97.tar.xz |
sys-cluster/sanlock: added new package
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-cluster/sanlock')
-rw-r--r-- | sys-cluster/sanlock/Manifest | 1 | ||||
-rw-r--r-- | sys-cluster/sanlock/files/sanlock.initd | 9 | ||||
-rw-r--r-- | sys-cluster/sanlock/files/wdmd.initd | 12 | ||||
-rw-r--r-- | sys-cluster/sanlock/metadata.xml | 12 | ||||
-rw-r--r-- | sys-cluster/sanlock/sanlock-3.4.0.ebuild | 83 |
5 files changed, 117 insertions, 0 deletions
diff --git a/sys-cluster/sanlock/Manifest b/sys-cluster/sanlock/Manifest new file mode 100644 index 00000000000..7a3cd9cb52e --- /dev/null +++ b/sys-cluster/sanlock/Manifest @@ -0,0 +1 @@ +DIST sanlock-3.4.0.tar.xz 157016 SHA256 b4b18eb0af1bfc730a037f9da7dd84777c9a4ceb1a1ac2e577705124c4c9e891 SHA512 8a10faaa5b9ce9f0506ca16620ad482804c9ca860b84a60a6f0b525a256059229a202163d366a57fb59169c0f4f822ced570b42562e412747f6f716509341f19 WHIRLPOOL 500ccc9ab323bed28fc6b65dbdc04588deae03d3bb500ab623b9b922c436db896b793965bf4e780800138cd780d4fb659a952dc064bb01065e629c69062c330e diff --git a/sys-cluster/sanlock/files/sanlock.initd b/sys-cluster/sanlock/files/sanlock.initd new file mode 100644 index 00000000000..30a5c1e56fd --- /dev/null +++ b/sys-cluster/sanlock/files/sanlock.initd @@ -0,0 +1,9 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +pidfile="/var/run/snlock.pid" +command="/usr/sbin/snlock" +command_args="daemon ${SANLOCKOPTS:-"-U sanlock -G sanlock"}" + diff --git a/sys-cluster/sanlock/files/wdmd.initd b/sys-cluster/sanlock/files/wdmd.initd new file mode 100644 index 00000000000..70140f00fde --- /dev/null +++ b/sys-cluster/sanlock/files/wdmd.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +pidfile="/var/run/wdmd.pid" +command="/usr/sbin/wdmd" +command_args="${WDMDOPTS:-"-G sanlock"}" + +start_pre() { + $command -p || exit 1 +} diff --git a/sys-cluster/sanlock/metadata.xml b/sys-cluster/sanlock/metadata.xml new file mode 100644 index 00000000000..f854e201fab --- /dev/null +++ b/sys-cluster/sanlock/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mschiff@gentoo.org</email> + <name>Marc Schiffbauer</name> + </maintainer> + <maintainer type="project"> + <email>cluster@gentoo.org</email> + <name>Gentoo Cluster Project</name> + </maintainer> +</pkgmetadata> diff --git a/sys-cluster/sanlock/sanlock-3.4.0.ebuild b/sys-cluster/sanlock/sanlock-3.4.0.ebuild new file mode 100644 index 00000000000..9e0358e91bd --- /dev/null +++ b/sys-cluster/sanlock/sanlock-3.4.0.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5} ) +inherit linux-info python-r1 systemd user + +DESCRIPTION="shared storage lock manager" +HOMEPAGE="https://fedorahosted.org/sanlock/" +SRC_URI="https://git.fedorahosted.org/cgit/${PN}.git/snapshot/${P}.tar.xz" + +LICENSE="LGPL-2+ GPL-2 GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="python" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND=" + sys-apps/util-linux + python? ( ${PYTHON_DEPS} ) +" +RDEPEND="${DEPEND}" + +pkg_setup() { + local warning="You need to have CONFIG_SOFT_WATCHDOG enabled in your kernel for wdmd" + if linux_config_exists; then + if ! linux_chkconfig_present SOFT_WATCHDOG; then + ewarn "" + ewarn "$warning" + ewarn "" + fi + else + ewarn "" + ewarn "Could not be checked automatically: $warning" + ewarn "" + fi +} + +pkg_preinst() { + enewuser sanlock + enewgroup sanlock +} + +src_compile() { + for d in wdmd src fence_sanlock reset; do + cd $d; emake; cd .. + done + if use python; then + cd python; python_foreach_impl emake; cd .. + fi +} + +src_install() { + for d in wdmd src fence_sanlock reset; do + cd $d; emake DESTDIR="${D}" LIBDIR="${EROOT}usr/$(get_libdir)" install; cd .. + done + if use python; then + cd python; python_foreach_impl emake DESTDIR="${D}" install; cd .. + 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 + systemd_newunit init.d/wdmd.service.native wdmd.service + systemd_dounit init.d/sanlk-resetd.service + #systemd_dounit ${FILESDIR}/fence_sanlockd.service +} |