Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions srcpkgs/gdnsd/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
case "${ACTION}" in
post)
setcap cap_net_bind_service+ei usr/bin/gdnsd
;;
esac
10 changes: 10 additions & 0 deletions srcpkgs/gdnsd/files/gdnsd/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
exec 2>&1
install -d -m0750 -o _gdnsd -g _gdnsd /run/gdnsd
exec setpriv --reuid _gdnsd --regid _gdnsd --groups _gdnsd \
--securebits +noroot,+noroot_locked,+no_setuid_fixup,+no_setuid_fixup_locked \
--bounding-set -all,+net_bind_service \
--ambient-caps -all,+net_bind_service \
--inh-caps -all,+net_bind_service \
--no-new-privs \
gdnsd -c /etc/gdnsd -R start
15 changes: 15 additions & 0 deletions srcpkgs/gdnsd/patches/musl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- a/src/daemon.c 2024-09-19 13:22:52.000000000 -0700
+++ b/src/daemon.c 2025-12-03 21:31:09.368965368 -0700
@@ -74,11 +74,11 @@ static void sysd_notify_ready(void)

const int fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
if (fd < 0)
log_fatal("Cannot create AF_UNIX socket");

- const ssize_t strv = sendto(fd, msg, strlen(msg), 0, &sun, sun_len);
+ const ssize_t strv = sendto(fd, msg, strlen(msg), 0, (const struct sockaddr *)&sun, sun_len);
if (strv < 0)
log_fatal("sendto() systemd NOTIFY_SOCKET failed: %s", logf_errno());

if (close(fd))
log_fatal("close() of systemd NOTIFY_SOCKET failed: %s", logf_errno());
35 changes: 35 additions & 0 deletions srcpkgs/gdnsd/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Template file for 'gdnsd'
pkgname=gdnsd
version=3.8.3
revision=1
build_style=gnu-configure
configure_args="
--disable-silent-rules
--with-rundir=/run/gdnsd"
hostmakedepends="automake pkg-config"
makedepends="libunwind-devel libmaxminddb-devel perl xz
libev-devel liburcu-devel libsodium-devel"
checkdepends="perl-Socket6 perl-IO-Socket-INET6
perl-HTTP-Daemon perl-Net-DNS"
short_desc="Authoritative-only DNS server with geographic plugins"
maintainer="JailBird <jailbird@fdf.net>"
license="GPL-3.0-or-later"
homepage="https://gdnsd.org/"
changelog="https://raw.githubusercontent.com/gdnsd/gdnsd/refs/heads/main/NEWS"
distfiles="https://github.com/gdnsd/gdnsd/releases/download/v${version}/gdnsd-${version}.tar.xz"
checksum=16a81836273dcbc17e5527df2214e8664d0545bb18b55f08325710de10c8f64d

system_accounts="_gdnsd"
_gdnsd_homedir="/var/lib/gdnsd"

make_dirs="/var/lib/gdnsd 0750 _gdnsd _gdnsd
/etc/gdnsd 0750 _gdnsd _gdnsd"

# Skip tests as they require a Maxmind DB
do_check() {
:
}

post_install() {
vsv gdnsd
}