libcli/dns: make 'clidns' private library out of DNS code in WAF build
authorAlexander Bokovoy <ab@samba.org>
Mon, 21 May 2012 14:54:13 +0000 (17:54 +0300)
committerAlexander Bokovoy <ab@samba.org>
Wed, 23 May 2012 14:51:50 +0000 (17:51 +0300)
After consolidating DNS resolver code to lib/addns, there is one piece
that still needs to be moved into a common DNS resolver library: DNS_HOSTS_FILE
subsystem. Unfortunately, direct move would require lib/addns to depend on
libcli/util/{ntstatus.h,werror.h} (provided by errors subsystem).

In addition, moving libcli/dns/* code to lib/addns/ would make conflicting
the dns_tkey_record struct. The conflict comes from source4/dns_server/ and is due
to use of IDL to define the struct. lib/addns/ library also provides its own definition
so we either need to keep them in sync (rewrite code in lib/addns/ a bit) or
depend on generated IDL headers.

Thus, making a private library and subsystem clidns is an intermediate step
that allows to buy some time fore refactoring.

lib/addns/wscript_build
libcli/dns/wscript_build
libcli/nbt/wscript_build
source4/dns_server/wscript_build
utils/wscript_build

index f1bab053c3af39e4e866e4072c195bab1af03b05..15fb62016daf672e35d4ec8201312995efe7cfe7 100755 (executable)
@@ -2,6 +2,6 @@
 
 bld.SAMBA_LIBRARY('addns',
                    source='dnsquery.c dnsrecord.c dnsutils.c dnssock.c dnsgss.c dnsmarshall.c error.c',
 
 bld.SAMBA_LIBRARY('addns',
                    source='dnsquery.c dnsrecord.c dnsutils.c dnssock.c dnsgss.c dnsmarshall.c error.c',
-                   public_deps='DNS_HOSTS_FILE samba-util gssapi uuid resolv',
+                   public_deps='clidns samba-util gssapi uuid resolv',
                    private_library=True,
                    vars=locals())
                    private_library=True,
                    vars=locals())
index fab872712f3101504aec2f12613a66b01f213ba9..03025ad176f7ad153470d528ac725796dac194e1 100755 (executable)
@@ -1,9 +1,7 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-bld.SAMBA_SUBSYSTEM('LIBCLI_DNS',
-        source='dns.c',
-        deps='LIBTSOCKET tevent-util')
-
-bld.SAMBA_SUBSYSTEM('DNS_HOSTS_FILE',
-        source='dns_hosts_file.c',
-        deps='samba-util errors')
+bld.SAMBA_LIBRARY('clidns',
+        source='dns.c dns_hosts_file.c',
+        public_deps='LIBTSOCKET tevent-util',
+        private_library=True,
+        vars=locals())
index 55867bae9172a83c7758fe5cf38976f5b186c45b..a8c239c10d16dc3e6395526f418543d1c366b2a4 100755 (executable)
@@ -8,7 +8,7 @@ bld.SAMBA_SUBSYSTEM('NDR_NBT_BUF',
 
 bld.SAMBA_SUBSYSTEM('lmhosts',
                     source='lmhosts.c',
 
 bld.SAMBA_SUBSYSTEM('lmhosts',
                     source='lmhosts.c',
-                    deps='DNS_HOSTS_FILE replace talloc'
+                    deps='clidns replace talloc'
                     )
 
 bld.SAMBA_LIBRARY('cli-nbt',
                     )
 
 bld.SAMBA_LIBRARY('cli-nbt',
index 960aefc3cb2251b4deb7d145bec6ad11f0333892..c541d08d557c0b519ee89af78f6bb239282575df 100644 (file)
@@ -4,7 +4,7 @@ bld.SAMBA_MODULE('service_dns',
         source='dns_server.c dns_query.c dns_update.c dns_utils.c',
         subsystem='service',
         init_function='server_service_dns_init',
         source='dns_server.c dns_query.c dns_update.c dns_utils.c',
         subsystem='service',
         init_function='server_service_dns_init',
-        deps='samba-hostconfig LIBTSOCKET LIBSAMBA_TSOCKET ldbsamba LIBCLI_DNS',
+        deps='samba-hostconfig LIBTSOCKET LIBSAMBA_TSOCKET ldbsamba clidns',
         local_include=False,
         internal_module=False,
         enabled=bld.AD_DC_BUILD_IS_ENABLED()
         local_include=False,
         internal_module=False,
         enabled=bld.AD_DC_BUILD_IS_ENABLED()
index 3c22ad27aebdd7a031e5cdc99b434bbaa22df8f4..bb13bc78c316408cf7f00764560e30e248683f30 100644 (file)
@@ -2,6 +2,6 @@
 
 bld.SAMBA_BINARY('samba-dig',
        source='samba-dig.c',
 
 bld.SAMBA_BINARY('samba-dig',
        source='samba-dig.c',
-        deps='samba-util NDR_DNS tevent LIBCLI_DNS'
+        deps='samba-util NDR_DNS tevent clidns'
        )
 
        )