]> git.pld-linux.org Git - packages/Zope.git/blobdiff - Zope.spec
- added macros in /etc/logrotate.d
[packages/Zope.git] / Zope.spec
index d0da68c690f839144edd1ef1632ee5f3d9e232af..d3368cca37f121db24f45957ff88bdba82331a43 100644 (file)
--- a/Zope.spec
+++ b/Zope.spec
@@ -1,6 +1,7 @@
-%include        /usr/lib/rpm/macros.python
 
 # TODO:
+# - check why initgroups() crashes on AMD64 and something, better than
+#   disabling initgroups() completely, with that
 # - no/more secure initial user/password settings (currently: zope/zope)
 # - ZEO support (mkzeoinstance is not tested and probably doesn't work)
 # - perl support?
@@ -10,13 +11,13 @@ Summary(es):        Un servidor de aplicaciones y un conjunto de herramientas para la c
 Summary(pl):   Serwer aplikacji i toolkit portalowy do tworzenia serwisów WWW
 Summary(pt_BR):        Um servidor de aplicações e um conjunto de ferramentas para construção de sites Web
 Name:          Zope
-Version:       2.7.0
-%define                sub_ver b4
-Release:       3.%{sub_ver}.1
+Version:       2.7.2
+# %%define             sub_ver b2
+Release:       3
 License:       Zope Public License (ZPL)
 Group:         Networking/Daemons
-Source0:       http://www.zope.org/Products/%{name}/%{version}%{sub_ver}/%{version}%{sub_ver}/%{name}-%{version}-%{sub_ver}.tgz
-# Source0-md5: 97f5ec08f943de8e933936c05368af0d
+Source0:       http://www.zope.org/Products/%{name}/%{version}/%{name}-%{version}-0.tgz
+# Source0-md5: 08b3c4a119aa1ded2e7b1b3d5bc45425
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}.logrotate
@@ -28,16 +29,18 @@ Source8:    %{name}-installzopeproduct
 Patch0:                %{name}-default_config.patch
 Patch1:                %{name}-instance_paths.patch
 Patch2:                %{name}-pld_makefile_fix.patch
+Patch3:                %{name}-no_initgroups.patch
 URL:           http://www.zope.org/
 BuildRequires: python-devel >= 2.3.3
 BuildRequires: perl-base
+BuildRequires: rpmbuild(macros) >= 1.159
 PreReq:                rc-scripts
-Requires(pre): /usr/bin/getgid
 Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires(postun):      /usr/sbin/userdel
 Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
 Requires(post,preun):  /sbin/chkconfig
 Requires:      logrotate
 Requires:      python >= 2.3.3
@@ -45,7 +48,11 @@ Requires:    python-modules >= 2.3.3
 Requires:      python-libs >= 2.3.3
 Requires:      expat >= 1.95.7
 Requires:      python-PyXML >= 0.8.3
-%pyrequires_eq  python
+%pyrequires_eq python
+Provides:      group(zope)
+Provides:      user(zope)
+Obsoletes:     Zope-Hotfix = 040713
+Obsoletes:     Zope-Hotfix = 040714
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                zope_dir /usr/lib/zope
@@ -83,22 +90,25 @@ eles ao inv
 
 %prep
 
-%setup -q -n %{name}-%{version}-%{sub_ver}
+%setup -q -n %{name}-%{version}-0
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%ifarch amd64 alpha
+%patch3 -p1
+%endif
 
 %build
 perl -pi -e "s|data_dir\s+=\s+.*?join\(INSTANCE_HOME, 'var'\)|data_dir=INSTANCE_HOME|" lib/python/Globals.py
 
 ./configure \
-       --prefix=%{zope_dir}
+       --prefix=%{zope_dir} \
+       --optimize
 #      --with-python=/usr/bin/python
 
 %{__make}
 
 perl -pi -e "s|data_dir\s+=\s+.*?join\(INSTANCE_HOME, 'var'\)|data_dir=INSTANCE_HOME|" lib/python/Globals.py
-# python wo_pcgi.py
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -137,13 +147,23 @@ touch $RPM_BUILD_ROOT/var/log/zope/main/Z2.log
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -z "`getgid zope`" ]; then
-       echo "Making group zope"
-       /usr/sbin/groupadd -r -f zope
+if [ -n "`/usr/bin/getgid zope`" ]; then
+       if [ "`/usr/bin/getgid zope`" != "112" ]; then
+               echo "Error: group zope doesn't have gid=112. Correct this before installing zope." 1>&2
+               exit 1
+       fi
+else
+       echo "Making group zope"
+       /usr/sbin/groupadd -g 112 zope
 fi
-if [ -z "`id -u zope 2>/dev/null`" ]; then
-       echo "Making user zope"
-       /usr/sbin/useradd -r -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope
+if [ -n "`/bin/id -u zope 2>/dev/null`" ]; then
+       if [ "`/bin/id -u zope`" != "112" ]; then
+               echo "Error: user zope doesn't have uid=112. Correct this before installing zope." 1>&2
+               exit 1
+       fi
+else
+       echo "Making user zope"
+       /usr/sbin/useradd -u 112 -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope
 fi
 
 %post
@@ -160,13 +180,13 @@ for dir in /var/lib/zope/main /var/lib/zope ; do
        if [ -f $dir/Data.fs ]; then
                echo "Found the database in old location. Migrating..."
                if [ -f /var/lock/subsys/zope ]; then
-                   /etc/rc.d/init.d/zope stop >&2
-                   was_stopped=1
+                       /etc/rc.d/init.d/zope stop >&2
+                       was_stopped=1
                fi
                umask 022
                [ -d /var/lib/zope/main ] && cd $dir && mv -f Data* /var/lib/zope/main/var 2>/dev/null
                if [ "x$was_stopped" = "x1" ]; then
-                   /etc/rc.d/init.d/zope start >&2
+                       /etc/rc.d/init.d/zope start >&2
                fi
                echo "Migration completed (new db location is /var/lib/zope/main/var)"
                break
@@ -174,7 +194,7 @@ for dir in /var/lib/zope/main /var/lib/zope ; do
 done
 if [ -f /var/lock/subsys/zope ]; then
        if [ "x$was_stopped" != "x1" ]; then
-           /etc/rc.d/init.d/zope restart >&2
+               /etc/rc.d/init.d/zope restart >&2
        fi
 else
        echo "look at /etc/zope/main/zope.conf" >&2
@@ -192,10 +212,8 @@ fi
 
 %postun
 if [ "$1" = "0" ] ; then
-       echo "Removing user zope"
-       /usr/sbin/userdel zope >/dev/null 2>&1 || :
-       echo "Removing group zope"
-       /usr/sbin/groupdel zope >/dev/null 2>&1 || :
+       %userremove zope
+       %groupremove zope
 fi
 
 %files
@@ -213,7 +231,7 @@ fi
 %attr(640,root,root) %dir /etc/zope/skel
 %attr(640,root,root) %dir /etc/zope/main
 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/zope/skel/*
-%attr(640,root,root) /etc/logrotate.d/zope
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/zope
 %attr(640,root,root) /etc/sysconfig/zope
 %ghost /var/log/zope/main/event.log
 %ghost /var/log/zope/main/Z2.log
This page took 0.044785 seconds and 4 git commands to generate.