2006-12-19 00:17:14 +01:00
|
|
|
#
|
2012-10-24 16:29:21 +02:00
|
|
|
# spec file for package openldap2-client
|
2006-12-19 00:17:14 +01:00
|
|
|
#
|
2016-01-21 14:36:42 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-12-19 00:17:14 +01:00
|
|
|
#
|
2008-08-11 23:19:12 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2012-04-23 09:18:42 +02:00
|
|
|
%define run_test_suite 0
|
2016-01-21 14:36:42 +01:00
|
|
|
%define version_main 2.4.43
|
2008-02-25 17:35:54 +01:00
|
|
|
|
2016-01-21 14:36:42 +01:00
|
|
|
%if %{suse_version} >= 1310 && %{suse_version} != 1315
|
|
|
|
%define _rundir /run/slapd
|
|
|
|
%else
|
|
|
|
%define _rundir /var/run/slapd
|
2014-05-14 14:59:35 +02:00
|
|
|
%endif
|
|
|
|
|
2012-10-24 16:29:21 +02:00
|
|
|
Name: openldap2-client
|
|
|
|
Summary: The OpenLDAP commandline client tools
|
2012-04-23 09:18:42 +02:00
|
|
|
License: OLDAP-2.8
|
2012-10-24 16:29:21 +02:00
|
|
|
Group: Productivity/Networking/LDAP/Clients
|
2016-01-21 14:36:42 +01:00
|
|
|
Version: %{version_main}
|
2012-04-23 09:18:42 +02:00
|
|
|
Release: 0
|
2007-10-30 01:33:48 +01:00
|
|
|
Url: http://www.openldap.org
|
2014-02-11 13:31:42 +01:00
|
|
|
Source: openldap-%{version_main}.tgz
|
2007-12-19 14:52:01 +01:00
|
|
|
Source3: DB_CONFIG
|
|
|
|
Source4: sasl-slapd.conf
|
2016-01-21 14:36:42 +01:00
|
|
|
Source5: README.module-loading
|
2015-10-15 09:10:44 +02:00
|
|
|
Source6: schema2ldif
|
|
|
|
Source7: baselibs.conf
|
2016-01-21 14:36:42 +01:00
|
|
|
Source9: ldapns.schema
|
|
|
|
Source10: rfc2307bis.schema
|
|
|
|
Source11: yast.schema
|
|
|
|
Source12: slapd.conf.example
|
|
|
|
Source13: start
|
|
|
|
Source14: slapd.service
|
|
|
|
Source15: SuSEfirewall2.openldap
|
|
|
|
Source16: sysconfig.openldap
|
2010-08-27 21:45:34 +02:00
|
|
|
Patch2: 0002-slapd.conf.dif
|
|
|
|
Patch3: 0003-LDAPI-socket-location.dif
|
|
|
|
Patch5: 0005-pie-compile.dif
|
2011-12-06 13:54:38 +01:00
|
|
|
Patch6: 0006-No-Build-date-and-time-in-binaries.dif
|
2016-01-25 14:05:16 +01:00
|
|
|
Patch7: 0007-Recover-on-DB-version-change.dif
|
|
|
|
Patch8: 0008-In-monitor-backend-do-not-return-Connection0-entries.patch
|
2015-11-30 11:24:53 +01:00
|
|
|
Patch9: 0009-Fix-ldap-host-lookup-ipv6.patch
|
2016-01-25 14:05:16 +01:00
|
|
|
Patch10: 0010-Enforce-minimum-DH-size-of-1024.patch
|
|
|
|
Patch11: 0011-openldap-re24-its7796.patch
|
|
|
|
Patch12: 0012-openldap-re24-its8336.patch
|
2006-12-19 00:17:14 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-12-24 17:13:00 +01:00
|
|
|
BuildRequires: cyrus-sasl-devel
|
|
|
|
BuildRequires: groff
|
|
|
|
BuildRequires: libopenssl-devel
|
|
|
|
BuildRequires: libtool
|
2016-01-21 14:36:42 +01:00
|
|
|
Requires: libldap-2_4-2 = %{version_main}
|
|
|
|
Recommends: cyrus-sasl
|
2014-12-24 17:13:00 +01:00
|
|
|
%if "%{name}" == "openldap2"
|
|
|
|
BuildRequires: db-devel
|
|
|
|
BuildRequires: openslp-devel
|
|
|
|
BuildRequires: unixODBC-devel
|
|
|
|
Conflicts: openldap
|
|
|
|
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd /usr/bin/grep
|
2016-01-21 14:36:42 +01:00
|
|
|
%if %{suse_version} >= 1310 && %{suse_version} != 1315
|
2014-12-24 17:13:00 +01:00
|
|
|
# avoid cycle with krb5
|
|
|
|
BuildRequires: krb5-mini
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
%{?systemd_requires}
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
Conflicts: openldap-client
|
|
|
|
%endif
|
|
|
|
# For /usr/bin/strings
|
|
|
|
Requires(pre): binutils
|
|
|
|
|
2009-08-06 18:21:51 +02:00
|
|
|
%if "%{name}" == "openldap2"
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
%description
|
2016-01-21 14:36:42 +01:00
|
|
|
OpenLDAP is a client and server reference implementation of the
|
|
|
|
Lightweight Directory Access Protocol v3 (LDAPv3).
|
|
|
|
|
|
|
|
The server provides several database backends and overlays.
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
%package -n openldap2-back-perl
|
|
|
|
Summary: OpenLDAP Perl Back-End
|
|
|
|
Group: Productivity/Networking/LDAP/Servers
|
2014-02-11 13:31:42 +01:00
|
|
|
Requires: openldap2 = %{version_main}
|
2012-04-23 09:18:42 +02:00
|
|
|
Requires: perl = %{perl_version}
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
%description -n openldap2-back-perl
|
|
|
|
The OpenLDAP Perl back-end allows you to execute Perl code specific to
|
|
|
|
different LDAP operations.
|
|
|
|
|
2016-01-21 14:36:42 +01:00
|
|
|
%package -n openldap2-back-sock
|
|
|
|
Summary: OpenLDAP Socket Back-End
|
|
|
|
Group: Productivity/Networking/LDAP/Servers
|
|
|
|
Requires: openldap2 = %{version_main}
|
|
|
|
Provides: openldap2:/usr/share/man/man5/slapd-sock.5.gz
|
|
|
|
|
|
|
|
%description -n openldap2-back-sock
|
|
|
|
The OpenLDAP socket back-end allows you to handle LDAP requests and
|
|
|
|
results with an external process listening on a Unix domain socket.
|
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
%package -n openldap2-back-meta
|
|
|
|
Summary: OpenLDAP Meta Back-End
|
|
|
|
Group: Productivity/Networking/LDAP/Servers
|
2014-02-11 13:31:42 +01:00
|
|
|
Requires: openldap2 = %{version_main}
|
2006-12-19 00:17:14 +01:00
|
|
|
Provides: openldap2:/usr/share/man/man5/slapd-meta.5.gz
|
|
|
|
|
|
|
|
%description -n openldap2-back-meta
|
|
|
|
The OpenLDAP Meta back-end is able to perform basic LDAP proxying with
|
|
|
|
respect to a set of remote LDAP servers. The information contained in
|
|
|
|
these servers can be presented as belonging to a single Directory
|
|
|
|
Information Tree (DIT).
|
|
|
|
|
2010-08-27 21:45:34 +02:00
|
|
|
%package -n openldap2-back-sql
|
|
|
|
Summary: OpenLDAP SQL Back-End
|
|
|
|
Group: Productivity/Networking/LDAP/Servers
|
2014-02-11 13:31:42 +01:00
|
|
|
Requires: openldap2 = %{version_main}
|
2010-08-27 21:45:34 +02:00
|
|
|
|
|
|
|
%description -n openldap2-back-sql
|
|
|
|
The primary purpose of this OpenLDAP backend is to present information
|
|
|
|
stored in a Relational (SQL) Database as an LDAP subtree without the need
|
|
|
|
to do any programming.
|
|
|
|
|
2016-01-21 14:36:42 +01:00
|
|
|
%package -n openldap2-contrib
|
|
|
|
Summary: OpenLDAP Contrib Modules
|
|
|
|
Group: Productivity/Networking/LDAP/Servers
|
|
|
|
Requires: openldap2 = %{version_main}
|
|
|
|
|
|
|
|
%description -n openldap2-contrib
|
|
|
|
Various overlays found in contrib/:
|
|
|
|
allop
|
|
|
|
allowed Generates attributes indicating access rights
|
|
|
|
autogroup
|
|
|
|
cloak
|
|
|
|
denyop
|
|
|
|
lastbind writes last bind timestamp to entry
|
|
|
|
noopsrch handles no-op search control
|
|
|
|
nops
|
|
|
|
pw-sha2 generates/validates SHA-2 password hashes
|
|
|
|
pw-pbkdf2 generates/validates PBKDF2 password hashes
|
|
|
|
smbk5pwd generates Samba3 password hashes (heimdal krb disabled)
|
|
|
|
|
2010-11-09 16:13:38 +01:00
|
|
|
%package -n openldap2-doc
|
|
|
|
Summary: OpenLDAP Documentation
|
|
|
|
Group: Documentation/Other
|
|
|
|
Provides: openldap2:/usr/share/doc/packages/openldap2/drafts/README
|
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n openldap2-doc
|
|
|
|
The OpenLDAP Admin Guide plus a set of OpenLDAP related IETF internet drafts
|
|
|
|
|
2016-01-21 14:36:42 +01:00
|
|
|
|
2014-02-11 13:31:42 +01:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
The OpenLDAP Project <project@openldap.org>
|
|
|
|
|
2008-07-08 15:40:57 +02:00
|
|
|
%else
|
|
|
|
|
2009-08-06 18:21:51 +02:00
|
|
|
%description
|
2012-03-06 16:07:37 +01:00
|
|
|
This package contains the OpenLDAP client utilities.
|
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
%package -n openldap2-devel
|
2008-02-25 17:35:54 +01:00
|
|
|
Summary: Libraries, Header Files and Documentation for OpenLDAP
|
2012-04-23 09:18:42 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2009-01-09 01:42:38 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: openldap2-devel-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2008-06-25 18:32:44 +02:00
|
|
|
Conflicts: openldap-devel
|
2014-02-11 13:31:42 +01:00
|
|
|
Requires: libldap-2_4-2 = %{version_main}
|
2016-01-21 14:36:42 +01:00
|
|
|
Recommends: cyrus-sasl-devel
|
2013-06-14 08:43:36 +02:00
|
|
|
|
|
|
|
%description -n openldap2-devel
|
|
|
|
This package provides the OpenLDAP libraries, header files, and
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
%package -n openldap2-devel-static
|
|
|
|
Summary: Static libraries for the OpenLDAP libraries
|
|
|
|
Group: Development/Libraries/C and C++
|
2012-04-23 09:18:42 +02:00
|
|
|
Requires: cyrus-sasl-devel
|
2014-12-24 17:13:00 +01:00
|
|
|
Requires: libopenssl-devel
|
|
|
|
Requires: openldap2-devel = %version
|
2006-12-19 00:17:14 +01:00
|
|
|
|
2013-06-14 08:43:36 +02:00
|
|
|
%description -n openldap2-devel-static
|
|
|
|
This package provides the static versions of the OpenLDAP libraries
|
|
|
|
for development.
|
2006-12-19 00:17:14 +01:00
|
|
|
|
2008-06-25 18:32:44 +02:00
|
|
|
%package -n libldap-2_4-2
|
|
|
|
Summary: OpenLDAP Client Libraries
|
|
|
|
Group: Productivity/Networking/LDAP/Clients
|
|
|
|
|
|
|
|
%description -n libldap-2_4-2
|
|
|
|
This package contains the OpenLDAP client libraries.
|
|
|
|
|
2008-07-08 15:40:57 +02:00
|
|
|
%endif
|
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
%prep
|
2016-01-21 14:36:42 +01:00
|
|
|
%setup -q -n openldap-%{version_main}
|
2010-08-27 21:45:34 +02:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2016-01-21 14:36:42 +01:00
|
|
|
#%patch4 -p1
|
2010-08-27 21:45:34 +02:00
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
2016-01-25 14:05:16 +01:00
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
2015-11-30 11:24:53 +01:00
|
|
|
%patch9 -p1
|
2015-12-02 13:58:25 +01:00
|
|
|
%patch10 -p1
|
|
|
|
%patch11 -p1
|
2016-01-21 14:36:42 +01:00
|
|
|
%patch12 -p1
|
2009-04-23 23:12:13 +02:00
|
|
|
cp %{SOURCE5} .
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
%build
|
2016-01-21 14:36:42 +01:00
|
|
|
# %{?suse_update_config:%{suse_update_config -f build}}
|
|
|
|
#libtoolize --force
|
|
|
|
#autoreconf
|
|
|
|
# export CFLAGS="${RPM_OPT_FLAGS} -Wno-format-extra-args -fno-strict-aliasing -DNDEBUG -DSLAP_CONFIG_DELETE -DSLAP_SCHEMA_EXPOSE -DLDAP_COLLECTIVE_ATTRIBUTES"
|
|
|
|
export CFLAGS="-Wno-format-extra-args -fno-strict-aliasing -DNDEBUG -DSLAP_CONFIG_DELETE -DSLAP_SCHEMA_EXPOSE -DLDAP_COLLECTIVE_ATTRIBUTES"
|
2010-08-27 21:45:34 +02:00
|
|
|
export STRIP=""
|
2016-01-21 14:36:42 +01:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=%{_sysconfdir} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--libexecdir=%{_libdir} \
|
|
|
|
--localstatedir=%{_rundir} \
|
|
|
|
--enable-wrappers=no \
|
2006-12-19 00:17:14 +01:00
|
|
|
--enable-spasswd \
|
|
|
|
--enable-modules \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-dynamic \
|
2016-01-21 14:36:42 +01:00
|
|
|
--with-tls=openssl \
|
2006-12-19 00:17:14 +01:00
|
|
|
--with-cyrus-sasl \
|
|
|
|
--enable-crypt \
|
|
|
|
--enable-ipv6=yes \
|
|
|
|
%if "%{name}" == "openldap2"
|
|
|
|
--enable-aci \
|
2016-01-21 14:36:42 +01:00
|
|
|
--enable-bdb=mod \
|
|
|
|
--enable-hdb=mod \
|
2006-12-19 00:17:14 +01:00
|
|
|
--enable-rewrite \
|
2016-01-21 14:36:42 +01:00
|
|
|
--enable-ldap=mod \
|
2006-12-19 00:17:14 +01:00
|
|
|
--enable-meta=mod \
|
2016-01-21 14:36:42 +01:00
|
|
|
--enable-monitor=mod \
|
2006-12-19 00:17:14 +01:00
|
|
|
--enable-perl=mod \
|
2016-01-21 14:36:42 +01:00
|
|
|
--enable-sock=mod \
|
2010-08-27 21:45:34 +02:00
|
|
|
--enable-sql=mod \
|
2016-01-21 14:36:42 +01:00
|
|
|
--enable-mdb=mod \
|
|
|
|
--enable-relay=mod \
|
2006-12-19 00:17:14 +01:00
|
|
|
--enable-slp \
|
2010-11-10 16:39:43 +01:00
|
|
|
--enable-overlays=mod \
|
2016-01-21 14:36:42 +01:00
|
|
|
--enable-syncprov=mod \
|
|
|
|
--enable-ppolicy=mod \
|
2006-12-19 00:17:14 +01:00
|
|
|
%else
|
|
|
|
--disable-slapd \
|
|
|
|
%endif
|
|
|
|
--enable-lmpasswd \
|
2016-01-21 14:36:42 +01:00
|
|
|
--with-yielding-select \
|
|
|
|
|| cat config.log
|
2006-12-19 00:17:14 +01:00
|
|
|
make depend
|
2014-11-04 13:48:27 +01:00
|
|
|
make %{?_smp_mflags}
|
2016-01-21 14:36:42 +01:00
|
|
|
%if "%{name}" == "openldap2"
|
|
|
|
# Build selected contrib overlays
|
|
|
|
for SLAPO_NAME in allowed allop autogroup lastbind nops denyop cloak noopsrch passwd/sha2 passwd/pbkdf2
|
|
|
|
do
|
|
|
|
make -C contrib/slapd-modules/${SLAPO_NAME} %{?_smp_mflags} "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libdir}"
|
|
|
|
done
|
|
|
|
# One more level up needed because of passwd/sha2
|
|
|
|
# slapo-smbk5pwd only for Samba password hashes
|
|
|
|
make -C contrib/slapd-modules/smbk5pwd %{?_smp_mflags} "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libdir}" DEFS="-DDO_SAMBA" HEIMDAL_LIB=""
|
|
|
|
%endif
|
2007-10-30 01:33:48 +01:00
|
|
|
|
|
|
|
%check
|
2009-12-11 13:08:02 +01:00
|
|
|
%if %run_test_suite
|
2006-12-19 00:17:14 +01:00
|
|
|
# calculate the base port to be use in the test-suite
|
|
|
|
SLAPD_BASEPORT=10000
|
|
|
|
if [ -f /.buildenv ] ; then
|
|
|
|
. /.buildenv
|
2008-08-13 17:27:01 +02:00
|
|
|
SLAPD_BASEPORT=$(($SLAPD_BASEPORT + ${BUILD_INCARNATION:-0} * 10))
|
2006-12-19 00:17:14 +01:00
|
|
|
fi
|
|
|
|
export SLAPD_BASEPORT
|
|
|
|
%ifnarch %arm alpha
|
2008-10-06 19:05:59 +02:00
|
|
|
rm -f tests/scripts/test019-syncreplication-cascade
|
2007-12-19 14:52:01 +01:00
|
|
|
rm -f tests/scripts/test022-ppolicy
|
2009-08-06 18:21:51 +02:00
|
|
|
rm -f tests/scripts/test023-refint
|
2008-10-06 19:05:59 +02:00
|
|
|
rm -f tests/scripts/test033-glue-syncrepl
|
2009-08-06 18:21:51 +02:00
|
|
|
#rm -f tests/scripts/test036-meta-concurrency
|
|
|
|
#rm -f tests/scripts/test039-glue-ldap-concurrency
|
2008-10-06 19:05:59 +02:00
|
|
|
rm -f tests/scripts/test043-delta-syncrepl
|
2009-08-06 18:21:51 +02:00
|
|
|
#rm -f tests/scripts/test045-syncreplication-proxied
|
2008-10-06 19:05:59 +02:00
|
|
|
rm -f tests/scripts/test048-syncrepl-multiproxy
|
|
|
|
rm -f tests/scripts/test050-syncrepl-multimaster
|
2009-08-06 18:21:51 +02:00
|
|
|
rm -f tests/scripts/test058-syncrepl-asymmetric
|
2008-09-26 15:06:42 +02:00
|
|
|
make SLAPD_DEBUG=0 test
|
2006-12-19 00:17:14 +01:00
|
|
|
%endif
|
2009-12-11 13:08:02 +01:00
|
|
|
%endif
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
%install
|
2016-01-21 14:36:42 +01:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}/openldap
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/openldap
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/usr/sbin
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/%{_unitdir}
|
|
|
|
make STRIP="" "DESTDIR=${RPM_BUILD_ROOT}" "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libdir}" install
|
|
|
|
# Additional symbolic link to slapd executable in /usr/sbin/
|
|
|
|
%if "%{name}" == "openldap2"
|
|
|
|
ln -s %{_libdir}/slapd ${RPM_BUILD_ROOT}/usr/sbin/slapd
|
|
|
|
%endif
|
|
|
|
%if "%{name}" == "openldap2"
|
|
|
|
# Install selected contrib overlays
|
|
|
|
for SLAPO_NAME in allowed allop autogroup lastbind nops denyop cloak noopsrch passwd/sha2 passwd/pbkdf2
|
|
|
|
do
|
|
|
|
make -C contrib/slapd-modules/${SLAPO_NAME} STRIP="" "DESTDIR=${RPM_BUILD_ROOT}" "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libdir}" install
|
|
|
|
done
|
|
|
|
# slapo-smbk5pwd only for Samba password hashes
|
|
|
|
make -C contrib/slapd-modules/smbk5pwd STRIP="" "DESTDIR=${RPM_BUILD_ROOT}" "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libdir}" install
|
|
|
|
%endif
|
|
|
|
install -m 755 %{SOURCE13} ${RPM_BUILD_ROOT}/usr/lib/openldap/start
|
|
|
|
install -m 644 %{SOURCE14} ${RPM_BUILD_ROOT}/%{_unitdir}
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/openldap/slapd.d
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/sasl2
|
|
|
|
install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sasl2/slapd.conf
|
|
|
|
install -m 755 -d ${RPM_BUILD_ROOT}/var/lib/ldap
|
|
|
|
chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/liblber.so*
|
|
|
|
chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/libldap_r.so*
|
|
|
|
chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/libldap.so*
|
|
|
|
install -m 755 %{SOURCE6} ${RPM_BUILD_ROOT}/usr/sbin/schema2ldif
|
2006-12-19 00:17:14 +01:00
|
|
|
%if "%{name}" == "openldap2"
|
2010-11-09 16:13:38 +01:00
|
|
|
%define DOCDIR %{_defaultdocdir}/%{name}
|
2016-01-21 14:36:42 +01:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates
|
|
|
|
install -m 644 %{SOURCE16} ${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.openldap
|
|
|
|
install -m 644 %{SOURCE9} ${RPM_BUILD_ROOT}%{_sysconfdir}/openldap/schema
|
|
|
|
install -m 644 %{SOURCE10} ${RPM_BUILD_ROOT}%{_sysconfdir}/openldap/schema
|
|
|
|
install -m 644 %{SOURCE11} ${RPM_BUILD_ROOT}%{_sysconfdir}/openldap/schema
|
|
|
|
install -m 644 %{SOURCE12} ${RPM_BUILD_ROOT}%{_sysconfdir}/openldap
|
|
|
|
install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/var/lib/ldap/DB_CONFIG
|
|
|
|
install -m 644 ${RPM_BUILD_ROOT}/etc/openldap/DB_CONFIG.example ${RPM_BUILD_ROOT}/var/lib/ldap/DB_CONFIG.example
|
|
|
|
install -d ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/
|
|
|
|
install -m 644 %{SOURCE15} ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/openldap
|
2007-12-19 14:52:01 +01:00
|
|
|
rm -f `find doc/guide ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d`
|
|
|
|
rm -rf doc/guide/release
|
2016-01-21 14:36:42 +01:00
|
|
|
install -d ${RPM_BUILD_ROOT}/%{DOCDIR}/adminguide \
|
|
|
|
${RPM_BUILD_ROOT}/%{DOCDIR}/images \
|
|
|
|
${RPM_BUILD_ROOT}/%{DOCDIR}/drafts
|
|
|
|
install -m 644 doc/guide/admin/* ${RPM_BUILD_ROOT}/%{DOCDIR}/adminguide
|
|
|
|
install -m 644 doc/guide/images/*.gif ${RPM_BUILD_ROOT}/%{DOCDIR}/images
|
|
|
|
install -m 644 doc/drafts/* ${RPM_BUILD_ROOT}/%{DOCDIR}/drafts
|
2010-11-10 16:39:43 +01:00
|
|
|
install -m 644 ANNOUNCEMENT \
|
|
|
|
COPYRIGHT \
|
|
|
|
LICENSE \
|
|
|
|
README \
|
|
|
|
CHANGES \
|
|
|
|
%{SOURCE5} \
|
2016-01-21 14:36:42 +01:00
|
|
|
${RPM_BUILD_ROOT}/%{DOCDIR}
|
2011-12-06 13:54:38 +01:00
|
|
|
install -m 644 servers/slapd/slapd.ldif \
|
2016-01-21 14:36:42 +01:00
|
|
|
${RPM_BUILD_ROOT}/%{DOCDIR}/slapd.ldif.default
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/etc/openldap/DB_CONFIG.example
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/etc/openldap/schema/README
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/etc/openldap/slapd.ldif*
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/%{_rundir}/openldap-data/DB_CONFIG.example
|
2010-09-29 11:24:42 +02:00
|
|
|
mv servers/slapd/back-sql/rdbms_depend servers/slapd/back-sql/examples
|
2014-02-19 14:45:44 +01:00
|
|
|
# Provide SUSE policy symlink /usr/sbin/rcFOO -> /etc/init.d/FOO
|
|
|
|
# /usr/sbin/service exists only since openSUSE 12.3:
|
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcslapd
|
|
|
|
%else
|
|
|
|
ln -s /sbin/service %{buildroot}%{_sbindir}/rcslapd
|
|
|
|
%endif
|
2010-09-29 11:24:42 +02:00
|
|
|
%endif
|
2016-01-21 14:36:42 +01:00
|
|
|
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/openldap/*.a
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/usr/share/man/man5/slapd-dnssrv.5
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/usr/share/man/man5/slapd-ndb.5
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/usr/share/man/man5/slapd-null.5
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/usr/share/man/man5/slapd-passwd.5
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/usr/share/man/man5/slapd-shell.5
|
|
|
|
rm -f ${RPM_BUILD_ROOT}/usr/share/man/man5/slapd-tcl.5
|
2006-12-19 00:17:14 +01:00
|
|
|
# Remove *.la files, libtool does not handle this correct
|
2016-01-21 14:36:42 +01:00
|
|
|
rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
|
2010-08-27 21:45:34 +02:00
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
#put filelists into files
|
|
|
|
cat >openldap2.filelist <<EOF
|
|
|
|
/var/adm/fillup-templates/sysconfig.openldap
|
2008-09-26 15:06:42 +02:00
|
|
|
%config /etc/sysconfig/SuSEfirewall2.d/services/openldap
|
2006-12-19 00:17:14 +01:00
|
|
|
/usr/sbin/slap*
|
2014-02-19 14:45:44 +01:00
|
|
|
/usr/sbin/rcslapd
|
2014-02-11 13:31:42 +01:00
|
|
|
%dir /etc/sasl2
|
2006-12-19 00:17:14 +01:00
|
|
|
%dir /etc/openldap
|
2007-12-19 14:52:01 +01:00
|
|
|
%dir %attr(0770, ldap, ldap) /etc/openldap/slapd.d
|
2008-09-26 15:06:42 +02:00
|
|
|
%dir /etc/openldap/schema
|
|
|
|
%config /etc/openldap/schema/*.schema
|
|
|
|
%config /etc/openldap/schema/*.ldif
|
2016-01-21 14:36:42 +01:00
|
|
|
%config(noreplace) %attr(640, root, ldap) /%{_sysconfdir}/openldap/slapd.conf
|
2008-04-25 15:20:02 +02:00
|
|
|
%config(noreplace) %attr(640, ldap, ldap) /var/lib/ldap/DB_CONFIG
|
|
|
|
%config /var/lib/ldap/DB_CONFIG.example
|
2016-01-21 14:36:42 +01:00
|
|
|
%config %attr(640, root, ldap) /%{_sysconfdir}/openldap/slapd.conf.default
|
|
|
|
%config %attr(640, root, ldap) /%{_sysconfdir}/openldap/slapd.conf.example
|
2014-02-11 13:31:42 +01:00
|
|
|
%config(noreplace) /etc/sasl2/slapd.conf
|
2006-12-19 00:17:14 +01:00
|
|
|
%dir /usr/lib/openldap
|
2016-01-21 14:36:42 +01:00
|
|
|
%dir /%{_libdir}/openldap
|
|
|
|
%{_libdir}/openldap/back_bdb*
|
|
|
|
%{_libdir}/openldap/back_hdb*
|
|
|
|
%{_libdir}/openldap/back_ldap*
|
|
|
|
%{_libdir}/openldap/back_mdb*
|
|
|
|
%{_libdir}/openldap/back_monitor*
|
|
|
|
%{_libdir}/openldap/back_relay*
|
|
|
|
%{_libdir}/openldap/accesslog*
|
|
|
|
%{_libdir}/openldap/auditlog*
|
|
|
|
%{_libdir}/openldap/collect*
|
|
|
|
%{_libdir}/openldap/constraint*
|
|
|
|
%{_libdir}/openldap/dds*
|
|
|
|
%{_libdir}/openldap/deref*
|
|
|
|
%{_libdir}/openldap/dyngroup*
|
|
|
|
%{_libdir}/openldap/dynlist*
|
|
|
|
%{_libdir}/openldap/memberof*
|
|
|
|
%{_libdir}/openldap/pcache*
|
|
|
|
%{_libdir}/openldap/ppolicy*
|
|
|
|
%{_libdir}/openldap/refint*
|
|
|
|
%{_libdir}/openldap/retcode*
|
|
|
|
%{_libdir}/openldap/rwm*
|
|
|
|
%{_libdir}/openldap/seqmod*
|
|
|
|
%{_libdir}/openldap/sssvlv*
|
|
|
|
%{_libdir}/openldap/syncprov*
|
|
|
|
%{_libdir}/openldap/translucent*
|
|
|
|
%{_libdir}/openldap/unique*
|
|
|
|
%{_libdir}/openldap/valsort*
|
|
|
|
%{_libdir}/slapd
|
2014-02-11 13:31:42 +01:00
|
|
|
/usr/lib/openldap/start
|
2016-01-21 14:36:42 +01:00
|
|
|
%{_unitdir}/slapd.service
|
|
|
|
%dir %attr(0750, ldap, ldap) /var/lib/ldap
|
|
|
|
%ghost %attr(0750, ldap, ldap) %{_rundir}
|
2006-12-19 00:17:14 +01:00
|
|
|
%doc %{_mandir}/man8/sl*
|
|
|
|
%doc %{_mandir}/man5/slapd.*
|
|
|
|
%doc %{_mandir}/man5/slapd-bdb.*
|
2007-12-19 14:52:01 +01:00
|
|
|
%doc %{_mandir}/man5/slapd-config.*
|
2006-12-19 00:17:14 +01:00
|
|
|
%doc %{_mandir}/man5/slapd-hdb.*
|
|
|
|
%doc %{_mandir}/man5/slapd-ldbm.*
|
|
|
|
%doc %{_mandir}/man5/slapd-ldap.*
|
|
|
|
%doc %{_mandir}/man5/slapd-ldif.*
|
2012-10-26 16:27:11 +02:00
|
|
|
%doc %{_mandir}/man5/slapd-mdb.*
|
2006-12-19 00:17:14 +01:00
|
|
|
%doc %{_mandir}/man5/slapd-monitor.*
|
|
|
|
%doc %{_mandir}/man5/slapd-relay.*
|
|
|
|
%doc %{_mandir}/man5/slapo-*
|
2010-11-10 16:39:43 +01:00
|
|
|
%dir %{DOCDIR}
|
2010-11-09 16:13:38 +01:00
|
|
|
%doc %{DOCDIR}/ANNOUNCEMENT
|
|
|
|
%doc %{DOCDIR}/COPYRIGHT
|
|
|
|
%doc %{DOCDIR}/LICENSE
|
2010-11-10 16:39:43 +01:00
|
|
|
%doc %{DOCDIR}/README*
|
2010-11-09 16:13:38 +01:00
|
|
|
%doc %{DOCDIR}/CHANGES
|
2011-12-06 13:54:38 +01:00
|
|
|
%doc %{DOCDIR}/slapd.ldif.default
|
2006-12-19 00:17:14 +01:00
|
|
|
EOF
|
2014-02-11 13:31:42 +01:00
|
|
|
#
|
2006-12-19 00:17:14 +01:00
|
|
|
#
|
|
|
|
cat > openldap2-client.filelist <<EOF
|
|
|
|
%dir /etc/openldap
|
|
|
|
%config(noreplace) /etc/openldap/ldap.conf
|
|
|
|
/etc/openldap/ldap.conf.default
|
|
|
|
/usr/bin/ldapadd
|
|
|
|
/usr/bin/ldapcompare
|
|
|
|
/usr/bin/ldapdelete
|
2007-12-19 14:52:01 +01:00
|
|
|
/usr/bin/ldapexop
|
2006-12-19 00:17:14 +01:00
|
|
|
/usr/bin/ldapmodify
|
|
|
|
/usr/bin/ldapmodrdn
|
|
|
|
/usr/bin/ldapsearch
|
|
|
|
/usr/bin/ldappasswd
|
2009-03-24 19:56:33 +01:00
|
|
|
/usr/bin/ldapurl
|
2006-12-19 00:17:14 +01:00
|
|
|
/usr/bin/ldapwhoami
|
2009-10-03 00:27:25 +02:00
|
|
|
/usr/sbin/schema2ldif
|
2006-12-19 00:17:14 +01:00
|
|
|
%doc %{_mandir}/man1/ldap*
|
|
|
|
%doc %{_mandir}/man5/ldap.conf*
|
|
|
|
%doc %{_mandir}/man5/ldif.*
|
|
|
|
EOF
|
2008-06-25 18:32:44 +02:00
|
|
|
cat > libldap.filelist <<EOF
|
2014-02-11 13:31:42 +01:00
|
|
|
%{_libdir}/liblber*2.4.so.*
|
|
|
|
%{_libdir}/libldap*2.4.so.*
|
2008-06-25 18:32:44 +02:00
|
|
|
EOF
|
2006-12-19 00:17:14 +01:00
|
|
|
cat > openldap2-devel.filelist <<EOF
|
2011-07-28 14:07:12 +02:00
|
|
|
/usr/include/*.h
|
2006-12-19 00:17:14 +01:00
|
|
|
%{_libdir}/liblber.so
|
2008-03-03 16:20:00 +01:00
|
|
|
%{_libdir}/libldap*.so
|
2006-12-19 00:17:14 +01:00
|
|
|
%doc %{_mandir}/man3/ber*
|
|
|
|
%doc %{_mandir}/man3/lber*
|
|
|
|
%doc %{_mandir}/man3/ld_errno*
|
|
|
|
%doc %{_mandir}/man3/ldap*
|
|
|
|
EOF
|
2013-06-14 08:43:36 +02:00
|
|
|
cat > openldap2-devel-static.filelist <<-EOF
|
|
|
|
%_libdir/liblber.a
|
|
|
|
%_libdir/libldap*.a
|
|
|
|
EOF
|
2006-12-19 00:17:14 +01:00
|
|
|
cat > openldap2-back-perl.filelist <<EOF
|
2016-01-21 14:36:42 +01:00
|
|
|
%{_libdir}/openldap/back_perl*
|
2006-12-19 00:17:14 +01:00
|
|
|
%doc %{_mandir}/man5/slapd-perl.*
|
|
|
|
EOF
|
2016-01-21 14:36:42 +01:00
|
|
|
cat > openldap2-back-sock.filelist <<EOF
|
|
|
|
%{_libdir}/openldap/back_sock*
|
|
|
|
%doc %{_mandir}/man5/slapd-sock.*
|
|
|
|
EOF
|
2006-12-19 00:17:14 +01:00
|
|
|
cat > openldap2-back-meta.filelist <<EOF
|
2016-01-21 14:36:42 +01:00
|
|
|
%{_libdir}/openldap/back_meta*
|
2006-12-19 00:17:14 +01:00
|
|
|
%doc %{_mandir}/man5/slapd-meta.*
|
|
|
|
EOF
|
2010-08-27 21:45:34 +02:00
|
|
|
cat > openldap2-back-sql.filelist <<EOF
|
2016-01-21 14:36:42 +01:00
|
|
|
%{_libdir}/openldap/back_sql*
|
2010-08-27 21:45:34 +02:00
|
|
|
%doc %{_mandir}/man5/slapd-sql.*
|
2010-09-29 11:24:42 +02:00
|
|
|
%doc servers/slapd/back-sql/examples
|
2010-08-27 21:45:34 +02:00
|
|
|
%doc servers/slapd/back-sql/docs/bugs
|
|
|
|
%doc servers/slapd/back-sql/docs/install
|
|
|
|
EOF
|
2016-01-21 14:36:42 +01:00
|
|
|
cat > openldap2-contrib.filelist <<EOF
|
|
|
|
%{_libdir}/openldap/allowed.*
|
|
|
|
%{_libdir}/openldap/allop.*
|
|
|
|
%{_libdir}/openldap/autogroup.*
|
|
|
|
%{_libdir}/openldap/lastbind.*
|
|
|
|
%{_libdir}/openldap/noopsrch.*
|
|
|
|
%{_libdir}/openldap/nops.*
|
|
|
|
%{_libdir}/openldap/pw-sha2.*
|
|
|
|
%{_libdir}/openldap/pw-pbkdf2.*
|
|
|
|
%{_libdir}/openldap/denyop.*
|
|
|
|
%{_libdir}/openldap/cloak.*
|
|
|
|
%{_libdir}/openldap/smbk5pwd.*
|
|
|
|
EOF
|
2010-11-09 16:13:38 +01:00
|
|
|
cat >openldap2-doc.filelist <<EOF
|
2010-11-10 16:39:43 +01:00
|
|
|
%dir %{DOCDIR}
|
2010-11-09 16:13:38 +01:00
|
|
|
%doc %{DOCDIR}/drafts
|
|
|
|
%doc %{DOCDIR}/adminguide
|
|
|
|
%doc %{DOCDIR}/images
|
|
|
|
EOF
|
2006-12-19 00:17:14 +01:00
|
|
|
#remove files from other spec file
|
|
|
|
%if "%{name}" == "openldap2"
|
2013-06-14 08:43:36 +02:00
|
|
|
cat openldap2-client.filelist libldap.filelist openldap2-devel.filelist \
|
|
|
|
openldap2-devel-static.filelist |
|
2006-12-19 00:17:14 +01:00
|
|
|
%else
|
2016-01-21 14:36:42 +01:00
|
|
|
cat openldap2.filelist openldap2-back-perl.filelist openldap2-back-sock.filelist \
|
2010-11-09 16:13:38 +01:00
|
|
|
openldap2-back-meta.filelist openldap2-back-sql.filelist \
|
2016-01-21 14:36:42 +01:00
|
|
|
openldap2-doc.filelist openldap2-contrib.filelist |
|
2006-12-19 00:17:14 +01:00
|
|
|
%endif
|
|
|
|
grep -v "%dir " |sed -e "s|^.* ||" |grep "^/" |while read name ; do
|
2016-01-21 14:36:42 +01:00
|
|
|
rm -rf ${RPM_BUILD_ROOT}${name}
|
2006-12-19 00:17:14 +01:00
|
|
|
done
|
|
|
|
%if "%{name}" == "openldap2"
|
|
|
|
|
|
|
|
%pre
|
2014-10-02 16:05:49 +02:00
|
|
|
/usr/sbin/groupadd -g 70 -o -r ldap || :
|
2016-01-21 14:36:42 +01:00
|
|
|
/usr/sbin/useradd -r -o -g ldap -u 76 -s /bin/false -c "User for OpenLDAP" -d /var/lib/ldap ldap || :
|
2014-07-16 18:08:39 +02:00
|
|
|
if /usr/bin/chkconfig ldap 2>&1 | grep -q on; then
|
2016-01-21 14:36:42 +01:00
|
|
|
touch %{_rundir}/enable_slapd_service
|
2014-06-10 12:53:07 +02:00
|
|
|
fi
|
2014-02-19 14:45:44 +01:00
|
|
|
%service_add_pre slapd.service
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
if [ ${1:-0} -gt 1 ] && [ -f %{_libdir}/sasl2/slapd.conf ] ; then
|
|
|
|
cp /etc/sasl2/slapd.conf /etc/sasl2/slapd.conf.rpmnew
|
|
|
|
cp %{_libdir}/sasl2/slapd.conf /etc/sasl2/slapd.conf
|
|
|
|
fi
|
2014-02-11 13:31:42 +01:00
|
|
|
%{fillup_only -n openldap ldap}
|
2006-12-19 00:17:14 +01:00
|
|
|
%{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER}
|
2014-02-19 14:45:44 +01:00
|
|
|
%service_add_post slapd.service
|
2016-01-21 14:36:42 +01:00
|
|
|
if [ -f %{_rundir}/enable_slapd_service ]; then
|
2014-06-10 12:53:07 +02:00
|
|
|
/usr/bin/systemctl --quiet enable slapd
|
|
|
|
fi
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
%preun
|
2014-02-19 14:45:44 +01:00
|
|
|
%service_del_preun slapd.service
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
%postun
|
2014-02-19 14:45:44 +01:00
|
|
|
%service_del_postun slapd.service
|
2014-02-11 13:31:42 +01:00
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
%files -f openldap2.filelist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%files -n openldap2-back-perl -f openldap2-back-perl.filelist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
2016-01-21 14:36:42 +01:00
|
|
|
%files -n openldap2-back-sock -f openldap2-back-sock.filelist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
%files -n openldap2-back-meta -f openldap2-back-meta.filelist
|
|
|
|
%defattr(-,root,root)
|
2010-08-27 21:45:34 +02:00
|
|
|
|
|
|
|
%files -n openldap2-back-sql -f openldap2-back-sql.filelist
|
|
|
|
%defattr(-,root,root)
|
2010-11-09 16:13:38 +01:00
|
|
|
|
|
|
|
%files -n openldap2-doc -f openldap2-doc.filelist
|
|
|
|
%defattr(-,root,root)
|
2014-02-11 13:31:42 +01:00
|
|
|
|
2016-01-21 14:36:42 +01:00
|
|
|
%files -n openldap2-contrib -f openldap2-contrib.filelist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
%else
|
|
|
|
|
2008-06-25 18:32:44 +02:00
|
|
|
%post -n libldap-2_4-2 -p /sbin/ldconfig
|
2007-08-24 01:51:41 +02:00
|
|
|
|
2008-06-25 18:32:44 +02:00
|
|
|
%postun -n libldap-2_4-2 -p /sbin/ldconfig
|
2007-08-24 01:51:41 +02:00
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
%files -f openldap2-client.filelist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
2008-06-25 18:32:44 +02:00
|
|
|
%files -n libldap-2_4-2 -f libldap.filelist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
%files -n openldap2-devel -f openldap2-devel.filelist
|
|
|
|
%defattr(-,root,root)
|
2013-06-14 08:43:36 +02:00
|
|
|
|
|
|
|
%files -n openldap2-devel-static -f openldap2-devel-static.filelist
|
|
|
|
%defattr(-,root,root)
|
2006-12-19 00:17:14 +01:00
|
|
|
%endif
|
2007-12-19 14:52:01 +01:00
|
|
|
|
2007-02-25 23:33:24 +01:00
|
|
|
%changelog
|