extra/bind to 9.11.0.P3-3

This commit is contained in:
Kevin Mihelich 2017-03-15 00:12:13 +00:00
parent 1efc231690
commit 93faa9d40a
2 changed files with 54 additions and 4 deletions

View file

@ -0,0 +1,39 @@
# https://github.com/voidlinux/void-packages/blob/master/srcpkgs/bind/patches/seccomp.patch
--- a/bin/named/include/named/seccomp.h.orig
+++ b/bin/named/include/named/seccomp.h
@@ -57,6 +57,8 @@
SCMP_SYS(rt_sigsuspend),
SCMP_SYS(fstat),
SCMP_SYS(epoll_ctl),
SCMP_SYS(gettimeofday),
+ SCMP_SYS(getpid),
+ SCMP_SYS(getrandom),
SCMP_SYS(unlink),
SCMP_SYS(socket),
@@ -121,6 +123,8 @@
"fstat",
"epoll_ctl",
"gettimeofday",
+ "getpid",
+ "getrandom",
"unlink",
"socket",
"sendto",
@@ -190,6 +194,8 @@
SCMP_SYS(fstat64),
SCMP_SYS(epoll_ctl),
SCMP_SYS(gettimeofday),
+ SCMP_SYS(getpid),
+ SCMP_SYS(getrandom),
SCMP_SYS(unlink),
#ifndef ISC_PLATFORM_USETHREADS
SCMP_SYS(fcntl64),
@@ -226,6 +232,8 @@
"fstat64",
"epoll_ctl",
"gettimeofday",
+ "getpid",
+ "getrandom",
"unlink",
#ifndef ISC_PLATFORM_USETHREADS
"fcntl64",

View file

@ -12,7 +12,7 @@ pkgbase=bind
pkgname=(bind bind-tools)
_pkgver=9.11.0-P3
pkgver=${_pkgver//-/.}
pkgrel=2
pkgrel=3
url='https://www.isc.org/software/bind/'
license=('custom:ISC')
arch=('i686' 'x86_64')
@ -31,7 +31,8 @@ source=("https://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz"{,.asc}
'localhost.zone'
'localhost.ip6.zone'
'127.0.0.zone'
'empty.zone')
'empty.zone'
'01-seccomp.patch')
sha1sums=('87d604061b23757dd746902ee66cd95545d5872f'
'SKIP'
'c5a2bcd9b0f009ae71f3a03fbdbe012196962a11'
@ -41,13 +42,23 @@ sha1sums=('87d604061b23757dd746902ee66cd95545d5872f'
'6704303a6ed431a29b1d8fe7b12decd4d1f2f50f'
'52da8f1c0247a11b16daa4e03d920e8f09315cbe'
'9c33726088342207ad06d33b2c13408290a0c8ad'
'4f4457b310cbbeadca2272eced062a9c2b2b42fe')
'4f4457b310cbbeadca2272eced062a9c2b2b42fe'
'b1130c6d3ecab96291108194ec9490df3322aabe')
prepare() {
msg2 'Getting a fresh version of root DNS'
# no more using source array, lack of versioning.
curl -o root.hint http://www.internic.net/zones/named.root
curl -o root.hint https://www.internic.net/zones/named.root
[[ -s root.hint ]]
cd bind-$_pkgver
# apply patch from the source array (should be a pacman feature)
local filename
for filename in "${source[@]}"; do
if [[ "$filename" =~ \.patch$ ]]; then
msg2 "Applying patch ${filename##*/}"
patch -p1 -N -i "$srcdir/${filename##*/}"
fi
done
}
build() {