2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 21:17:54 +00:00

249 Commits

Author SHA1 Message Date
Witold Kręcicki
ad03c22e97 Use pthread rwlocks by default 2020-03-04 10:28:22 +01:00
Evan Hunt
beda680f90 minor cosmetic fixes
- the configuration summary reported zlib compression was not
  supported even when it was.
- when bind.keys.h was regenerated it violated clang-format style.
2020-02-25 18:24:41 +00:00
Diego Fronza
9b4e28e155 Added a isc_glob() function that wraps glob() calls for POSIX systems
and implement a custom glob() function on Windows systems.
2020-02-24 13:46:39 -03:00
Michał Kępień
b273ed8a63 Bump version to 9.17.0 2020-02-24 10:56:47 +01:00
Michał Kępień
9ad9c98021 Fix broken link in configure.ac 2020-02-24 10:56:47 +01:00
Michał Kępień
a5fc3a6364 Clean up --with-tuning=large remnants
The change introduced by commit be159f556568abb9a5dbc494f8441eefdd304a7f
was not fully complete.  Adjust ./configure summary so that it reflects
the new way the --with-tuning switch works, fixing the Autoconf variable
used for determining the value of that switch.  Fix win32utils/Configure
so that it behaves the same way as its Unix counterpart.
2020-02-21 12:51:49 +01:00
Witold Kręcicki
093af1a609 Use libuv-provided uv_{export,import} if available.
We were using our own versions of isc_uv_{export,import} functions
for multithreaded TCP listeners. Upcoming libuv version will
contain proper uv_{export,import} functions - use them if they're
available.
2020-02-18 12:17:55 +01:00
Witold Kręcicki
737501b0d3 Allow --enable-pthread-rwlock even without developer mode 2020-02-07 08:54:54 +01:00
Witold Kręcicki
be159f5565 Set --with-tuning=large as a default, add --with-tuning=small. 2020-02-07 08:54:12 +01:00
Ondřej Surý
fc9c7025bc Fail the autoconf script early if pkg-config is not present. 2020-01-14 14:07:36 +01:00
Witold Kręcicki
5a65ec0aff Add uv_handle_{get,set}_data functions that's absent in pre-1.19 libuv to make code clearer.
This might be removed when we stop supporting older libuv versions.
2019-12-09 11:15:27 -08:00
Ondřej Surý
01731d4b1b Add and use ISC_THREAD_LOCAL macro
The new ISC_THREAD_LOCAL macro unifies usage of platform dependent
Thread Local Storage definition thread_local vs __thread vs
__declspec(thread) to a single macro.

The commit also unifies the required level of support for TLS as for
some parts of the code it was mandatory and for some parts of the code
it wasn't.
2019-12-03 16:27:24 +01:00
Mark Andrews
eed2aabc40 add AC_ARG_VAR([PYTHON], [path to python executable]) 2019-12-03 23:42:08 +11:00
Mark Andrews
d8fc544569 unset PYTHON on --without-python to prevent python still being used 2019-12-03 23:41:28 +11:00
Mark Andrews
50e1bf3800 check for 'distutils.core setup' 2019-11-25 22:46:48 +00:00
Mark Andrews
c7b20f3c40 specify the install name when building libwrap 2019-11-16 11:21:41 +08:00
Mark Andrews
b88faee181 MacOS portability
-Wl,-z,interpose is not supported.
-Wl,rpath=<path> is not supported use -Wl,rpath,<path> instead.
Use @SO@ for loadable extension.
Use -L <path> -l libwrap instead of libwrap.sa.
2019-11-16 11:21:41 +08:00
Witold Kręcicki
70397f9d92 netmgr: libuv-based network manager
This is a replacement for the existing isc_socket and isc_socketmgr
implementation. It uses libuv for asynchronous network communication;
"networker" objects will be distributed across worker threads reading
incoming packets and sending them for processing.

UDP listener sockets automatically create an array of "child" sockets
so each worker can listen separately.

TCP sockets are shared amongst worker threads.

A TCPDNS socket is a wrapper around a TCP socket, which handles the
the two-byte length field at the beginning of DNS messages over TCP.

