Skip to content

Commit

Permalink
build: Make "samba4" public libraries provided (mostly) for OpenChang…
Browse files Browse the repository at this point in the history
…e private

These libraries, mostly with ABI versions of 0.0.1 were made public in
the early development of Samba4 and have not been seriously considered
since.  Most are to allow OpenChange to build.

While the OpenChange server is no longer actively used, the MAPI
client is used and we need to allow packages to be built that will
allow the Evolution MAPI client to still work.

Some appear to be mistakes (dcerpc-samr), historical abberations
(tevent-util) or ideas that did not go very far (the samba-policy
library for example).

To allow any remaining users to access them, they are not made private
in the build system but are instead listed so that they can be made
public again via ./configure with the same --private-libraries='!LIB'
syntax introduced to make ldb private by default.

Signed-off-by: Andrew Bartlett <[email protected]>
Reviewed-by: Alexander Bokovoy <[email protected]>

Autobuild-User(master): Andrew Bartlett <[email protected]>
Autobuild-Date(master): Wed Jun  5 21:47:24 UTC 2024 on atb-devel-224
  • Loading branch information
abartlet committed Jun 5, 2024
1 parent d11b281 commit 096d380
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
21 changes: 21 additions & 0 deletions WHATSNEW.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,27 @@ never took into account later changes, and so has not worked for a
number of years. Samba 4.21 and LDB 2.10 removes this unused and
broken feature.

Some Samba public libraries made private by default
---------------------------------------------------

The following Samba C libraries are currently made public due to their
use by OpenChange or for historical reasons that are no longer clear.

dcerpc-samr, samba-policy, tevent-util, dcerpc, samba-hostconfig,
samba-credentials, dcerpc_server, samdb

The libraries used by the OpenChange client now private, but can be
made public (like ldb above) with:

./configure --private-libraries='!dcerpc,!samba-hostconfig,!samba-credentials,!ldb'

The C libraries without any known user or used only for the OpenChange
server (a dead project) may be made private entirely in a future Samba
version.

If you use a Samba library in this list, please be in touch with the
samba-technical mailing list.

Using ldaps from 'winbindd' and 'net ads'
-----------------------------------------

Expand Down
20 changes: 19 additions & 1 deletion wscript
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,25 @@ from waflib.Tools import bison
samba_dist.DIST_DIRS('.')
samba_dist.DIST_BLACKLIST('.gitignore .bzrignore source4/selftest/provisions')

DEFAULT_PRIVATE_LIBS = ["ldb"]
# A function so the variables are not in global scope
def get_default_private_libs():
# LDB is used by sssd (was made private by default in Samba 4.21)
SSSD_LIBS=["ldb"]
# These following libs without ABI checking were made private by default in Samba 4.21
# Presumably unused (dcerpc-samr was probably a copy and paste error,
# and samba-policy has primary use via python bindings). tevent-util
# was for openchange but was for PIDL output that is no longer
# generated
POSSIBLY_UNUSED_LIBS=["dcerpc-samr","samba-policy","tevent-util"]
# These were used by mapiproxy in OpenChange (also used LDB and
# the real public libs tdb, talloc, tevent)
OPENCHANGE_SERVER_LIBS = ["dcerpc_server","samdb"]
# These (plus LDB, ndr, talloc, tevent) are used by the OpenChange
# client, which is still in use (Fedora/Red Hat packages it)
OPENCHANGE_LIBS = ["dcerpc","samba-hostconfig","samba-credentials"]
return SSSD_LIBS + POSSIBLY_UNUSED_LIBS + OPENCHANGE_LIBS + OPENCHANGE_SERVER_LIBS

DEFAULT_PRIVATE_LIBS = get_default_private_libs()

# install in /usr/local/samba by default
default_prefix = Options.default_prefix = '/usr/local/samba'
Expand Down

0 comments on commit 096d380

Please sign in to comment.