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/csync2 |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/csync2')
-rw-r--r-- | sys-cluster/csync2/Manifest | 7 | ||||
-rw-r--r-- | sys-cluster/csync2/csync2-2.0.ebuild | 107 | ||||
-rw-r--r-- | sys-cluster/csync2/files/csync2.initd | 25 | ||||
-rw-r--r-- | sys-cluster/csync2/files/csync2.xinetd | 15 | ||||
-rw-r--r-- | sys-cluster/csync2/metadata.xml | 8 |
5 files changed, 162 insertions, 0 deletions
diff --git a/sys-cluster/csync2/Manifest b/sys-cluster/csync2/Manifest new file mode 100644 index 000000000000..6e533d0a20c3 --- /dev/null +++ b/sys-cluster/csync2/Manifest @@ -0,0 +1,7 @@ +AUX csync2.initd 492 SHA256 a5be7bd48f86cf3301e3a321ad925f55ed61c2eaa08e19d3911fc2e541a41311 SHA512 a189bdc921efb51734e66f8df808289850c6ce5c60c797c85abb7b3063a45630261a32edced1efd23fe367e8e91e4fe69c3d5e44a10d5b95112ae990e26fa916 WHIRLPOOL 8b2d233db8d5d2c30da1d2c293ab2d168776a4e217d58518a0b603c1408905cb3e6dde670cad59f3d1853f2f803bd7345d078602ad443d92d19f72f5dba55cf2 +AUX csync2.xinetd 388 SHA256 c281d7e494088abd84ef09b5487482cfa886f12aa0ab717f4cb579b729cc7ee9 SHA512 538bb8fc5b6b667a8afd708fbb35c9b1e98967cf0c1e5b139cdd15a19305000fd7fb7eab564131eb7cf3f562ba9189b08a06061aa31ef64e8e85ca13d6f3d583 WHIRLPOOL 35896b35309fd8f99e938d592db2a4f9c3d348bd065e0e9428d9d0f1c3073b5992e77cc04c7655cefbde80cc079b049230dd483ef862b411239a71e5b18c99e8 +DIST csync2-2.0.tar.gz 411013 SHA256 11cb37380fb185bce0c22b804fec9b01c385d9d83cc528cfd48d748453834fa2 SHA512 f91fd222f67affe9634471d341b43ff67854a6ed25b620301a454e98a79a9fb80b2a66eb8713546758fd08300d52751e5ca7472c696daa20ee11779b87a830f8 WHIRLPOOL 6cbe49b5dd36d455d2c2b15089cc8e766aa3f9ebc2d5ebbd0528379123ae280850972b07279075a38dc328391633bd63f1a5dc8a2403b1d4faac295e27d1d920 +EBUILD csync2-2.0.ebuild 2723 SHA256 3033eac729c2ffd7ac8b6b96ccc99d6060b4746726e751ca24b957f85df699b3 SHA512 e52af2fa658cb623999970fbe2e68e28895226e1406045a76c732162075516f930a9a12c86d0cc7e5b08901ebcf7051c0b3c1cc343862c32553be46026bfc3d3 WHIRLPOOL f758b18ccf495183507399f8dbc75542de99f93eb39e1a988192120d77051b8f09c1315e7798cf2184bf473ebf86cf2872d7dcbe102769993eb80f525eefee54 +MISC ChangeLog 3451 SHA256 fa973c8f70b09c1e824687d2736ccc860653ac90b045cfc520675ca4ecfdce7a SHA512 8eb74fd49db3260d6db89b5ad4c51112981d94189595ef2f25462a060c830a9bc3b19228c46dc395aa4a11c6682bcb7259713034ad9ab19a8d346b9f4c21d234 WHIRLPOOL 5ce67d2316e4c711027ea68149f2bb013dcd6cf2538a07cbf1c29f673a6c965d4ae5a999972dca44a8af4259e069a145206ab3b096d8ce8439332af43b45bdfd +MISC ChangeLog-2015 6036 SHA256 03c45115b34a893f4407f21d8e88cc36c102ee4a8b87a8f94b42588eac70f5da SHA512 4c74232df11aac1b2ff5611bdf662a681644cc148de0cdc56854d352460a8fbebbf239c09e4a8b109591d9d724b64bfe15e13839512d2b842f6f3b8ea40d6b2b WHIRLPOOL 49898ba121e89e1315a3e62972a6364e2ca4ea21077494f4a4186e6cf5ea405bcac457069e5f66e62c4c66f0e2fc48854716ec993a4ebda5c91de1e98372909e +MISC metadata.xml 257 SHA256 eba5a727fcb9e27d2a6e5dac0c92b252de676d434ef19bb09d44534257bed08c SHA512 d01f4b592393076365e924fcc717c807172488f03a7b64542238616207fd00dacd096c383e68b9558142f7dab357578f91904f73acd41ce3a6ba7b7ef72b4980 WHIRLPOOL 8621cedc31dcd2b89dffd18c102b491aea21946189d752b9dfc3b686aea7adfff6782a3c7796d777e18677b7dd99f1cd8584022642eaf009cab3b733918a501b diff --git a/sys-cluster/csync2/csync2-2.0.ebuild b/sys-cluster/csync2/csync2-2.0.ebuild new file mode 100644 index 000000000000..93288e0b154a --- /dev/null +++ b/sys-cluster/csync2/csync2-2.0.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils + +DESCRIPTION="Cluster synchronization tool" +HOMEPAGE="http://oss.linbit.com/csync2/" +SRC_URI="http://oss.linbit.com/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="amd64 x86" + +IUSE="mysql postgres sqlite ssl xinetd" + +RDEPEND=">=net-libs/librsync-0.9.5 + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( >=dev-db/sqlite-3.0 ) + ssl? ( >=net-libs/gnutls-2.7.3 ) + xinetd? ( sys-apps/xinetd )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +REQUIRED_USE="|| ( mysql postgres sqlite )" +SLOT="0" + +src_configure() { + econf \ + --docdir=/usr/share/doc/${P} \ + --localstatedir=/var \ + --sysconfdir=/etc/csync2 \ + $(use_enable mysql) \ + $(use_enable postgres) \ + $(use_enable sqlite sqlite3) \ + $(use_enable ssl gnutls) +} + +src_install() { + # Parallel install fails, bug #561382 + emake -j1 DESTDIR="${D}" install + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/${PN}.xinetd ${PN} + fi + + keepdir /var/lib/csync2 + + newinitd "${FILESDIR}"/${PN}.initd ${PN} +} + +pkg_postinst() { + if use xinetd; then + echo + einfo "After you setup your conf file, edit the xinetd" + einfo "entry in /etc/xinetd.d/${PN} to enable, then" + einfo "start xinetd: /etc/init.d/xinetd start" + fi + echo + einfo "To add ${PN} to your services file" + if use ssl; then + einfo "and to generate the SSL certificates," + fi + einfo "just run this command after you install:" + echo + einfo "emerge --config =${PF}" + echo + einfo "Now you can find csync2.cfg under /etc/${PN}" + einfo "Please move you old config to the right location" + echo + einfo "To start csync2 as a standalone daemon, simply run:" + einfo "/etc/init.d/csync2 start" + echo +} + +pkg_config() { + einfo "Updating ${ROOT}/etc/services" + { grep -v ^${PN} "${ROOT}"/etc/services; + echo "csync2 30865/tcp" + } > "${ROOT}"/etc/services.new + mv -f "${ROOT}"/etc/services.new "${ROOT}"/etc/services + + if use ssl; then + if [ ! -f "${ROOT}"/etc/${PN}/csync2_ssl_key.pem ]; then + einfo "Creating default certificate in ${ROOT}/etc/${PN}" + + openssl genrsa -out "${ROOT}"/etc/${PN}/csync2_ssl_key.pem 1024 &> /dev/null + + yes '' | \ + openssl req -new \ + -key "${ROOT}"/etc/${PN}/csync2_ssl_key.pem \ + -out "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr \ + &> "${ROOT}"/dev/null + + openssl x509 -req -days 600 \ + -in "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr \ + -signkey "${ROOT}"/etc/${PN}/csync2_ssl_key.pem \ + -out "${ROOT}"/etc/${PN}/csync2_ssl_cert.pem \ + &> "${ROOT}"/dev/null + + rm "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr + chmod 400 "${ROOT}"/etc/${PN}/csync2_ssl_key.pem "${ROOT}"/etc/${PN}/csync2_ssl_cert.pem + fi + fi +} diff --git a/sys-cluster/csync2/files/csync2.initd b/sys-cluster/csync2/files/csync2.initd new file mode 100644 index 000000000000..d718a4990921 --- /dev/null +++ b/sys-cluster/csync2/files/csync2.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE=/var/run/csync2.pid +BINARY=/usr/sbin/csync2 + +start() { + ebegin "Starting csync2" + start-stop-daemon --start --pidfile "${PIDFILE}" -m -x ${BINARY} -b -- -ii + eend $? +} + +stop() { + ebegin "Stopping csync2" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} + +restart() { + ebegin "Restarting csync2" + svc_stop + svc_start + eend $? +} diff --git a/sys-cluster/csync2/files/csync2.xinetd b/sys-cluster/csync2/files/csync2.xinetd new file mode 100644 index 000000000000..d2a7adb8f5b9 --- /dev/null +++ b/sys-cluster/csync2/files/csync2.xinetd @@ -0,0 +1,15 @@ +# default: on +# description: csync2 +service csync2 +{ + flags = REUSE + socket_type = stream + wait = no + user = root + group = root + server = /usr/sbin/csync2 + server_args = -i + #log_on_failure += USERID + disable = yes + only_from = 192.168.199.3 192.168.199.4 +} diff --git a/sys-cluster/csync2/metadata.xml b/sys-cluster/csync2/metadata.xml new file mode 100644 index 000000000000..8bf4b5f36954 --- /dev/null +++ b/sys-cluster/csync2/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>cluster@gentoo.org</email> + <name>Gentoo Cluster Project</name> + </maintainer> +</pkgmetadata> |