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 D1BDF139694 for ; Tue, 2 May 2017 12:50:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C54BE0CF3; Tue, 2 May 2017 12:50:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D28E8E0CF3 for ; Tue, 2 May 2017 12:50:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 9ACD73413B7 for ; Tue, 2 May 2017 12:50:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C2CB24AC for ; Tue, 2 May 2017 12:50:02 +0000 (UTC) From: "Sven Wegener" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Wegener" Message-ID: <1493729398.12d6de7c54ce9ef6c518c245d5227119f79bff86.swegener@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/pdns/files/, net-dns/pdns/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-dns/pdns/files/pdns-r1 net-dns/pdns/pdns-4.0.3-r1.ebuild X-VCS-Directories: net-dns/pdns/files/ net-dns/pdns/ X-VCS-Committer: swegener X-VCS-Committer-Name: Sven Wegener X-VCS-Revision: 12d6de7c54ce9ef6c518c245d5227119f79bff86 X-VCS-Branch: master Date: Tue, 2 May 2017 12:50:02 +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: 2e86c9e6-0ed7-400b-ae10-d0f32b15f693 X-Archives-Hash: 958fde81ddd15f17fea27f68e64a4783 commit: 12d6de7c54ce9ef6c518c245d5227119f79bff86 Author: Sven Wegener gentoo org> AuthorDate: Mon May 1 11:40:29 2017 +0000 Commit: Sven Wegener gentoo org> CommitDate: Tue May 2 12:49:58 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12d6de7c net-dns/pdns: Update init script, bug #570794 Package-Manager: Portage-2.3.3, Repoman-2.3.2 net-dns/pdns/files/pdns-r1 | 90 ++++++++++++++++++++++ net-dns/pdns/pdns-4.0.3-r1.ebuild | 152 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 242 insertions(+) diff --git a/net-dns/pdns/files/pdns-r1 b/net-dns/pdns/files/pdns-r1 new file mode 100644 index 00000000000..84ba1a14108 --- /dev/null +++ b/net-dns/pdns/files/pdns-r1 @@ -0,0 +1,90 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PDNS_CONFIGDIR="${PDNS_CONFIGDIR:-/etc/powerdns}" +PDNS_SOCKETDIR="${PDNS_SOCKETDIR:-/var/lib/powerdns}" + +name="PowerDNS Authoritative Server" +description="Authoritative name server" + +extra_started_commands="dump ping" +extra_stopped_commands="monitor" +description_dump="Dumps all statistic variables" +description_ping="Ping the PowerDNS instance" +description_monitor="Starts in foreground with logging and console enabled" + +command="/usr/sbin/pdns_server" +command_args="--config-dir=${PDNS_CONFIGDIR} --socket-dir=${PDNS_SOCKETDIR}" +command_args_foreground="--daemon=no" +command_args_background="--daemon=yes" +yesno ${rc_verbose} || command_args_background="${command_args_background} >/dev/null 2>&1" + +if [ "${RC_SVCNAME}" != "pdns" ]; then + PDNS_INSTANCE="${RC_SVCNAME#pdns[.-]}" + name="${name} (${PDNS_INSTANCE})" + command_args="${command_args} --config-name=${PDNS_INSTANCE}" + pidfile="${PDNS_SOCKETDIR}/pdns-${PDNS_INSTANCE}.pid" +else + pidfile="${PDNS_SOCKETDIR}/pdns.pid" +fi + +control_command="/usr/bin/pdns_control" +control_command_args="${command_args}" + +depend() { + need net + use mysql postgresql +} + +status() { + default_status || return + _ping || return 32 +} + +stop() { + default_stop || return + _ping || return 0 + + local sleep + for sleep in 0.1 0.2 0.3 0.4; do + sleep "${sleep}" + _ping || return 0 + done + return 1 +} + +dump() { + einfo "Dumping ${name} variables" + ${control_command} ${control_command_args} list +} + +_ping() { + ${control_command} ${control_command_args} rping >/dev/null 2>&1 +} + +ping() { + ebegin "Pinging ${name}" + _ping + eend $? +} + +monitor() { + einfo "Starting ${name} in monitor mode" + + echo "" + echo "************************************************" + echo "* Use \"QUIT\" or Ctrl-C to end monitoring mode! *" + echo "************************************************" + echo "" + + ${command} \ + ${command_args} \ + ${command_args_foreground} \ + --guardian=no \ + --control-console=yes \ + --loglevel=9 \ + --log-dns-details=yes \ + --query-logging=yes + return 0 +} diff --git a/net-dns/pdns/pdns-4.0.3-r1.ebuild b/net-dns/pdns/pdns-4.0.3-r1.ebuild new file mode 100644 index 00000000000..f68b555fb8d --- /dev/null +++ b/net-dns/pdns/pdns-4.0.3-r1.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit eutils multilib user toolchain-funcs versionator + +DESCRIPTION="The PowerDNS Daemon" +HOMEPAGE="https://www.powerdns.com/" +SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# other possible flags: +# db2: we lack the dep +# oracle: dito (need Oracle Client Libraries) +# xdb: (almost) dead, surely not supported + +IUSE="botan debug doc geoip ldap lua luajit mydns mysql opendbx postgres protobuf remote sqlite systemd tools tinydns test" + +REQUIRED_USE="mydns? ( mysql ) ?? ( lua luajit )" + +RDEPEND=" + dev-libs/openssl:= + >=dev-libs/boost-1.35:= + botan? ( =dev-libs/botan-1.10*[threads] ) + lua? ( dev-lang/lua:= ) + luajit? ( dev-lang/luajit:= ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ldap? ( >=net-nds/openldap-2.0.27-r4 ) + sqlite? ( dev-db/sqlite:3 ) + opendbx? ( dev-db/opendbx ) + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip ) + tinydns? ( >=dev-db/tinycdb-0.77 ) + protobuf? ( dev-libs/protobuf )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +S="${WORKDIR}"/${P/_/-} + +src_configure() { + local dynmodules="pipe bind" # the default backends, always enabled + + #use db2 && dynmodules+=" db2" + use ldap && dynmodules+=" ldap" + use lua && dynmodules+=" lua" + use mydns && dynmodules+=" mydns" + use mysql && dynmodules+=" gmysql" + use opendbx && dynmodules+=" opendbx" + #use oracle && dynmodules+=" goracle oracle" + use postgres && dynmodules+=" gpgsql" + use remote && dynmodules+=" remote" + use sqlite && dynmodules+=" gsqlite3" + use tinydns && dynmodules+=" tinydns" + use geoip && dynmodules+=" geoip" + #use xdb && dynmodules+=" xdb" + + econf \ + --disable-static \ + --sysconfdir=/etc/powerdns \ + --libdir=/usr/$(get_libdir)/powerdns \ + --with-modules= \ + --with-dynmodules="${dynmodules}" \ + --with-pgsql-includes=/usr/include \ + --with-pgsql-lib=/usr/$(get_libdir) \ + --with-mysql-lib=/usr/$(get_libdir) \ + $(use_enable botan botan1.10) \ + $(use_enable debug verbose-logging) \ + $(use_enable test unit-tests) \ + $(use_enable tools) \ + $(use_enable systemd) \ + $(use_with lua) \ + $(use_with luajit) \ + $(use_with protobuf) \ + ${myconf} +} + +src_compile() { + default + use doc && emake -C codedocs codedocs +} + +src_install() { + default + + mv "${D}"/etc/powerdns/pdns.conf{-dist,} + + fperms 0700 /etc/powerdns + fperms 0600 /etc/powerdns/pdns.conf + + # set defaults: setuid=pdns, setgid=pdns + sed -i \ + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ + "${D}"/etc/powerdns/pdns.conf + + newinitd "${FILESDIR}"/pdns-r1 pdns + + keepdir /var/empty + + use doc && dohtml -r codedocs/html/. + + # Install development headers + insinto /usr/include/pdns + doins pdns/*.hh + insinto /usr/include/pdns/backends/gsql + doins pdns/backends/gsql/*.hh + + if use ldap ; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/dnsdomain2.schema + fi + + prune_libtool_files --all +} + +pkg_preinst() { + enewgroup pdns + enewuser pdns -1 -1 /var/empty pdns +} + +pkg_postinst() { + elog "PowerDNS provides multiple instances support. You can create more instances" + elog "by symlinking the pdns init script to another name." + elog + elog "The name must be in the format pdns. and PowerDNS will use the" + elog "/etc/powerdns/pdns-.conf configuration file instead of the default." + + if use ldap ; then + ewarn "The official LDAP backend module is only compile-tested by upstream." + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." + fi + + local old + for old in ${REPLACING_VERSIONS}; do + version_compare ${old} 3.2 + [[ $? -eq 1 ]] || continue + + ewarn "To fix a security bug (bug #458018) had the following" + ewarn "files/directories the world-readable bit removed (if set):" + ewarn " ${EPREFIX}/etc/powerdns" + ewarn " ${EPREFIX}/etc/powerdns/pdns.conf" + ewarn "Check if this is correct for your setup" + ewarn "This is a one-time change and will not happen on subsequent updates." + chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf} + + break + done +}