* [gentoo-commits] repo/proj/guru:dev commit in: net-dns/technitium-dns/files/, net-dns/technitium-dns/
@ 2025-09-19 19:23 Itai Ferber
0 siblings, 0 replies; only message in thread
From: Itai Ferber @ 2025-09-19 19:23 UTC (permalink / raw
To: gentoo-commits
commit: ab70a56eee4301f470273a6044bd7a01ee7e2b70
Author: Itai Ferber <itai <AT> itaiferber <DOT> net>
AuthorDate: Fri Sep 19 19:22:40 2025 +0000
Commit: Itai Ferber <itai <AT> itaiferber <DOT> net>
CommitDate: Fri Sep 19 19:23:09 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ab70a56e
net-dns/technitium-dns: new package, add 13.6
Signed-off-by: Itai Ferber <itai <AT> itaiferber.net>
net-dns/technitium-dns/Manifest | 3 +
.../technitium-dns/files/technitium-dns-13.6.initd | 10 +++
.../files/technitium-dns-13.6.service | 12 +++
net-dns/technitium-dns/metadata.xml | 11 +++
net-dns/technitium-dns/technitium-dns-13.6.ebuild | 87 ++++++++++++++++++++++
5 files changed, 123 insertions(+)
diff --git a/net-dns/technitium-dns/Manifest b/net-dns/technitium-dns/Manifest
new file mode 100644
index 0000000000..9f9f142d58
--- /dev/null
+++ b/net-dns/technitium-dns/Manifest
@@ -0,0 +1,3 @@
+DIST BouncyCastle.Cryptography.2.5.1.nupkg 8231681 BLAKE2B 0e532828def85261e703d09e8a5ef0b86e91e96f7ab5b69ff84a3dc4411c6a71dcdf3c25ba6427311dd4c033aa5058e56f6bc0932c245d9d849ebd44184f14b2 SHA512 cc12d715a7a3acda0e51b6804ae10e1c3e9543009c108485ae6c4ebe8773dee57642f8be291dc2cadcd14a086a0237d925298997ded8a01a4d5a781c7b67ab3d
+DIST TechnitiumDnsServer-13.6.0.tar.gz 1627685 BLAKE2B 21e42c61d0817402583f15d8e6ec851e9b28660e1ef66ef6bae284e9fefb6a2158648ba92f10af6403820a8d7d5d743a7aa028362cf44b32d9cecf66897287a9 SHA512 f8ca95d0865095ead6ddfc4270b95ca9c1869b3fc2bfa4891ab3ffbd8655ca70c7436fd022e56819399eef1b80156d071a4302034431eb96cc2e3d714562ebf5
+DIST TechnitiumLibrary-13.6.0.tar.gz 246457 BLAKE2B 271dd51d477cae14ffea3c22136b8a4a5077af9f5fab35eaee0baed731f01265341a9a64d30e32e940bd77ccf6714d9859b58f6de2851117d9dbbe0f55beb045 SHA512 2b8f1f9a86c418a1c5260a180399d0f67c1b3b63406ef0f6e70c0e069b0e84c4f8f51aeca1ee278195603c435e606a76a15917ae4a2b35ed5b4ca67e10a00528
diff --git a/net-dns/technitium-dns/files/technitium-dns-13.6.initd b/net-dns/technitium-dns/files/technitium-dns-13.6.initd
new file mode 100644
index 0000000000..143cad09d8
--- /dev/null
+++ b/net-dns/technitium-dns/files/technitium-dns-13.6.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+supervisor="supervise-daemon"
+command="/usr/bin/technitium-dns"
+command_args="/etc/dns"
+
+# The server responds to SIGINT instead of SIGTERM.
+retry="SIGINT/5"
diff --git a/net-dns/technitium-dns/files/technitium-dns-13.6.service b/net-dns/technitium-dns/files/technitium-dns-13.6.service
new file mode 100644
index 0000000000..e9bbe19f97
--- /dev/null
+++ b/net-dns/technitium-dns/files/technitium-dns-13.6.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Technitium DNS Server
+
+[Service]
+ExecStart=/usr/bin/technitium-dns /etc/dns
+KillSignal=SIGINT
+Restart=always
+RestartSec=10
+SyslogIdentifier=technitium-dns
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/technitium-dns/metadata.xml b/net-dns/technitium-dns/metadata.xml
new file mode 100644
index 0000000000..8d907970b1
--- /dev/null
+++ b/net-dns/technitium-dns/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>itai@itaiferber.net</email>
+ <name>Itai Ferber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">TechnitiumSoftware/DnsServer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dns/technitium-dns/technitium-dns-13.6.ebuild b/net-dns/technitium-dns/technitium-dns-13.6.ebuild
new file mode 100644
index 0000000000..3f8bbc1aca
--- /dev/null
+++ b/net-dns/technitium-dns/technitium-dns-13.6.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DOTNET_PKG_COMPAT=8.0
+NUGETS="BouncyCastle.Cryptography@2.5.1"
+inherit dotnet-pkg systemd
+
+MYPV="${PV}.0"
+DESCRIPTION="Open-source, self-hosted authoritative and recursive DNS+DHCP server."
+HOMEPAGE="https://technitium.com/dns/"
+SRC_URI="
+ https://github.com/TechnitiumSoftware/DnsServer/archive/refs/tags/v${MYPV}.tar.gz -> TechnitiumDnsServer-${MYPV}.tar.gz
+ https://github.com/TechnitiumSoftware/TechnitiumLibrary/archive/refs/tags/dns-server-v${MYPV}.tar.gz -> TechnitiumLibrary-${MYPV}.tar.gz
+ ${NUGET_URIS}
+"
+
+S="${WORKDIR}"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+
+RDEPEND=">=dev-libs/icu-70"
+
+DOTNET_PKG_PROJECTS=(
+ "${S}/TechnitiumLibrary-dns-server-v${MYPV}/TechnitiumLibrary.ByteTree/TechnitiumLibrary.ByteTree.csproj"
+ "${S}/TechnitiumLibrary-dns-server-v${MYPV}/TechnitiumLibrary.Net/TechnitiumLibrary.Net.csproj"
+ "${S}/DnsServer-${MYPV}/DnsServerApp/DnsServerApp.csproj"
+)
+
+src_prepare() {
+ default
+ dotnet-pkg_src_prepare
+
+ # The DnsServer project expects to find TechnitiumLibrary DLLs in a
+ # directory sibling to the root of the project, so has `HintPath`
+ # directives to point to that relative path (e.g.,
+ # '..\..\TechnitiumLibrary\bin\TechnitiumLibrary.dll'). Because we're
+ # explicitly building into `DOTNET_PKG_OUTPUT`, we'll need to point there
+ # instead for the DLLs to be located.
+ local replace_hintpaths="s|<HintPath>(\\.\\.\\\\)*TechnitiumLibrary\\\\bin|<HintPath>${DOTNET_PKG_OUTPUT}|g"
+ grep -ErlZ 'HintPath.*TechnitiumLibrary' "${S}/DnsServer-${MYPV}" \
+ | xargs -0 sed -E -i "${replace_hintpaths}" \
+ || die
+}
+
+src_install() {
+ default
+
+ # dotnet-pkg will create a wrapper script around an executable at the root
+ # of `DOTNET_PKG_OUTPUT` matching `${PN}`, so we can link to
+ # `DnsServerApp`.
+ cd "${DOTNET_PKG_OUTPUT}" && ln -rs 'DnsServerApp' "${PN}" || die
+
+ # The included `systemd.service` file has hard-coded paths we'd need to
+ # adjust; we'll install our own.
+ rm "${DOTNET_PKG_OUTPUT}/systemd.service"
+
+ dotnet-pkg_src_install
+
+ newinitd "${FILESDIR}/${PF}.initd" "${PN}"
+ systemd_newunit "${FILESDIR}/${PF}.service" "${PN}.service"
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog 'To start Technitium DNS:'
+ elog '* OpenRC: rc-update add technitium-dns boot'
+ elog ' rc-service technitium-dns start'
+ elog ' OR'
+ elog '* systemd: systemctl enable technitium-dns'
+ elog ' systemctl start technitium-dns'
+ elog
+ elog 'After starting the service,'
+ elog '1. Technitium DNS configuration files can be found in'
+ elog " \"${ROOT}/etc/dns\""
+ elog '2. The Technetium web server can be accessed at localhost:5380. This port'
+ elog ' can be adjusted in settings'
+ fi
+}
+
+pkg_postrm() {
+ if [[ -d "${ROOT}/etc/dns" ]]; then
+ elog "Technitium DNS config files may still be present in \"${ROOT}/etc/dns\""
+ fi
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-19 19:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 19:23 [gentoo-commits] repo/proj/guru:dev commit in: net-dns/technitium-dns/files/, net-dns/technitium-dns/ Itai Ferber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox