From: Alan T. DeKok Date: Thu, 16 Nov 2023 13:24:51 +0000 (-0500) Subject: Revert "Copy, don't link, schemas" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=791995dab2e5fc55c60c9c53fd819ae67dafc05a;p=thirdparty%2Ffreeradius-server.git Revert "Copy, don't link, schemas" This reverts commit 823ad7a63550597682582c4d70010f536db4b7be. this breaks CI --- diff --git a/scripts/ci/ldap-setup.sh b/scripts/ci/ldap-setup.sh index 1408296fc22..7dc06082d27 100755 --- a/scripts/ci/ldap-setup.sh +++ b/scripts/ci/ldap-setup.sh @@ -91,32 +91,25 @@ sed -i -e "s/\/var\/lib\/ldap/\/tmp\/ldap${suffix}\/db/" src/tests/salt-test-ser if [ -d "${schema_dir}" ]; then echo "Schema dir already linked" # Debian -if [ -d /etc/ldap/schema ]; then - schema_src_dir="/etc/ldap/schema" +elif [ -d /etc/ldap/schema ]; then + ln -fs /etc/ldap/schema "${schema_dir}" # Symas packages elif [ -d /opt/symas/etc/openldap/schema ]; then - schema_src_dir="/opt/symas/etc/openldap/schema" + ln -fs /opt/symas/etc/openldap/schema "${schema_dir}" # Redhat elif [ -d /etc/openldap/schema ]; then - schema_src_dir="/etc/openldap/schema" + ln -fs /etc/openldap/schema "${schema_dir}" # macOS (homebrew x86) elif [ -d /usr/local/etc/openldap/schema ]; then - schema_src_dir="/usr/local/etc/openldap/schema" + ln -fs /usr/local/etc/openldap/schema "${schema_dir}" # macOS (homebrew ARM) elif [ -d /opt/homebrew/opt/openldap/schema ]; then - schema_src_dir="/opt/homebrew/opt/openldap/schema" + ln -fs /opt/homebrew/opt/openldap/schema "${schema_dir}" else echo "Can't locate OpenLDAP schema dir" exit 1 fi -# Copy all schemas over to the schema dir, so they're all available for inclusion -# we don't overwrite any existing files to avoid overwriting developer changes. -for i in ${schema_src_dir}/*; do - # Only copy in schema files that don't already exist - cp -n "${i}" "${schema_dir}/" -done - # Ensure we have some certs generated make -C raddb/certs @@ -135,7 +128,7 @@ fi # Copy the config over to the base_dir. There seems to be some issues with actions runners # not allowing file access outside of /etc/ldap, so we copy the config to the specified base_dir. -cp -n "scripts/ci/ldap/slapd${suffix}.conf" "${base_dir}/slapd.conf" +cp "scripts/ci/ldap/slapd${suffix}.conf" "${base_dir}/slapd.conf" # Start slapd slapd -d any -h "ldap://127.0.0.1:${ldap_port}/ ldaps://127.0.0.1:${ldaps_port}/ ${socket_url}" -f "${base_dir}/slapd.conf" 2>&1 > ${base_dir}/slapd.log &