Commit 39330e46 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/bind: make sure all patches are applied

This fixes builds on non-x86
parent 935add8c
......@@ -7,7 +7,7 @@ pkgver=9.11.6_p1
_ver=${pkgver%_p*}
_p=${pkgver#*_p}
[ "$_p" != "$pkgver" ] && _ver="${_ver}-P$_p"
pkgrel=0
pkgrel=1
pkgdesc="The ISC DNS server"
url="http://www.isc.org"
arch="all"
......@@ -65,6 +65,7 @@ source="http://ftp.isc.org/isc/bind9/${_ver}/bind-${_ver}.tar.gz
builddir="$srcdir/bind-${_ver}"
prepare() {
default_prepare
cd "$builddir"
### http://bugs.gentoo.org/show_bug.cgi?id=227333
......@@ -78,8 +79,6 @@ prepare() {
-e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
"${i}" || return 1
done
patch -p0 -i "$srcdir"/bind.so_bsdcompat.patch || return 1
}
build() {
......@@ -188,8 +187,8 @@ tools() {
}
sha512sums="419aeeddeab7aef818b9043db7b21a847993444f663dca04e58ee97a0ebee0610cbc5a9422d17a6f0ee5d44598a2cbb5651e3b4e8c56708eaf923dca0a5c4c03 bind-9.11.6-P1.tar.gz
d3b0329f48bd296988d8854ec4c7738c611d96e13c0439326a9cf801bc41a9504b1e0673f06fd66c5e36949192c6968d512d53a91d5d5fa96783c8b2c6ec88e3 Replace-atomic-operations.patch
f3e3d1b680617485b9db20a59a10fec3b3b539d423984493228a7d5aaa29d699b9012ad60e863e56bdaf15b73952c22710d0ded1c86cd24417ac775ee062cfa3 bind.so_bsdcompat.patch
1022c0dff2d62ed7dc7a772c7fd50e908befc4cf93d42bdb8ecf1fdc29e9b8bb4042bd67dbf16ff5e54a380cadb5bba11aac60227bba582c7486cffb6ba29181 Replace-atomic-operations.patch
38c06e1f4834f9648cd5ee37175aeb52d31101123b5359f9df8553283f5dde98a827ba1d8786c0fc4c86012b5125c253b735e227df0cb2241213f05f88ae2b9e bind.so_bsdcompat.patch
196c0a3b43cf89e8e3547d7fb63a93ff9a3306505658dfd9aa78e6861be6b226580b424dd3dd44b955b2d9f682b1dc62c457f3ac29ce86200ef070140608c015 named.initd
127bdcc0b5079961f0951344bc3fad547450c81aee2149eac8c41a8c0c973ea0ffe3f956684c6fcb735a29c43d2ff48c153b6a71a0f15757819a72c492488ddf named.confd
d2f61d02d7829af51faf14fbe2bafe8bc90087e6b6697c6275a269ebbddcaa14a234fff5c41da793e945e8ff1de3de0858a40334e0d24289eab98df4bb721ac5 named.conf.authoritative
......
From d72f436b7d7c697b262968c48c2d7643069ab17f Mon Sep 17 00:00:00 2001
From ef49780d30d3ddc5735cfc32561b678a634fa72f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org>
Date: Wed, 17 Apr 2019 15:22:27 +0200
Subject: [PATCH] Replace atomic operations in bin/named/client.c with
isc_refcount reference counting
(cherry picked from commit ef49780d30d3ddc5735cfc32561b678a634fa72f)
---
lib/ns/client.c | 18 +++++++-----------
lib/ns/include/ns/interfacemgr.h | 5 +++--
lib/ns/interfacemgr.c | 7 +++++--
bin/named/client.c | 18 +++++++-----------
bin/named/include/named/interfacemgr.h | 5 +++--
bin/named/interfacemgr.c | 7 +++++--
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/lib/ns/client.c b/lib/ns/client.c
index d8ab3ce9c6..24f4f830d9 100644
--- a/lib/ns/client.c
+++ b/lib/ns/client.c
@@ -428,12 +428,10 @@ tcpconn_detach(ns_client_t *client) {
diff --git a/bin/named/client.c b/bin/named/client.c
index 845326abc0..29fecadca8 100644
--- a/bin/named/client.c
+++ b/bin/named/client.c
@@ -402,12 +402,10 @@ tcpconn_detach(ns_client_t *client) {
static void
mark_tcp_active(ns_client_t *client, bool active) {
if (active && !client->tcpactive) {
......@@ -30,24 +29,24 @@ index d8ab3ce9c6..24f4f830d9 100644
client->tcpactive = active;
}
}
@@ -580,7 +578,7 @@ exit_check(ns_client_t *client) {
@@ -554,7 +552,7 @@ exit_check(ns_client_t *client) {
if (client->mortal && TCP_CLIENT(client) &&
client->newstate != NS_CLIENTSTATE_FREED &&
(client->sctx->options & NS_SERVER_CLIENTTEST) == 0 &&
!ns_g_clienttest &&
- isc_atomic_xadd(&client->interface->ntcpaccepting, 0) == 0)
+ isc_refcount_current(&client->interface->ntcpaccepting) == 0)
{
/* Nobody else is accepting */
client->mortal = false;
@@ -3306,7 +3304,6 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
@@ -3328,7 +3326,6 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
isc_result_t result;
ns_client_t *client = event->ev_arg;
isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event;
dns_aclenv_t *env = ns_interfacemgr_getaclenv(client->interface->mgr);
- uint32_t old;
REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN);
REQUIRE(NS_CLIENT_VALID(client));
@@ -3326,8 +3323,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
@@ -3348,8 +3345,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
INSIST(client->naccepts == 1);
client->naccepts--;
......@@ -57,7 +56,7 @@ index d8ab3ce9c6..24f4f830d9 100644
/*
* We must take ownership of the new socket before the exit
@@ -3457,8 +3453,8 @@ client_accept(ns_client_t *client) {
@@ -3480,8 +3476,8 @@ client_accept(ns_client_t *client) {
* quota is tcp-clients plus the number of listening
* interfaces plus 1.)
*/
......@@ -68,7 +67,7 @@ index d8ab3ce9c6..24f4f830d9 100644
if (exit) {
client->newstate = NS_CLIENTSTATE_INACTIVE;
(void)exit_check(client);
@@ -3516,7 +3512,7 @@ client_accept(ns_client_t *client) {
@@ -3539,7 +3535,7 @@ client_accept(ns_client_t *client) {
* listening for connections itself to prevent the interface
* going dead.
*/
......@@ -77,19 +76,19 @@ index d8ab3ce9c6..24f4f830d9 100644
}
static void
diff --git a/lib/ns/include/ns/interfacemgr.h b/lib/ns/include/ns/interfacemgr.h
index 24552ed353..6bbb0e67f3 100644
--- a/lib/ns/include/ns/interfacemgr.h
+++ b/lib/ns/include/ns/interfacemgr.h
diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h
index 3535ef22a8..6e10f210fd 100644
--- a/bin/named/include/named/interfacemgr.h
+++ b/bin/named/include/named/interfacemgr.h
@@ -45,6 +45,7 @@
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/socket.h>
+#include <isc/refcount.h>
#include <dns/geoip.h>
#include <dns/result.h>
@@ -76,11 +77,11 @@ struct ns_interface {
@@ -75,11 +76,11 @@ struct ns_interface {
/*%< UDP dispatchers. */
isc_socket_t * tcpsocket; /*%< TCP socket. */
isc_dscp_t dscp; /*%< "listen-on" DSCP value */
......@@ -103,11 +102,11 @@ index 24552ed353..6bbb0e67f3 100644
servicing TCP queries
(whether accepting or
connected) */
diff --git a/lib/ns/interfacemgr.c b/lib/ns/interfacemgr.c
index 5f9cd8c0b9..e4e9b5e10d 100644
--- a/lib/ns/interfacemgr.c
+++ b/lib/ns/interfacemgr.c
@@ -429,8 +429,8 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c
index d9f6df5802..135533be6b 100644
--- a/bin/named/interfacemgr.c
+++ b/bin/named/interfacemgr.c
@@ -386,8 +386,8 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
* connections will be handled in parallel even though there is
* only one client initially.
*/
......@@ -118,7 +117,7 @@ index 5f9cd8c0b9..e4e9b5e10d 100644
ifp->nudpdispatch = 0;
@@ -663,6 +663,9 @@ ns_interface_destroy(ns_interface_t *ifp) {
@@ -618,6 +618,9 @@ ns_interface_destroy(ns_interface_t *ifp) {
ns_interfacemgr_detach(&ifp->mgr);
......
--- lib/isc/unix/socket.c.orig 2005-11-03 17:08:42.000000000 -0600
+++ lib/isc/unix/socket.c 2006-02-18 13:09:15.000000000 -0600
--- ./lib/isc/unix/socket.c.orig 2005-11-03 17:08:42.000000000 -0600
+++ ./lib/isc/unix/socket.c 2006-02-18 13:09:15.000000000 -0600
@@ -245,6 +245,8 @@
#define SOCK_DEAD(s) ((s)->references == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment