4c6096b
4c6096b
%define pkgname   dirsrv
4c6096b
4c6096b
Summary:          389 Directory Server (base)
4c6096b
Name:             389-ds-base
4c6096b
Version:          1.2.1
4c6096b
Release:          1%{?dist}
4c6096b
License:          GPLv2 with exceptions
4c6096b
URL:              http://port389.org/
4c6096b
Group:            System Environment/Daemons
4c6096b
BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
4c6096b
Provides:         fedora-ds-base = %{version}-%{release}
4c6096b
Obsoletes:        fedora-ds-base < 1.2.1-1
4c6096b
4c6096b
BuildRequires:    nspr-devel
4c6096b
BuildRequires:    nss-devel
4c6096b
BuildRequires:    svrcore-devel
4c6096b
BuildRequires:    mozldap-devel
4c6096b
BuildRequires:    db4-devel
4c6096b
BuildRequires:    cyrus-sasl-devel
4c6096b
BuildRequires:    icu
4c6096b
BuildRequires:    libicu-devel
4c6096b
# The following are needed to build the snmp ldap-agent
4c6096b
BuildRequires:    net-snmp-devel
4c6096b
%ifnarch sparc sparc64 ppc ppc64
4c6096b
BuildRequires:    lm_sensors-devel
4c6096b
%endif
4c6096b
BuildRequires:    bzip2-devel
4c6096b
BuildRequires:    zlib-devel
4c6096b
BuildRequires:    openssl-devel
4c6096b
BuildRequires:    tcp_wrappers
4c6096b
BuildRequires:    libselinux-devel
4c6096b
# the following is for the pam passthru auth plug-in
4c6096b
BuildRequires:    pam-devel
4c6096b
4c6096b
# the following are needed for some of our scripts
4c6096b
Requires:         mozldap-tools
4c6096b
Requires:         perl-Mozilla-LDAP
4c6096b
4c6096b
# this is needed to setup SSL if you are not using the
4c6096b
# administration server package
4c6096b
Requires:         nss-tools
4c6096b
4c6096b
# these are not found by the auto-dependency method
4c6096b
# they are required to support the mandatory LDAP SASL mechs
4c6096b
Requires:         cyrus-sasl-gssapi
4c6096b
Requires:         cyrus-sasl-md5
4c6096b
4c6096b
# this is needed for verify-db.pl
4c6096b
Requires:         db4-utils
4c6096b
4c6096b
# This picks up libperl.so as a Requires, so we add this versioned one
4c6096b
Requires:         perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
4c6096b
4c6096b
# for the init script
4c6096b
Requires(post): /sbin/chkconfig
4c6096b
Requires(preun): /sbin/chkconfig
4c6096b
Requires(preun): /sbin/service
4c6096b
4c6096b
Source0:          http://port389.org/sources/%{name}-%{version}.tar.bz2
4c6096b
# 389-ds-git.sh should be used to generate the source tarball from git
4c6096b
Source1:          %{name}-git.sh
4c6096b
Source2:          %{name}-devel.README
4c6096b
4c6096b
%description
4c6096b
389 Directory Server is an LDAPv3 compliant server.  The base package includes
4c6096b
the LDAP server and command line utilities for server administration.
4c6096b
4c6096b
%package          devel
4c6096b
Summary:          Development libraries for 389 Directory Server
4c6096b
Group:            Development/Libraries
4c6096b
Requires:         %{name} = %{version}-%{release}
4c6096b
Requires:         mozldap-devel
4c6096b
Provides:         fedora-ds-base-devel = %{version}-%{release}
4c6096b
Obsoletes:        fedora-ds-base-devel < 1.2.1-1
4c6096b
4c6096b
%description      devel
4c6096b
Development Libraries and headers for the 389 Directory Server base package.
4c6096b
4c6096b
%prep
4c6096b
%setup -q -n %{name}-%{version}
4c6096b
cp %{SOURCE2} README.devel
4c6096b
4c6096b
%build
4c6096b
%configure --enable-autobind
4c6096b
4c6096b
# Generate symbolic info for debuggers
4c6096b
export XCFLAGS=$RPM_OPT_FLAGS
4c6096b
4c6096b
%ifarch x86_64 ppc64 ia64 s390x sparc64
4c6096b
export USE_64=1
4c6096b
%endif
4c6096b
4c6096b
make %{?_smp_mflags}
4c6096b
4c6096b
%install
4c6096b
rm -rf $RPM_BUILD_ROOT 
4c6096b
4c6096b
make DESTDIR="$RPM_BUILD_ROOT" install
4c6096b
4c6096b
mkdir -p $RPM_BUILD_ROOT/var/log/%{pkgname}
4c6096b
mkdir -p $RPM_BUILD_ROOT/var/lib/%{pkgname}
4c6096b
mkdir -p $RPM_BUILD_ROOT/var/lock/%{pkgname}
4c6096b
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{pkgname}
4c6096b
4c6096b
#remove libtool and static libs
4c6096b
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/*.a
4c6096b
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/*.la
4c6096b
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/plugins/*.a
4c6096b
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/plugins/*.la
4c6096b
4c6096b
install -p -m 644 ldap/servers/slapd/slapi-plugin.h $RPM_BUILD_ROOT%{_includedir}/%{pkgname}/
4c6096b
install -p -m 644 ldap/servers/plugins/replication/winsync-plugin.h $RPM_BUILD_ROOT%{_includedir}/%{pkgname}/
4c6096b
4c6096b
# make sure perl scripts have a proper shebang 
4c6096b
sed -i -e 's|#{{PERL-EXEC}}|#!/usr/bin/perl|' $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/script-templates/template-*.pl
4c6096b
4c6096b
%clean
4c6096b
rm -rf $RPM_BUILD_ROOT
4c6096b
4c6096b
%post
4c6096b
/sbin/chkconfig --add %{pkgname}
4c6096b
/sbin/ldconfig
4c6096b
# this has been problematic - if this directory
4c6096b
# does not exist, the server will silently fail to
4c6096b
# start - however, if the user has already created
4c6096b
# it, we don't want to overwrite the permissions
4c6096b
# on it - so we can't list it explicitly in the
4c6096b
# files section - we list it as a ghost so that
4c6096b
# it will be removed when the rpm is removed
4c6096b
if [ ! -d %{_localstatedir}/run/%{pkgname} ] ; then
4c6096b
    mkdir -p %{_localstatedir}/run/%{pkgname}
4c6096b
fi
4c6096b
4c6096b
%preun
4c6096b
if [ $1 = 0 ]; then
4c6096b
        /sbin/service %{pkgname} stop >/dev/null 2>&1 || :
4c6096b
        /sbin/chkconfig --del %{pkgname}
4c6096b
fi
4c6096b
4c6096b
%postun -p /sbin/ldconfig
4c6096b
4c6096b
%files
4c6096b
%defattr(-,root,root,-)
4c6096b
%doc LICENSE EXCEPTION LICENSE.GPLv2
4c6096b
%dir %{_sysconfdir}/%{pkgname}
4c6096b
%dir %{_sysconfdir}/%{pkgname}/schema
4c6096b
%config(noreplace)%{_sysconfdir}/%{pkgname}/schema/*.ldif
4c6096b
%dir %{_sysconfdir}/%{pkgname}/config
4c6096b
%config(noreplace)%{_sysconfdir}/%{pkgname}/config/slapd-collations.conf
4c6096b
%config(noreplace)%{_sysconfdir}/%{pkgname}/config/certmap.conf
4c6096b
%config(noreplace)%{_sysconfdir}/sysconfig/%{pkgname}
4c6096b
%{_datadir}/%{pkgname}
4c6096b
%{_sysconfdir}/rc.d/init.d/%{pkgname}
4c6096b
%{_bindir}/*
4c6096b
%{_sbindir}/*
4c6096b
%dir %{_libdir}/%{pkgname}
4c6096b
%{_libdir}/%{pkgname}/*.so.*
4c6096b
%{_libdir}/%{pkgname}/perl
4c6096b
%dir %{_libdir}/%{pkgname}/plugins
4c6096b
%{_libdir}/%{pkgname}/plugins/*.so
4c6096b
%dir %{_localstatedir}/lib/%{pkgname}
4c6096b
%dir %{_localstatedir}/log/%{pkgname}
4c6096b
%dir %{_localstatedir}/lock/%{pkgname}
4c6096b
%{_mandir}/man1/*
4c6096b
%{_mandir}/man8/*
4c6096b
4c6096b
%files devel
4c6096b
%defattr(-,root,root,-)
4c6096b
%doc LICENSE EXCEPTION LICENSE.GPLv2 README.devel
4c6096b
%{_includedir}/%{pkgname}
4c6096b
%{_libdir}/%{pkgname}/*.so
4c6096b
4c6096b
%changelog
4c6096b
* Mon May 18 2009 Rich Megginson <rmeggins@redhat.com> - 1.2.1-1
4c6096b
- change name to 389
4c6096b
- change version to 1.2.1
4c6096b
- added initial support for numeric string syntax
4c6096b
- added initial support for syntax validation
4c6096b
- added initial support for paged results including sorting
4c6096b
4c6096b
* Tue Apr 28 2009 Rich Megginson <rmeggins@redhat.com> - 1.2.0-4
4c6096b
- final release 1.2.0
4c6096b
- Resolves: bug 475338 - LOG: the intenal type of maxlogsize, maxdiskspace and minfreespace should be 64-bit integer
4c6096b
- Resolves: bug 496836 - SNMP ldap-agent on Solaris: Unable to open semaphore for server: 389
4c6096b
- CVS tag: FedoraDirSvr_1_2_0 FedoraDirSvr_1_2_0_20090428
4c6096b
4c6096b
* Mon Apr  6 2009 Rich Megginson <rmeggins@redhat.com> - 1.2.0-3
4c6096b
- re-enable ppc builds
4c6096b
4c6096b
* Thu Apr  2 2009 Rich Megginson <rmeggins@redhat.com> - 1.2.0-2
4c6096b
- exclude ppc builds - needs extensive porting work
4c6096b
4c6096b
* Mon Mar 30 2009 Rich Megginson <rmeggins@redhat.com> - 1.2.0-1
4c6096b
- new release 1.2.0
4c6096b
- Made devel package depend on mozldap-devel
4c6096b
- only create run dir if it does not exist
4c6096b
- CVS tag: FedoraDirSvr_1_2_0_RC1 FedoraDirSvr_1_2_0_RC1_20090330
4c6096b
4c6096b
* Mon Oct 30 2008 Noriko Hosoi <nhosoi@redhat.com> - 1.1.3-7
4c6096b
- added db4-utils to Requires for verify-db.pl
4c6096b
4c6096b
* Mon Oct 13 2008 Noriko Hosoi <nhosoi@redhat.com> - 1.1.3-6
4c6096b
- Enabled LDAPI autobind
4c6096b
4c6096b
* Thu Oct  9 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.3-5
4c6096b
- updated update to patch bug463991-bdb47.patch
4c6096b
4c6096b
* Thu Oct  9 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.3-4
4c6096b
- updated patch bug463991-bdb47.patch
4c6096b
4c6096b
* Mon Sep 29 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.3-3
4c6096b
- added patch bug463991-bdb47.patch
4c6096b
- make ds work with bdb 4.7
4c6096b
4c6096b
* Wed Sep 24 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.3-2
4c6096b
- rolled back bogus winsync memory leak fix
4c6096b
4c6096b
* Tue Sep 23 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.3-1
4c6096b
- winsync api improvements for modify operations
4c6096b
4c6096b
* Fri Jun 13 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.2-1
4c6096b
- This is the 1.1.2 release.  The bugs fixed can be found here
4c6096b
- https://bugzilla.redhat.com/showdependencytree.cgi?id=452721
4c6096b
- Added winsync-plugin.h to the devel subpackage
4c6096b
4c6096b
* Fri Jun  6 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.1-2
4c6096b
- bump rev to rebuild and pick up new version of ICU
4c6096b
4c6096b
* Fri May 23 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.1-1
4c6096b
- 1.1.1 release candidate - several bug fixes
4c6096b
4c6096b
* Wed Apr 16 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.0.1-4
4c6096b
- fix bugzilla 439829 - patch to allow working with NSS 3.11.99 and later
4c6096b
4c6096b
* Tue Mar 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.1.0.1-3
4c6096b
- add patch to allow server to work with NSS 3.11.99 and later
4c6096b
- do NSS_Init after fork but before detaching from console
4c6096b
4c6096b
* Tue Mar 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.1.0.1-3
4c6096b
- add Requires for versioned perl (libperl.so)
4c6096b
4c6096b
* Wed Feb 27 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.0.1-2
4c6096b
- previous fix for 434403 used the wrong patch
4c6096b
- this is the right one
4c6096b
4c6096b
* Wed Feb 27 2008 Rich Megginson <rmeggins@redhat.com> - 1.1.0.1-1
4c6096b
- Resolves bug 434403 - GCC 4.3 build fails
4c6096b
- Rolled new source tarball which includes Nathan's fix for the struct ucred
4c6096b
- NOTE: Change version back to 1.1.1 for next release
4c6096b
- this release was pulled from CVS tag FedoraDirSvr110_gcc43
4c6096b
4c6096b
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.0-5
4c6096b
- Autorebuild for GCC 4.3
4c6096b
4c6096b
* Thu Dec 20 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-4
4c6096b
- This is the GA release of Fedora DS 1.1
4c6096b
- Removed version numbers for BuildRequires and Requires
4c6096b
- Added full URL to source tarball
4c6096b
4c6096b
* Fri Dec 07 2007 Release Engineering <rel-eng at fedoraproject dot org> - 1.1.0-3
4c6096b
- Rebuild for deps
4c6096b
4c6096b
* Wed Nov  7 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-2.0
4c6096b
- This is the beta2 release
4c6096b
- new file added to package - /etc/sysconfig/dirsrv - for setting
4c6096b
- daemon environment as is usual in other linux daemons
4c6096b
4c6096b
* Thu Aug 16 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-1.2
4c6096b
- fix build breakage due to open()
4c6096b
- mock could not find BuildRequires: db4-devel >= 4.2.52
4c6096b
- mock works if >= version is removed - it correctly finds db4.6
4c6096b
4c6096b
* Fri Aug 10 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-1.1
4c6096b
- Change pathnames to use the pkgname macro which is dirsrv
4c6096b
- get rid of cvsdate in source name
4c6096b
4c6096b
* Fri Jul 20 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-0.3.20070720
4c6096b
- Added Requires for perldap, cyrus sasl plugins
4c6096b
- Removed template-migrate* files
4c6096b
- Added perl module directory
4c6096b
- Removed install.inf - setup-ds.pl can now easily generate one
4c6096b
4c6096b
* Mon Jun 18 2007 Nathan Kinder <nkinder@redhat.com> - 1.1.0-0.2.20070320
4c6096b
- added requires for mozldap-tools
4c6096b
4c6096b
* Tue Mar 20 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-0.1.20070320
4c6096b
- update to latest sources
4c6096b
- added migrateTo11 to allow migrating instances from 1.0.x to 1.1
4c6096b
- ldapi support
4c6096b
- fixed pam passthru plugin ENTRY method
4c6096b
4c6096b
* Fri Feb 23 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-0.1.20070223
4c6096b
- Renamed package to fedora-ds-base, but keep names of paths/files/services the same
4c6096b
- use the shortname macro (fedora-ds) for names of paths, files, and services instead
4c6096b
- of name, so that way we can continue to use e.g. /etc/fedora-ds instead of /etc/fedora-ds-base
4c6096b
- updated to latest sources
4c6096b
4c6096b
* Tue Feb 13 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-0.1.20070213
4c6096b
- More cleanup suggested by Dennis Gilmore
4c6096b
- This is the fedora extras candidate based on cvs tag FedoraDirSvr110a1
4c6096b
4c6096b
* Fri Feb  9 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-1.el4.20070209
4c6096b
- latest sources
4c6096b
- added init scripts
4c6096b
- use /etc as instconfigdir
4c6096b
4c6096b
* Wed Feb  7 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-1.el4.20070207
4c6096b
- latest sources
4c6096b
- moved all executables to _bindir
4c6096b
4c6096b
* Mon Jan 29 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-1.el4.20070129
4c6096b
- latest sources
4c6096b
- added /var/tmp/fedora-ds to dirs
4c6096b
4c6096b
* Fri Jan 26 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-8.el4.20070125
4c6096b
- added logconv.pl
4c6096b
- added slapi-plugin.h to devel package
4c6096b
- added explicit dirs for /var/log/fedora-ds et. al.
4c6096b
4c6096b
* Thu Jan 25 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-7.el4.20070125
4c6096b
- just move all .so files into the base package from the devel package
4c6096b
4c6096b
* Thu Jan 25 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-6.el4.20070125
4c6096b
- Move the plugin *.so files into the main package instead of the devel
4c6096b
- package because they are loaded directly by name via dlopen
4c6096b
4c6096b
* Fri Jan 19 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-5.el4.20070125
4c6096b
- Move the script-templates directory to datadir/fedora-ds
4c6096b
4c6096b
* Fri Jan 19 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-4.el4.20070119
4c6096b
- change mozldap to mozldap6
4c6096b
4c6096b
* Fri Jan 19 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-3.el4.20070119
4c6096b
- remove . from cvsdate define
4c6096b
4c6096b
* Fri Jan 19 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-2.el4.20070119
4c6096b
- Having a problem building in Brew - may be Release format
4c6096b
4c6096b
* Fri Jan 19 2007 Rich Megginson <rmeggins@redhat.com> - 1.1.0-1.el4.cvs20070119
4c6096b
- Changed version to 1.1.0 and added Release 1.el4.cvs20070119
4c6096b
- merged in changes from Fedora Extras candidate spec file
4c6096b
4c6096b
* Mon Jan 15 2007 Rich Megginson <rmeggins@redhat.com> - 1.1-0.1.cvs20070115
4c6096b
- Bump component versions (nspr, nss, svrcore, mozldap) to their latest
4c6096b
- remove unneeded patches
4c6096b
4c6096b
* Tue Jan 09 2007 Dennis Gilmore <dennis@ausil.us> - 1.1-0.1.cvs20070108
4c6096b
- update to a cvs snapshot
4c6096b
- fedorafy the spec 
4c6096b
- create -devel subpackage
4c6096b
- apply a patch to use mozldap not mozldap6
4c6096b
- apply a patch to allow --prefix to work correctly
4c6096b
4c6096b
* Mon Dec 4 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-16
4c6096b
- Fixed the problem where the server would crash upon shutdown in dblayer
4c6096b
- due to a race condition among the database housekeeping threads
4c6096b
- Fix a problem with normalized absolute paths for db directories
4c6096b
4c6096b
* Tue Nov 28 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-15
4c6096b
- Touch all of the ldap/admin/src/scripts/*.in files so that they
4c6096b
- will be newer than their corresponding script template files, so
4c6096b
- that make will rebuild them.
4c6096b
4c6096b
* Mon Nov 27 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-14
4c6096b
- Chown new schema files when copying during instance creation
4c6096b
4c6096b
* Tue Nov 21 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-13
4c6096b
- Configure will get ldapsdk_bindir from pkg-config, or $libdir/mozldap6
4c6096b
4c6096b
* Tue Nov 21 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-12
4c6096b
- use eval to sed ./configure into ../configure
4c6096b
4c6096b
* Tue Nov 21 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-11
4c6096b
- jump through hoops to be able to run ../configure
4c6096b
4c6096b
* Tue Nov 21 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-10
4c6096b
- Need to make built dir in setup section
4c6096b
4c6096b
* Tue Nov 21 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-9
4c6096b
- The template scripts needed to use @libdir@ instead of hardcoding
4c6096b
- /usr/lib
4c6096b
- Use make DESTDIR=$RPM_BUILD_ROOT install instead of % makeinstall
4c6096b
- do the actual build in a "built" subdirectory, until we remove
4c6096b
- the old script templates
4c6096b
4c6096b
* Thu Nov 16 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-8
4c6096b
- Make replication plugin link with libdb
4c6096b
4c6096b
* Wed Nov 15 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-7
4c6096b
- Have make define LIBDIR, BINDIR, etc. for C code to use
4c6096b
- especially for create_instance.h
4c6096b
4c6096b
* Tue Nov 14 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-6
4c6096b
- Forgot to checkin new config.h.in for AC_CONFIG_HEADERS
4c6096b
4c6096b
* Tue Nov 14 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-5
4c6096b
- Add perldap as a Requires; update sources
4c6096b
4c6096b
* Thu Nov 9 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-4
4c6096b
- Fix ds_newinst.pl
4c6096b
- Remove obsolete #defines
4c6096b
4c6096b
* Thu Nov 9 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-3
4c6096b
- Update sources; rebuild to populate brew yum repo with dirsec-nss
4c6096b
4c6096b
* Tue Nov 7 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-2
4c6096b
- Update sources
4c6096b
4c6096b
* Thu Nov 2 2006 Rich Megginson <rmeggins@redhat.com> - 1.0.99-1
4c6096b
- initial revision