Author: thl
Update of /cvs/free/rpms/compat-zope/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv21137
Modified Files:
.cvsignore sources
Added Files:
compat-zope.spec compat-zope.spec~ zope-2.10.4-config.patch
zope-README.Fedora zope.init.in zope.logrotate.cron.in
zope.logrotate.in zope.sysconfig.in zope.zopectl.in
Log Message:
initial import from livna
--- NEW FILE compat-zope.spec ---
%define python_minver 2.4.3
%define compat_python %{_bindir}/python2.4
%{!?python_sitearch: %define python_sitearch %(%{compat_python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define zope_user zope
%define zope_group %{zope_user}
%define zope_home %{_libdir}/zope
%define software_home %{zope_home}/lib/python
%define instance_home %{_localstatedir}/lib/zope
%define zopectl %{_bindir}/zopectl
%define runzope %{_bindir}/runzope
Name: compat-zope
Summary: Web application server for flexible content management applications
Version: 2.10.6
Release: 2%{?dist}
License: ZPL
Group: System Environment/Daemons
URL:
http://www.zope.org/
Source0:
http://www.zope.org/Products/Zope/%{version}/Zope-%{version}-final.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source1: zope.init.in
Source2: zope.sysconfig.in
Source3: zope.zopectl.in
Source4: zope-README.Fedora
Source5: zope.logrotate.in
Source6: zope.logrotate.cron.in
Patch0: zope-2.10.4-config.patch
BuildRequires: compat-python24-devel >= %{python_minver}
BuildRequires: compat-python24 >= %{python_minver}
Requires: compat-python24 >= %{python_minver}, compat-python24-elementtree
Requires: compat-python24-libxml2
Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig, /sbin/service
%description
Zope is an application server framework that enables developers to quickly
build web applications such as intranets, portals, and content management
systems.
Zope, by default, will listen on port 8080.
%prep
%setup -q -n Zope-%{version}-final
%patch0 -p0
chmod -x skel/import/README.txt
install -pm 644 %{SOURCE4} README.Fedora
install -pm 644 %{SOURCE5} skel/etc/logrotate.conf.in
%build
rm -rf $RPM_BUILD_ROOT # Configure checks for it
./configure \
--prefix=$RPM_BUILD_ROOT%{zope_home} \
--with-python=%{compat_python}
# --no-compile
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
# Create all required additional directories
for dir in %{zope_home} %{software_home} %{instance_home}/{Products,bin,var} \
%{_sysconfdir}/sysconfig %{_bindir}; do
install -d $RPM_BUILD_ROOT$dir
done
install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/zope
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zope
install -D -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/zopectl
install -D -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/zope-logrotate
perl -pi -e 's,<<SYSCONFDIR>>,%{_sysconfdir},g;
s,<<BINDIR>>,%{_bindir},g;
s,<<LOCALSTATEDIR>>,%{_localstatedir},g;
s,<<ZOPE_USER>>,%{zope_user},g' \
$RPM_BUILD_ROOT%{_initrddir}/zope \
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zope \
$RPM_BUILD_ROOT%{_bindir}/zopectl \
$RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/zope-logrotate \
README.Fedora skel/etc/zope.conf.in
# Install the skel, translating paths, into the build root
%{compat_python} "utilities/copyzopeskel.py" \
--sourcedir="skel" \
--targetdir="$RPM_BUILD_ROOT%{instance_home}" \
--replace="INSTANCE_HOME:%{instance_home}" \
--replace="SOFTWARE_HOME:%{software_home}" \
--replace="ZOPE_HOME:%{zope_home}" \
--replace="PYTHON:%{compat_python}" \
# Actually copy all the other files over
make install
chmod 750 $RPM_BUILD_ROOT%{instance_home}
# Fix permissions, must have changed in the upstream tar
chmod 755 $RPM_BUILD_ROOT%{instance_home}/bin/zopectl
chmod 755 $RPM_BUILD_ROOT%{instance_home}/bin/runzope
# Set needed permissions
# We might go as far as to only allow zope r/w to the .pyc files
for dir in %{instance_home}/{Products,log,lib,var}; do
chmod 775 $RPM_BUILD_ROOT$dir
done
chmod 755 $RPM_BUILD_ROOT%{zope_home}
# included in %%doc
rm -rf $RPM_BUILD_ROOT%{zope_home}/doc
# write version.txt
echo "Zope %{version}-%{release}" > \
"$RPM_BUILD_ROOT%{software_home}/version.txt"
# write zope.pth
install -d $RPM_BUILD_ROOT%{python_sitearch}
echo "%{software_home}" > \
"$RPM_BUILD_ROOT%{python_sitearch}/zope.pth"
# Compile .pyc
%{compat_python} -c "import compileall; \
compileall.compile_dir(\"$RPM_BUILD_ROOT%{zope_home}\", \
ddir=\"%{zope_home}\", force=1)"
%clean
rm -rf $RPM_BUILD_ROOT
%pre
%{_sbindir}/useradd -c "Zope user" -s /bin/false -r -d %{zope_home} \
%{zope_user} 2>/dev/null || :
%post
# add zope init to runlevels
/sbin/chkconfig --add zope
%preun
if [ $1 -eq 0 ]; then
/sbin/service zope stop >/dev/null 2>&1
/sbin/chkconfig --del zope
fi
%files
%defattr(-, root, root, -)
%doc doc/* README.Fedora ZopePublicLicense.txt
%config(noreplace) %{_sysconfdir}/sysconfig/zope
%config %{_initrddir}/zope
%config %{_sysconfdir}/cron.daily/zope-logrotate
%attr(0755, root, root) %{_bindir}/zopectl
%dir %{zope_home}
%{zope_home}/bin
%{zope_home}/lib
%dir %{zope_home}/skel
%{zope_home}/skel/bin
%{zope_home}/skel/Extensions
%{zope_home}/skel/import
%{zope_home}/skel/log
%{zope_home}/skel/lib
%{zope_home}/skel/Products
%{zope_home}/skel/README.txt
%{zope_home}/skel/var
%config %{zope_home}/skel/etc
%attr(-, root, %{zope_group}) %{instance_home}/*
%{python_sitearch}/zope.pth
%changelog
* Sun Aug 10 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 2.10.6-2
- rebuild for RPM Fusion
* Sun Jul 27 2008 Jonathan Steffan <jon a fedoraunity.org> 2.10.6-1
- Update to 2.10.6
* Sat Dec 1 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.5-3
- Update permissions for runtime compliation of translations
* Thu Nov 8 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.5-2
- Update permissions for zopectl and runzope
* Thu Nov 8 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.5-1
- Update to 2.10.5
- Fix initscript
- Fix permissions
* Mon Sep 3 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.4-3
- Updated Requires for libxml2-python24 and
compat-python24-elementtree
* Tue Aug 14 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.4-2
- Added config patch
* Wed Aug 1 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.4-1
- Initial Package
--- NEW FILE compat-zope.spec~ ---
%define python_minver 2.4.3
%define compat_python %{_bindir}/python2.4
%{!?python_sitearch: %define python_sitearch %(%{compat_python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define zope_user zope
%define zope_group %{zope_user}
%define zope_home %{_libdir}/zope
%define software_home %{zope_home}/lib/python
%define instance_home %{_localstatedir}/lib/zope
%define zopectl %{_bindir}/zopectl
%define runzope %{_bindir}/runzope
Name: compat-zope
Summary: Web application server for flexible content management applications
Version: 2.10.6
Release: 1%{?dist}
License: ZPL
Group: System Environment/Daemons
URL:
http://www.zope.org/
Source0:
http://www.zope.org/Products/Zope/%{version}/Zope-%{version}-final.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source1: zope.init.in
Source2: zope.sysconfig.in
Source3: zope.zopectl.in
Source4: zope-README.Fedora
Source5: zope.logrotate.in
Source6: zope.logrotate.cron.in
Patch0: zope-2.10.4-config.patch
BuildRequires: compat-python24-devel >= %{python_minver}
BuildRequires: compat-python24 >= %{python_minver}
Requires: compat-python24 >= %{python_minver}, compat-python24-elementtree
Requires: compat-python24-libxml2
Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig, /sbin/service
%description
Zope is an application server framework that enables developers to quickly
build web applications such as intranets, portals, and content management
systems.
Zope, by default, will listen on port 8080.
%prep
%setup -q -n Zope-%{version}-final
%patch0 -p0
chmod -x skel/import/README.txt
install -pm 644 %{SOURCE4} README.Fedora
install -pm 644 %{SOURCE5} skel/etc/logrotate.conf.in
%build
rm -rf $RPM_BUILD_ROOT # Configure checks for it
./configure \
--prefix=$RPM_BUILD_ROOT%{zope_home} \
--with-python=%{compat_python}
# --no-compile
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
# Create all required additional directories
for dir in %{zope_home} %{software_home} %{instance_home}/{Products,bin,var} \
%{_sysconfdir}/sysconfig %{_bindir}; do
install -d $RPM_BUILD_ROOT$dir
done
install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/zope
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zope
install -D -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/zopectl
install -D -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/zope-logrotate
perl -pi -e 's,<<SYSCONFDIR>>,%{_sysconfdir},g;
s,<<BINDIR>>,%{_bindir},g;
s,<<LOCALSTATEDIR>>,%{_localstatedir},g;
s,<<ZOPE_USER>>,%{zope_user},g' \
$RPM_BUILD_ROOT%{_initrddir}/zope \
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zope \
$RPM_BUILD_ROOT%{_bindir}/zopectl \
$RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/zope-logrotate \
README.Fedora skel/etc/zope.conf.in
# Install the skel, translating paths, into the build root
%{compat_python} "utilities/copyzopeskel.py" \
--sourcedir="skel" \
--targetdir="$RPM_BUILD_ROOT%{instance_home}" \
--replace="INSTANCE_HOME:%{instance_home}" \
--replace="SOFTWARE_HOME:%{software_home}" \
--replace="ZOPE_HOME:%{zope_home}" \
--replace="PYTHON:%{compat_python}" \
# Actually copy all the other files over
make install
chmod 750 $RPM_BUILD_ROOT%{instance_home}
# Fix permissions, must have changed in the upstream tar
chmod 755 $RPM_BUILD_ROOT%{instance_home}/bin/zopectl
chmod 755 $RPM_BUILD_ROOT%{instance_home}/bin/runzope
# Set needed permissions
# We might go as far as to only allow zope r/w to the .pyc files
for dir in %{instance_home}/{Products,log,lib,var}; do
chmod 775 $RPM_BUILD_ROOT$dir
done
chmod 755 $RPM_BUILD_ROOT%{zope_home}
# included in %%doc
rm -rf $RPM_BUILD_ROOT%{zope_home}/doc
# write version.txt
echo "Zope %{version}-%{release}" > \
"$RPM_BUILD_ROOT%{software_home}/version.txt"
# write zope.pth
install -d $RPM_BUILD_ROOT%{python_sitearch}
echo "%{software_home}" > \
"$RPM_BUILD_ROOT%{python_sitearch}/zope.pth"
# Compile .pyc
%{compat_python} -c "import compileall; \
compileall.compile_dir(\"$RPM_BUILD_ROOT%{zope_home}\", \
ddir=\"%{zope_home}\", force=1)"
%clean
rm -rf $RPM_BUILD_ROOT
%pre
%{_sbindir}/useradd -c "Zope user" -s /bin/false -r -d %{zope_home} \
%{zope_user} 2>/dev/null || :
%post
# add zope init to runlevels
/sbin/chkconfig --add zope
%preun
if [ $1 -eq 0 ]; then
/sbin/service zope stop >/dev/null 2>&1
/sbin/chkconfig --del zope
fi
%files
%defattr(-, root, root, -)
%doc doc/* README.Fedora ZopePublicLicense.txt
%config(noreplace) %{_sysconfdir}/sysconfig/zope
%config %{_initrddir}/zope
%config %{_sysconfdir}/cron.daily/zope-logrotate
%attr(0755, root, root) %{_bindir}/zopectl
%dir %{zope_home}
%{zope_home}/bin
%{zope_home}/lib
%dir %{zope_home}/skel
%{zope_home}/skel/bin
%{zope_home}/skel/Extensions
%{zope_home}/skel/import
%{zope_home}/skel/log
%{zope_home}/skel/lib
%{zope_home}/skel/Products
%{zope_home}/skel/README.txt
%{zope_home}/skel/var
%config %{zope_home}/skel/etc
%attr(-, root, %{zope_group}) %{instance_home}/*
%{python_sitearch}/zope.pth
%changelog
* Sun Jul 27 2008 Jonathan Steffan <jon a fedoraunity.org> 2.10.6-1
- Update to 2.10.6
* Sat Dec 1 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.5-3
- Update permissions for runtime compliation of translations
* Thu Nov 8 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.5-2
- Update permissions for zopectl and runzope
* Thu Nov 8 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.5-1
- Update to 2.10.5
- Fix initscript
- Fix permissions
* Mon Sep 3 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.4-3
- Updated Requires for libxml2-python24 and
compat-python24-elementtree
* Tue Aug 14 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.4-2
- Added config patch
* Wed Aug 1 2007 Jonathan Steffan <jon a fedoraunity.org> 2.10.4-1
- Initial Package
zope-2.10.4-config.patch:
--- NEW FILE zope-2.10.4-config.patch ---
--- skel/etc/zope.conf.in.orig 2007-08-14 00:14:05.000000000 -0600
+++ skel/etc/zope.conf.in 2007-08-14 00:14:49.000000000 -0600
@@ -148,6 +148,7 @@
#
# effective-user chrism
+effective-user zope
# Directive: enable-product-installation
#
@@ -288,6 +289,7 @@
#
# mime-types $INSTANCE/etc/mime.types
+mime-types /etc/mime.types
# Directive: structured-text-header-level
#
--- NEW FILE zope-README.Fedora ---
==== Concerning the Fedora package ====
A default instance has been installed in <<LOCALSTATEDIR>>/lib/zope.
You can create additional instances using the mkzopeinstance.py script
Add your instances to <<SYSCONFDIR>>/sysconfig/zope to make the zopectl
script
aware of them. Every operation run by <<BINDIR>>/zopectl will affect all
your instances, you can control them independently using the zopectl
script in the bin/ directory inside your instance.
When you create a new instance, remember to change the default listening
ports and to chown the directory to the zope user.
--- NEW FILE zope.init.in ---
#!/bin/sh
# Startup script for Zope
#
# chkconfig: - 80 20
# description: Zope, a web application server
#
# config: $instance/etc/zope.conf
# Source function library.
. /etc/init.d/functions
RETVAL=0
zopectl="<<BINDIR>>/zopectl"
user="<<ZOPE_USER>>"
prog="zope"
start() {
echo -n $"Starting $prog: "
output=`$zopectl -u $user start 2>/dev/null`
# the return status of zopectl is not reliable, we need to parse
# its output via substring match
if echo $output | grep -q "started"; then
# success
touch /var/lock/subsys/$prog
success
echo
RETVAL=0
else
# failed
failure
echo
RETVAL=1
fi
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
output=`$zopectl -u $user stop 2>/dev/null`
# the return status of zopectl is not reliable, we need to parse
# its output via substring match
if echo $output | grep -q "stopped"; then
# success
rm -f /var/lock/subsys/$prog
success
echo
RETVAL=0
else
# failed
failure
echo
RETVAL=1
fi
return $RETVAL
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
$zopectl status
;;
restart)
restart
;;
condrestart)
$zopectl status | grep -qs "program running" && restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
RETVAL=2
esac
exit $RETVAL
--- NEW FILE zope.logrotate.cron.in ---
#!/bin/bash
. <<SYSCONFDIR>>/sysconfig/zope
for instance in $ZOPE_INSTANCES; do
logrotate $instance/etc/logrotate.conf
done
--- NEW FILE zope.logrotate.in ---
<<INSTANCE_HOME>>/log/*.log {
missingok
sharedscripts
rotate 4
weekly
compress
postrotate
<<INSTANCE_HOME>>/bin/zopectl logreopen >/dev/null 2>&1
endscript
}
--- NEW FILE zope.sysconfig.in ---
# List here the paths to your Zope instances, space separated.
#
# Example : ZOPE_INSTANCES="/var/lib/zope-test /var/lib/zope-prod"
#
# This file is used by the generic zopectl script.
#
ZOPE_INSTANCES="<<LOCALSTATEDIR>>/lib/zope"
--- NEW FILE zope.zopectl.in ---
#!/bin/bash
. <<SYSCONFDIR>>/sysconfig/zope
for instance in $ZOPE_INSTANCES; do
$instance/bin/zopectl "$@"
done
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/compat-zope/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:49:26 -0000 1.1
+++ .cvsignore 10 Aug 2008 10:10:47 -0000 1.2
@@ -0,0 +1 @@
+Zope-2.10.6-final.tgz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/compat-zope/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:49:26 -0000 1.1
+++ sources 10 Aug 2008 10:10:47 -0000 1.2
@@ -0,0 +1 @@
+c04427dfae2003ff743ae047bad5fcc7 Zope-2.10.6-final.tgz