(Other wrapper socket types can be implemented in the future to handle
DNS over TLS, DNS over HTTPS, etc.)
2019-11-07 11:55:37 -08:00
Witold Kręcicki
402969bf95 implement fetch-and-add array queue data structure
this is a lockless queue based on hazard pointers.
2019-11-07 11:55:37 -08:00
Mark Andrews
e0fe33506c MAXMINDDB_LIBS should end with '/lib' not '/libs' 2019-11-06 10:20:16 +11:00
Michał Kępień
428dcf3b49 Remove remnants of the --with-cc-alg option
Commit afa81ee4e4e863fa646177947c55e8c6b1475f47 omitted some spots in
the source tree which are still referencing the removed --with-cc-alg
"configure" option.  Make sure the latter is removed completely.
2019-10-15 21:57:58 +02:00
Ondřej Surý
635e5293b2 Remove unused RSA Security copyrighted cryptoki.h header 2019-10-04 08:35:45 +02:00
Michal Nowak
c871dda0aa
Remove unused configure checks for dblatex 2019-09-17 16:42:16 +02:00
Michal Nowak
0055b9616e
Find docbook-xsl and dblatex templates on Red Hat/Fedora
`/usr/share/sgml/docbook/xsl-stylesheets` and `/usr/share/dblatex` are
places where docbook-style-xsl and, respectively, dblatex packages on
Red Hat systems put their XSL templates. Unless we hint this place it
has to be added to `./configure` manually (`--with-docbook-xsl=...`):
https://src.fedoraproject.org/rpms/bind/blob/master/f/bind.spec#_691.

On Fedora 30:

Before
```
./configure
...
checking for Docbook-XSL path... auto
checking for html/docbook.xsl... "not found"
checking for xhtml/docbook.xsl... "not found"
checking for manpages/docbook.xsl... "not found"
checking for html/chunk.xsl... "not found"
checking for xhtml/chunk.xsl... "not found"
checking for html/chunktoc.xsl... "not found"
checking for xhtml/chunktoc.xsl... "not found"
checking for html/maketoc.xsl... "not found"
checking for xhtml/maketoc.xsl... "not found"
checking for xsl/docbook.xsl... "not found"
checking for xsl/latex_book_fast.xsl... "not found"
```

After:
```
./configure
...
checking for Docbook-XSL path... auto
checking for html/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl
checking for xhtml/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl
checking for manpages/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
checking for html/chunk.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl
checking for xhtml/chunk.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunk.xsl
checking for html/chunktoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/chunktoc.xsl
checking for xhtml/chunktoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunktoc.xsl
checking for html/maketoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/maketoc.xsl
checking for xhtml/maketoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/maketoc.xsl
checking for xsl/docbook.xsl... /usr/share/dblatex/xsl/docbook.xsl
checking for xsl/latex_book_fast.xsl... /usr/share/dblatex/xsl/latex_book_fast.xsl
```
2019-09-17 16:42:15 +02:00
Michał Kępień
119f3e0c2e Make lib/dns/tests/tkey_test.c more portable
Weak symbols are handled differently by different dynamic linkers.  With
glibc, lib/dns/tests/tkey_test works as expected no matter whether
--with-libtool is used or not: __attribute__((weak)) prevents a static
build from failing and it just so happens that the desired symbols are
picked at runtime for dynamic builds.  However, with BSD libc, the
libdns functions called from lib/dns/tests/tkey_test.c use the "real"
memory allocation functions from libisc, thus breaking that unit test.
(Note: similar behavior can be reproduced with glibc by setting the
LD_DYNAMIC_WEAK environment variable.)

The simplest way to make lib/dns/tests/tkey_test work reliably is to
drop all uses of __attribute__((weak)) in it - this way, the memory
functions inside lib/dns/tests/tkey_test.c will always be used instead
of the "real" libisc ones for dynamic builds.  However, this would not
work with static builds as it would result in multiple strong symbols
with the same name being present in a single binary.

