public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthew Smith" <matthew@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/knot-resolver/files/, net-dns/knot-resolver/
Date: Wed, 26 Jul 2023 20:33:28 +0000 (UTC)	[thread overview]
Message-ID: <1690403584.f78480292d1ae4d2a89762eb33fb72101af5d446.matthew@gentoo> (raw)

commit:     f78480292d1ae4d2a89762eb33fb72101af5d446
Author:     Spencer Pavkovic <smp <AT> nandre <DOT> com>
AuthorDate: Mon Jul 24 23:51:06 2023 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Wed Jul 26 20:33:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7848029

net-dns/knot-resolver: added OpenRC init script

Signed-off-by: Spencer Pavkovic <smp <AT> nandre.com>
Closes: https://github.com/gentoo/gentoo/pull/32028
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 net-dns/knot-resolver/files/kresd.confd            |  5 ++
 net-dns/knot-resolver/files/kresd.initd            | 23 ++++++
 .../knot-resolver/knot-resolver-5.6.0-r1.ebuild    | 96 ++++++++++++++++++++++
 3 files changed, 124 insertions(+)

diff --git a/net-dns/knot-resolver/files/kresd.confd b/net-dns/knot-resolver/files/kresd.confd
new file mode 100644
index 000000000000..6749da309845
--- /dev/null
+++ b/net-dns/knot-resolver/files/kresd.confd
@@ -0,0 +1,5 @@
+# Copyright 1999-2023 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+KRESD_OPTS="-n /var/run/kresd"
+
+#KRESD_PIDFILE="/var/run/kresd.pid"
\ No newline at end of file

diff --git a/net-dns/knot-resolver/files/kresd.initd b/net-dns/knot-resolver/files/kresd.initd
new file mode 100644
index 000000000000..b443d98d749d
--- /dev/null
+++ b/net-dns/knot-resolver/files/kresd.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/kresd"
+command_args="${KRESD_OPTS}"
+pidfile="${KRESD_PIDFILE:-/var/run/${RC_SVCNAME}.pid}"
+command_background=true
+start_stop_daemon_args="--start -bm --pidfile ${pidfile} --exec ${command} -- ${command_args}"
+
+name="knot-resolver"
+description="scaleable caching DNS resolver"
+
+depend() {
+    need net
+    use logger
+    provide dns
+}
+
+start() {
+	checkpath --directory /var/run/kresd
+	default_start
+}

diff --git a/net-dns/knot-resolver/knot-resolver-5.6.0-r1.ebuild b/net-dns/knot-resolver/knot-resolver-5.6.0-r1.ebuild
new file mode 100644
index 000000000000..eb66bdf93586
--- /dev/null
+++ b/net-dns/knot-resolver/knot-resolver-5.6.0-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( luajit )
+
+inherit lua-single meson tmpfiles verify-sig
+
+DESCRIPTION="A scaleable caching DNS resolver"
+HOMEPAGE="https://www.knot-resolver.cz https://gitlab.nic.cz/knot/knot-resolver"
+SRC_URI="
+	https://secure.nic.cz/files/${PN}/${P}.tar.xz
+	verify-sig? ( https://secure.nic.cz/files/${PN}/${P}.tar.xz.asc )
+"
+
+LICENSE="Apache-2.0 BSD CC0-1.0 GPL-3+ LGPL-2.1+ MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="caps dnstap kresc nghttp2 systemd test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="
+	${LUA_DEPS}
+	acct-group/knot-resolver
+	acct-user/knot-resolver
+	dev-db/lmdb:=
+	dev-libs/libuv:=
+	net-dns/knot:=
+	net-libs/gnutls:=
+	caps? ( sys-libs/libcap-ng )
+	dnstap? (
+		dev-libs/fstrm
+		dev-libs/protobuf-c:=
+	)
+	kresc? ( dev-libs/libedit )
+	nghttp2? ( net-libs/nghttp2:= )
+	systemd? ( sys-apps/systemd:= )
+"
+DEPEND="
+	${RDEPEND}
+	test? (
+		  dev-util/cmocka
+	)
+"
+BDEPEND="
+	virtual/pkgconfig
+	verify-sig? ( sec-keys/openpgp-keys-knot-resolver )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-5.5.3-docdir.patch
+	"${FILESDIR}"/${PN}-5.5.3-nghttp-openssl.patch
+)
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/${PN}.gpg
+
+src_unpack() {
+	if use verify-sig; then
+		verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc}
+	fi
+
+	unpack ${P}.tar.xz
+}
+
+src_configure() {
+	local emesonargs=(
+		--localstatedir "${EPREFIX}"/var # double lib
+		# https://bugs.gentoo.org/870019
+		-Dauto_features=disabled
+		-Ddoc=disabled
+		-Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
+		-Dopenssl=disabled
+		$(meson_feature caps capng)
+		$(meson_feature dnstap)
+		$(meson_feature kresc client)
+		$(meson_feature nghttp2)
+		$(meson_feature test unit_tests)
+		$(meson_feature systemd systemd_files)
+	)
+
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+	fowners -R ${PN}: /etc/${PN}
+
+	newinitd "${FILESDIR}"/kresd.initd kresd
+	newconfd "${FILESDIR}"/kresd.confd kresd
+}
+
+pkg_postinst() {
+	use systemd && tmpfiles_process knot-resolver.conf
+}


             reply	other threads:[~2023-07-26 20:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 20:33 Matthew Smith [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-10  2:54 [gentoo-commits] repo/gentoo:master commit in: net-dns/knot-resolver/files/, net-dns/knot-resolver/ Sam James
2024-12-01 15:19 Sam James
2023-09-17  7:39 Matthew Smith
2022-10-16 13:37 Matthew Smith

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=1690403584.f78480292d1ae4d2a89762eb33fb72101af5d446.matthew@gentoo \
    --to=matthew@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