# nss-pam-ldapd depends on openldap24



## dksayers (Jul 6, 2022)

I have a recent version of the FreeBSD ports tree in my poudriere repo running on FreeBSD 13. I have configured a jail-ports-make.conf with a DEFAULT_VERSION=ldap2.5 and built my repo. openldap-25 builds as expected but I find that when I install the nss-pam-ldapd package from the same repo it has a dependency of openldap-24. How can I change the dependency to openldap25.


----------



## SirDice (Jul 6, 2022)

dksayers said:


> I have configured a jail-ports-make.conf with a DEFAULT_VERSION=ldap2.5 and built my repo


It's `DEFAULT_VERSIONS= ldap=2.5`

That said, I'm not sure you can do this with LDAP. There is a way to set the LDAP version but I need to dig around a little because I can't remember how.

Edit: For LDAP you should probably use this:

```
DEFAULT_OPENLDAP_VER=25
```


----------



## dksayers (Jul 6, 2022)

My apologies, instead of cut/paste I made a typo. I have other options in my  DEFAULT_VERSIONS= and they work correctly. Doing a poudriere testport -i I can see that it is in fact its loading in my options but they are not used for the nss-pam-ldapd package:

#### /usr/local/etc/poudriere.d/make.conf ####
DEFAULT_VERSIONS=mysql=5.7 ldap=2.5
...
=======================<phase: lib-depends    >============================
===== env: DEVELOPER_MODE=yes USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0
===>   nss-pam-ldapd-0.9.11_1 depends on shared library: libldap-2.4.so.2 - not found
===>   Installing existing package /packages/All/openldap24-client-2.4.59_4.pkg
[v1300-latest] Installing openldap24-client-2.4.59_4...
[v1300-latest] `-- Installing cyrus-sasl-2.1.27_2...
*** Added group `cyrus' (id 60)
*** Added user `cyrus' (id 60)
[v1300-latest] `-- Extracting cyrus-sasl-2.1.27_2: .......... done
[v1300-latest] Extracting openldap24-client-2.4.59_4: .......... done
=====

My limited understanding says the nss-pam-ldapd package is not honouring the DEFAULT_VERSIONS option.


----------



## SirDice (Jul 7, 2022)

dksayers said:


> My limited understanding says the nss-pam-ldapd package is not honouring the DEFAULT_VERSIONS option.


It's not the port or the package, it's /usr/ports/Mk/bsd.ldap.mk that hasn't been converted to a /usr/ports/Mk/Uses/ script yet. Ideally the port should be able to add `USES= ldap` for example, and it would then build with whatever `ldap` version is set to. But that code isn't there (yet). 

Set `DEFAULT_OPENLDAP_VER=25` in make.conf. That should set the default OpenLDAP version to 2.5.


----------



## dksayers (Jul 7, 2022)

Many thanks. 
DEFAULT_OPENLDAP_VER=25 in poudriere.d/jail-port-make.conf resolved the problem.


----------

