From: "Sven Wegener" <swegener@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/pdns-recursor/, net-dns/pdns-recursor/files/
Date: Thu, 25 May 2017 15:04:55 +0000 (UTC) [thread overview]
Message-ID: <1495724686.38f6898fabe5d0954bed1b965a9217679b5b43d7.swegener@gentoo> (raw)
commit: 38f6898fabe5d0954bed1b965a9217679b5b43d7
Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Sun May 14 13:26:33 2017 +0000
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Thu May 25 15:04:46 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38f6898f
net-dns/pdns-recursor: Update init script
Package-Manager: Portage-2.3.5, Repoman-2.3.2
net-dns/pdns-recursor/files/pdns-recursor-r1 | 37 +++++++++++
.../pdns-recursor/pdns-recursor-4.0.4-r1.ebuild | 75 ++++++++++++++++++++++
2 files changed, 112 insertions(+)
diff --git a/net-dns/pdns-recursor/files/pdns-recursor-r1 b/net-dns/pdns-recursor/files/pdns-recursor-r1
new file mode 100644
index 00000000000..57c9df1eaa4
--- /dev/null
+++ b/net-dns/pdns-recursor/files/pdns-recursor-r1
@@ -0,0 +1,37 @@
+#!/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_CONFIG="${PDNS_CONFIGDIR}/recursor.conf"
+PDNS_CHROOTDIR="$( awk -F = '$1 == "chroot" { print $2 }' "${PDNS_CONFIG}" )"
+PDNS_SOCKETDIR="$( awk -F = '$1 == "socket-dir" { print $2 }' "${PDNS_CONFIG}" )"
+[ -z "${PDNS_SOCKETDIR}" -a -z "${PDNS_CHROOTDIR}" ] && PDNS_SOCKETDIR="/var/run"
+
+name="PowerDNS Recursor"
+description="Recursive name server"
+
+extra_started_commands="ping"
+description_ping="Ping the PowerDNS instance"
+
+command="/usr/sbin/pdns_recursor"
+command_args="--config-dir=${PDNS_CONFIGDIR}"
+command_args_foreground="--daemon=no"
+command_args_background="--daemon=yes"
+yesno ${rc_verbose} || command_args_background="${command_args_background} >/dev/null 2>&1"
+
+pidfile="${PDNS_CHROOTDIR}/${PDNS_SOCKETDIR}/pdns_recursor.pid"
+
+control_command="/usr/bin/rec_control"
+control_command_args="${command_args}"
+
+depend() {
+ need net
+}
+
+ping() {
+ ebegin "Pinging ${name}"
+ ${control_command} ${control_command_args} ping >/dev/null 2>&1
+ eend $?
+}
diff --git a/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild
new file mode 100644
index 00000000000..b748e27b710
--- /dev/null
+++ b/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs flag-o-matic eutils versionator
+
+DESCRIPTION="The PowerDNS Recursor"
+HOMEPAGE="https://www.powerdns.com/"
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="lua luajit protobuf systemd"
+REQUIRED_USE="?? ( lua luajit )"
+
+DEPEND="lua? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:= )
+ protobuf? (
+ dev-libs/protobuf
+ >=dev-libs/boost-1.42
+ )
+ systemd? ( sys-apps/systemd:0= )
+ >=dev-libs/boost-1.35"
+RDEPEND="${DEPEND}
+ !<net-dns/pdns-2.9.20-r1"
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_/-}
+
+pkg_setup() {
+ filter-flags -ftree-vectorize
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/powerdns \
+ $(use_enable systemd) \
+ $(use_with lua) \
+ $(use_with luajit) \
+ $(use_with protobuf)
+}
+
+src_install() {
+ default
+
+ mv "${D}"/etc/powerdns/recursor.conf{-dist,}
+
+ # set defaults: setuid=nobody, setgid=nobody
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
+ -e 's/^# quiet=$/quiet=on/' \
+ -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
+ "${D}"/etc/powerdns/recursor.conf
+
+ newinitd "${FILESDIR}"/pdns-recursor-r1 pdns-recursor
+
+ keepdir /var/lib/powerdns
+}
+
+pkg_postinst() {
+ local old
+
+ for old in ${REPLACING_VERSIONS}; do
+ version_compare ${old} 4.0.0-r1
+ [[ $? -eq 1 ]] || continue
+
+ ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
+ ewarn "to pdns-recursor, please update your runlevels accordingly."
+
+ break
+ done
+}
next reply other threads:[~2017-05-25 15:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 15:04 Sven Wegener [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-02 19:07 [gentoo-commits] repo/gentoo:master commit in: net-dns/pdns-recursor/, net-dns/pdns-recursor/files/ Sven Wegener
2023-02-16 21:20 Sven Wegener
2022-04-04 12:01 Sven Wegener
2022-04-02 14:09 Sven Wegener
2020-07-22 19:38 Sven Wegener
2020-05-20 21:32 Sven Wegener
2020-03-11 13:43 Sven Wegener
2017-12-04 15:46 Sven Wegener
2017-12-03 22:42 Sven Wegener
2017-11-27 17:37 Sven Wegener
2017-10-30 13:27 Sven Wegener
2016-11-20 21:08 Sven Wegener
2016-07-19 22:03 Sven Wegener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495724686.38f6898fabe5d0954bed1b965a9217679b5b43d7.swegener@gentoo \
--to=swegener@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox