rpms/389-ds-base/EL-4 .cvsignore, 1.11, 1.12 389-ds-base-git-local.sh, 1.8, 1.9 389-ds-base-git.sh, 1.9, 1.10 389-ds-base.spec, 1.17, 1.18 sources, 1.13, 1.14

Richard Allen Megginson rmeggins at fedoraproject.org
Wed May 26 21:39:35 UTC 2010


Author: rmeggins

Update of /cvs/extras/rpms/389-ds-base/EL-4
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv28844/EL-4

Modified Files:
	.cvsignore 389-ds-base-git-local.sh 389-ds-base-git.sh 
	389-ds-base.spec sources 
Log Message:
this is the 1.2.6.a4 release


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/389-ds-base/EL-4/.cvsignore,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- .cvsignore	15 Apr 2010 18:09:57 -0000	1.11
+++ .cvsignore	26 May 2010 21:39:34 -0000	1.12
@@ -1 +1 @@
-389-ds-base-1.2.6.a3.tar.bz2
+389-ds-base-1.2.6.a4.tar.bz2


Index: 389-ds-base-git-local.sh
===================================================================
RCS file: /cvs/extras/rpms/389-ds-base/EL-4/389-ds-base-git-local.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- 389-ds-base-git-local.sh	10 Apr 2010 02:00:53 -0000	1.8
+++ 389-ds-base-git-local.sh	26 May 2010 21:39:35 -0000	1.9
@@ -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


Index: 389-ds-base-git.sh
===================================================================
RCS file: /cvs/extras/rpms/389-ds-base/EL-4/389-ds-base-git.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- 389-ds-base-git.sh	10 Apr 2010 02:00:54 -0000	1.9
+++ 389-ds-base-git.sh	26 May 2010 21:39:35 -0000	1.10
@@ -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"


Index: 389-ds-base.spec
===================================================================
RCS file: /cvs/extras/rpms/389-ds-base/EL-4/389-ds-base.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- 389-ds-base.spec	7 Apr 2010 23:39:21 -0000	1.17
+++ 389-ds-base.spec	26 May 2010 21:39:35 -0000	1.18
@@ -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 <
 %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/p
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%pre -p <lua>
--- 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 <lua>
-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 <lua>
--- 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 <rmeggins at redhat.com> - 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 <nkinder at redhat.com> - 1.2.6-0.3.a3
 - 1.2.6.a3 release
 - add managed entries plug-in


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/389-ds-base/EL-4/sources,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- sources	15 Apr 2010 18:09:57 -0000	1.13
+++ sources	26 May 2010 21:39:35 -0000	1.14
@@ -1 +1 @@
-8ebd9659167fbfbc514e5abf552901c0  389-ds-base-1.2.6.a3.tar.bz2
+bc996a7ec8e7fff2266172c9ecb1883a  389-ds-base-1.2.6.a4.tar.bz2



More information about the scm-commits mailing list