Skip to content

Commit 978c7b2

Browse files
committed
Complete rewrite the BIND 9 build system
The rewrite of BIND 9 build system is a large work and cannot be reasonable split into separate merge requests. Addition of the automake has a positive effect on the readability and maintainability of the build system as it is more declarative, it allows conditional and we are able to drop all of the custom make code that BIND 9 developed over the years to overcome the deficiencies of autoconf + custom Makefile.in files. This squashed commit contains following changes: - conversion (or rather fresh rewrite) of all Makefile.in files to Makefile.am by using automake - the libtool is now properly integrated with automake (the way we used it was rather hackish as the only official way how to use libtool is via automake - the dynamic module loading was rewritten from a custom patchwork to libtool's libltdl (which includes the patchwork to support module loading on different systems internally) - conversion of the unit test executor from kyua to automake parallel driver - conversion of the system test executor from custom make/shell to automake parallel driver - The GSSAPI has been refactored, the custom SPNEGO on the basis that all major KRB5/GSSAPI (mit-krb5, heimdal and Windows) implementations support SPNEGO mechanism. - The various defunct tests from bin/tests have been removed: bin/tests/optional and bin/tests/pkcs11 - The text files generated from the MD files have been removed, the MarkDown has been designed to be readable by both humans and computers - The xsl header is now generated by a simple sed command instead of perl helper - The <irs/platform.h> header has been removed - cleanups of configure.ac script to make it more simpler, addition of multiple macros (there's still work to be done though) - the tarball can now be prepared with `make dist` - the system tests are partially able to run in oot build Here's a list of unfinished work that needs to be completed in subsequent merge requests: - `make distcheck` doesn't yet work (because of system tests oot run is not yet finished) - documentation is not yet built, there's a different merge request with docbook to sphinx-build rst conversion that needs to be rebased and adapted on top of the automake - msvc build is non functional yet and we need to decide whether we will just cross-compile bind9 using mingw-w64 or fix the msvc build - contributed dlz modules are not included neither in the autoconf nor automake
1 parent 4df5a58 commit 978c7b2

File tree

596 files changed

+4300
-21769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

596 files changed

+4300
-21769
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
*.gcno
55
*.la
66
*.lo
7+
*.log
78
*.o
89
*.orig
910
*.plist/ # ccc-analyzer store its results in .plist directories
1011
*.rej
1112
*.so
13+
*.trs
1214
*_test
1315
*.ipch # vscode/intellisense precompiled header
1416
*~
@@ -63,3 +65,4 @@ timestamp
6365
/cppcheck.results
6466
/tsan
6567
/util/check-make-install
68+
/INSTALL

.gitlab-ci.yml

+15-81
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ variables:
3232
TARBALL_EXTENSION: xz
3333

3434
stages:
35+
- autoconf
3536
- precheck
3637
- build
3738
- unit
@@ -168,7 +169,7 @@ stages:
168169
.autoconf: &autoconf_job
169170
<<: *release_branch_triggering_rules
170171
<<: *base_image
171-
stage: precheck
172+
stage: autoconf
172173
script:
173174
- autoreconf -fi
174175
artifacts:
@@ -186,6 +187,7 @@ stages:
186187
--with-json-c \
187188
--prefix=$HOME/.local \
188189
--without-make-clean \
190+
--with-python=python3 \
189191
$EXTRA_CONFIGURE \
190192
|| cat config.log
191193

@@ -253,8 +255,8 @@ stages:
253255
- *setup_interfaces
254256
- *setup_softhsm
255257
script:
256-
- ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
257-
- test -s bin/tests/system/systests.output
258+
- ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k check V=1 ) || cat bin/tests/system/test-suite.log
259+
- test -s bin/tests/system/test-suite.log
258260

259261
.system_test: &system_test_job
260262
<<: *system_test_common
@@ -313,9 +315,7 @@ stages:
313315
before_script:
314316
- *setup_softhsm
315317
script:
316-
- make unit
317-
after_script:
318-
- *kyua_report_html
318+
- cd lib && make -j${TEST_PARALLEL_JOBS:-1} -k check V=1
319319

