[Bug 290441] net/samba422: insists on pulling in lib/samba4/modules/ldb/ldap.so when AD_DC and LDAP are both OFF

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 23 Oct 2025 08:09:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290441

            Bug ID: 290441
           Summary: net/samba422: insists on pulling in
                    lib/samba4/modules/ldb/ldap.so when AD_DC and LDAP are
                    both OFF
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: samba@FreeBSD.org
          Reporter: Trond.Endrestol@ximalas.info
             Flags: maintainer-feedback?(samba@FreeBSD.org)
          Assignee: samba@FreeBSD.org

I have configured net/samba422 as shown below:

# make -C /usr/ports/net/samba422 showconfig
===> The following configuration options are available for samba422-4.22.3:
     ADS=off: Active Directory client
     AD_DC=off: Active Directory Domain Controller(implies PYTHON3)
     CLUSTER=off: Clustering support
     CUPS=off: CUPS printing system support
     DOCS=on: Build and/or install documentation
     FAM=on: File Alteration Monitor
     GPGME=off: GpgME support
     LDAP=off: LDAP client
     MANPAGES=on: Build and/or install manual pages
     PROFILE=off: Profiling data
     PYTHON3=on: Python 3.x bindings or support
     QUOTAS=off: Disk quota support
     SYSLOG=on: Syslog logging support
     UTMP=on: UTMP accounting
====> VFS modules
     FRUIT=off: MacOSX and TimeMachine support
     GLUSTERFS=off: GlusterFS support
====> GSSAPI Security API support: you have to select exactly one of them
     GSSAPI_BUILTIN=on: GSSAPI support via bundled Heimdal
     GSSAPI_MIT=off: GSSAPI support via security/krb5
====> Zero configuration networking: you have to select exactly one of them
     ZEROCONF_NONE=on: Zeroconf support is absent
     AVAHI=off: Zeroconf support via Avahi
     MDNSRESPONDER=off: Zeroconf support via mDNSResponder
===> Use 'make config' to modify these settings

This doesn't go well when building the package:

--------------------------------------------------------------------------------
--  Phase: package
--------------------------------------------------------------------------------
===>  Building packages for samba422-4.22.3
===>   Building samba422-4.22.3
pkg-static: Unable to access file
/construction/xports/net/samba422/work/stage/usr/local/lib/samba4/modules/ldb/ldap.so:No
such file or directory
*** Error code 1

Stop.
make: stopped in /xports/net/samba422

Looking at the pkg-plist file, I noticed the negative form of AD_DC.

%%NO_AD_DC%%lib/samba4/modules/ldb/ldap.so

Looking at the output of make -C PLIST_SUB, I noticed NO_AD_DC is empty while
AD_DC is set to @comment. The same goes for LDAP.

I believe we should use the positive form of AD_DC and add LDAP to the mix:

%%AD_DC%%%%LDAP%%lib/samba4/modules/ldb/ldap.so

At least the port built successfully with just:

%%AD_DC%%lib/samba4/modules/ldb/ldap.so

--------------------------------------------------------------------------------
--  Phase: package
--------------------------------------------------------------------------------
===>  Building packages for samba422-4.22.3
===>   Building samba422-4.22.3
file sizes/checksums  [1065]: .......... done
packing files         [1065]: .......... done
packing directories     [39]: . done

-- 
You are receiving this mail because:
You are the assignee for the bug.