Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37399330
en ru br
Репозитории ALT
S:2.6.4-alt1
5.1: 2.3.43-alt2.3
4.1: 2.3.41-alt3.M41.3
4.0: 2.3.35-alt1.M40.1
3.0: 2.2.27-alt1.1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: openldap

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _sover 2.3
### Build switches for enable or disable fiture ###
%def_disable doc
%def_enable sql
%def_enable perl
%def_disable shell
%def_enable sasl
%def_enable krb
### Disable, because while build by rpm is not passed
%def_disable test
%def_disable debug
%def_disable slapi
%def_enable slp
%def_enable overlay
%def_enable aci
%def_enable slurpd
%def_enable ldbm
%def_enable yielding
%def_disable aacls
%def_enable ntlm

Name: openldap
Version: %_sover.43
Release: alt2.3
Provides: %name = 2.3.43-alt2.2

%define so_maj %_sover
%define ldap_ssl_dir %_sysconfdir/%name/ssl
%define ssl_dir %_localstatedir/ssl/certs

Summary: LDAP libraries and sample clients
License: OpenLDAP Public License
Group: System/Servers
Url: http://www.openldap.org/

Packager: OpenLDAP Maintainers Team <openldap at packages.altlinux.org>

# OpenLDAP source

Source: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%name-release/%name-%version.tar.bz2

# Docs for this products

#Source2: %name-README.upgrading
Source3: %name-README.ALT
Source4: %name-config-README.ALT

# System Specific source

Source11: %name.sysconfig
Source12: %name-slapd.init
Source13: %name.logrotate
Source14: %name-slurpd.init
## Chroot config
Source15: %name-ldap.all
Source16: %name-ldap.conf
Source17: %name-ldap.lib
#This file we need to build from original dynamic
Source18: %name-slapd.conf
Source19: %name-bdb-DB_CONFIG
Source20: %name-slapd-access.conf
Source21: %name-slapd-hdb-db01.conf
Source22: %name-slapd-hdb-db02.conf

# Extended OpenLDAP schemas

Source50: %name-addon-schemas.tar.bz2
Source51: %name-ALT-rootdse.ldif

%if_enabled aacls
## AACLS patch
Source60: %name-aacls-patch-1.6a.tgz
%endif

### PATCHES

## This path for chrooting ldap
Patch0: %name-2.3.34-alt-chroot.patch
Patch1: %name-2.3.12-alt-servers-path.patch

## Patch created by Alexander Bokovoy <ab at altlinux.ru>

Patch2: %name-2.3.34-alt-pid.patch
Patch3: %name-2.3.12-autoconf-2.5-alt.patch

Patch4: %name-2.3.20-alt-makefile.patch
Patch5: %name-2.3.20-alt-ldapconf.patch
Patch6: %name-2.3.34-alt-defaults.patch

Patch7: %name-2.3.34-alt-meta-backend.patch

Patch8: %name-2.3.37-alt-ntlm.patch

# CVE-2008-2952

Patch10: %name-head-CVE-2008-2952.patch

Patch11: openldap-2.3.43-fix-ucred.patch
Patch12: openldap-2.3.43-cvs-gcc44.patch

### REQUIRE Section


%if_enabled doc
# For compile documentations need "sdf".
BuildPreReq: sdf >= 2
%endif
%if_enabled sasl
# due to SASL_AUXPROP_PLUG_VERSION
BuildPreReq: libsasl2-devel >= 2.1.24-alt1.cvs.20090508
%endif
%if_enabled krb
BuildPreReq: libkrb5-devel >= 1.3.1-alt3
%endif
%if_enabled sql
BuildPreReq: libunixODBC-devel
%endif
%if_enabled perl
BuildPreReq: perl-devel
%endif
%if_enabled slp
BuildPreReq: libopenslp-devel
%endif

# Automatically added by buildreq on Thu Aug 24 2006 (-bi)

BuildRequires: libdb4.4-devel libltdl-devel libssl-devel libwrap-devel python-modules-compiler python-modules-encodings shtool chrooted termutils

%package -n libldap%_sover
Summary: OpenLDAP libraries
Group: System/Libraries
#Conflicts: %name < %version-%release
Conflicts: %name < 2.3.43-alt2.2
Provides: libldap2.3 = 2.3.43-alt2.2
%if_enabled krb
Requires: libkrb5 >= 1.3.1-alt3
%endif

%package -n libldap-devel
Summary: OpenLDAP development libraries and header files
Group: Development/C
Provides: libldap-devel = %version
Provides: openldap-devel = %version
Requires: libldap%_sover = %version-%release
Obsoletes: openldap-devel
%if_enabled krb5
Requires: libkrb5-devel >= 1.3.1-alt3
%endif
%if_enabled sasl
Requires: libsasl2-devel
%endif
%if_enabled slp
Requires: libopenslp-devel
%endif

