X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=Zope.spec;h=ad400b482cdac94d9ff26b763b3fcc5c3c1a7566;hb=4b0670eec5aaf8e4c709f18ea2db196b59ae6f6d;hp=759d52f7db3dc9763f871d009424887a64795232;hpb=c0bf69bc1c2c1504afc0bbc80e8c1b5fff4b68cc;p=packages%2FZope.git diff --git a/Zope.spec b/Zope.spec index 759d52f..ad400b4 100644 --- a/Zope.spec +++ b/Zope.spec @@ -1,4 +1,3 @@ -%include /usr/lib/rpm/macros.python # TODO: # - check why initgroups() crashes on AMD64 and something, better than @@ -12,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.1 -%define sub_ver b1 -Release: 0.%{sub_ver}.1 +Version: 2.7.3 +# %%define sub_ver b2 +Release: 1 License: Zope Public License (ZPL) Group: Networking/Daemons -Source0: http://www.zope.org/Products/%{name}/%{version}%{sub_ver}/%{name}-%{version}-%{sub_ver}.tgz -# Source0-md5: eb00f3f31fa382471e65ec4e76f61bd3 +Source0: http://www.zope.org/Products/%{name}/%{version}/%{name}-%{version}-0.tgz +# Source0-md5: 15001ab6d429dc80b1f49735e8d2ee10 Source1: %{name}.init Source2: %{name}.sysconfig Source3: %{name}.logrotate @@ -31,16 +30,18 @@ Patch0: %{name}-default_config.patch Patch1: %{name}-instance_paths.patch Patch2: %{name}-pld_makefile_fix.patch Patch3: %{name}-no_initgroups.patch +Patch4: %{name}-xhtml_unicode_fix.patch URL: http://www.zope.org/ -BuildRequires: python-devel >= 2.3.3 +BuildRequires: python-devel >= 1: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 @@ -48,7 +49,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 @@ -86,13 +91,14 @@ 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 +%patch4 -p1 %build perl -pi -e "s|data_dir\s+=\s+.*?join\(INSTANCE_HOME, 'var'\)|data_dir=INSTANCE_HOME|" lib/python/Globals.py @@ -143,13 +149,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 @@ -166,13 +182,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 @@ -180,7 +196,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 @@ -198,10 +214,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 @@ -219,7 +233,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