remove redundant sysconfig-related stuff
This commit is contained in:
parent
8a6f427a71
commit
cb0643e628
@ -5,14 +5,13 @@
|
|||||||
|
|
||||||
Name: openldap
|
Name: openldap
|
||||||
Version: 2.4.39
|
Version: 2.4.39
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: LDAP support libraries
|
Summary: LDAP support libraries
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
License: OpenLDAP
|
License: OpenLDAP
|
||||||
URL: http://www.openldap.org/
|
URL: http://www.openldap.org/
|
||||||
Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz
|
Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz
|
||||||
Source1: slapd.service
|
Source1: slapd.service
|
||||||
Source2: slapd.sysconfig
|
|
||||||
Source3: slapd.tmpfiles
|
Source3: slapd.tmpfiles
|
||||||
Source4: slapd.ldif
|
Source4: slapd.ldif
|
||||||
Source5: ldap.conf
|
Source5: ldap.conf
|
||||||
@ -317,10 +316,6 @@ rm -f %{buildroot}%{_sysconfdir}/openldap/schema/*.default
|
|||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/slapd.service
|
install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/slapd.service
|
||||||
|
|
||||||
# install syconfig/ldap
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
||||||
install -m 644 %SOURCE2 %{buildroot}%{_sysconfdir}/sysconfig/slapd
|
|
||||||
|
|
||||||
# move slapd out of _libdir
|
# move slapd out of _libdir
|
||||||
mv %{buildroot}%{_libdir}/slapd %{buildroot}%{_sbindir}/
|
mv %{buildroot}%{_libdir}/slapd %{buildroot}%{_sbindir}/
|
||||||
|
|
||||||
@ -416,31 +411,6 @@ if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap ]; then
|
|||||||
rm -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap
|
rm -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# conversion from /etc/sysconfig/ldap to /etc/sysconfig/slapd
|
|
||||||
if [ $1 -eq 2 ]; then
|
|
||||||
# we expect that 'ldap' will be renamed to 'ldap.rpmsave' after removing the old package
|
|
||||||
[ -r %{_sysconfdir}/sysconfig/ldap ] || exit 0
|
|
||||||
source %{_sysconfdir}/sysconfig/ldap &>/dev/null
|
|
||||||
|
|
||||||
new_urls=
|
|
||||||
[ "$SLAPD_LDAP" != "no" ] && new_urls="$new_urls ldap:///"
|
|
||||||
[ "$SLAPD_LDAPI" != "no" ] && new_urls="$new_urls ldapi:///"
|
|
||||||
[ "$SLAPD_LDAPS" == "yes" ] && new_urls="$new_urls ldaps:///"
|
|
||||||
[ -n "$SLAPD_URLS" ] && new_urls="$new_urls $SLAPD_URLS"
|
|
||||||
|
|
||||||
failure=0
|
|
||||||
cp -f %{_sysconfdir}/sysconfig/slapd %{_sysconfdir}/sysconfig/slapd.rpmconvert
|
|
||||||
sed -i '/^#\?SLAPD_URLS=/s@.*@SLAPD_URLS="'"$new_urls"'"@' %{_sysconfdir}/sysconfig/slapd.rpmconvert &>/dev/null || failure=1
|
|
||||||
[ -n "$SLAPD_OPTIONS" ] && \
|
|
||||||
sed -i '/^#\?SLAPD_OPTIONS=/s@.*$@SLAPD_OPTIONS="'"$SLAPD_OPTIONS"'"@' %{_sysconfdir}/sysconfig/slapd.rpmconvert &>/dev/null || failure=1
|
|
||||||
|
|
||||||
if [ $failure -eq 0 ]; then
|
|
||||||
mv -f %{_sysconfdir}/sysconfig/slapd.rpmconvert %{_sysconfdir}/sysconfig/slapd
|
|
||||||
else
|
|
||||||
rm -f %{_sysconfdir}/sysconfig/slapd.rpmconvert
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# restart after upgrade
|
# restart after upgrade
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
if [ $start_slapd -eq 1 ]; then
|
if [ $start_slapd -eq 1 ]; then
|
||||||
@ -535,7 +505,6 @@ exit 0
|
|||||||
%doc README.schema
|
%doc README.schema
|
||||||
%config(noreplace) %dir %attr(0750,ldap,ldap) %{_sysconfdir}/openldap/slapd.d
|
%config(noreplace) %dir %attr(0750,ldap,ldap) %{_sysconfdir}/openldap/slapd.d
|
||||||
%config(noreplace) %{_sysconfdir}/openldap/schema
|
%config(noreplace) %{_sysconfdir}/openldap/schema
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/slapd
|
|
||||||
%config(noreplace) %{_sysconfdir}/openldap/check_password.conf
|
%config(noreplace) %{_sysconfdir}/openldap/check_password.conf
|
||||||
%{_tmpfilesdir}/slapd.conf
|
%{_tmpfilesdir}/slapd.conf
|
||||||
%dir %attr(0700,ldap,ldap) %{_sharedstatedir}/ldap
|
%dir %attr(0700,ldap,ldap) %{_sharedstatedir}/ldap
|
||||||
@ -602,6 +571,9 @@ exit 0
|
|||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 19 2014 Jan Synáček <jsynacek@redhat.com> - 2.4.39-3
|
||||||
|
- remove redundant sysconfig-related stuff
|
||||||
|
|
||||||
* Tue Feb 4 2014 Jan Synáček <jsynacek@redhat.com> - 2.4.39-2
|
* Tue Feb 4 2014 Jan Synáček <jsynacek@redhat.com> - 2.4.39-2
|
||||||
- CVE-2013-4449: segfault on certain queries with rwm overlay (#1060851)
|
- CVE-2013-4449: segfault on certain queries with rwm overlay (#1060851)
|
||||||
|
|
||||||
|
@ -5,10 +5,8 @@ After=syslog.target network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
PIDFile=/var/run/openldap/slapd.pid
|
PIDFile=/var/run/openldap/slapd.pid
|
||||||
Environment="SLAPD_URLS=ldap:/// ldapi:///" "SLAPD_OPTIONS="
|
|
||||||
EnvironmentFile=/etc/sysconfig/slapd
|
|
||||||
ExecStartPre=/usr/libexec/openldap/check-config.sh
|
ExecStartPre=/usr/libexec/openldap/check-config.sh
|
||||||
ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS
|
ExecStart=/usr/sbin/slapd -u ldap -h "ldap:/// ldapi:///"
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# OpenLDAP server configuration
|
|
||||||
# see 'man slapd' for additional information
|
|
||||||
|
|
||||||
# Where the server will run (-h option)
|
|
||||||
# - ldapi:/// is required for on-the-fly configuration using client tools
|
|
||||||
# (use SASL with EXTERNAL mechanism for authentication)
|
|
||||||
# - default: ldapi:/// ldap:///
|
|
||||||
# - example: ldapi:/// ldap://127.0.0.1/ ldap://10.0.0.1:1389/ ldaps:///
|
|
||||||
SLAPD_URLS="ldapi:/// ldap:///"
|
|
||||||
|
|
||||||
# Any custom options
|
|
||||||
#SLAPD_OPTIONS=""
|
|
||||||
|
|
||||||
# Keytab location for GSSAPI Kerberos authentication
|
|
||||||
#KRB5_KTNAME="FILE:/etc/openldap/ldap.keytab"
|
|
Loading…
Reference in New Issue
Block a user