diff --git a/389-ds-base.spec b/389-ds-base.spec index 5fe3ffb..8e799cd 100644 --- a/389-ds-base.spec +++ b/389-ds-base.spec @@ -19,9 +19,7 @@ %global use_nunc_stans 0 %endif -%if 0%{?use_nunc_stans:1} %global nunc_stans_ver 0.1.8 -%endif # fedora 15 and later uses tmpfiles.d # otherwise, comment this out @@ -35,9 +33,9 @@ Summary: 389 Directory Server (base) Name: 389-ds-base -Version: 1.3.5.0 -Release: %{?relprefix}1%{?prerel}%{?dist} -License: GPLv2 with exceptions +Version: 1.3.5.1 +Release: %{?relprefix}3%{?prerel}%{?dist} +License: GPLv3+ URL: https://port389.org/ Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -130,9 +128,7 @@ Source0: http://port389.org/binaries/%{name}-%{version}%{?prerel}.tar.b # 389-ds-git.sh should be used to generate the source tarball from git Source1: %{name}-git.sh Source2: %{name}-devel.README -%if 0%{?use_nunc_stans:1} Source3: https://git.fedorahosted.org/cgit/nunc-stans.git/snapshot/nunc-stans-%{nunc_stans_ver}.tar.bz2 -%endif %description 389 Directory Server is an LDAPv3 compliant server. The base package includes @@ -157,7 +153,7 @@ BuildRequires: libdb-devel BuildRequires: cyrus-sasl-devel BuildRequires: libicu-devel BuildRequires: pcre-devel -%if 0%{?use_nunc_stans:1} +%if %{use_nunc_stans} BuildRequires: libtalloc-devel BuildRequires: libevent-devel BuildRequires: libtevent-devel @@ -182,7 +178,7 @@ Requires: openldap-devel %else Requires: mozldap-devel %endif -%if 0%{?use_nunc_stans:1} +%if %{use_nunc_stans} Requires: libtalloc Requires: libevent Requires: libtevent @@ -194,7 +190,7 @@ Development Libraries and headers for the 389 Directory Server base package. %prep %setup -q -n %{name}-%{version}%{?prerel} -%if 0%{?use_nunc_stans:1} +%if %{use_nunc_stans} %setup -q -n %{name}-%{version}%{?prerel} -T -D -b 3 %endif cp %{SOURCE2} README.devel @@ -204,7 +200,7 @@ cp %{SOURCE2} README.devel sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!%{__python3}|' ldap/admin/src/scripts/*.py %build -%if 0%{?use_nunc_stans:1} +%if %{use_nunc_stans} pushd ../nunc-stans-%{nunc_stans_ver} %configure --with-fhs --libdir=%{_libdir}/%{pkgname} make %{?_smp_mflags} @@ -238,7 +234,7 @@ make %{?_smp_mflags} %install -%if 0%{?use_nunc_stans:1} +%if %{use_nunc_stans} pushd ../nunc-stans-%{nunc_stans_ver} make DESTDIR="$RPM_BUILD_ROOT" install rm -rf $RPM_BUILD_ROOT%{_includedir} $RPM_BUILD_ROOT%{_datadir} \ @@ -278,6 +274,27 @@ ninst=0 # number of instances found in total if [ -n "$DEBUGPOSTTRANS" ] ; then output=$DEBUGPOSTTRANS fi + +has_dirsrv=`/usr/bin/egrep -i "^dirsrv\>" /etc/passwd` || : +if [ "$has_dirsrv" = "" ]; then + dirsrv_uid=389 + while [ "`getent passwd | awk -F: '{print $3}' | grep $dirsrv_uid`" != "" ]; do + dirsrv_uid=`expr $dirsrv_uid + 1` + done + echo "User dirsrv does not exist, create it with uid %dirsrv_uid." >> $output 2>&1 || : + /usr/sbin/useradd -c "389-ds-base" -u $dirsrv_uid \ + -s /sbin/nologin -r -d /usr/share/dirsrv dirsrv 2> /dev/null || : +fi +has_dirsrv=`/usr/bin/egrep -i "^dirsrv\>" /etc/group` || : +if [ "$has_dirsrv" = "" ]; then + dirsrv_gid=389 + while [ "`getent group | grep $dirsrv_gid`" != "" ]; do + dirsrv_gid=`expr $dirsrv_gid + 1` + done + echo "Group dirsrv does not exist, create it with uid %dirsrv_gid." >> $output 2>&1 || : + /usr/sbin/groupadd -g $dirsrv_gid -r dirsrv 2> /dev/null || : +fi + echo looking for services in %{_sysconfdir}/systemd/system/%{groupname}.wants/* >> $output 2>&1 || : for service in %{_sysconfdir}/systemd/system/%{groupname}.wants/* ; do if [ ! -f "$service" ] ; then continue ; fi # in case nothing matches @@ -366,7 +383,7 @@ fi %doc LICENSE LICENSE.GPLv3+ LICENSE.openssl README.devel %{_includedir}/%{pkgname} %{_libdir}/%{pkgname}/libslapd.so -%if 0%{?use_nunc_stans:1} +%if %{use_nunc_stans} %{_libdir}/%{pkgname}/libnunc-stans.so %endif %{_libdir}/pkgconfig/* @@ -377,11 +394,37 @@ fi %dir %{_libdir}/%{pkgname} %{_libdir}/%{pkgname}/libslapd.so.* %{_libdir}/%{pkgname}/libns-dshttpd.so* -%if 0%{?use_nunc_stans:1} +%if %{use_nunc_stans} %{_libdir}/%{pkgname}/libnunc-stans.so* %endif %changelog +* Mon Apr 11 2016 Noriko Hosoi - 1.3.5.1-3 +- Release 1.3.5.1-3 +- Fixed the %if expression for use_nunc_stans. +- Removed %if %{use_nunc_stans} from Source3 as well as from nunc_stans_ver. + +* Mon Mar 28 2016 Noriko Hosoi - 1.3.5.1-2 +- Release 1.3.5.1-2 +- Fixed License to GPLv3+ +- Generate a user dirsrv in the package install. + +* Wed Mar 23 2016 Noriko Hosoi - 1.3.5.1-1 +- Release 1.3.5.1-1 +- Ticket 47982 - improve timestamp resolution in logs +- Ticket 48759 - no plugin calls in tombstone purging +- Ticket 48665 - Prevent sefault in ldbm_instance_modify_config_entry +- Ticket 48757 - License tag does not match actual license of code +- Ticket 48746 - Crash when indexing an attribute with a matching rule +- Ticket 48497 - extended search without MR indexed attribute prevents later indexing with that MR +- Ticket 48368 - Resolve the py.test conflicts with the create_test.py issue +- Ticket 48748 - Fix memory_leaks test suite teardown failure +- Ticket 48383 - import tasks with dynamic buffer sizes +- Ticket 48420 - change severity of some messages related to "keep alive" entries +- Ticket 48386 - Clean up dsktune code +- Ticket 48537 - undefined reference to `abstraction_increment' +- Ticket 48747 - dirsrv service fails to start when nsslapd-listenhost is configured + * Tue Feb 23 2016 Noriko Hosoi - 1.3.5.0-1 - Release 1.3.5.0 - nunc-stans - bump version to 0.1.8