#190 bind-9.16: another try
Closed by abbra. Opened by slev.
slev/bind-dyndb-ldap bind-9.16-support  into  master

This PR is based on Tomas PR:
https://pagure.io/bind-dyndb-ldap/pull-request/187

The changes list was composed as the list of all the changes touched the corresponding dyndb tests in upstream, something like this:

git log -p upstream/v9_11_8_release..upstream/v9_16_3-release -- bin/tests/system/dyndb/

There is still a bunch of problems I want to test/fix, but most of the changes were done (hope).

41 new commits added

  • tests: Run all tests
  • bind-9.16: Clean up outdated static assertions
  • bind-9.16: isc_mem_strdup cannot fail gracefully now
  • bind-9.16: isc_mem_allocate cannot fail gracefully now
  • bind-9.16: isc_mem_get cannot fail gracefully now
  • bind-9.16: Don't re-initialize hash in BIND-only mode
  • bind-9.16: Refactor detach dyndb
  • bind-9.16: Refactor dns_fixedname_name
  • bind-9.16: Fix assertions on isc_refcount_init
  • bind-9.16: Clean up isc_ondestroy_init
  • bind-9.16: Correct reference counting
  • bind-9.16: isc_condition_destroy is still neither void nor fatal
  • bind-9.16: Follow project's cleanup rule
  • bind-9.16: Remove compat defines
  • WIP: test against FreeIPA with bind external pkcs11 engine
  • WIP: Test build against bind 9.16
  • bind-9.16: Use dns_name_copynf(...) for RUNTIME_CHECK(dns_name_copy(..., NULL))
  • isc-bind 9.16: Temporary define HAVE_TLS and HAVE_THREAD_LOCAL
  • bind-9.16: dns_dbmethods_t has three more entries
  • bind-9.16: findzonecut and dns_db_findzonecut has additional parameter
  • bind-9.16: dns_zone_load has additional parameter
  • bins-9.16: dns_zone_setfile has additional parameters
  • bind-9.16: dns_fwdtable_find has additional parameter
  • bind-9.16: cfg_print_grammar has additional parameter
  • bind-9.16: Use dns_byaddr_createptrname instead of dns_byaddr_createptrname2
  • bind-9.16: Use dns_zone_getserial instead of dns_zone_getserial2
  • bind-9.16: dns_zone_setdbtype is now void
  • bind-9.16: isc_refcount_t is now atomic_uint_fast32_t only
  • bind-9.16: dns_rbtnodechain_init has only one parameter
  • bind-9.16: dns_view_flushcache has an additional parameter
  • bind-9.16: Use const for dns_name_t root name
  • bind-9.16: STATIC_ASSERT is now provided by isc/util.h
  • bind-9.16: Handle dns_db_rpz_ deprecations
  • bind-9.16: Remove isc_ondestroy_init
  • bind-9.16: isc_thread_ functions are void and failures are fatal
  • bind-9.16: Use reworked isc_refcount_ functions
  • bind-9.16: isc_mutex_ fuctions are void and failures are fatal
  • bind-9.16: Replace removed isc_string_ functions
  • bind-9.16: isc_buffer_allocate is now void
  • bind-9.16: cfg_parse_buffer changes
  • bind-9.16: Lowercase DNS_SSUMATCHTYPE_* -> dns_ssumatchtype_*

