From 2e24332235713cc59d33e134f6e77e270fb055676ea21b0092841fe2411932b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Str=C3=B6der?= Date: Sat, 15 Aug 2020 06:44:31 +0000 Subject: [PATCH 1/2] Accepting request 826780 from home:kukuk:container - Remove remaining rc.status usage in start script OBS-URL: https://build.opensuse.org/request/show/826780 OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=267 --- openldap2.changes | 5 +++++ start | 18 +----------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/openldap2.changes b/openldap2.changes index 755522f..7319993 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Aug 15 06:36:43 UTC 2020 - Thorsten Kukuk + +- Remove remaining rc.status usage in start script + ------------------------------------------------------------------- Wed Aug 12 06:16:42 UTC 2020 - Michael Ströder diff --git a/start b/start index e4aaf0e..b6318ff 100644 --- a/start +++ b/start @@ -34,20 +34,6 @@ SLAPD_PID_DIR="/var/run/slapd/" test -x $SLAPD_BIN || exit 5 -# Shell functions sourced from /etc/rc.status: -# rc_check check and set local and overall rc status -# rc_status check and set local and overall rc status -# rc_status -v ditto but be verbose in local rc status -# rc_status -v -r ditto and clear the local rc status -# rc_failed set local and overall rc status to failed -# rc_failed set local and overall rc status to -# rc_reset clear local rc status (overall remains) -# rc_exit exit appropriate to overall rc status -. /etc/rc.status - -# First reset status of this service -rc_reset - function init_ldap_listener_urls(){ case "$OPENLDAP_START_LDAP" in [Yy][Ee][Ss]) @@ -143,14 +129,12 @@ GROUP_CMD="" if [ -f /etc/openldap/UPDATE_NEEDED ]; then - rc_failed 6 echo " The configuration of your LDAP server needs to be updated." echo " Please see /usr/share/doc/packages/openldap2/README.update" echo " for details." echo " After the update please remove the file:" echo " /etc/openldap/UPDATE_NEEDED" - rc_status -v - exit + exit 6 fi # chown backend directories if OPENLDAP_CHOWN_DIRS ist set if [ "$(echo "$OPENLDAP_CHOWN_DIRS" | tr 'A-Z' 'a-z')" = "yes" ]; then From 4754d1883c1df1c10712484674d7e31aa748012af38339b12adbc8617fab4068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Str=C3=B6der?= Date: Sat, 15 Aug 2020 07:05:10 +0000 Subject: [PATCH 2/2] Accepting request 826784 from home:kukuk:container - Drop obsolete, not working DB_CONFIG - Remove init.d header from start script, does not work - Use bash for start script as syntax is not POSIX sh supported - Remove UPDATE_NEEDED section in start script, does never match OBS-URL: https://build.opensuse.org/request/show/826784 OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=268 --- DB_CONFIG | 7 ------- openldap2.changes | 8 ++++++++ openldap2.conf | 1 - openldap2.spec | 3 --- start | 22 +--------------------- 5 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 DB_CONFIG diff --git a/DB_CONFIG b/DB_CONFIG deleted file mode 100644 index a465400..0000000 --- a/DB_CONFIG +++ /dev/null @@ -1,7 +0,0 @@ -set_cachesize 0 15000000 1 -set_lg_regionmax 262144 -set_lg_bsize 2097152 -set_lk_max_locks 30000 -set_lk_max_objects 30000 -set_flags DB_LOG_AUTOREMOVE - diff --git a/openldap2.changes b/openldap2.changes index 7319993..1dccdef 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Aug 15 06:56:27 UTC 2020 - Thorsten Kukuk + +- Drop obsolete, not working DB_CONFIG +- Remove init.d header from start script, does not work +- Use bash for start script as syntax is not POSIX sh supported +- Remove UPDATE_NEEDED section in start script, does never match + ------------------------------------------------------------------- Sat Aug 15 06:36:43 UTC 2020 - Thorsten Kukuk diff --git a/openldap2.conf b/openldap2.conf index 579c6d0..683a2d0 100644 --- a/openldap2.conf +++ b/openldap2.conf @@ -1,3 +1,2 @@ # openldap needs a directory in /var/lib/: d /var/lib/ldap 0750 ldap ldap - -L /var/lib/ldap/DB_CONFIG - - - - ../../../usr/lib/openldap/ diff --git a/openldap2.spec b/openldap2.spec index d660470..40dd80a 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -44,7 +44,6 @@ URL: https://www.openldap.org Source: https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-%{version_main}.tgz Source1: slapd.conf Source2: slapd.conf.olctemplate -Source3: DB_CONFIG Source4: sasl-slapd.conf Source5: README.module-loading Source6: schema2ldif @@ -369,7 +368,6 @@ install -m 755 %{SOURCE6} %{buildroot}%{_sbindir}/schema2ldif install -m 755 %{SOURCE17} %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_tmpfilesdir}/ install -m 644 %{SOURCE18} %{buildroot}%{_tmpfilesdir}/ -install -m 644 %{SOURCE3} %{buildroot}/usr/lib/openldap/ # Install ppolicy check module make -C contrib/slapd-modules/ppolicy-check-password STRIP="" DESTDIR="%{buildroot}" "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libexecdir}" install @@ -473,7 +471,6 @@ fi %config(noreplace) %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.olctemplate %config %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.default %config %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.example -%config(noreplace) %attr(640, ldap, ldap) /usr/lib/openldap/DB_CONFIG %dir %{_libdir}/openldap %dir /usr/lib/openldap %dir %{_sysconfdir}/sasl2 diff --git a/start b/start index b6318ff..efdeffe 100644 --- a/start +++ b/start @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # Copyright (c) 1997-2000 SuSE GmbH Nuernberg, Germany. # Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. @@ -6,18 +6,6 @@ # Author: Carsten Hoeger # Ralf Haferkamp # -# /etc/init.d/ldap -# -### BEGIN INIT INFO -# Provides: ldap -# Required-Start: $network $remote_fs -# Required-Stop: $network $remote_fs -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: OpenLDAP Server (slapd) -# Description: Start and Stop the OpenLDAP Server (slapd) to -# provide LDAP directory services. -### END INIT INFO # Determine the base and follow a runlevel link name. base=${0##*/} @@ -128,14 +116,6 @@ GROUP_CMD="" [ ! "x$OPENLDAP_CONFIG_BACKEND" = "xldap" ] && SLAPD_CONFIG_ARG="-f /etc/openldap/slapd.conf" -if [ -f /etc/openldap/UPDATE_NEEDED ]; then - echo " The configuration of your LDAP server needs to be updated." - echo " Please see /usr/share/doc/packages/openldap2/README.update" - echo " for details." - echo " After the update please remove the file:" - echo " /etc/openldap/UPDATE_NEEDED" - exit 6 -fi # chown backend directories if OPENLDAP_CHOWN_DIRS ist set if [ "$(echo "$OPENLDAP_CHOWN_DIRS" | tr 'A-Z' 'a-z')" = "yes" ]; then if [ -n "$OPENLDAP_USER" -o -n "$OPENLDAP_GROUP" ]; then