From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3FEE01396D9 for ; Wed, 8 Nov 2017 21:30:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 874D2E0C58; Wed, 8 Nov 2017 21:30:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 578BDE0C58 for ; Wed, 8 Nov 2017 21:30:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 971FA33BEC7 for ; Wed, 8 Nov 2017 21:30:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 39D9095AF for ; Wed, 8 Nov 2017 21:30:51 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1510176490.2c996c9897e0a4175662fb47faa1a25db21ce120.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/csync2/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-cluster/csync2/csync2-2.0-r1.ebuild X-VCS-Directories: sys-cluster/csync2/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 2c996c9897e0a4175662fb47faa1a25db21ce120 X-VCS-Branch: master Date: Wed, 8 Nov 2017 21:30:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3548a9dd-0231-446e-9cd7-f0439f7b09ce X-Archives-Hash: 86eb00f9027ee4602fbd237a378d1f3b commit: 2c996c9897e0a4175662fb47faa1a25db21ce120 Author: James Le Cuirot gentoo org> AuthorDate: Wed Nov 8 21:28:10 2017 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Wed Nov 8 21:28:10 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c996c98 sys-cluster/csync2: EAPI bump to 6 eutils doesn't appear to be used. Package-Manager: Portage-2.3.13, Repoman-2.3.4 sys-cluster/csync2/csync2-2.0-r1.ebuild | 105 ++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/sys-cluster/csync2/csync2-2.0-r1.ebuild b/sys-cluster/csync2/csync2-2.0-r1.ebuild new file mode 100644 index 00000000000..29663af4b3f --- /dev/null +++ b/sys-cluster/csync2/csync2-2.0-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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 ~arm ~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 +}