%package -n libldap-devel-static
Summary: OpenLDAP development static libraries
Group: Development/C
Provides: openldap-devel-static = %version
Provides: libldap-devel-static = %version
Requires: libldap-devel = %version-%release
%if_enabled krb5
Requires: libkrb5-devel-static >= 1.3.1-alt3
%endif
Obsoletes: openldap-devel-static

%package servers
Summary: LDAP servers
Group: System/Servers
PreReq: libldap%_sover = %version-%release, %name = %version-%release, coreutils, shadow-utils, libunixODBC, service >= 0.3, openssl
Requires: gawk
%if_enabled perl
Requires: perl
%endif
%if_enabled slp
Requires: libopenslp
%endif

%package clients
Summary: LDAP utilities, tools and sample clients
Group: Networking/Remote access
PreReq: libldap%_sover = %version-%release, %name = %version-%release

%if_enabled doc
%package doc
Summary: OpenLDAP administration guide
Group: Books/Computer books
BuildArch: noarch
#Requires: %name = %version-%release
Obsoletes: %name-guide
%endif

%description
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
Protocol) applications and development tools.  LDAP is a set of
protocols for accessing directory services (usually phone book style
information, but other information is possible) over the Internet,
similar to the way DNS (Domain Name System) information is propagated
over the Internet.  The suite includes a stand-alone LDAP server
(slapd), a stand-alone LDAP replication server (slurpd), libraries for
implementing the LDAP protocol, utilities, tools, and sample clients.

Install %name if you need to run LDAP-based applications and tools.

%description -n libldap%_sover
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
Protocol) applications and development tools.  LDAP is a set of
protocols for accessing directory services (usually phone book style
information, but other information is possible) over the Internet,
similar to the way DNS (Domain Name System) information is propagated
over the Internet.  The suite includes a stand-alone LDAP server
(slapd), a stand-alone LDAP replication server (slurpd), libraries for
implementing the LDAP protocol, utilities, tools, and sample clients.

This package contains shared libraries needed for make works %name-based softare.

%description -n libldap-devel
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
Protocol) applications and development tools.  LDAP is a set of
protocols for accessing directory services (usually phone book style
information, but other information is possible) over the Internet,
similar to the way DNS (Domain Name System) information is propagated
over the Internet.  The suite includes a stand-alone LDAP server
(slapd), a stand-alone LDAP replication server (slurpd), libraries for
implementing the LDAP protocol, utilities, tools, and sample clients.

This package includes the development libraries and header files needed
for developing applications that use LDAP internals. Install this package
only if you plan to develop or will need to compile customized LDAP clients.

%description -n libldap-devel-static
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
Protocol) applications and development tools.  LDAP is a set of
protocols for accessing directory services (usually phone book style
information, but other information is possible) over the Internet,
similar to the way DNS (Domain Name System) information is propagated
over the Internet.  The suite includes a stand-alone LDAP server
(slapd), a stand-alone LDAP replication server (slurpd), libraries for
implementing the LDAP protocol, utilities, tools, and sample clients.

This package includes the static libraries needed for developing statically
linked applications that use LDAP internals.

%description servers
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
Protocol) applications and development tools.  LDAP is a set of
protocols for accessing directory services (usually phone book style
information, but other information is possible) over the Internet,
similar to the way DNS (Domain Name System) information is propagated
over the Internet.  The suite includes a stand-alone LDAP server
(slapd), a stand-alone LDAP replication server (slurpd), libraries for
implementing the LDAP protocol, utilities, tools, and sample clients.

Install %name-servers if you need LDAP servers.

%description clients
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
Protocol) applications and development tools.  LDAP is a set of
protocols for accessing directory services (usually phone book style
information, but other information is possible) over the Internet,
similar to the way DNS (Domain Name System) information is propagated
over the Internet.  The suite includes a stand-alone LDAP server
(slapd), a stand-alone LDAP replication server (slurpd), libraries for
implementing the LDAP protocol, utilities, tools, and sample clients.

Install %name-client if you need LDAP applications and tools.

%if_enabled doc
%description doc
OpenLDAP Administration Guide
HTML and TXT versions
%endif

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

%if_enabled ntlm
%patch8 -p1 -b .ntlm
%endif

%patch11 -p1
%patch12 -p1

### Extract AACLS patch

%if_enabled aacls
tar -zxf %SOURCE60
%__patch -p1 < ./patch-0.6/patch-2.2.11
%endif

# Add some more schema for the sake of migration scripts and others

pushd servers/slapd
tar -jxf %SOURCE50
popd


%build
%if_enabled krb
# Made OpenLDAP with Kerboros
export CPPFLAGS="`krb5-config --cflags`"
export CPATH="`krb5-config --cflags`"
export LDFLAGS="`krb5-config --libs`"
%endif

# Options -lresolv in line below need for some bad configure scripts like in auth_ldap package

#export LDFLAGS="$LDFLAGS -lresolv"
export CPPFLAGS="$CPPFLAGS -DLOG_DAEMON=1"

shtoolize all
aclocal
autoconf
libtoolize --force --install

%configure \
--enable-syslog \
--enable-proctitle \
--enable-dynamic \
--disable-ipv6 \
--with-tls=openssl \
--with-threads \
--enable-slapd \
--enable-lmpasswd \
--enable-crypt \
   --enable-cleartext \
--enable-modules \
--enable-rewrite \
--enable-wrappers \
--enable-bdb=mod \
--enable-hdb=mod \
--enable-dnssrv=mod \
--enable-ldap=mod \
   --enable-relay=mod \
%if_enabled ldbm
   --enable-hdb=mod \
--enable-ldbm=mod \
--enable-ldbm-api=berkeley \
--enable-ldbm-type=btree \
%else
--disable-ldbm \
%endif
--enable-meta=mod \
--enable-monitor=mod \
--enable-null=mod \
--enable-passwd=mod \
\
%if_enabled yielding
--with-yielding-select \
%else
--without-yielding-select \
%endif
%if_enabled aci
--enable-aci \
%else
--disable-aci \
%endif
%if_enabled slapi
--enable-slapi \
%else
--disable-slapi \
%endif
%if_enabled slp
--enable-slp \
%else
--disable-slp \
%endif
%if_enabled shell
--enable-shell=mod \
 --disable-slurpd \
 --without-threads \
%else
--disable-shell \
 --with-threads \
%endif
%if_enabled sql
--enable-sql=mod \
%else
--disable-sql \
%endif
%if_enabled sasl
--with-cyrus-sasl \
 --enable-spasswd \
%else
--without-cyrus-sasl \
%endif
%if_enabled perl
--enable-perl=mod \
%else
--disable-perl \
%endif
%if_enabled krb
--with-kerberos \
 --enable-kpasswd \
%else
--without-kerberos \
%endif
%if_enabled overlay
    --enable-accesslog=mod \
    --enable-auditlog=mod \
    --enable-denyop=mod \
--enable-dyngroup=mod \
    --enable-dynlist=mod \
    --enable-lastmod=mod \
    --enable-ppolicy=mod \
--enable-proxycache=mod \
    --enable-refint=mod \
    --enable-retcode=mod \
    --enable-rwm=mod \
    --enable-syncprov=mod \
    --enable-translucent=mod \
    --enable-unique=mod \
    --enable-valsort=mod \
%else
   --disable-accesslog \
   --disable-auditlog \
   --disable-denyop \
--disable-dyngroup \
   --disable-dynlist \
   --disable-lastmod \
   --disable-ppolicy \
--disable-proxycache \
   --disable-refint \
   --disable-retcode \
   --disable-rwm \
   --disable-syncprov \
   --disable-translucent \
   --disable-unique \
   --disable-valsort \
%endif
%if_enabled slurpd
--enable-slurpd \
%else
--disable-slurpd \
%endif
%if_enabled debug
--enable-debug \
%endif
%if_enabled aacls
--enable-aacls \
%endif

%__subst 's/^AC_CFLAGS.*/& %optflags_shared/' libraries/librewrite/Makefile

%make depend
export NPROCS=1
cd include
%make_build
cd ../libraries
%make_build
pwd

%install

cd libraries
%make DESTDIR=%buildroot install

###

## Install all slapd's file
###
# log repository and logrotate config
#__mkdir_p -m750 %buildroot/%_logdir/ldap
#__install -pD -m644 %SOURCE13 %buildroot/%_sysconfdir/logrotate.d/ldap

#======

# Relocate some shared libraries from %_libdir/ to /%_lib/.
%__mkdir_p %buildroot/%_lib
for n in ldap lber; do
for f in %buildroot/%_libdir/lib$n.so; do
t=`objdump -p "$f" |awk '/SONAME/ {print $2}'`
[ -n "$t" ]
%__ln_s -nf ../../%_lib/"$t" "$f"
done
%__mv %buildroot/%_libdir/lib$n-*.so.* %buildroot/%_lib/
done


%files -n libldap%_sover
/%_lib/*
%_libdir/*.so.*

%files
%doc ANNOUNCEMENT CHANGES COPYRIGHT LICENSE README
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/ldap.conf

###

# TODO for 2.2.x
#
#[global] correct install all docs to %_docdir
#[global] Correct build with SASL(+++) Need tests
#[FR] Translate Admin Guide
#[FR] Translate LDAP Tools and add working in LOCALE Run-Time envirement.
#[FR] Make load modules correctly by dlopen without *.la files
#[global] Copy or not in back-meta/data directory (may be need to copy this data to Docs dir).
#[NeedBugFix] Remove TEXTREL from back-{modules}
#[global] What is back-tcl ?? man is here, but back modules isn't.
#[global] Generate slapd.conf according slapd.conf in source and man pages back-*
#[global] Create new config shema
#[FR] Import, may be, backup shema from MDK
#[global] Work on SSL/TLS cert dir!(+++) Need tests.
#[FR] Correct patch for aacls for latest version
#[FR] Create separate package with OpenLDAP test for ALT Specific chroot env
#[FR] Create chroot-scripts dynamic while build package

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin