diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/sanlock |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/sanlock')
-rw-r--r-- | sys-cluster/sanlock/Manifest | 5 | ||||
-rw-r--r-- | sys-cluster/sanlock/files/sanlock.initd | 8 | ||||
-rw-r--r-- | sys-cluster/sanlock/files/wdmd.initd | 11 | ||||
-rw-r--r-- | sys-cluster/sanlock/metadata.xml | 12 | ||||
-rw-r--r-- | sys-cluster/sanlock/sanlock-3.4.0-r1.ebuild | 84 |
5 files changed, 120 insertions, 0 deletions
diff --git a/sys-cluster/sanlock/Manifest b/sys-cluster/sanlock/Manifest new file mode 100644 index 000000000000..47276557673e --- /dev/null +++ b/sys-cluster/sanlock/Manifest @@ -0,0 +1,5 @@ +AUX sanlock.initd 249 SHA256 339371540c4167c7705c1bd1d010c00beb62e4763f6c7a11bd5e83258013093a SHA512 5ed7b2d96cb875e2db0914ec7232fe8443c05de69e07d214ffc0adfafac5123694173373f831c5acf46d11aa4fca304b88e6e4c4ee2fbe5b033d173eea5aec36 WHIRLPOOL 05a4154c0978c0566aa4e0c1f01f15ac835562af882b977d95e64b03d6172fa12c5ba006d428d5db5bf95a2c0c7f266f3a8883be9f5fd1b7a0424d897d19af39 +AUX wdmd.initd 261 SHA256 93bbb7fd52e14ef5285e1f2676d9a5a48b956cda618d3c95061dd641469b8eab SHA512 9c7e980817c1c76868caff229b42a3d70e912abfd8c974bf5b856067bef79fbd3a5942b30bcb7d02869e2eba85e6f6ba3c861e9780046b01b25df1b39661b6c0 WHIRLPOOL dc4e5cbaab1ef1f001874f7f5f99f027a0321fd44a595e74e23ead0fba02225d5da6b099e5edaa58ae330e6cb0f181bc6281851be5132d9eaa0918270d2f74b5 +DIST sanlock-3.4.0.tar.xz 157016 SHA256 b4b18eb0af1bfc730a037f9da7dd84777c9a4ceb1a1ac2e577705124c4c9e891 SHA512 8a10faaa5b9ce9f0506ca16620ad482804c9ca860b84a60a6f0b525a256059229a202163d366a57fb59169c0f4f822ced570b42562e412747f6f716509341f19 WHIRLPOOL 500ccc9ab323bed28fc6b65dbdc04588deae03d3bb500ab623b9b922c436db896b793965bf4e780800138cd780d4fb659a952dc064bb01065e629c69062c330e +EBUILD sanlock-3.4.0-r1.ebuild 2051 SHA256 e2cbf7a94384c29ae15ee7a7e25814f9bef99156dfb36fa395ca025681d15c98 SHA512 35c102a99b0e44073e97cc03e591ac1a1c95a886675b16a90c390414674440cf2d1cf88e52c805d63cbf34d1520f48604e74f32d925841e93aa8bab8b2c9fbcf WHIRLPOOL 0a16d2797b03755347c2185a556526436505b524f168611f8e0175124011a719e9e88cd627a7e9e5aa4985a3972ca5e52c1dea7166b92b02103cb226c8264802 +MISC metadata.xml 368 SHA256 b4e92de3890c887828ee9e71a4bbb69bd98de5e6f5c065bf78b22710dc7ee1a7 SHA512 2cc3ec3c99cfff2e0c576ab6c7b0a39460af875ba826ce0cf3c5a1a4f0f3def6170753c8d42af2fc7a139ad7f2135e309c3165bde83b4e7574292768c96e8086 WHIRLPOOL 6a427e2e2c9fd1d4a002a603487b87b04a1834a8525e9942be1966aeb3595201303550e14252d718db1aa801153e027ee9a5e969a32b728e8ba1451fac568676 diff --git a/sys-cluster/sanlock/files/sanlock.initd b/sys-cluster/sanlock/files/sanlock.initd new file mode 100644 index 000000000000..823e5edf26b8 --- /dev/null +++ b/sys-cluster/sanlock/files/sanlock.initd @@ -0,0 +1,8 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/var/run/sanlock.pid" +command="/usr/sbin/sanlock" +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 000000000000..a87106aaa853 --- /dev/null +++ b/sys-cluster/sanlock/files/wdmd.initd @@ -0,0 +1,11 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 000000000000..f854e201fabf --- /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-r1.ebuild b/sys-cluster/sanlock/sanlock-3.4.0-r1.ebuild new file mode 100644 index 000000000000..a4d7474e909b --- /dev/null +++ b/sys-cluster/sanlock/sanlock-3.4.0-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5} ) +inherit linux-info python-r1 systemd user + +DESCRIPTION="shared storage lock manager" +HOMEPAGE="https://pagure.io/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 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~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() { + enewgroup sanlock + enewuser sanlock -1 -1 -1 sanlock,disk + +} + +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 + sed -i 's,^ExecStartPre=,#ExecStartPre=,' init.d/wdmd.service.native + systemd_newunit init.d/wdmd.service.native wdmd.service + systemd_dounit init.d/sanlk-resetd.service + #systemd_dounit ${FILESDIR}/fence_sanlockd.service +} |