From 0320201ca0931576823b02cf1d3c6ea1a271f6c3 Mon Sep 17 00:00:00 2001 From: Richard Allen Megginson Date: May 26 2010 21:39:35 +0000 Subject: this is the 1.2.6.a4 release --- diff --git a/.cvsignore b/.cvsignore index 74b680f..0c3276f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -389-ds-base-1.2.6.a3.tar.bz2 +389-ds-base-1.2.6.a4.tar.bz2 diff --git a/389-ds-base-git-local.sh b/389-ds-base-git-local.sh index 250ed11..2b9f29a 100644 --- a/389-ds-base-git-local.sh +++ b/389-ds-base-git-local.sh @@ -2,7 +2,7 @@ DATE=`date +%Y%m%d` # use a real tag name here -VERSION=1.2.6.a3 +VERSION=1.2.6.a4 PKGNAME=389-ds-base TAG=${TAG:-$PKGNAME-$VERSION} #SRCNAME=$PKGNAME-$VERSION-$DATE diff --git a/389-ds-base-git.sh b/389-ds-base-git.sh index caecec9..8c52537 100644 --- a/389-ds-base-git.sh +++ b/389-ds-base-git.sh @@ -2,7 +2,7 @@ DATE=`date +%Y%m%d` # use a real tag name here -VERSION=1.2.6.a3 +VERSION=1.2.6.a4 PKGNAME=389-ds-base TAG=${TAG:-$PKGNAME-$VERSION} URL="http://git.fedorahosted.org/git/?p=389/ds.git;a=snapshot;h=$TAG;sf=tgz" diff --git a/389-ds-base.spec b/389-ds-base.spec index 944a466..f17d082 100644 --- a/389-ds-base.spec +++ b/389-ds-base.spec @@ -1,14 +1,14 @@ %global pkgname dirsrv # for a pre-release, define the prerel field e.g. .a1 .rc2 - comment out for official release -%global prerel .a3 +%global prerel .a4 # also need the relprefix field for a pre-release e.g. .0 - also comment out for official release %global relprefix 0. Summary: 389 Directory Server (base) Name: 389-ds-base Version: 1.2.6 -Release: %{?relprefix}3%{?prerel}%{?dist} +Release: %{?relprefix}4%{?prerel}%{?dist} License: GPLv2 with exceptions URL: http://port389.org/ Group: System Environment/Daemons @@ -84,12 +84,19 @@ Obsoletes: fedora-ds-base-devel < 1.2.1-1 %description devel Development Libraries and headers for the 389 Directory Server base package. +%package selinux-devel +Summary: Development interface for 389 Directory Server base SELinux policy +Group: Development/Libraries + +%description selinux-devel +SELinux policy interface for the 389 Directory Server base package. + %prep %setup -q -n %{name}-%{version}%{?prerel} cp %{SOURCE2} README.devel %build -%configure --enable-autobind +%configure --enable-autobind --with-selinux # Generate symbolic info for debuggers export XCFLAGS=$RPM_OPT_FLAGS @@ -127,57 +134,23 @@ sed -i -e 's|#{{PERL-EXEC}}|#!/usr/bin/perl|' $RPM_BUILD_ROOT%{_datadir}/%{pkgna %clean rm -rf $RPM_BUILD_ROOT -%pre -p --- see if fedora-ds-base exists - if so, save the run level configuration --- and set a flag that tells us to restore that config in %posttrans --- and restart the server --- we can get rid of this code once Fedora 11 becomes obsolete -rc = os.execute('rpm --quiet -q fedora-ds-base') -if rc == 0 then - %{pkgname}_exists = true - %{pkgname}_savelinks = {} - for dir in posix.files("%{_sysconfdir}/rc.d") do - if string.find(dir, "rc%d.d") then --- print("looking in %{_sysconfdir}/rc.d/"..dir) - for link in posix.files("%{_sysconfdir}/rc.d/"..dir) do - if string.find(link, "[SK]%d%d%{pkgname}") then - fullname = "%{_sysconfdir}/rc.d/"..dir.."/"..link - linked = posix.readlink(fullname) --- print(fullname.." is linked to "..linked) - %{pkgname}_savelinks[fullname] = linked - end - end - end - end -end - -%post -p -os.execute('/sbin/chkconfig --add %{pkgname}') -os.execute('/sbin/ldconfig') -os.execute('/sbin/chkconfig --add %{pkgname}-snmp') --- this has been problematic - if this directory --- does not exist, the server will silently fail to --- start - however, if the user has already created --- it, we don't want to overwrite the permissions --- on it - so we can't list it explicitly in the --- files section - we list it as a ghost so that --- it will be removed when the rpm is removed -if not posix.access("%{_localstatedir}/run/%{pkgname}") then - posix.mkdir("%{_localstatedir}/run/%{pkgname}") -end --- since posttrans is not passed the upgrade status, we get --- it here -if (arg[2] > 1) or %{pkgname}_exists then --- print("in %{pkgname} post - upgrading") - %{pkgname}_upgrading = true -else --- print("in %{pkgname} post - installing") - %{pkgname}_upgrading = false -end - +%post +/sbin/chkconfig --add %{pkgname} +/sbin/ldconfig +/sbin/chkconfig --add %{pkgname}-snmp +# this has been problematic - if this directory +# does not exist, the server will silently fail to +# start - however, if the user has already created +# it, we don't want to overwrite the permissions +# on it - so we can't list it explicitly in the +# files section - we list it as a ghost so that +# it will be removed when the rpm is removed +if [ ! -d "%{_localstatedir}/run/%{pkgname}" ] ; then + mkdir -p "%{_localstatedir}/run/%{pkgname}" +fi %preun -if [ $1 = 0 ]; then +if [ $1 = 0 ]; then # Final removal /sbin/service %{pkgname} stop >/dev/null 2>&1 || : /sbin/chkconfig --del %{pkgname} /sbin/service %{pkgname}-snmp stop >/dev/null 2>&1 || : @@ -186,53 +159,41 @@ fi %postun -p /sbin/ldconfig -%posttrans -p --- if we saved the run level configuration in %pre, restore it now --- we can get rid of this code once Fedora 11 becomes obsolete -if %{pkgname}_savelinks then - for fullpath,link in pairs(%{pkgname}_savelinks) do - posix.symlink(link,fullpath) --- print("posttrans - restored run level "..fullpath.." to "..link) - end -end -if %{pkgname}_upgrading then - instbase = "%{_sysconfdir}/%{pkgname}" --- print("posttrans - upgrading - looking for instances in "..instbase) --- find all instances - instances = {} -- instances that require a restart after upgrade - for dir in posix.files(instbase) do --- print("dir="..dir) - if string.find(dir,"^slapd-") and not string.find(dir,"\.removed$") then - inst = string.gsub(dir,"^slapd[-]", "") --- print("found instance "..inst.." getting status") - rc = os.execute('/sbin/service %{pkgname} status '..inst..' >/dev/null 2>&1') --- if instance is running, we must restart it after upgrade - if rc == 0 then - instances[inst] = inst --- print("instance "..inst.." is running") --- else --- print("instance "..inst.." is shutdown") - end - end - end --- shutdown all instances --- print("shutting down all instances . . .") - os.execute('/sbin/service %{pkgname} stop > /dev/null 2>&1') --- do the upgrade --- print("upgrading instances . . .") - os.execute('%{_sbindir}/setup-ds.pl -l /dev/null -u -s General.UpdateMode=offline > /dev/null 2>&1') --- restart instances that require it - for inst,dummy in pairs(instances) do --- print("restarting instance "..inst) - os.execute('/sbin/service %{pkgname} start '..inst..' >/dev/null 2>&1') - end -end --- if we upgraded from fedora to 389, the upgrade will shutdown --- all old running instances, so we have to start them here -if %{pkgname}_exists then --- print("restarting all instances due to package rename") - os.execute('/sbin/service %{pkgname} start >/dev/null 2>&1') -end +%posttrans +if [ $1 -gt 0 ] ; then + instbase="%{_sysconfdir}/%{pkgname}" +# echo posttrans - upgrading - looking for instances in $instbase +# find all instances + instances="" + for dir in $instbase/slapd-* ; do + case "$dir" in + *.removed) continue ;; + esac + if [ ! -d "$dir" ] ; then + continue; + fi + inst=${dir#slapd-} +# echo found instance $inst getting status + if /sbin/service %{pkgname} status $inst >/dev/null 2>&1 ; then +# if instance is running, we must restart it after upgrade + instances="$instances $inst" +# echo instance $inst is running +# else +# echo instance $inst is shutdown + fi + done +# shutdown all instances +# echo shutting down all instances . . . + /sbin/service %{pkgname} stop > /dev/null 2>&1 +# do the upgrade +# echo upgrading instances . . . + %{_sbindir}/setup-ds.pl -l /dev/null -u -s General.UpdateMode=offline > /dev/null 2>&1 +# restart instances that require it + for inst in $instances ; do +# echo restarting instance $inst + /sbin/service %{pkgname} start '..inst..' >/dev/null 2>&1 + done +fi %files @@ -271,6 +232,10 @@ end %changelog +* Wed May 26 2010 Rich Megginson - 1.2.6-0.4.a4 +- 1.2.6.a4 release +- replace lua code with shell scripts where possible, otherwise, just removed it + * Tue Apr 6 2010 Nathan Kinder - 1.2.6-0.3.a3 - 1.2.6.a3 release - add managed entries plug-in diff --git a/sources b/sources index f578c7b..da7280d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8ebd9659167fbfbc514e5abf552901c0 389-ds-base-1.2.6.a3.tar.bz2 +bc996a7ec8e7fff2266172c9ecb1883a 389-ds-base-1.2.6.a4.tar.bz2