Commit Graph
56 Commits
Author SHA1 Message Date
Mark AndrewsandOndřej Surý 383297f80b Request krb5 CFLAGS and LIBS from $KRB5_CONFIG
The GSSAPI now needs both gssapi and krb5 libraries, so we need to
request both CFLAGS and LIBS from the configure script.
2021-04-01 10:39:48 +02:00
Mark AndrewsandOndřej Surý 7f08c756aa Remove custom ISC SPNEGO implementation
The custom ISC SPNEGO mechanism implementation is no longer needed on
the basis that all major Kerberos 5/GSSAPI (mit-krb5, heimdal and
Windows) implementations support SPNEGO mechanism since 2006.

This commit removes the custom ISC SPNEGO implementation, and removes
the option from both autoconf and win32 Configure script.  Unknown
options are being ignored, so this doesn't require any special handling.
2021-04-01 10:39:48 +02:00
Mark AndrewsandMichal Nowak edd6d5884a Free OpenSSL keys in ./configure
Failure to free OpenSSL keys in ./configure results in ASAN errors and
false negative errors.
2021-02-08 08:57:06 +01:00
Michal Nowak c857e63087 Use dlsym for -ldl detection
-fsanitize=thread hijacks dlopen() and dlclose(), therefore dlopen()
won't request -ldl to be used for linking during Autoconf test. Check
for dlsym() presence will fail and dlzexternal and dyndb system tests
won't run.

Retrieved from 2dd54fa62f.
2021-01-19 08:05:54 +01:00
Mark Andrews 773abc3c52 Fix 'configure --with-maxminddb=<path>'
(cherry picked from commit cafb021b2a)
2021-01-06 08:40:52 +00:00
Michał Kępień a51cde6ceb Check for _Unwind_Backtrace() support
Some operating systems (e.g. Linux, FreeBSD) provide the
_Unwind_Backtrace() function in libgcc_s.so, which is automatically
linked into any binary using the functions provided by that library.  On
OpenBSD, though, _Unwind_Backtrace() is provided by libc++abi.so, which
is not automatically linked into binaries produced by the stock system C
compiler.

Meanwhile, lib/isc/backtrace.c assumes that any GNU-compatible toolchain
allows _Unwind_Backtrace() to be used without any extra provisions in
the build system.  This causes build failures on OpenBSD (and possibly
other systems).

Instead of making assumptions, actually check for _Unwind_Backtrace()
support in the toolchain if the backtrace() function is unavailable.

(cherry picked from commit 10d7055791)
2020-10-30 09:42:24 +01:00
Michał Kępień b9cf398679 Disable OpenSSL hashing when using native PKCS#11
When building with "--enable-native-pkcs11 --with-openssl", OpenSSL
support is automatically disabled in favor of native PKCS#11:

    checking for OpenSSL library... use of native PKCS11 instead

However, adding "--enable-openssl-hash" to the above two switches causes
the build to fail:

    checking for OpenSSL library... use of native PKCS11 instead
    disabled because of native PKCS11
    checking for using OpenSSL for hash functions... configure: error: No OpenSSL for hash functions

In other words, "--with-openssl" and "--enable-openssl-hash" are not
behaving consistently when used together with "--enable-native-pkcs11".

Fix by automatically disabling OpenSSL hashing support when native
PKCS#11 support is enabled.
2020-09-28 09:30:00 +02:00
Michał Kępień d21ed7527e Make native PKCS#11 require dlopen() support
PKCS#11 support in BIND requires dlopen() support from the operating
system and thus building with "--enable-native-pkcs11 --without-dlopen"
should not be possible.  Add an Autoconf check which enforces that
constraint.  Adjust the pairwise testing model accordingly.

(cherry picked from commit 187dca9cf7)
2020-09-28 09:24:48 +02:00
Michal NowakandMichał Kępień 90368d8e1d Add pairwise testing
Pairwise testing is a test case generation technique based on the
observation that most faults are caused by interactions of at most two
factors.  For BIND, its configure options can be thought of as such
factors.

Process BIND configure options into a model that is subsequently
processed by the PICT tool in order to find an effective test vector.
That test vector is then used for configuring and building BIND using
various combinations of configure options.

(cherry picked from commit 420986bf18)
2020-09-22 11:49:30 +02:00
Evan Hunt 400171aee8 update all copyright headers to eliminate the typo 2020-09-14 17:00:40 -07:00
Ondřej Surý b9c6932793 Skip the unit tests when kyua is not available
The unittest.sh script tried to execute the unit tests when cmocka
development libraries was available, but kyua, the execution engine,
was not.  Now, both need to be installed in the system.

