specify some deps on private libs actually used directly
authorMichael Tokarev <mjt@tls.msk.ru>
Thu, 19 May 2022 17:37:21 +0000 (20:37 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 28 Nov 2024 19:28:27 +0000 (22:28 +0300)
Updated: Thu, 28 Nov 2024 11:59:58 +0300
Forwarded: https://gitlab.com/samba-team/samba/-/merge_requests/3872

Lots of samba libraries has incomplete dependencies listed
in wscript files.  This usually is not a problem since the
link line includes dependencies of their dependencies of
their dependencies, and somewhere down that line all immediate
dependencies which are missing are actually present.  But
sometimes this becomes a problem when a library does not
declare direct dependency on at least one private library
which it actually uses: in case no private library is
listed as direct dependency, private library directory is
not put into RUNPATH of the resulting binary, so the binary
can not find its own dependencies.

Fix a few such places, including some libraries which are
a part of public abi (libsmbldap, libndr).

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name add-missing-libs-deps.diff

lib/param/wscript_build
lib/util/wscript_build
librpc/wscript_build
source3/wscript_build
source4/dsdb/samdb/ldb_modules/wscript_build_server
source4/param/wscript_build

index 864975a588467d7c27ad5f7f3cdc06e347984ab9..0ea874b9f6e2b08e6614fd218e9324d21c075ae7 100644 (file)
@@ -32,7 +32,7 @@ bld.SAMBA_GENERATOR('param_table_gen.c',
 
 bld.SAMBA_LIBRARY('server-role',
                   source='loadparm_server_role.c',
-                  deps='samba-util samba-debug',
+                  deps='samba-util time-basic samba-debug',
                   private_library=True)
 
 bld.SAMBA_LIBRARY('samba-hostconfig',
index b4fcfeaba07c576fcc2eee7a0f0762ab594fae0f..3861470293039b8b00eef5b2bec75fe3da029be4 100644 (file)
@@ -243,7 +243,7 @@ else:
 
     bld.SAMBA_LIBRARY('samba-modules',
                       source='modules.c',
-                      deps='samba-errors samba-util',
+                      deps='samba-errors samba-util samba-debug',
                       local_include=False,
                       private_library=True)
 
@@ -277,7 +277,7 @@ else:
                           tevent_req_profile.c
                       ''',
                       local_include=False,
-                      public_deps='tevent samba-errors',
+                      public_deps='tevent time-basic samba-errors',
                       public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
                       header_path=[ ('*', 'util') ],
                       pc_files=[],
index b1765863d9c1cd366a2506c1c4f153e8712ba8f6..e7e5eff529321d5de150675924475e56facfb55e 100644 (file)
@@ -672,6 +672,7 @@ bld.SAMBA_LIBRARY('ndr',
     source='ndr/ndr_string.c ndr/ndr_basic.c ndr/uuid.c ndr/ndr.c ndr/ndr_misc.c gen_ndr/ndr_misc.c ndr/util.c',
     pc_files='ndr.pc',
     public_deps='samba-errors talloc samba-util util_str_hex',
+    deps='genrand',
     public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h',
     header_path= [('*gen_ndr*', 'gen_ndr')],
     vnum='5.0.0',
index 824f961c1ecd55e234a2fd811853c8e0a65347ff..d966bf1947db44e9b79769c7302994583460cb71 100644 (file)
@@ -191,7 +191,7 @@ bld.SAMBA3_LIBRARY('smbldaphelper',
                           passdb/pdb_ldap_schema.c
                           passdb/pdb_ldap_util.c
                           ''',
-                   deps='smbldap secrets3',
+                   deps='smbldap secrets3 samba-security samba3-util',
                    allow_undefined_symbols=True,
                    enabled=bld.CONFIG_SET('HAVE_LDAP'),
                    private_library=True)
@@ -491,7 +491,7 @@ bld.SAMBA3_LIBRARY('secrets3',
 
 bld.SAMBA3_LIBRARY('smbldap',
                     source='lib/smbldap.c',
-                    deps='ldap lber samba-util smbconf',
+                    deps='ldap lber samba-util smbconf samba-security genrand smbd_shim',
                     enabled=bld.CONFIG_SET("HAVE_LDAP"),
                     private_library=False,
                     abi_directory='lib/ABI',
index 9c1eb12a7c2e212bd6af212d89eaab60ee3070ba..1f70641283a955ed38c1c7921a7b39162841a15e 100644 (file)
@@ -345,7 +345,7 @@ bld.SAMBA_MODULE('ldb_anr',
        init_function='ldb_anr_module_init',
        module_init_name='ldb_init_module',
        internal_module=False,
-       deps='talloc samba-util samdb'
+       deps='talloc samba-util samdb ldbsamba'
        )
 
 
@@ -385,7 +385,7 @@ bld.SAMBA_MODULE('ldb_resolve_oids',
        init_function='ldb_resolve_oids_module_init',
        module_init_name='ldb_init_module',
        internal_module=False,
-       deps='samdb talloc ndr'
+       deps='samdb talloc ndr ldbsamba'
        )
 
 
index d1b852c0c73d177b53180c5776c459d85af9865c..80341369337680faf5a89e580a3f020985c1f5e3 100644 (file)
@@ -39,7 +39,7 @@ libpython = bld.pyembed_libname('LIBPYTHON')
 
 bld.SAMBA_PYTHON('pyparam',
                 source='pyparam.c',
-                deps='samba-hostconfig %s' % pytalloc_util,
+                deps='samba-hostconfig server-role samba-util samba-debug %s' % pytalloc_util,
                 realname='samba/param.so'
                 )