Work around the problem by only compiling in the overriding definitions
of memory functions when building using --with-libtool.  For static
builds, keep relying on the --wrap linker option for replacing calls to
the functions we are interested in.
2019-09-12 14:25:57 +02:00
Ondřej Surý
9b6c6f57d8 configure.ac: Add OpenSSL SipHash support detection
Add check for creating new EVP_PKEY with EVP_PKEY_SIPHASH, but disable SipHash
on OpenSSL 1.1.1 as the hash length initialization is broken before OpenSSL
1.1.1a release.
2019-09-03 09:19:55 +02:00
Sergei Trofimovich
a5ad6b16c5 configure.ac: autodetect 'pause' instruction presence on sparc
The change fixes the following build failure on sparc T3 and older CPUs:

```
sparc-unknown-linux-gnu-gcc ... -O2 -mcpu=niagara2 ... -c rwlock.c
{standard input}: Assembler messages:
{standard input}:398: Error: Architecture mismatch on "pause ".
{standard input}:398: (Requires v9e|v9v|v9m|m8; requested architecture is v9b.)
make[1]: *** [Makefile:280: rwlock.o] Error 1
```

`pause` insutruction exists only on `-mcpu=niagara4` (`T4`) and upper.

The change adds `pause` configure-time autodetection and uses it if available.
config.h.in got new `HAVE_SPARC_PAUSE` knob. Fallback is a fall-through no-op.

Build-tested on:

- sparc-unknown-linux-gnu-gcc (no `pause`, build succeeds)
- sparc-unknown-linux-gnu-gcc -mcpu=niagara4 (`pause`, build succeeds)

Reported-by: Rolf Eike Beer
Bug: https://bugs.gentoo.org/691708
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2019-08-08 07:15:04 -04:00
Ondřej Surý
37cccbab8d Fix the ${WRAP} -> $${WRAP} to allow static non-libtool linking again 2019-07-31 16:18:58 +02:00
Ondřej Surý
1d3ba54d6c Remove the autoconf checks for etags/ctags and make tags target
There's no strong reason to keep `make tags` in our build system.  The previous
functionality of `make tags` could be simply retained by aliasing variant of:

    etags $(git ls-files '*.c' '*.h')

which would be universal for all C-code projects.
2019-07-31 15:27:27 +02:00
Ondřej Surý
2b632a232f Convert the configure.ac rules for zlib library to use pkg-config 2019-07-31 14:54:40 +02:00
Ondřej Surý
4b44351e65 The BIND 9 libraries are now internal-only, so remove isc-config.sh
The isc-config.sh script was introduced before pkg-config as is a purely
historical thing.  There are two reason for removal of isc-config.sh scripts:

a) The BIND 9 libraries are now meant to be used only from BIND 9, so there's no
   reason to provide convenience script to link with the libraries.

b) Even if that was not the case, we should and would replace the isc-config.sh
   with respective pkg-config (.pc) file for every library.
2019-07-31 10:45:18 +02:00
Ondřej Surý
0cd1e5ed28 Disable LD_WRAP tests when libtool is disabled 2019-07-23 11:49:21 -04:00
Ondřej Surý
135519e59a Fix the configure.ac and Makefile.in to correctly test for --wrap 2019-07-22 23:00:37 +02:00
Witold Kręcicki
afa81ee4e4 Remove all cookie algorithms but AES, which was used as a default, for legacy purposes. 2019-07-21 10:08:14 -04:00
Witold Kręcicki
92424e23fa Special, for-tests-only, mode with atomics emulated by a mutex-locked variable - useful for finding atomics congestions 2019-07-09 16:09:36 +02:00
Ondřej Surý
5c0cc1ee8b Add missing AX_RESTORE_FLAGS([geoip2]) to configure.ac 2019-07-09 13:38:56 +02:00
Evan Hunt
3781448c89 use configure --enable-geoip to turn on GeoIP2
- instead of --with-geoip2, use --enable-geoip to turn on the GeoIP
  feature
- --with-maxminddb can be used to set the prefix for maxminddb
2019-07-04 08:58:25 -07:00
Evan Hunt
787f2a7e03 remove all support for legacy GeoIP 2019-07-04 08:56:45 -07:00
Evan Hunt
fea6b5bf10 add a search for GeoIP2 libraries in configure
- "--with-geoip" is used to enable the legacy GeoIP library.
- "--with-geoip2" is used to enable the new GeoIP2 library
  (libmaxminddb), and is on by default if the library is found.