42 new commits added

  • bind-9.16: isc_event_allocate cannot fail gracefully now
  • tests: Run all tests
  • bind-9.16: Clean up outdated static assertions
  • bind-9.16: isc_mem_strdup cannot fail gracefully now
  • bind-9.16: isc_mem_allocate cannot fail gracefully now
  • bind-9.16: isc_mem_get cannot fail gracefully now
  • bind-9.16: Don't re-initialize hash in BIND-only mode
  • bind-9.16: Refactor detach dyndb
  • bind-9.16: Refactor dns_fixedname_name
  • bind-9.16: Fix assertions on isc_refcount_init
  • bind-9.16: Clean up isc_ondestroy_init
  • bind-9.16: Correct reference counting
  • bind-9.16: isc_condition_destroy is still neither void nor fatal
  • bind-9.16: Follow project's cleanup rule
  • bind-9.11.6: Remove compat defines
  • WIP: test against FreeIPA with bind external pkcs11 engine
  • WIP: Test build against bind 9.16
  • bind-9.16: Use dns_name_copynf(...) for RUNTIME_CHECK(dns_name_copy(..., NULL))
  • isc-bind 9.16: Temporary define HAVE_TLS and HAVE_THREAD_LOCAL
  • bind-9.16: dns_dbmethods_t has three more entries
  • bind-9.16: findzonecut and dns_db_findzonecut has additional parameter
  • bind-9.16: dns_zone_load has additional parameter
  • bins-9.16: dns_zone_setfile has additional parameters
  • bind-9.16: dns_fwdtable_find has additional parameter
  • bind-9.16: cfg_print_grammar has additional parameter
  • bind-9.16: Use dns_byaddr_createptrname instead of dns_byaddr_createptrname2
  • bind-9.16: Use dns_zone_getserial instead of dns_zone_getserial2
  • bind-9.16: dns_zone_setdbtype is now void
  • bind-9.16: isc_refcount_t is now atomic_uint_fast32_t only
  • bind-9.16: dns_rbtnodechain_init has only one parameter
  • bind-9.16: dns_view_flushcache has an additional parameter
  • bind-9.16: Use const for dns_name_t root name
  • bind-9.16: STATIC_ASSERT is now provided by isc/util.h
  • bind-9.16: Handle dns_db_rpz_ deprecations
  • bind-9.16: Remove isc_ondestroy_init
  • bind-9.16: isc_thread_ functions are void and failures are fatal
  • bind-9.16: Use reworked isc_refcount_ functions
  • bind-9.16: isc_mutex_ fuctions are void and failures are fatal
  • bind-9.16: Replace removed isc_string_ functions
  • bind-9.16: isc_buffer_allocate is now void
  • bind-9.16: cfg_parse_buffer changes
  • bind-9.16: Lowercase DNS_SSUMATCHTYPE_* -> dns_ssumatchtype_*

1 new commit added

  • bind: Temp workaround for rndc-confgen

With temp commit all tests passed:
https://dev.azure.com/slev0400/slev/_build/results?buildId=1554&view=results

Thank you, @slev, much appreciated!

Zones seem to work:

May 22 15:08:44 master1.ipa.test named[8266]: zone 0.18.172.in-addr.arpa/IN: loaded serial 1590160124
May 22 15:08:44 master1.ipa.test named[8266]: zone example.test/IN (signed): loaded serial 1590160124
May 22 15:08:44 master1.ipa.test named[8266]: zone example.test/IN (unsigned): loaded serial 1590160124
May 22 15:08:44 master1.ipa.test named[8266]: zone example.test/IN (signed): receive_secure_serial: unchanged
May 22 15:08:44 master1.ipa.test named[8266]: zone example.test/IN (signed): loaded serial 1590160124
May 22 15:08:44 master1.ipa.test named[8266]: zone example.test/IN (signed): reconfiguring NSEC3PARAM to '0 0 0 00'
May 22 15:08:44 master1.ipa.test named[8266]: zone ipa.test/IN: loaded serial 1590160124
May 22 15:08:44 master1.ipa.test named[8266]: 3 master zones from LDAP instance 'ipa' loaded (3 zones defined, 0 inactive, 0 failed to load)
May 22 15:08:44 master1.ipa.test named[8266]: zone example.test/IN (signed): reconfiguring zone keys
May 22 15:08:44 master1.ipa.test named[8266]: zone example.test/IN (signed): next key event: 22-May-2020 16:08:44.122

NSEC3PARAM with all-zeros is just a default value when nsec3param record is not set in the zone.

rebased onto 3b34807f481de612fbf42e1bd8858a2fca0b5c15

Rebased on master.
Removed rndc-confgen workaround (fixed in bind-9.16).

@rjeffman please review.

I want to do a few more tests, but this looks good to me.

this needs a rebase on current master/11.3

well, "needs" for the version number change, that's all

fails to build on 32bit:

...
../../src/syncrepl.c: In function sync_task_add:
../../src/syncrepl.c:460:15: error: format %lu expects argument of type long unsigned int, but argument 4 has type unsigned int [-Werror=format=]
  460 |  log_debug(2, "adding task %p to syncrepl list; %lu tasks in list",
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have prepared modification to allow building also from BIND 9.11 sources. I did not test it works, it just compiles.

https://pagure.io/fork/pemensik/bind-dyndb-ldap/tree/bind-9.16-support

@pemensik thanks!
Could you please remove the second hunk in https://pagure.io/fork/pemensik/bind-dyndb-ldap/c/b310d9a8dc7aa39afbd2a578c56c3cde3d141306?branch=bind-9.16-support ?
It is definitely not needed, please reduce the diff.

Okay, I removed unnecessary format change, but added small cleanup removing a variable.

I have made new build of BIND 9.16.6. It changed db API, new function was added.
Requires modification to compile, provided it in my branch.

I merged a variant of this PR to master.

Pull-Request has been closed by abbra