320320
.unit_test: &unit_test_job
321321
<<: *unit_test_common
@@ -328,16 +328,12 @@ stages:
328328
<<: *unit_test_common
329329
allow_failure: true
330330
after_script:
331-
- *kyua_report_html
332331
- find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
333332
artifacts:
334333
expire_in: "1 day"
335334
paths:
336335
- lib/*/tests/tsan.*
337336
- tsan/
338-
- kyua.log
339-
- kyua.results
340-
- kyua_html/
341337
when: on_failure
342338

343339
.cppcheck_args: &run_cppcheck |
@@ -377,7 +373,6 @@ autoreconf:
377373
misc:
378374
<<: *precheck_job
379375
script:
380-
- sh util/check-ans-prereq.sh
381376
- sh util/checklibs.sh > checklibs.out
382377
- sh util/tabify-changes < CHANGES > CHANGES.tmp
383378
- diff -urNap CHANGES CHANGES.tmp
@@ -451,16 +446,14 @@ tarball-create:
451446
stage: precheck
452447
<<: *base_image
453448
script:
454-
- source version
455-
- export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
456-
- git archive --prefix="${BIND_DIRECTORY}/" --output="${BIND_DIRECTORY}.tar" HEAD
457-
- mkdir "${BIND_DIRECTORY}"
458-
- echo "SRCID=$(git rev-list --max-count=1 HEAD | cut -b1-7)" > "${BIND_DIRECTORY}/srcid"
459-
- tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/srcid"
460-
- ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar"
449+
- *configure
450+
- make -j${BUILD_PARALLEL_JOBS:-1} dist V=1
461451
artifacts:
462452
paths:
463-
- bind-*.tar.${TARBALL_EXTENSION}
453+
- bind-*.tar.*
454+
needs:
455+
- job: autoreconf
456+
artifacts: true
464457
only:
465458
- tags
466459

@@ -477,6 +470,7 @@ docs:
477470
needs:
478471
- job: autoreconf
479472
artifacts: true
473+
allow_failure: true
480474
artifacts:
481475
paths:
482476
- doc/arm/
@@ -524,7 +518,7 @@ gcc:centos6:amd64:
524518
variables:
525519
CC: gcc
526520
CFLAGS: "${CFLAGS_COMMON}"
527-
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
521+
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error --without-python"
528522
<<: *centos_centos6_amd64_image
529523
<<: *build_job
530524

@@ -805,7 +799,7 @@ gcc:tumbleweed:amd64:
805799
variables:
806800
CC: gcc
807801
CFLAGS: "${CFLAGS_COMMON}"
808-
EXTRA_CONFIGURE: "--with-libidn2"
802+
EXTRA_CONFIGURE: "--with-libidn2 --with-python"
809803
<<: *tumbleweed_latest_amd64_image
810804
<<: *build_job
811805

@@ -1152,77 +1146,17 @@ system:clang:openbsd6.6:amd64:
11521146
- schedules
11531147
- web
11541148

1155-
# Jobs for Visual Studio 2017 builds on Windows (amd64)
1156-
1157-
msvc:windows:amd64:
1158-
<<: *windows_build_job
1159-
<<: *default_triggering_rules
1160-
variables:
1161-
VSCONF: Release
1162-
1163-
system:msvc:windows:amd64:
1164-
<<: *windows_system_test_job
1165-
variables:
1166-
VSCONF: Release
1167-
needs:
1168-
- job: msvc:windows:amd64
1169-
artifacts: true
1170-
1171-
msvc-debug:windows:amd64:
1172-
<<: *windows_build_job
1173-
variables:
1174-
VSCONF: Debug
1175-
only:
1176-
- schedules
1177-
- tags
1178-
- web
1179-
1180-
system:msvc-debug:windows:amd64:
1181-
<<: *windows_system_test_job
1182-
variables:
1183-
VSCONF: Debug
1184-
needs:
1185-
- job: msvc-debug:windows:amd64
1186-
artifacts: true
1187-
11881149
# Job producing a release tarball
11891150

11901151
release:
11911152
<<: *base_image
11921153
stage: release
11931154
script:
1194-
# Determine BIND version
1195-
- source version
1196-
- export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
1197-
# Remove redundant files and system test utilities from Windows build artifacts
1198-
- find Build/Release/ -name "*.pdb" -print -delete
1199-
- find Build/Debug/ \( -name "*.bsc" -o -name "*.idb" \) -print -delete
1200-
- find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete
1201-
# Create Windows zips
1202-
- openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256
1203-
- ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * )
1204-
- ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * )
1205-
# Prepare release tarball contents (tarballs + zips + documentation)
1206-
- mkdir -p release/doc/arm
1207-
- pushd release
1208-
- mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip .
1209-
- tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}"
1210-
- mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README,srcid} .
1211-
- mv "${BIND_DIRECTORY}"/doc/arm/{Bv9ARM{*.html,.pdf},man.*,notes.{html,pdf,txt}} doc/arm/
1212-
- rm -rf "${BIND_DIRECTORY}"
1213-
- cp doc/arm/notes.html "RELEASE-NOTES-${BIND_DIRECTORY}.html"
1214-
- cp doc/arm/notes.pdf "RELEASE-NOTES-${BIND_DIRECTORY}.pdf"
1215-
- cp doc/arm/notes.txt "RELEASE-NOTES-${BIND_DIRECTORY}.txt"
1216-
- popd
12171155
# Create release tarball
12181156
- tar --create --file="${CI_COMMIT_TAG}.tar.gz" --gzip release/
12191157
needs:
12201158
- job: tarball-create
12211159
artifacts: true
1222-
- job: msvc:windows:amd64
1223-
artifacts: true
1224-
- job: msvc-debug:windows:amd64
1225-
artifacts: true
12261160
only:
12271161
- tags
12281162
artifacts:

AUTHORS

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Mark Andrews
2+
Andreas Gustafsson
3+
Evan Hunt
4+
Brian Wellington
5+
Bob Halley
6+
David Lawrence
7+
Michael Graff
8+
Michael Sawyer
9+
Ondřej Surý
10+
James Brister
11+
Tatuya JINMEI 神明達哉
12+
Francis Dupont
13+
Michał Kępień
14+
Danny Mayer
15+
Mukund Sivaraman
16+
Jeremy C. Reed
17+
William King
18+
Stephen Morris
19+
Witold Kręcicki
20+
Curtis Blackburn
21+
Scott Mann
22+
Rob Austein
23+
Jim Reid
24+
Eric Luce
25+
Olafur Gudmundsson
26+
Stephen Jacob
27+
Damien Neil
28+
Tony Finch
29+
Jakob Schlyter
30+
Petr Menšík
31+
Vernon Schryver
32+
Matt Nelson
33+
Shane Kerr
34+
Paul Ebersman
35+
Ray Bellis
36+
Shawn Routhier
37+
Ben Cottrell
38+
Tomas Hozza
39+
johnd
40+
Bill Parker
41+
李昶
42+
Kevin Chen
43+
Jonathan Casey
44+
Mary Stahl
45+
Mathieu Arnold
46+
David Hankins
47+
Paul Hoffman
48+
Paul Vixie
49+
Brian Conry
50+
Anay Panvalkar
51+
colleen
52+
Robert Edmonds
53+
João Damas

CODE_OF_CONDUCT

-79
This file was deleted.

0 commit comments

Comments
 (0)