Commit Graph

29572 Commits

Author SHA1 Message Date
Michał Kępień
d20a928435 Fix system test error reporting on Windows
Make sure the CYGWIN environment variable is set whenever system tests
are run on Windows to prevent stop.pl from making incorrect assumptions
about the environment it is running in, which triggers e.g. false
reports about named instances crashing on shutdown when system tests are
run on Windows.  This issue has not been caught earlier because the
CYGWIN environment variable was incidentally being set on a higher level
in our Windows test environments.

Error reporting for parallel system tests on Windows has been broken all
along: since all parallel.mk targets generated by parallel.sh pipe their
output through "tee", the return code from run.sh is lost and thus
running "make -f parallel.mk check" will not yield a non-zero return
code if some system tests fail.  The same applies to runsequential.sh.
Yet, runall.sh on Windows only sets its return code to a non-zero value
if either "make -f parallel.mk check" or runsequential.sh returns a
non-zero return code.  Fix by making runall.sh yield a non-zero return
code when testsummary.sh fails, which is the same approach as the one
used in the "test" target in bin/tests/system/Makefile.

(cherry picked from commit fed397c04b)
2019-09-27 09:16:02 +02:00
Michał Kępień
78a3cacf8d Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.

(cherry picked from commit 0476e8f1ac)
2019-09-27 09:16:02 +02:00
Michał Kępień
90b8e590b7 Enable building dnssec-cds.exe
Build configuration for the dnssec-cds Visual Studio project is absent
from the solution file template, which means the solution needs to be
upgraded using "devenv bind9.sln /upgrade" in order for the dnssec-cds
project to be built.  Add the build configuration for dnssec-cds to the
solution file template so that upgrading the solution is not necessary
for building that project.

(cherry picked from commit 1d5259b0a0)
2019-09-27 09:16:02 +02:00
Michał Kępień
d43392e546 Drop named-checkzone dependency on libbind9
named-checkzone does not use libbind9.  Update the Visual Studio project
file template for named-checkzone to reflect that, thus preventing
compilation issues during parallel builds.

(cherry picked from commit 918ebd9830)
2019-09-27 09:16:02 +02:00
Michał Kępień
1bf5a95774 Add missing nsupdate dependency on libirs
When commit 8eb88aafee removed liblwres,
it also modified nsupdate to use libirs instead of liblwres, but the
Visual Studio project files were not updated to reflect that change.
Make sure the nsupdate Visual Studio project depends on the libirs
project to prevent compilation issues during parallel builds.

(cherry picked from commit de1859422e)
2019-09-27 09:16:02 +02:00
Michał Kępień
cfb6e311a0 Merge branch 'marka-win32-vsconf-v9_14' into 'v9_14'
[v9_14] allow VSCONF to be overridden at runtime

See merge request isc-projects/bind9!2406
2019-09-27 03:15:19 -04:00
Mark Andrews
fea03c8a43 allow VSCONF to be overridden at runtime
(cherry picked from commit 2433e3e808)
2019-09-27 09:14:10 +02:00
Mark Andrews
d44a1289c9 Merge branch 'marka-resolver-fix-v9_14' into 'v9_14'
use test specific shell variables

See merge request isc-projects/bind9!2388
2019-09-27 03:07:43 -04:00
Mark Andrews
fd916bf406 use test specific shell variables
(cherry picked from commit 4a5400c1b7)
2019-09-27 16:23:27 +10:00
Ondřej Surý
6d2092e749 Merge branch 'ondrej/fix-clang-10-error-v9_14' into 'v9_14'
Silence false positive warning from Clang 10 in random_test.c

See merge request isc-projects/bind9!2405
2019-09-26 09:25:44 -04:00
Ondřej Surý
903fab5f6c Silence false positive warning from Clang 10 in random_test.c
(cherry picked from commit 9ff02c8170)
2019-09-26 15:24:56 +02:00
Michał Kępień
3096e11af9 Merge branch 'michal/prevent-unbuffered-stderr-io-on-windows-v9_14' into 'v9_14'
[v9_14] Prevent unbuffered stderr I/O on Windows

See merge request isc-projects/bind9!2401
2019-09-26 08:00:54 -04:00
Michał Kępień
b440d30a78 Prevent unbuffered stderr I/O on Windows
Make stderr fully buffered on Windows to improve named performance when
it is logging to stderr, which happens e.g. in system tests.  Note that:

  - line buffering (_IOLBF) is unavailable on Windows,

  - fflush() is called anyway after each log message gets written to the
    default stderr logging channels created by libisc.

(cherry picked from commit c72da3497d)
2019-09-26 13:56:38 +02:00
Ondřej Surý
7f55b7d60c Merge branch '1246-fix-stdatomic-shim-for-win32-v9_14' into 'v9_14'
Resolve "Add atomic_fetch_add and atomic_fetch_or shims"

See merge request isc-projects/bind9!2399
2019-09-26 07:43:16 -04:00
Ondřej Surý
9d400c7d89 Fix the wrong function for the atomic_fetch_add_explicit64 shim on non-WIN64 build 2019-09-26 13:01:26 +02:00
Michał Kępień
75bc9ea249 Merge branch 'michal/prevent-cygwin-from-concealing-non-abort-crashes-v9_14' into 'v9_14'
Prevent Cygwin from concealing non-abort() crashes

See merge request isc-projects/bind9!2394
2019-09-26 04:38:08 -04:00
Michał Kępień
239c1195d5 Prevent Cygwin from concealing non-abort() crashes
BIND system tests are run in a Cygwin environment.  Apparently Cygwin
shell sets the SEM_NOGPFAULTERRORBOX bit in its process error mode which
is then inherited by all spawned child processes.  This bit prevents the
Windows Error Reporting dialog from being displayed, which I assume is
part of an effort to contain memory handling errors triggered by Cygwin
binaries in the Cygwin environment.  Unfortunately, this also prevents
automatic crash dump creation by Windows Error Reporting and Cygwin
itself does not handle memory errors in native Windows processes spawned
from a Cygwin shell.

Fix by clearing the SEM_NOGPFAULTERRORBOX bit inside named if it is
started in a Cygwin environment, thus overriding the Cygwin-set process
error mode in order to enable Windows Error Reporting to handle all
named crashes.

(cherry picked from commit 3d4b17806f)
2019-09-26 10:34:40 +02:00
Michał Kępień
8dfb51b15d Merge branch '1245-properly-initialize-libxml2-v9_14' into 'v9_14'
[v9_14] Properly initialize libxml2

See merge request isc-projects/bind9!2392
2019-09-26 04:31:55 -04:00
Michał Kępień
258f48bcf0 Add CHANGES entry
5293.	[bug]		On Windows, named crashed upon any attempt to fetch XML
			statistics from it. [GL #1245]

(cherry picked from commit b5bcd4b8d6)
2019-09-26 10:28:52 +02:00
Michał Kępień
e9f9062732 Properly initialize libxml2
When libxml2 is to be used in a multi-threaded application, the
xmlInitThreads() function must be called before any other libxml2
function.  This function does different things on various platforms and
thus one can get away without calling it on Unix systems, but not on
Windows, where it initializes critical section objects used for
synchronizing access to data structures shared between threads.  Add the
missing xmlInitThreads() call to prevent crashes on affected systems.

Also add a matching xmlCleanupThreads() call to properly release the
resources set up by xmlInitThreads().

(cherry picked from commit a3c0b00ef6)
2019-09-26 10:28:51 +02:00
Mark Andrews
4d725a54b8 Merge branch '1205-named-crashes-when-setting-nsec3param-v9_14' into 'v9_14'
Resolve "named crashes when setting nsec3param"

See merge request isc-projects/bind9!2379
2019-09-23 23:06:24 -04:00
Mark Andrews
75a8acf3ab add CHANGES
(cherry picked from commit 31c8f66f25)
2019-09-24 11:38:06 +10:00
Mark Andrews
bf63ff09c1 Queue nsec3param setting until receive_secure_serial has completed.
(cherry picked from commit 456888c00f)
2019-09-24 11:37:37 +10:00
Mark Andrews
553313c2c2 Move dns_zone_setdb() to after the db is created.
Addresses the database changing w/o the changes being done under task lock.
Fix: build the database before assigning it to the zone.

(cherry picked from commit 4e686f40e0)
2019-09-24 11:37:37 +10:00
Michał Kępień
c6d9e9cd8f Merge branch 'michal/run-freebsd-jobs-automatically-for-all-pipelines-v9_14' into 'v9_14'
[v9_14] Run FreeBSD jobs automatically for all pipelines

See merge request isc-projects/bind9!2353
2019-09-17 14:26:16 -04:00
Michał Kępień
7c992a0e57 Run FreeBSD jobs automatically for all pipelines
No problems have been observed on the FreeBSD GitLab CI runner during
the burn-in period, when FreeBSD jobs needed to be triggered manually.
Thus, make the FreeBSD jobs run automatically along other GitLab CI
jobs.

(cherry picked from commit f7bc95409d)
2019-09-17 20:24:37 +02:00
Michal Nowak
b479738b20 Merge branch 'mnowak/Red_Hat_find_docbook-xsl-v9_14' into 'v9_14'
Find docbook-xsl and dblatex templates on Red Hat/Fedora

See merge request isc-projects/bind9!2351
2019-09-17 12:07:26 -04:00
Michal Nowak
5347941ef1 Remove unused configure checks for dblatex
(cherry picked from commit c871dda0aa)
2019-09-17 17:03:44 +02:00
Michal Nowak
df6e06e941 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:03:44 +02:00
Ondřej Surý
236e47beec Merge branch 'ondrej/improve-flycheck-configuration-v9_14' into 'v9_14'
Remove the current directory from the flycheck configuration

See merge request isc-projects/bind9!2349
2019-09-17 07:31:08 -04:00
Ondřej Surý
28241706c6 Remove the current directory from the flycheck configuration 2019-09-17 13:07:23 +02:00
Michal Nowak
b792a3bc02 Merge branch 'mnowak_README_fixes-v9_14' into 'v9_14'
Various README.md and README fixes

See merge request isc-projects/bind9!2337
2019-09-16 01:46:46 -04:00
Michal Nowak
3ec897c97e Various README.md and README fixes
Fixing typos, typographical glitches. Added backticks around binaries,
modules, and libraries so it's more consistent. Added a paragraph with
ISC Security Policy.

(cherry picked from commit 4e2fdd7ee9)
2019-09-16 07:45:16 +02:00
Mark Andrews
974fc3c3f4 Merge branch 'marka-win32-fixup-v9_11-v9_14' into 'v9_14'
reinstate error handler

See merge request isc-projects/bind9!2341
2019-09-13 00:31:22 -04:00
Mark Andrews
31a905775c reinstate error handler
(cherry picked from commit 7fb0a0db53)
2019-09-13 14:29:54 +10:00
Mark Andrews
1aff269e6a Merge branch 'marka-win32-fixup-v9_11-v9_14' into 'v9_14'
win32 fixup v9_11

See merge request isc-projects/bind9!2340
2019-09-13 00:28:01 -04:00
Mark Andrews
946f08db99 declare alloc_failure
(cherry picked from commit 0d23bc5b55)
2019-09-13 14:26:36 +10:00
Mark Andrews
fd395947ad declare result
(cherry picked from commit 9ee27573af)
2019-09-13 14:26:36 +10:00
Michał Kępień
ab6db576e2 Merge branch 'michal/add-freebsd-to-ci-v9_14' into 'v9_14'
[v9_14] Add FreeBSD to CI

See merge request isc-projects/bind9!2334
2019-09-12 09:23:38 -04:00
Michał Kępień
097989cf59 Add FreeBSD to GitLab CI
Ensure BIND can be tested on FreeBSD in GitLab to more quickly catch
build and test errors on that operating system.  Make the relevant jobs
optional until the CI environment supporting them is deemed stable
enough for continuous use.

FreeBSD jobs are run using the Custom executor feature of GitLab Runner.
Unlike the Docker executor, the Custom executor does not support the
"image" option and thus some way of informing the runner about the OS
version to use for a given job is necessary.  Arguably the simplest way
of doing that without a lot of code duplication in .gitlab-ci.yml would
be to use a YAML template with a "variables" block specifying the
desired FreeBSD release to use, but including such a template in a job
definition would cause issues in case other variables also needed to be
set for that job (e.g. CFLAGS or EXTRA_CONFIGURE for build jobs).  Thus,
only one FreeBSD YAML template is defined instead and the Custom
executor scripts on FreeBSD runners extract the OS version to use from
the CI job name.  This allows .gitlab-ci.yml variables to be defined for
FreeBSD jobs in the same way as for Docker-based jobs.

(cherry picked from commit 51af91d007)
2019-09-12 15:00:38 +02:00
Michał Kępień
83ceebef81 Set --logfile for all kyua invocations
When kyua is called without the --logfile command line option, the log
file is created at a default location which is derived from the HOME
environment variable.  On FreeBSD GitLab CI runners, /home is a
read-only directory and thus kyua invocations not using the --logfile
option fail when HOME is set to something beneath /home.  Set --logfile
to /dev/null for all kyua invocations whose logs are irrelevant in order
to prevent kyua failures caused by HOME being non-writable.

(cherry picked from commit 1bffa602ba)
2019-09-12 15:00:34 +02:00
Michał Kępień
84fdc4034f Merge branch 'michal/misc-doc-fixes-v9_14' into 'v9_14'
[v9_14] Miscellaneous documentation fixes

See merge request isc-projects/bind9!2330
2019-09-12 08:01:33 -04:00
Michał Kępień
bf4c9450ca README: do not mention /usr/include on macOS
For newer versions of Xcode, "xcode-select --install" no longer installs
system headers into /usr/include (instead, they are installed in the
Xcode directory tree), so do not mention that path in the macOS section
of README to prevent confusion.

(cherry picked from commit 5af0b1d1d3)
2019-09-12 13:58:01 +02:00
Mark Andrews
973eac118d Merge branch 'marka-split-notes-v9_14' into 'v9_14'
split notes.xml into sections v9_14

See merge request isc-projects/bind9!2327
2019-09-12 06:06:42 -04:00
Mark Andrews
9f612e0850 split notes.xml into sections 2019-09-12 20:05:05 +10:00
Mark Andrews
eeb281641b Merge branch '1043-cppcheck-detected-code-issues-v9_14' into 'v9_14'
Resolve "cppcheck-detected code issues"

See merge request isc-projects/bind9!2332
2019-09-12 06:01:25 -04:00
Mark Andrews
57824120e4 address or suppress cppcheck warnings
(cherry picked from commit b59fe46e76)
2019-09-12 19:27:28 +10:00
Tinderbox User
39057cceec Merge branch 'prep-release' into v9_14 v9.14.6 2019-09-09 14:51:54 +00:00
Tinderbox User
87bcd335d6 prep for 9.14.6 2019-09-09 14:09:52 +00:00
Tinderbox User
2a2d8d00aa prep for 9.14.6 2019-09-09 13:34:28 +00:00