(cherry picked from commit 762a3c866e)
2020-06-17 15:31:44 +02:00
Petr MenšíkandOndřej Surý 33fcafe055 Detect atomic operations support on ppc64le
Current configure detects only stdatomic operations. Fix it to detect
also ISC atomics with assembly.
2020-03-25 23:04:23 +01:00
Mark Andrews c8025d8fed test installed header files
(cherry picked from commit a278b6bd84)
2020-03-06 13:23:48 +11:00
Mark Andrews 197842c1b7 sort AC_CONFIG_FILES
(cherry picked from commit fd0d4ba948)
2020-03-06 08:54:53 +11:00
Ondřej SurýandOndřej Surý 7110ceb880 Use pkg-config for --with-libxml2=auto/yes
The downstream distributors of BIND 9 (Debian in this case) are in
process of removing xml2-config command from the libxml2-dev package
(see Debian Bug #949056 for details).  The removal of the script will
make BIND 9 to fail to build from the source when --with-libxml2=yes is
specified or not link with libxml2 when --with-libxml2=auto is specified
and then fail ABI changes (Debian Bug #949056).

When --with-libxml2=<path>, the script checks for <path>/bin/xml2-config
and uses the specified path to link with libxml2. This has been kept to
retain backwards compatibility with systems that does not ship
pkg-config.
2020-03-02 15:07:18 +01:00
Mark Andrews 17b29261bd add AC_ARG_VAR([PYTHON], [path to python executable])
(cherry picked from commit eed2aabc40)
2019-12-03 13:16:27 +00:00
Mark Andrews 4a18cb8029 unset PYTHON on --without-python to prevent python still being used
(cherry picked from commit d8fc544569)
2019-12-03 13:16:27 +00:00
Mark Andrews da75b8a7d1 check for 'distutils.core setup'
(cherry picked from commit 50e1bf3800)
2019-11-26 10:04:04 +11:00
Mark Andrews ee0a70a67f MAXMINDDB_LIBS should end with '/lib' not '/libs'
(cherry picked from commit e0fe33506c)
2019-11-06 11:50:04 +11:00
Michał Kępień 983ef9b930 Remove remnants of the --with-cc-alg option
Commit afa81ee4e4 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.

(cherry picked from commit 428dcf3b49)
2019-10-15 22:00:40 +02:00
Michal Nowak 1d9e114736 Remove unused configure checks for dblatex 2019-09-17 17:43:35 +02:00
Michal Nowak 0a0700bd4a 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
```

(cherry picked from commit 0055b9616e)
2019-09-17 17:40:25 +02:00
Ondřej Surý a0f4e6d27e Add new siphash24 DNS Cookie algorithm
This commit changes the BIND cookie algorithms to match
draft-sury-toorop-dnsop-server-cookies-00.  Namely, it changes the Client Cookie
algorithm to use SipHash 2-4, adds the new Server Cookie algorithm using SipHash
2-4.  The change doesn't make the SipHash 2-4 to be the default algorithm, this
is up to the operator.

(cherry picked from commit 196b342bc9)
2019-07-22 09:06:03 -04:00
Ondřej Surý a848ef76f1 Add missing AX_RESTORE_FLAGS([geoip2]) to configure.ac 2019-07-09 13:54:31 +02:00
Evan Hunt 7de12aaa34 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.

(cherry picked from commit fea6b5bf10)
(cherry picked from commit 6a7e805796)
2019-07-02 12:28:14 -07:00
Mark Andrews 174b6be987 capture named-checkconf output
(cherry picked from commit 36dd373ab4)
2019-06-06 18:48:57 +10:00
Mark Andrews ac4d3e8496 test Ed448 against test vectors
(cherry picked from commit 20f2d9b41b)
2019-05-30 23:06:09 +10:00
Mark Andrews 3fbbaeb478 add link flags for ia64-hp-hpux
(cherry picked from commit 61752bf8ac)
2019-05-30 11:29:51 +10:00
Ondřej Surý f9880fcf6d Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make
(cherry picked from commit d4596baed4)
2019-05-29 13:34:22 +02:00
Mark Andrews 8d0b0a106e fix configire error message to say --without-python
(cherry picked from commit d70bf76d80)
2019-05-27 14:03:46 +10:00
Ondřej SurýandEvan Hunt ab706cc6f2 Improve the error message about missing PLY Python package
Previously, only a message about missing Python was printed, which was
misleading to many users.  The new message clearly states that Python
AND PLY is required and prints basic instructions how to install PLY
package.

(cherry picked from commit 55b48700da)
2019-05-09 19:57:02 -07:00
Mark Andrews e55a19c8f0 make 'configure --with-gssapi=yes' fatal if support is not found
(cherry picked from commit e420078c63)
2019-04-23 13:01:17 +10:00
Mark Andrews 18e1c33206 back port complete SO_* block preserving SunOS disable 2019-03-26 05:51:00 -04:00
Mark Andrews 2d4d4c223d backport MacOS link flags 2019-03-26 05:51:00 -04:00
Ondřej Surý c927beea2d Make lib/dns/dnstap.pb-c.h private header
This changes dns_dtdata struct to not expose data types from dnstap.pb-c.h to
prevent the need for including this header where not really needed.

(cherry picked from commit 8ccce7e24b)
2019-03-22 12:08:16 +01:00
Petr MenšíkandMark Andrews 1e5c61d5cc Support DLZ filesystem detection in feature-test
Do not use variable from configure to detect the feature.

(cherry picked from commit 759a7b4ce3)
2019-03-04 14:10:16 +11:00
Ondřej SurýandMichał Kępień 1d92178bec When --with-python is given to configure, use default search list for python binaries instead of 'yes'
(cherry picked from commit 3951cb053b)
2019-01-18 15:15:02 +01:00
Ondřej Surý 4892b52156 Fix the stdatomic #ifdefs to work with older compilers 2018-12-21 09:29:47 +01:00
Evan Hunt 8d698288fb set the export-dynamic linker flag on linux
(cherry picked from commit 4ae085a066)
2018-11-28 23:38:43 -08:00
Ondřej SurýandMichał Kępień 6c4b8ee8ee Fix build-time Python configuration
Apply various fixes and tweaks to Python configuration logic implemented
in the "configure" script:

  - Prevent PYTHON_INSTALL_DIR, which holds the value passed to the
    --with-python-install-dir option, from being set to "unspec" by
    default as this breaks installing Python modules when the
    --with-python-install-dir option is not used.

  - Make the --with-python-install-dir option also work when the Python
    interpreter is specified explicitly (using --with-python=<...>).

  - Improve contents and placement of error messages.

  - Reduce duplication of code checking Python dependencies.

  - Use Autoconf macros AS_CASE() and AS_IF() instead of plain shell
    code.

  - Update comments.  Capitalize the word "Python" when referring to the
    language itself rather than a specific executable.

(cherry picked from commit ed4c700c33)
2018-11-27 15:52:40 +01:00
Ondřej Surý af1c5ef613 Add python3.6 and python3.7 to the search list of python versions
(cherry picked from commit da9038e9a0)
2018-11-27 10:33:33 +01:00
Evan Hunt 2d7235e1f1 warn, rather than failing, if kyua is not present
(cherry picked from commit 6cfb2249e1)
2018-11-16 12:42:39 -08:00
Ondřej SurýandEvan Hunt d196b5e493 Remove embedded atf-src and enforce atf >= 0.20 + kyua as execution engine
(cherry picked from commit de219b8555)
2018-11-16 09:17:32 -08:00
Evan Hunt 2ed9b06ab8 remove ATF source code and Atffiles
(cherry picked from commit 8c4d50c6bc)
(cherry picked from commit 33f428efda)
2018-11-15 17:52:00 -08:00
Evan Hunt 6295b44ed6 remove ATF from configure
(cherry picked from commit efe3c038b1)
(cherry picked from commit 4f3073de7c)
2018-11-15 17:51:59 -08:00
Mark Andrews 0c738a5673 require cmocka >= 1.0.0
(cherry picked from commit f3ff5f63ac)
2018-11-12 18:42:58 +11:00
Ondřej SurýandMark Andrews 6b50da7ba8 Use cmocka_set_message_output as test function for cmocka presence
(cherry picked from commit 0158c1a4ea)
2018-11-12 17:25:30 +11:00
Ondřej SurýandMark Andrews 760e336e89 Set with_cmocka=no by default
(cherry picked from commit ed8000f333)
2018-11-12 00:01:24 -05:00
Mark Andrews af5a051e4d check result tables are complete
(cherry picked from commit 4f04a79250)
2018-11-12 15:32:58 +11:00
Ondřej SurýandMark Andrews 2dcc521b29 Add --wrap linker option detection
(cherry picked from commit 10535d1c79)
2018-11-12 12:54:59 +11:00