public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-dns/knot/files/, net-dns/knot/
@ 2016-02-08 10:17 Tomas Chvatal
  0 siblings, 0 replies; 5+ messages in thread
From: Tomas Chvatal @ 2016-02-08 10:17 UTC (permalink / raw
  To: gentoo-commits

commit:     bf4c3059da8c7cdf703e980534b89beb05e40a31
Author:     Tomáš Chvátal <scarabeus <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  8 10:16:04 2016 +0000
Commit:     Tomas Chvatal <scarabeus <AT> gentoo <DOT> org>
CommitDate: Mon Feb  8 10:16:22 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf4c3059

[net-dns/knot] Version update to 1.6.6 bug#553782 and version update to 2.1.0 with nettle patch bug#573866.

 net-dns/knot/files/knot-2.1.0-nettle.patch         | 26 +++++++++
 net-dns/knot/knot-1.5.3.ebuild                     | 61 ----------------------
 .../knot/{knot-1.6.3.ebuild => knot-1.6.6.ebuild}  |  2 +-
 .../knot/{knot-2.0.2.ebuild => knot-2.1.0.ebuild}  |  1 +
 4 files changed, 28 insertions(+), 62 deletions(-)

diff --git a/net-dns/knot/files/knot-2.1.0-nettle.patch b/net-dns/knot/files/knot-2.1.0-nettle.patch
new file mode 100644
index 0000000..8f89ae8
--- /dev/null
+++ b/net-dns/knot/files/knot-2.1.0-nettle.patch
@@ -0,0 +1,26 @@
+diff --git a/src/dnssec/lib/binary.c b/src/dnssec/lib/binary.c
+index 454dc5a..8d642be 100644
+--- a/src/dnssec/lib/binary.c
++++ b/src/dnssec/lib/binary.c
+@@ -15,16 +15,18 @@
+ */
+ 
+ #include <assert.h>
+-#include <nettle/base64.h>
+ #include <string.h>
++#include <nettle/base64.h>
++#ifdef HAVE_NETTLE_VERSION_H
++#include <nettle/version.h>
++#endif
+ 
+ #include "binary.h"
+ #include "error.h"
+ #include "shared.h"
+ 
+ typedef
+-#ifdef HAVE_NETTLE_VERSION_H
+-	#include <nettle/version.h>
++#ifdef NETTLE_VERSION_MAJOR
+ 	#if NETTLE_VERSION_MAJOR >= 3
+ 		size_t
+ 	#else

diff --git a/net-dns/knot/knot-1.5.3.ebuild b/net-dns/knot/knot-1.5.3.ebuild
deleted file mode 100644
index 77b523f..0000000
--- a/net-dns/knot/knot-1.5.3.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="https://gitlab.labs.nic.cz/labs/${PN}.git"
-[[ ${PV} == 9999 ]] && inherit autotools git-r3
-inherit eutils user
-
-DESCRIPTION="High-performance authoritative-only DNS server"
-HOMEPAGE="http://www.knot-dns.cz/"
-[[ ${PV} == 9999 ]] || SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-[[ ${PV} == 9999 ]] || \
-KEYWORDS="~amd64 ~x86"
-IUSE="debug caps +fastparser idn"
-
-RDEPEND="
-	dev-libs/openssl
-	dev-libs/userspace-rcu
-	caps? ( sys-libs/libcap-ng )
-	idn? ( net-dns/libidn )
-"
-#	sys-libs/glibc
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	sys-devel/flex
-	virtual/yacc
-	fastparser? ( dev-util/ragel )
-"
-
-S="${WORKDIR}/${P/_/-}"
-
-src_prepare() {
-	[[ ${PV} == 9999 ]] && eautoreconf
-}
-
-src_configure() {
-	econf \
-		--with-storage="${EPREFIX}/var/lib/${PN}" \
-		--with-rundir="${EPREFIX}/var/run/${PN}" \
-		--disable-lto \
-		--enable-recvmmsg \
-		$(use_enable fastparser) \
-		$(use_enable debug debug server,zones,xfr,packet,dname,rr,ns,hash,compiler) \
-		$(use_enable debug debuglevel details) \
-		$(use_with idn libidn)
-}
-
-src_install() {
-	default
-	newinitd "${FILESDIR}/knot.init" knot
-}
-
-pkg_postinst() {
-	enewgroup knot 53
-	enewuser knot 53 -1 /var/lib/knot knot
-}

diff --git a/net-dns/knot/knot-1.6.3.ebuild b/net-dns/knot/knot-1.6.6.ebuild
similarity index 97%
rename from net-dns/knot/knot-1.6.3.ebuild
rename to net-dns/knot/knot-1.6.6.ebuild
index 9b45a0e..44bb39f 100644
--- a/net-dns/knot/knot-1.6.3.ebuild
+++ b/net-dns/knot/knot-1.6.6.ebuild
@@ -35,7 +35,7 @@ DEPEND="${RDEPEND}
 S="${WORKDIR}/${P/_/-}"
 
 src_prepare() {
-	epatch "${FILESDIR}/${PV}-dont-create-extra-directories.patch"
+	epatch "${FILESDIR}/1.6.3-dont-create-extra-directories.patch"
 }
 
 src_configure() {

diff --git a/net-dns/knot/knot-2.0.2.ebuild b/net-dns/knot/knot-2.1.0.ebuild
similarity index 98%
rename from net-dns/knot/knot-2.0.2.ebuild
rename to net-dns/knot/knot-2.1.0.ebuild
index deb9f03..5e244ea 100644
--- a/net-dns/knot/knot-2.0.2.ebuild
+++ b/net-dns/knot/knot-2.1.0.ebuild
@@ -35,6 +35,7 @@ S="${WORKDIR}/${P/_/-}"
 
 src_prepare() {
 	epatch "${FILESDIR}/2.0.2-dont-create-extra-directories.patch"
+	epatch "${FILESDIR}/knot-2.1.0-nettle.patch"
 }
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/knot/files/, net-dns/knot/
@ 2017-08-22  9:07 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2017-08-22  9:07 UTC (permalink / raw
  To: gentoo-commits

commit:     91cdae70f2fa6322ff9b38336b24312bdd3c3810
Author:     Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
AuthorDate: Wed Aug 16 11:37:28 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 09:07:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91cdae70

net-dns/knot: enhance systemd service security

Suggested-by: hexumg <hexumg <AT> gmail.com>
Bug: https://bugs.gentoo.org/606644

 net-dns/knot/files/knot-1.service | 17 +++++++++++++++++
 net-dns/knot/knot-2.5.3-r1.ebuild |  6 ++++--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/net-dns/knot/files/knot-1.service b/net-dns/knot/files/knot-1.service
new file mode 100644
index 00000000000..14a34a2b211
--- /dev/null
+++ b/net-dns/knot/files/knot-1.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Knot high-performance DNS Server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/knotd
+ExecReload=/usr/sbin/knotc reload
+ExecStop=/usr/sbin/knotc stop
+PrivateTmp=true
+User=knot
+Group=knot
+RuntimeDirectory=knot
+RuntimeDirectoryMode=750
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-dns/knot/knot-2.5.3-r1.ebuild b/net-dns/knot/knot-2.5.3-r1.ebuild
index d9263f9e849..5d116b1a44c 100644
--- a/net-dns/knot/knot-2.5.3-r1.ebuild
+++ b/net-dns/knot/knot-2.5.3-r1.ebuild
@@ -26,7 +26,7 @@ RDEPEND="
 	)
 	idn? ( || ( net-dns/libidn >=net-dns/libidn2-2.0.0 ) )
 	dev-libs/libedit
-	systemd? ( sys-apps/systemd )
+	systemd? ( >=sys-apps/systemd-229 )
 "
 DEPEND="${RDEPEND}
 	virtual/pkgconfig
@@ -66,7 +66,9 @@ src_install() {
 	keepdir /var/lib/${PN}
 
 	newinitd "${FILESDIR}/knot.init" knot
-	systemd_dounit "${FILESDIR}/knot.service"
+	if use systemd; then
+		systemd_newunit "${FILESDIR}/knot-1.service" knot
+	fi
 
 	find "${D}" -name '*.la' -delete || die
 }


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/knot/files/, net-dns/knot/
@ 2024-12-01 14:30 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-12-01 14:30 UTC (permalink / raw
  To: gentoo-commits

commit:     bcca5763b643aa91a8d05f7529beaf98c34db11c
Author:     PPN-SD <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Sat Sep  7 22:39:59 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec  1 14:28:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcca5763

net-dns/knot: add 3.4.2

new module: authsignal

useflag:
* dbus: useflag added to support libdbus including when systemd is installed
* +doc: useflag enabled by default because pregenerated manpages are no longer provided by upstream
* idn1: useflag removed, deprecated
* pkcs#11: useflag added

scripts:
* use upstream service for systemd
* new openrc init script (knot-1.init):
    use background to create a root-owned pid file
    add checkconfig
* use knot.tmpfile for permissions:
    /run/knot (pidfile created by knotd)
    /var/lib/knot (default database, template ...)

Bug: https://bugs.gentoo.org/927551
Closes: https://bugs.gentoo.org/920681
Signed-off-by: PPN-SD <nicolas.parlant <AT> parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/39066
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dns/knot/Manifest           |   1 +
 net-dns/knot/files/knot-1.init  |  42 ++++++++++
 net-dns/knot/files/knot.tmpfile |   2 +
 net-dns/knot/knot-3.4.2.ebuild  | 166 ++++++++++++++++++++++++++++++++++++++++
 net-dns/knot/metadata.xml       |   9 +++
 5 files changed, 220 insertions(+)

diff --git a/net-dns/knot/Manifest b/net-dns/knot/Manifest
index 40abb4bd889c..d5b54f7bbb8c 100644
--- a/net-dns/knot/Manifest
+++ b/net-dns/knot/Manifest
@@ -1,2 +1,3 @@
 DIST knot-3.2.2.tar.xz 1632748 BLAKE2B 185567dc883f946570fe60cd7d01d96162c5f13ac84330e5551c293b5011c162401fd25ddbdb43bf9242e13c3cdc8225be107dc579619fe54c05335601cd27ae SHA512 29fadb96c1ea525c6183f9e7552f4ad370579b67d74aec1910a92d561cc2c5656fd7876015f29161d279a07c23643f6584308bf9fa0e74d351b17af54e5e9a7f
 DIST knot-3.2.9.tar.xz 1642600 BLAKE2B 2c81b2afa96c6077778c3458b2ddeeb8b47ea99607ba755a904278f9755a32171738418ea442b1e6b4afcebe0db2c86e68845d38f8e78342b8354411d1e34af8 SHA512 baf8da222e38198c85fa62e45e71b29ddac7c90433b811710ace1e0395e6e7b5d63547ce8f3a62792ee11259ec2e36d6ddd8fff999416f9171671444a95086cf
+DIST knot-3.4.2.tar.xz 1632976 BLAKE2B 0b633b27b22665db243bc4222f05028a17ee7ec6ba5960ff1cfe503d27bf3d26218f771cb15b70bbf8782898bcc7748bd5c27d55747607a1d93f784cdadddad7 SHA512 d5353fdd51224e20a8009aea7df6fe7503a726756c82041b770d8e90cae00b38ede7ecb2f31178ccb9f472a98b86f90208d4627fa4aaaf3c0383272b451e3015

diff --git a/net-dns/knot/files/knot-1.init b/net-dns/knot/files/knot-1.init
new file mode 100644
index 000000000000..989a576dcc59
--- /dev/null
+++ b/net-dns/knot/files/knot-1.init
@@ -0,0 +1,42 @@
+#!/sbin/openrc-run
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: ${KNOT_USER:=knot}
+: ${KNOT_GROUP:=knot}
+: ${KNOT_PIDFILE:=/run/knot.pid}
+: ${KNOT_CONFIG:=/etc/knot/knot.conf}
+
+name="knot"
+description="High-performance authoritative-only DNS server"
+command="/usr/sbin/knotd"
+command_args="-c ${KNOT_CONFIG}"
+command_user="${KNOT_USER}:${KNOT_GROUP}"
+command_background=true
+pidfile="${KNOT_PIDFILE}"
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+checkconfig() {
+	/usr/bin/knotc conf-check 1>/dev/null || return 1
+}
+
+reload() {
+	checkconfig || return 1
+	ebegin "Reloading ${SVCNAME}"
+	start-stop-daemon --signal HUP --pidfile $pidfile
+	eend $?
+}
+
+start_pre() {
+	if [ "${RC_CMD}" != "restart" ]; then
+		checkconfig || return 1
+	fi
+}
+
+stop_pre() {
+	if [ "${RC_CMD}" != "restart" ]; then
+		checkconfig || return 1
+	fi
+}

diff --git a/net-dns/knot/files/knot.tmpfile b/net-dns/knot/files/knot.tmpfile
new file mode 100644
index 000000000000..dfc488ca0583
--- /dev/null
+++ b/net-dns/knot/files/knot.tmpfile
@@ -0,0 +1,2 @@
+d /run/knot	0750	knot	knot
+d /var/lib/knot	0750	knot	knot

diff --git a/net-dns/knot/knot-3.4.2.ebuild b/net-dns/knot/knot-3.4.2.ebuild
new file mode 100644
index 000000000000..06a4f78e8400
--- /dev/null
+++ b/net-dns/knot/knot-3.4.2.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic systemd tmpfiles
+
+# subslot: libknot major.libdnssec major.libzscanner major
+KNOT_SUBSLOT="15.9.4"
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="https://www.knot-dns.cz/ https://gitlab.nic.cz/knot/knot-dns"
+SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
+
+S="${WORKDIR}/${P/_/-}"
+
+LICENSE="GPL-3+"
+SLOT="0/${KNOT_SUBSLOT}"
+KEYWORDS="~amd64 ~riscv ~x86"
+
+KNOT_MODULES=(
+	"+authsignal"
+	"+cookies"
+	"+dnsproxy"
+	"dnstap"
+	"geoip"
+	"+noudp"
+	"+onlinesign"
+	"+queryacl"
+	"+rrl"
+	"+stats"
+	"+synthrecord"
+	"+whoami"
+)
+
+IUSE="caps +daemon dbus +doc doh +fastparser +idn pkcs11 quic systemd test +utils xdp ${KNOT_MODULES[@]}"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+	dev-libs/libedit
+	dnstap? (
+		dev-libs/fstrm
+		dev-libs/protobuf-c:=
+	)
+	quic? ( net-libs/ngtcp2[gnutls] )
+"
+RDEPEND="
+	dev-db/lmdb:=
+	net-libs/gnutls:=[pkcs11?]
+	daemon? (
+		${COMMON_DEPEND}
+		acct-group/knot
+		acct-user/knot
+		dev-libs/userspace-rcu:=
+		caps? ( sys-libs/libcap-ng )
+		dbus? ( sys-apps/dbus )
+		geoip? ( dev-libs/libmaxminddb:= )
+		systemd? ( sys-apps/systemd:= )
+		)
+	utils? (
+		${COMMON_DEPEND}
+		doh? ( net-libs/nghttp2:= )
+		idn? ( net-dns/libidn2:= )
+	)
+	xdp? (
+		>=dev-libs/libbpf-1.0:=
+		net-libs/xdp-tools
+		utils? ( net-libs/libmnl:= )
+	)
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	doc? ( dev-python/sphinx )
+	test? (
+		pkcs11? ( dev-libs/softhsm )
+	)
+"
+
+src_prepare() {
+	default
+
+	# these tests call this daemon file knot/server/dthreads.h
+	if use test && use !daemon; then
+		sed -i \
+		-e '/test_atomic/d' \
+		-e '/test_spinlock/d' \
+		tests/Makefile.am || die
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	local u
+	local my_conf=(
+		--with-storage="${EPREFIX}/var/lib/${PN}"
+		--with-rundir="${EPREFIX}/var/run/${PN}"
+		$(use_enable caps cap_ng)
+		$(use_enable daemon)
+		$(use_enable fastparser)
+		$(use_enable dnstap)
+		$(use_enable doc documentation)
+		$(use_with doh libnghttp2)
+		$(use_enable geoip maxminddb)
+		$(use_with idn libidn)
+		$(use_enable quic)
+		$(use_enable systemd)
+		$(use_enable utils utilities)
+		$(use_enable xdp)
+	)
+
+	# modules (except dnstap forced by use_enable if set with utils) are only used by daemon
+	if use daemon; then
+		for u in "${KNOT_MODULES[@]#+}"; do
+			my_conf+=("$(use_with ${u} module-${u})")
+		done
+	else
+			my_conf+=("--disable-modules")
+	fi
+
+	if use !daemon; then
+		my_conf+=("--enable-dbus=no")
+	elif use dbus; then
+		my_conf+=("--enable-dbus=libdbus")
+	elif use !dbus && use !systemd; then
+		my_conf+=("--enable-dbus=no")
+	elif use !dbus && use systemd; then
+		my_conf+=("--enable-dbus=systemd")
+	fi
+
+	if use riscv; then
+		append-libs -latomic
+	fi
+
+	econf "${my_conf[@]}"
+}
+
+src_compile() {
+	default
+
+	use doc && emake -C doc html
+}
+
+src_install() {
+	use doc && local HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
+
+	default
+
+	if use daemon; then
+		rmdir "${D}/var/run/${PN}" "${D}/var/run/" || die
+
+		newinitd "${FILESDIR}/knot-1.init" knot
+
+		newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+		use systemd && systemd_newunit distro/common/knot.service knot.service
+	fi
+
+	find "${D}" -name '*.la' -delete || die
+
+	keepdir /var/lib/knot
+}
+
+pkg_postinst() {
+	use daemon && tmpfiles_process ${PN}.conf
+}

diff --git a/net-dns/knot/metadata.xml b/net-dns/knot/metadata.xml
index d7aafeb4ba1e..eb4839a1be64 100644
--- a/net-dns/knot/metadata.xml
+++ b/net-dns/knot/metadata.xml
@@ -10,9 +10,15 @@
 		<name>Proxy Maintainers</name>
 	</maintainer>
 	<use>
+		<flag name="authsignal">
+			Enable Automatic Authenticated DNSSEC Bootstrapping records
+		</flag>
 		<flag name="cookies">
 			Enable the DNS cookie module (RFC 7873)
 		</flag>
+		<flag name="daemon">
+			Enable Knot DNS main daemon
+		</flag>
 		<flag name="doh">
 			Enable DNS over HTTP (DoH) using libnghttp2
 		</flag>
@@ -42,6 +48,9 @@
 			Enable the module that sign zones on the fly instead of
 			pre-signing zone
 		</flag>
+		<flag name="pkcs11">
+			Add support for PKCS#11
+		</flag>
 		<flag name="queryacl">
 			Enable the module for query access control
 		</flag>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/knot/files/, net-dns/knot/
@ 2024-12-04 12:58 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-12-04 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     76953cdb865f54195a77df8a48899b59db54049e
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Dec  4 10:45:20 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec  4 12:57:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76953cdb

net-dns/knot: setcap for OpenRC init script. Add confd

Set capabilities by default in init, as systemd service.
No dep for openrc[caps] as it will be forced soon.
Bug: https://bugs.gentoo.org/945837

Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/39588
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dns/knot/files/knot-2.init    |  44 ++++++++++
 net-dns/knot/files/knot.confd     |   7 ++
 net-dns/knot/knot-3.4.2-r1.ebuild | 167 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 218 insertions(+)

diff --git a/net-dns/knot/files/knot-2.init b/net-dns/knot/files/knot-2.init
new file mode 100644
index 000000000000..746681496c53
--- /dev/null
+++ b/net-dns/knot/files/knot-2.init
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: ${KNOT_USER:=knot}
+: ${KNOT_GROUP:=knot}
+: ${KNOT_PIDFILE:=/run/knot.pid}
+: ${KNOT_CONFIG:=/etc/knot/knot.conf}
+
+name="knot"
+description="High-performance authoritative-only DNS server"
+command="/usr/sbin/knotd"
+command_args="-c ${KNOT_CONFIG}"
+command_user="${KNOT_USER}:${KNOT_GROUP}"
+command_background=true
+pidfile="${KNOT_PIDFILE}"
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+capabilities="^cap_net_bind_service,^cap_setpcap"
+
+checkconfig() {
+	/usr/bin/knotc conf-check 1>/dev/null || return 1
+}
+
+reload() {
+	checkconfig || return 1
+	ebegin "Reloading ${SVCNAME}"
+	start-stop-daemon --signal HUP --pidfile $pidfile
+	eend $?
+}
+
+start_pre() {
+	if [ "${RC_CMD}" != "restart" ]; then
+		checkconfig || return 1
+	fi
+}
+
+stop_pre() {
+	if [ "${RC_CMD}" != "restart" ]; then
+		checkconfig || return 1
+	fi
+}

diff --git a/net-dns/knot/files/knot.confd b/net-dns/knot/files/knot.confd
new file mode 100644
index 000000000000..f4821e9d725d
--- /dev/null
+++ b/net-dns/knot/files/knot.confd
@@ -0,0 +1,7 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+#KNOT_USER=knot
+#KNOT_GROUP=knot
+#KNOT_PIDFILE=/run/knot.pid
+#KNOT_CONFIG=/etc/knot/knot.conf

diff --git a/net-dns/knot/knot-3.4.2-r1.ebuild b/net-dns/knot/knot-3.4.2-r1.ebuild
new file mode 100644
index 000000000000..f15285db8abe
--- /dev/null
+++ b/net-dns/knot/knot-3.4.2-r1.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic systemd tmpfiles
+
+# subslot: libknot major.libdnssec major.libzscanner major
+KNOT_SUBSLOT="15.9.4"
+
+DESCRIPTION="High-performance authoritative-only DNS server"
+HOMEPAGE="https://www.knot-dns.cz/ https://gitlab.nic.cz/knot/knot-dns"
+SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
+
+S="${WORKDIR}/${P/_/-}"
+
+LICENSE="GPL-3+"
+SLOT="0/${KNOT_SUBSLOT}"
+KEYWORDS="~amd64 ~riscv ~x86"
+
+KNOT_MODULES=(
+	"+authsignal"
+	"+cookies"
+	"+dnsproxy"
+	"dnstap"
+	"geoip"
+	"+noudp"
+	"+onlinesign"
+	"+queryacl"
+	"+rrl"
+	"+stats"
+	"+synthrecord"
+	"+whoami"
+)
+
+IUSE="caps +daemon dbus +doc doh +fastparser +idn pkcs11 quic systemd test +utils xdp ${KNOT_MODULES[@]}"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+	dev-libs/libedit
+	dnstap? (
+		dev-libs/fstrm
+		dev-libs/protobuf-c:=
+	)
+	quic? ( net-libs/ngtcp2[gnutls] )
+"
+RDEPEND="
+	dev-db/lmdb:=
+	net-libs/gnutls:=[pkcs11?]
+	daemon? (
+		${COMMON_DEPEND}
+		acct-group/knot
+		acct-user/knot
+		dev-libs/userspace-rcu:=
+		caps? ( sys-libs/libcap-ng )
+		dbus? ( sys-apps/dbus )
+		geoip? ( dev-libs/libmaxminddb:= )
+		systemd? ( sys-apps/systemd:= )
+		)
+	utils? (
+		${COMMON_DEPEND}
+		doh? ( net-libs/nghttp2:= )
+		idn? ( net-dns/libidn2:= )
+	)
+	xdp? (
+		>=dev-libs/libbpf-1.0:=
+		net-libs/xdp-tools
+		utils? ( net-libs/libmnl:= )
+	)
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	doc? ( dev-python/sphinx )
+	test? (
+		pkcs11? ( dev-libs/softhsm )
+	)
+"
+
+src_prepare() {
+	default
+
+	# these tests call this daemon file knot/server/dthreads.h
+	if use test && use !daemon; then
+		sed -i \
+		-e '/test_atomic/d' \
+		-e '/test_spinlock/d' \
+		tests/Makefile.am || die
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	local u
+	local my_conf=(
+		--with-storage="${EPREFIX}/var/lib/${PN}"
+		--with-rundir="${EPREFIX}/var/run/${PN}"
+		$(use_enable caps cap_ng)
+		$(use_enable daemon)
+		$(use_enable fastparser)
+		$(use_enable dnstap)
+		$(use_enable doc documentation)
+		$(use_with doh libnghttp2)
+		$(use_enable geoip maxminddb)
+		$(use_with idn libidn)
+		$(use_enable quic)
+		$(use_enable systemd)
+		$(use_enable utils utilities)
+		$(use_enable xdp)
+	)
+
+	# modules (except dnstap forced by use_enable if set with utils) are only used by daemon
+	if use daemon; then
+		for u in "${KNOT_MODULES[@]#+}"; do
+			my_conf+=("$(use_with ${u} module-${u})")
+		done
+	else
+			my_conf+=("--disable-modules")
+	fi
+
+	if use !daemon; then
+		my_conf+=("--enable-dbus=no")
+	elif use dbus; then
+		my_conf+=("--enable-dbus=libdbus")
+	elif use !dbus && use !systemd; then
+		my_conf+=("--enable-dbus=no")
+	elif use !dbus && use systemd; then
+		my_conf+=("--enable-dbus=systemd")
+	fi
+
+	if use riscv; then
+		append-libs -latomic
+	fi
+
+	econf "${my_conf[@]}"
+}
+
+src_compile() {
+	default
+
+	use doc && emake -C doc html
+}
+
+src_install() {
+	use doc && local HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
+
+	default
+
+	if use daemon; then
+		rmdir "${D}/var/run/${PN}" "${D}/var/run/" || die
+
+		newinitd "${FILESDIR}"/knot-2.init knot
+		newconfd "${FILESDIR}"/knot.confd knot
+
+		newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+		use systemd && systemd_newunit distro/common/knot.service knot.service
+	fi
+
+	find "${D}" -name '*.la' -delete || die
+
+	keepdir /var/lib/knot
+}
+
+pkg_postinst() {
+	use daemon && tmpfiles_process ${PN}.conf
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/knot/files/, net-dns/knot/
@ 2024-12-06 15:36 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-12-06 15:36 UTC (permalink / raw
  To: gentoo-commits

commit:     adb8f8f7b1ddc969b72f428ef0c8237aff57570e
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Fri Dec  6 11:56:53 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec  6 15:35:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adb8f8f7

net-dns/knot: drop 3.4.2

Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/39610
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dns/knot/files/knot-1.init |  42 -----------
 net-dns/knot/knot-3.4.2.ebuild | 166 -----------------------------------------
 2 files changed, 208 deletions(-)

diff --git a/net-dns/knot/files/knot-1.init b/net-dns/knot/files/knot-1.init
deleted file mode 100644
index 989a576dcc59..000000000000
--- a/net-dns/knot/files/knot-1.init
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-: ${KNOT_USER:=knot}
-: ${KNOT_GROUP:=knot}
-: ${KNOT_PIDFILE:=/run/knot.pid}
-: ${KNOT_CONFIG:=/etc/knot/knot.conf}
-
-name="knot"
-description="High-performance authoritative-only DNS server"
-command="/usr/sbin/knotd"
-command_args="-c ${KNOT_CONFIG}"
-command_user="${KNOT_USER}:${KNOT_GROUP}"
-command_background=true
-pidfile="${KNOT_PIDFILE}"
-
-extra_commands="checkconfig"
-extra_started_commands="reload"
-
-checkconfig() {
-	/usr/bin/knotc conf-check 1>/dev/null || return 1
-}
-
-reload() {
-	checkconfig || return 1
-	ebegin "Reloading ${SVCNAME}"
-	start-stop-daemon --signal HUP --pidfile $pidfile
-	eend $?
-}
-
-start_pre() {
-	if [ "${RC_CMD}" != "restart" ]; then
-		checkconfig || return 1
-	fi
-}
-
-stop_pre() {
-	if [ "${RC_CMD}" != "restart" ]; then
-		checkconfig || return 1
-	fi
-}

diff --git a/net-dns/knot/knot-3.4.2.ebuild b/net-dns/knot/knot-3.4.2.ebuild
deleted file mode 100644
index 06a4f78e8400..000000000000
--- a/net-dns/knot/knot-3.4.2.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools flag-o-matic systemd tmpfiles
-
-# subslot: libknot major.libdnssec major.libzscanner major
-KNOT_SUBSLOT="15.9.4"
-
-DESCRIPTION="High-performance authoritative-only DNS server"
-HOMEPAGE="https://www.knot-dns.cz/ https://gitlab.nic.cz/knot/knot-dns"
-SRC_URI="https://secure.nic.cz/files/knot-dns/${P/_/-}.tar.xz"
-
-S="${WORKDIR}/${P/_/-}"
-
-LICENSE="GPL-3+"
-SLOT="0/${KNOT_SUBSLOT}"
-KEYWORDS="~amd64 ~riscv ~x86"
-
-KNOT_MODULES=(
-	"+authsignal"
-	"+cookies"
-	"+dnsproxy"
-	"dnstap"
-	"geoip"
-	"+noudp"
-	"+onlinesign"
-	"+queryacl"
-	"+rrl"
-	"+stats"
-	"+synthrecord"
-	"+whoami"
-)
-
-IUSE="caps +daemon dbus +doc doh +fastparser +idn pkcs11 quic systemd test +utils xdp ${KNOT_MODULES[@]}"
-RESTRICT="!test? ( test )"
-
-COMMON_DEPEND="
-	dev-libs/libedit
-	dnstap? (
-		dev-libs/fstrm
-		dev-libs/protobuf-c:=
-	)
-	quic? ( net-libs/ngtcp2[gnutls] )
-"
-RDEPEND="
-	dev-db/lmdb:=
-	net-libs/gnutls:=[pkcs11?]
-	daemon? (
-		${COMMON_DEPEND}
-		acct-group/knot
-		acct-user/knot
-		dev-libs/userspace-rcu:=
-		caps? ( sys-libs/libcap-ng )
-		dbus? ( sys-apps/dbus )
-		geoip? ( dev-libs/libmaxminddb:= )
-		systemd? ( sys-apps/systemd:= )
-		)
-	utils? (
-		${COMMON_DEPEND}
-		doh? ( net-libs/nghttp2:= )
-		idn? ( net-dns/libidn2:= )
-	)
-	xdp? (
-		>=dev-libs/libbpf-1.0:=
-		net-libs/xdp-tools
-		utils? ( net-libs/libmnl:= )
-	)
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	doc? ( dev-python/sphinx )
-	test? (
-		pkcs11? ( dev-libs/softhsm )
-	)
-"
-
-src_prepare() {
-	default
-
-	# these tests call this daemon file knot/server/dthreads.h
-	if use test && use !daemon; then
-		sed -i \
-		-e '/test_atomic/d' \
-		-e '/test_spinlock/d' \
-		tests/Makefile.am || die
-		eautoreconf
-	fi
-}
-
-src_configure() {
-	local u
-	local my_conf=(
-		--with-storage="${EPREFIX}/var/lib/${PN}"
-		--with-rundir="${EPREFIX}/var/run/${PN}"
-		$(use_enable caps cap_ng)
-		$(use_enable daemon)
-		$(use_enable fastparser)
-		$(use_enable dnstap)
-		$(use_enable doc documentation)
-		$(use_with doh libnghttp2)
-		$(use_enable geoip maxminddb)
-		$(use_with idn libidn)
-		$(use_enable quic)
-		$(use_enable systemd)
-		$(use_enable utils utilities)
-		$(use_enable xdp)
-	)
-
-	# modules (except dnstap forced by use_enable if set with utils) are only used by daemon
-	if use daemon; then
-		for u in "${KNOT_MODULES[@]#+}"; do
-			my_conf+=("$(use_with ${u} module-${u})")
-		done
-	else
-			my_conf+=("--disable-modules")
-	fi
-
-	if use !daemon; then
-		my_conf+=("--enable-dbus=no")
-	elif use dbus; then
-		my_conf+=("--enable-dbus=libdbus")
-	elif use !dbus && use !systemd; then
-		my_conf+=("--enable-dbus=no")
-	elif use !dbus && use systemd; then
-		my_conf+=("--enable-dbus=systemd")
-	fi
-
-	if use riscv; then
-		append-libs -latomic
-	fi
-
-	econf "${my_conf[@]}"
-}
-
-src_compile() {
-	default
-
-	use doc && emake -C doc html
-}
-
-src_install() {
-	use doc && local HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
-
-	default
-
-	if use daemon; then
-		rmdir "${D}/var/run/${PN}" "${D}/var/run/" || die
-
-		newinitd "${FILESDIR}/knot-1.init" knot
-
-		newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-		use systemd && systemd_newunit distro/common/knot.service knot.service
-	fi
-
-	find "${D}" -name '*.la' -delete || die
-
-	keepdir /var/lib/knot
-}
-
-pkg_postinst() {
-	use daemon && tmpfiles_process ${PN}.conf
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-06 15:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-01 14:30 [gentoo-commits] repo/gentoo:master commit in: net-dns/knot/files/, net-dns/knot/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-12-06 15:36 Sam James
2024-12-04 12:58 Sam James
2017-08-22  9:07 Michał Górny
2016-02-08 10:17 Tomas Chvatal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox