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