summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Krizek2020-01-27 14:30:05 +0100
committerTomas Krizek2020-01-27 14:31:02 +0100
commiteef481de1983ca5f9850624bcf2689784dcd0ab0 (patch)
tree6e3a846492958967592219f6f1e88dcd7caa3371
parent7bc0cb1803d15deb52bf8cb5559018516ea60855 (diff)
downloadaur-eef481de1983ca5f9850624bcf2689784dcd0ab0.tar.gz
update to 5.0.0
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD9
-rw-r--r--install36
3 files changed, 43 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 784c89db34e..3b99e365c6c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = knot-resolver
pkgdesc = full caching DNS resolver implementation
- pkgver = 4.3.0
+ pkgver = 5.0.0
pkgrel = 1
url = https://www.knot-resolver.cz/
install = install
@@ -16,21 +16,18 @@ pkgbase = knot-resolver
depends = libedit
depends = libuv
depends = lmdb
- depends = lua51-sec
- depends = lua51-socket
depends = luajit
depends = systemd
depends = libcap-ng
optdepends = lua51-basexx: experimental_dot_auth module,
optdepends = lua51-cqueues: http and dns64 module, policy.rpz() function,
- optdepends = lua51-http: http module,
- optdepends = lua51-filesystem: prefill module,
+ optdepends = lua51-http: http and prefill modules, trust_anchors bootstrap,
optdepends = lua51-psl: policy.slice_randomize_psl() function,
options = debug
options = strip
backup = etc/knot-resolver/kresd.conf
- source = https://secure.nic.cz/files/knot-resolver/knot-resolver-4.3.0.tar.xz
- sha256sums = 0ca0f171ae2b2d76830967a5150eb0fa496b48b2a48f41b2be65d3743aaece25
+ source = https://secure.nic.cz/files/knot-resolver/knot-resolver-5.0.0.tar.xz
+ sha256sums = ca6023cd0c18b11f4a0cff0c8e882c7f3a5ad6653e9aa95acdbedafc5a53a5ed
pkgname = knot-resolver
diff --git a/PKGBUILD b/PKGBUILD
index 9aae8a5c417..de7ab60eb5f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Ondřej Surý <ondrej@sury.org>
pkgname=knot-resolver
-pkgver=4.3.0
+pkgver=5.0.0
pkgrel=1
pkgdesc='full caching DNS resolver implementation'
url='https://www.knot-resolver.cz/'
@@ -18,8 +18,6 @@ depends=(
'libedit'
'libuv'
'lmdb'
- 'lua51-sec'
- 'lua51-socket'
'luajit'
'systemd'
'libcap-ng'
@@ -27,8 +25,7 @@ depends=(
optdepends=(
'lua51-basexx: experimental_dot_auth module',
'lua51-cqueues: http and dns64 module, policy.rpz() function',
- 'lua51-http: http module',
- 'lua51-filesystem: prefill module',
+ 'lua51-http: http and prefill modules, trust_anchors bootstrap',
'lua51-psl: policy.slice_randomize_psl() function',
)
makedepends=(
@@ -39,7 +36,7 @@ makedepends=(
source=("https://secure.nic.cz/files/${pkgname}/${pkgname}-${pkgver}.tar.xz")
-sha256sums=('0ca0f171ae2b2d76830967a5150eb0fa496b48b2a48f41b2be65d3743aaece25')
+sha256sums=('ca6023cd0c18b11f4a0cff0c8e882c7f3a5ad6653e9aa95acdbedafc5a53a5ed')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/install b/install
index de23d593f73..c2de76d78ed 100644
--- a/install
+++ b/install
@@ -4,8 +4,44 @@ post_install() {
chown -R root:knot-resolver /etc/knot-resolver
}
+pre_upgrade() {
+ # upgrade from 4.x to 5.x - save socket interfaces before package uninstall
+ if [ -f /usr/lib/systemd/system/kresd.socket ] ; then
+ export UPG_DIR=/var/lib/knot-resolver/.upgrade-4-to-5
+ mkdir -p ${UPG_DIR}
+ touch ${UPG_DIR}/.unfinished
+
+ for sock in kresd.socket kresd-tls.socket kresd-webmgmt.socket kresd-doh.socket ; do
+ if systemctl is-enabled ${sock} 2>/dev/null | grep -qv masked ; then
+ systemctl show ${sock} -p Listen > ${UPG_DIR}/${sock}
+ case "$(systemctl show ${sock} -p BindIPv6Only)" in
+ *ipv6-only)
+ touch ${UPG_DIR}/${sock}.v6only
+ ;;
+ *default)
+ if cat /proc/sys/net/ipv6/bindv6only | grep -q 1 ; then
+ touch ${UPG_DIR}/${sock}.v6only
+ fi
+ ;;
+ esac
+ fi
+ done
+ fi
+}
+
post_upgrade() {
+ # upgrade from 4.x to 5.x - convert systemd socket configs to net.listen() format
+ export UPG_DIR=/var/lib/knot-resolver/.upgrade-4-to-5
+ if [ -f ${UPG_DIR}/.unfinished ] ; then
+ rm -f ${UPG_DIR}/.unfinished
+ kresd -c /usr/lib/knot-resolver/upgrade-4-to-5.lua &>/dev/null
+ echo -e "\n !!! WARNING !!!"
+ echo -e "Knot Resolver configuration file requires manual upgrade.\n"
+ cat ${UPG_DIR}/kresd.conf.net 2>/dev/null
+ fi
+
chown -R root:knot-resolver /etc/knot-resolver
+ chown -R root:knot-resolver /var/lib/knot-resolver
}
post_remove() {