Page MenuHomeFreeBSD

Mk/**ldap.mk: Convert USE_LDAP to USES=ldap
AbandonedPublic

Authored by bofh on Jan 27 2023, 11:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 3:36 AM
Unknown Object (File)
Sun, Dec 8, 12:00 AM
Unknown Object (File)
Mon, Dec 2, 3:10 AM
Unknown Object (File)
Fri, Nov 29, 7:18 AM
Unknown Object (File)
Wed, Nov 27, 2:37 AM
Unknown Object (File)
Nov 24 2024, 11:00 PM
Unknown Object (File)
Nov 24 2024, 12:26 AM
Unknown Object (File)
Nov 22 2024, 1:16 PM
Subscribers

Details

Summary

This patch converts the USE_LDAP=yes to USES=ldap and adds the following feature:

  • Adds the argument USES=ldap:server to add openldap2{4|5|6}-server as RUN_DEPENDS
  • Adds the argument USES=ldap<version> and replaces WANT_OPENLDAP_VER
  • Adds OPENLDAP versions in bsd.default-versions.mk
  • Adds USE_OPENLDAP/WANT_OPENLDAP_VER in Mk/bsd.sanity.mk
  • Changes consumers to use the features
Test Plan

Build tested the consumers:
https://pdr.bofh.network/build.html?mastername=131-head&build=2023-01-27_14h40m35s

There was one error in this run with net-mgmt/adcli which has been fixed

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bofh requested review of this revision.Jan 27 2023, 11:43 PM
bofh created this revision.
diizzy added inline comments.
Mk/Uses/ldap.mk
7

I think this should follow suit of other USES providers such as python and support . (dot) releases syntax

19

Why is this needed? Can't this work just like Mk/Uses/python.mk?

Mk/Uses/ldap.mk
7

I have tried to follow the syntax in mysql which looks way cleaner than what python is.

19

There are some ports which supports a wide range of ldap versions but in case the user wants to specifically ask for a more specific version rather than the DEFAULT one. python.mk is a mess.

Mk/Uses/ldap.mk
86

^why is this needed globally?

88

^ is there a *nice* way? What does it do if no pkg is in the repo?

where is it even needed?

Mk/Uses/ldap.mk
86

This can be ifed when the versions are only 25 and 26.

88

There was no reference of the usage of this variable even.

  • CFLAGS LDAP_DEPRECATED is only enabled if the version of OPENLDAP is 2.5 or 2.6.
  • Remove unnecessary variable OPENLDAP_CLIENT_PKG.
Mk/Uses/ldap.mk
86

This should NOT be OpenLDAP version-dependent.

It was defined globally because it takes time for third party code to catch up with new API. Since it is there forever, we do not really know if any of APIs removed in OpenLDAP 2.4 is still in use, so if you make it conditional on version, please request an exp-run with OpenLDAP 2.4 as default (or maybe just remove OpenLDAP 2.4), or users trying to build with OpenLDAP 2.4 client may be broken.

88

This was used in SASL package and it's safe to remove.

bofh marked an inline comment as not done.Feb 6 2023, 6:26 PM
bofh added inline comments.
Mk/Uses/ldap.mk
86

Yes indeed.

cd net/openldap24-server && make patch && find work/openldap-2.4.59 -type f -exec grep LDAP_DEPRECATED {} \;
cd net/openldap25-server && make patch && find work/openldap-2.5.13 -type f -exec grep LDAP_DEPRECATED {} \;
cd net/openldap26-server && make patch && find work/openldap-2.6.3 -type f -exec grep LDAP_DEPRECATED {} \;

And I think I should revert the version clause mentioned here.

bofh marked 3 inline comments as done.Feb 6 2023, 6:53 PM