Bug 191439 - net/samba41: Add ADDC option, change default options
Summary: net/samba41: Add ADDC option, change default options
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Timur I. Bakeyev
Depends on:
Reported: 2014-06-27 18:00 UTC by Harald Schmalzbauer
Modified: 2014-12-15 00:57 UTC (History)
0 users

See Also:

net_samba41-add-ADDC-option.patch (22.36 KB, patch)
2014-06-27 18:01 UTC, Harald Schmalzbauer
no flags Details | Diff
Updated net_samba41-add-ADDC-option.patch matching 4.1.11 (21.96 KB, patch)
2014-10-13 13:54 UTC, Harald Schmalzbauer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Schmalzbauer 2014-06-27 18:00:38 UTC
I prepared a patchset which can reduce dependencies a bit by making it possible to disable (in my world disabled by default – so to enable) sambas »built-in« ActiveDirectory-DomainController (ADDC). It's a simple matter of the configure argument "--without-ad-dc". Now libsasl2, libgcrypt and libgnutls are no mandatory LIB_DEPENDS.

I also made NSUPDATE really optional, not one-out-of-3-choice (OPTION_RADIO vs. OPTION_SINGLE).

Additionally I changed OPTIONS_DEFAULT from ${OPTIONS_DEFINE} (all) to that I really used in the past 10 years of samba deployment. This is highly personal experience, but I'd like to see the ADDC option disabled by default – in many cases that prevents fellows from digging into samba41, but samba36 has some serious unfixed bugs, which prevent stable usage even for most basic/essential CIFS usage! (and I was told by a samba developer that only security fixes will make it into any samba36 update, not even most serious bugfixes, known and fixed in samba4[1] long ago and confirmed to be serious…)

And last, I changed ADS_DESC to make clear, member support for ActiveDirectory is meant (not DomainController, which one can think since that's the main feature when talking about samba4[1]) 


Comment 1 Harald Schmalzbauer 2014-06-27 18:01:48 UTC
Created attachment 144198 [details]
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2014-07-04 01:08:59 UTC
Over to maintainer.
Comment 3 Harald Schmalzbauer 2014-10-13 13:54:57 UTC
Created attachment 148256 [details]
Updated net_samba41-add-ADDC-option.patch matching 4.1.11

Some minor option changes happened since my first patch, so here's a replacing patch, matching samba 4.1.11 as in current ports tree.
Comment 4 Timur I. Bakeyev freebsd_committer 2014-10-15 22:18:12 UTC
I understand your pain, but, unfortunately, if the libs do present in the system - they'll be linked with. So, to deal with that fact I had to put explicit dependencies. You are welcome to provide patch that fixes that in the samba code.

Here are couple of examples:

        libsamba-util.so.0 => not found (0)
        libcom_err-samba4.so.0 => not found (0)
        libsamba-modules.so => not found (0)
        libgssapi-samba4.so.2 => not found (0)
        libtevent-util.so.0 => not found (0)
        libsamba-credentials.so.0 => not found (0)
        libndr-samba.so => not found (0)
        libasn1util.so => not found (0)
        liberrors.so => not found (0)
        libsamdb.so.0 => not found (0)
        libsamba-hostconfig.so.0 => not found (0)
        libauthkrb5.so => not found (0)
        libsamba-sockets.so => not found (0)
        libndr.so.0 => not found (0)
        libcliauth.so => not found (0)
        libtalloc.so.2 => /usr/local/lib/libtalloc.so.2 (0x801622000)
        libmd.so.6 => /lib/libmd.so.6 (0x80182e000)
-->     libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 (0x801a3e000)
        libthr.so.3 => /lib/libthr.so.3 (0x801c59000)
        libtevent.so.0 => /usr/local/lib/libtevent.so.0 (0x801e7e000)
        libc.so.7 => /lib/libc.so.7 (0x80081e000)

        liberrors.so => not found (0)
        libndr.so.0 => not found (0)
        libgssapi-samba4.so.2 => not found (0)
        libauth_sam_reply.so => not found (0)
        libtevent-util.so.0 => not found (0)
        libkrb5samba.so => not found (0)
        libndr-krb5pac.so.0 => not found (0)
        libsamba-hostconfig.so.0 => not found (0)
        libsamba-sockets.so => not found (0)
        libsamba-util.so.0 => not found (0)
        libkrb5-samba4.so.26 => not found (0)
        libcom_err-samba4.so.0 => not found (0)
        libthr.so.3 => /lib/libthr.so.3 (0x801616000)
        libtalloc.so.2 => /usr/local/lib/libtalloc.so.2 (0x80183b000)
-->     libgcrypt.so.20 => /usr/local/lib/libgcrypt.so.20 (0x801a47000)
-->     libgnutls.so.28 => /usr/local/lib/libgnutls.so.28 (0x801d1e000)
        libtevent.so.0 => /usr/local/lib/libtevent.so.0 (0x802029000)
        libc.so.7 => /lib/libc.so.7 (0x80081e000)

        libsamba-util.so.0 => not found (0)
        libsmbd_base.so => not found (0)
        liberrors.so => not found (0)
        libsmbregistry.so => not found (0)
        libsamba-security.so => not found (0)
        libsmbconf.so.0 => not found (0)
        libpdb.so.0 => not found (0)
        libsmbd_shim.so => not found (0)
        libtalloc.so.2 => /usr/local/lib/libtalloc.so.2 (0x801607000)
        libthr.so.3 => /lib/libthr.so.3 (0x801813000)
        libsunacl.so.1 => /usr/local/lib/libsunacl.so.1 (0x801a38000)
        libc.so.7 => /lib/libc.so.7 (0x80081e000)

Those are the libs that were build with --without-ad-dc flag.

While current ports infrastructure doesn't guaranty isolation of the build environment we have to use broadest dependencies.
Comment 5 Timur I. Bakeyev freebsd_committer 2014-10-16 20:37:36 UTC
To be clear, I'll apply certain parts of your patch, so you'll be able to compile samba without ADDC, but don't expect that extra dependencies will be dropped.
Comment 6 commit-hook freebsd_committer 2014-10-20 13:14:08 UTC
A commit references this bug:

Author: timur
Date: Mon Oct 20 13:13:10 UTC 2014
New revision: 371268
URL: https://svnweb.freebsd.org/changeset/ports/371268

  Upgrade net/samba41 to 4.1.13 version

  PR:		191439

Comment 7 Harald Schmalzbauer 2014-10-20 15:17:27 UTC
Thanks you for incorporating the applicable suggestions!
As soon as I'll have to deal with samba again, I'll check if the dependency pitfall (linking if found inside samba build infrastructure) can be addressed.

Most important, your recent commit seems to also address https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193734. Can you please change the state of the bug report?

Thanks a lot,

Comment 8 Timur I. Bakeyev freebsd_committer 2014-12-15 00:57:10 UTC
Committed, thanks!