- using both "--with-geoip" and "--with-geoip2" at the same time
  is an error.
- an attempt is made to determine the default GeoIP2 database path at
  compile time if pkg-config is able to report the module prefix. if
  this fails, it will be necessary to set the path in named.conf with
  geoip-directory
- Makefiles have been updated, and a stub lib/dns/geoip2.c has been
  added for the eventual GeoIP2 search implementation.
2019-06-27 14:58:13 -07:00
Ondřej Surý
d584223653 Enforce usage -zrelax=transtls when GNU C Compiler is used on Solaris
When GNU C Compiler is used on Solaris (11), the Thread Local Storage
is completely broken.  The behaviour doesn't manifest when GNU ld is
used.  Thus, we need to enforce usage of GNU ld when GNU C Compiler is
the compiler of choice.

For more background for this change, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90912
2019-06-27 04:18:44 -04:00
Ondřej Surý
cdace7cac1 Fix printing whether libxml2 is used in the report part of configure.ac 2019-06-26 18:21:24 +02:00
Ondřej Surý
5d1e7be582 Rename OPENSSL_INCLUDES to OPENSSL_CFLAGS in AX_CHECK_OPENSSL() macro
The ax_check_openssl m4 macro used OPENSSL_INCLUDES.  Rename the
subst variable to OPENSSL_CFLAGS and wrap AX_CHECK_OPENSSL() in
action-if-not-found part of PKG_CHECK_MODULE check for libcrypto.
2019-06-25 12:36:01 +02:00
Ondřej Surý
0771dd3be8 Make the usage of libxml2 opaque to the caller
The libxml2 have previously leaked into the global namespace leading
to forced -I<include_path> for every compilation unit using isc/xml.h
header.  This MR fixes the usage making the caller object opaque.
2019-06-25 12:01:32 +02:00
Ondřej Surý
77db0cb929 Remove the noop warning when using --with-libbind from configure.ac
The configure option --with-libbind was already obsolete, this MR
just removes the warning from configure.ac.
2019-06-21 19:03:01 +02:00
Ondřej Surý
a8dd98fbac Get rid of overriding default --sysconfdir and --localstatedir autoconf options
Previously the autoconf script set sysconfdir to /etc and localstatedir to /var
if they were not explicitly set in the ./configure invocation.  This MR reverts
the override and make it more in line with default and generally expected
autoconf behavior.
2019-06-21 18:42:50 +02:00
Ondřej Surý
2b1131cb28 Add AM_MAINTAINER_MODE macro to configure.ac and enable it by default
AM_MAINTAINER_MODE macro adds ability to disable rebuilding build file
(Makefile.in, configure, ...) when the source file changes.  This is
important in the CI where the timestamps could get skewed and that
triggers the rebuild on every ./configure run.
2019-06-21 10:37:39 +02:00
Ondřej Surý
a654756c3e Use couple more autoconf convenience macros to cleanup configure.ac
Pull and use several autoconf archive convenience macros to simplify
configure.ac.

* AX_CHECK_COMPILE_FLAG(FLAG, ...) - check whether given CFLAG works
* AX_CHECK_LINK_FLAG(FLAG, ...) - check whether given LDFLAG works
* AX_CHECK_PREPROC_FLAG(FLAG, ...) - check whether give CPPFLAG works
* AX_SAVE_FLAGS/AX_RESTORE_FLAGS - save and restore *FLAGS
2019-06-19 11:35:18 +02:00
Ondřej Surý
d45f9e413f Enforce pthread rwlock to be only enabled in developer mode 2019-06-05 11:17:19 -07:00
Witold Kręcicki
02bbf1e2b9 Add --enable-pthread-rwlock option 2019-05-30 16:10:16 +02:00
Ondřej Surý
64fbffbbaa Use simple pthread_rwlock in place of our custom adaptive rwlock 2019-05-30 16:10:16 +02:00