network/unbound: Updated for version 1.16.3.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Badchay 2022-09-24 03:51:24 +01:00 committed by Willy Sudiarto Raharjo
parent f5ca80380b
commit 86686e45bb
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
4 changed files with 71 additions and 13 deletions

View File

@ -13,11 +13,3 @@ not conflict with anything else on SlackBuilds:
groupadd -g 304 unbound groupadd -g 304 unbound
useradd -r -u 304 -g unbound -d /etc/unbound/ -s /sbin/nologin -c \ useradd -r -u 304 -g unbound -d /etc/unbound/ -s /sbin/nologin -c \
'Unbound DNS resolver' unbound 'Unbound DNS resolver' unbound
Note: As of version 1.16.2, the script was almost entirely rewritten.
The idea was not only to modernize the script, but also make the
application more compatible with the Slackware architecture and to
be as easy to "just install and run the app". Also to note:
The control app titled unbound-countrol is enabled by
default but can be disabled in unbound.conf. It's secure, binds
to localhost and can't be used by non-root users.

View File

@ -0,0 +1,64 @@
--------
Welcome and background
--------
Unbound SlackBuild script was rewritten as of version 1.16.2.
As of version 1.16.2 rc.unbound script was made from scratch
to work like other SysVinit scripts. The previous versions
included Red Hat style init script. If for some reason you still
want to use that one, it can be found from the source tarball
contrib directory. It's not supported by this SlackBuild, though.
--------
Configuration
--------
The main configuration file is located at /etc/unbound/unbound.conf.
To make the setup as easy as possible, the SlackBuild makes some
changes to the original file so you don't have to spend time
changing some obvious settings, like disabling systemd socket
activation and other stuff that's required for proper functionality
on Slackware. The upstream configuration file is saved to
unbound.conf.upstream.
Threading is supported by Unbound but disabled by default. The
script will set num-threads to the value of nproc. Just uncomment
num-threads in unbound.conf to enable threading.
By default, we turn on "remote control" which enables the
functionality of unbound-control command. Despite its name, it
binds to localhost (by default) and cannot be used by unprivileged
users as certificate files aren't readable by them. It also allows
logrotating to work properly.
The logs are kept in /var/log/unbound/. The default settings log
just very basic things (i.e. unbound started or stopped).
The script also installs a logrotate script to /etc/logrotate.d
As for resolving and caching, you'll probably want to add
something like this to your /etc/resolv.conf:
nameserver ::1
nameserver 127.0.0.1
options trust-ad
--------
Automatic starting/stopping upon system start/shutdown
--------
To start Unbound automatically when system is booted,
add the following lines to /etc/rc.d/rc.local:
if [ -x /etc/rc.d/rc.unbound ]; then
/etc/rc.d/rc.unbound start
fi
To stop Unbound on system shutdown, add following lines
to /etc/rc.d/rc.local_shutdown
if [ -x /etc/rc.d/rc.unbound ]; then
/etc/rc.d/rc.unbound stop
fi

View File

@ -27,8 +27,8 @@
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=unbound PRGNAM=unbound
VERSION=${VERSION:-1.16.2} VERSION=${VERSION:-1.16.3}
BUILD=${BUILD:-2} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
@ -142,6 +142,7 @@ touch -r doc/Changelog $PKG/usr/doc/$PRGNAM-$VERSION/Changelog
# 3) Change timestamps to ASCII format (from Epoch). # 3) Change timestamps to ASCII format (from Epoch).
# 4) Turn off chroot. # 4) Turn off chroot.
# 5) Disable systemd socket activation. # 5) Disable systemd socket activation.
# 6) Set num-threads to $(nproc). Still disabled by default.
cp -a $PKG/etc/unbound/unbound.conf $PKG/etc/unbound/unbound.conf.upstream cp -a $PKG/etc/unbound/unbound.conf $PKG/etc/unbound/unbound.conf.upstream
sed -i \ sed -i \
-e 's/# control-interface:/control-interface:/g' \ -e 's/# control-interface:/control-interface:/g' \
@ -150,6 +151,7 @@ sed -i \
-e 's/# use-systemd: no/use-systemd: no/g' \ -e 's/# use-systemd: no/use-systemd: no/g' \
-e 's/# logfile: ""/logfile: "\/var\/log\/unbound\/unbound.log"/g' \ -e 's/# logfile: ""/logfile: "\/var\/log\/unbound\/unbound.log"/g' \
-e 's/# chroot: "\/etc\/unbound"/chroot: ""/g' \ -e 's/# chroot: "\/etc\/unbound"/chroot: ""/g' \
-e 's/# num-threads: 1/# num-threads: '$(nproc)' # Set to nproc by SlackBuild. Uncomment to enable threading/g' \
$PKG/etc/unbound/unbound.conf \ $PKG/etc/unbound/unbound.conf \
mkdir -p $PKG/var/run/unbound mkdir -p $PKG/var/run/unbound

View File

@ -1,8 +1,8 @@
PRGNAM="unbound" PRGNAM="unbound"
VERSION="1.16.2" VERSION="1.16.3"
HOMEPAGE="https://nlnetlabs.nl/projects/unbound/about/" HOMEPAGE="https://nlnetlabs.nl/projects/unbound/about/"
DOWNLOAD="https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.2.tar.gz" DOWNLOAD="https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.3.tar.gz"
MD5SUM="974cbd17e2e2373f36bfce0ad5b1d4a1" MD5SUM="f0a767b32058ae67311e5d3665139d15"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="" REQUIRES=""