@@ -37,19 +37,28 @@ cp /acceptance/ca/intermediate/certs/ca-chain.cert.pem /container/service/slapd/
3737cp /acceptance/ldap-server/tls/dhparam.pem /container/service/slapd/assets/certs/dhparam.pem
3838chown -R root:root /container/service/slapd/assets/certs
3939
40- # Pre-install our configuration environment
41- rm -f /container/environment/99-default/* .yaml
42- cp /acceptance/ldap-server/env/* .yaml /container/environment/99-default
40+ # Pre-install our configuration environment.
41+ # Drop our overrides into a lexically earlier directory than the image's stock
42+ # /container/environment/99-default. osixia's run tool walks /container/environment
43+ # in sorted order and first-set-wins (see /container/tool/run), so values declared
44+ # here take precedence while everything we *don't* override (LDAP_PORT, LDAPS_PORT,
45+ # LDAP_NOFILE, DISABLE_CHOWN, etc.) is inherited from the image defaults.
46+ mkdir -p /container/environment/01-custom
47+ cp /acceptance/ldap-server/env/* .yaml /container/environment/01-custom/
4348
4449# Pre-install our schema (after killing most of the defaults from the container)
4550rm -f /container/service/slapd/assets/config/bootstrap/ldif/0[345]* .ldif
4651rm -rf /container/service/slapd/assets/config/bootstrap/schema/mmc
47- rm -f /etc/ldap/schema/*
52+ # Only remove stock *.ldif schemas; keep *.schema files because osixia/openldap:1.5.0's
53+ # bootstrap (slaptest) converts *.schema -> cn=config and needs core.schema to exist.
54+ rm -f /etc/ldap/schema/* .ldif
4855cp /acceptance/ldap-server/schema/* /etc/ldap/schema/
4956cp /acceptance/ldap-server/ldif/bootstrap/* .ldif /container/service/slapd/assets/config/bootstrap/ldif
5057
5158# Launch openldap
52- nohup /usr/bin/python -u /container/tool/run -l info &
59+ # /container/tool/run has its own `#!/usr/bin/python3 -u` shebang in osixia/openldap:1.5.0,
60+ # which no longer ships /usr/bin/python. Invoke it directly so we don't depend on Py2 paths.
61+ nohup /container/tool/run -l info &
5362OPENLDAP_PID=$!
5463
5564# Wait for the process to be running and connectable
0 commit comments