rpms/zope/devel zope-2.7.3-config.patch, NONE, 1.1 zope-README.Fedora, NONE, 1.1 zope.init.in, NONE, 1.1 zope.spec, NONE, 1.1 zope.sysconfig.in, NONE, 1.1 zope.zopectl.in, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ville Skytta (scop) fedora-extras-commits at redhat.com
Sun Jan 9 12:09:26 UTC 2005


Author: scop

Update of /cvs/extras/rpms/zope/devel
In directory cvs.fedora.redhat.com:/tmp/cvs-serv2015/devel

Modified Files:
	.cvsignore sources 
Added Files:
	zope-2.7.3-config.patch zope-README.Fedora zope.init.in 
	zope.spec zope.sysconfig.in zope.zopectl.in 
Log Message:
auto-import zope-2.7.3-6 on branch devel from zope-2.7.3-6.src.rpm

zope-2.7.3-config.patch:

--- NEW FILE zope-2.7.3-config.patch ---
--- ./skel/etc/zope.conf.in.config	2004-09-28 20:08:52.000000000 +0200
+++ ./skel/etc/zope.conf.in	2004-12-10 18:27:55.393492142 +0100
@@ -138,6 +138,7 @@
 #
 #    effective-user chrism
 
+effective-user <<ZOPE_USER>>
 
 # Directive: enable-product-installation
 #
@@ -295,6 +296,7 @@
 #
 #     mime-types  $INSTANCE/etc/mime.types
 
+mime-types /etc/mime.types
 
 # Directive: structured-text-header-level
 #
@@ -491,7 +493,7 @@
 #
 # Example:
 #
-#    security-policy-implementation python
+security-policy-implementation python
 
 # Directive: skip-authentication-checking
 #


--- 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: 345 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() {
        output=`$zopectl -u $user start`
        # 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
            action $"Starting $prog:  " /bin/true
            touch /var/lock/subsys/$prog
            RETVAL=0
        else
            # failed
            action $"Starting $prog:  " /bin/false
            RETVAL=1
        fi
        return $RETVAL
}

stop() {
        output=`$zopectl -u $user stop`
        # 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
            action $"Stopping $prog:  " /bin/true
            rm -f /var/lock/subsys/$prog
            RETVAL=1
        else
            # failed
            action $"Stopping $prog:  " /bin/false
            RETVAL=0
        fi
        return $RETVAL
}

restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	$zopectl status
	;;
  restart)
	restart
	;;
  condrestart)
	[ -e /var/lock/subsys/$prog ] && restart
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|condrestart}"
	RETVAL=1
esac

exit $REVAL


--- NEW FILE zope.spec ---
%define python_minver 2.3.3

%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: 	 zope
Summary: Web application server for flexible content management applications
Version: 2.7.3
Release: 6
License: ZPL
Group: 	 System Environment/Daemons
URL:	 http://www.zope.org/
Source:	 http://zope.org/Products/Zope/2.7.3/Zope-2.7.3-0.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Source1: zope.init.in
#Source2: http://plope.com/software/zope-rpm/zope.logrotate.in
Source2: zope.sysconfig.in
Source3: zope.zopectl.in
Source4: zope-README.Fedora
Patch0:  zope-2.7.3-config.patch

BuildRequires: python-devel >= %{python_minver} 
BuildRequires: python >= %{python_minver} 
Requires:      python >= %{python_minver}

Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig, /sbin/service
Requires(postun): /usr/sbin/userdel

%description
Zope is an application server framework that enables developers to quickly
build web applications such as intranets, portals, and content management
systems.


%prep
%setup -q -n Zope-%{version}-0
# Do not use -b option, or we'll install the backup too
%patch0 -p1 -b .config
rm -f skel/etc/zope.conf.in.config
cp -p %{SOURCE4} README.Fedora


%build
./configure \
  --with-python=%{__python} \
  --prefix=$RPM_BUILD_ROOT%{zope_home} \
  --optimize
  
#    --no-compile

make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
rm -f docs

# Create all required additional directories
for dir in %{zope_home} %{software_home} %{instance_home}/{Products,bin,var} \
    %{_sysconfdir}/sysconfig %{_bindir}; do
    mkdir -p $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
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 \
    README.Fedora skel/etc/zope.conf.in

# Install the skel, translating paths, into the build root
%{__python} "utilities/copyzopeskel.py" \
     --sourcedir="skel" \
     --targetdir="$RPM_BUILD_ROOT%{_localstatedir}/lib/zope" \
     --replace="INSTANCE_HOME:%{instance_home}" \
     --replace="SOFTWARE_HOME:%{software_home}" \
     --replace="ZOPE_HOME:%{zope_home}" \
     --replace="PYTHON:%{__python}" \

# Actually copy all the other files over
make install

chmod 700 $RPM_BUILD_ROOT%{_localstatedir}/lib/zope

# Symlink to include in the docs
ln -sf %{zope_home}/doc docs

# write version.txt
echo "Zope %{version}-%{release}" > \
    "$RPM_BUILD_ROOT%{zope_home}/lib/python/version.txt"

# Compile .pyc
%{__python} -c "import compileall; \
    compileall.compile_dir(\"$RPM_BUILD_ROOT%{zope_home}\", \
    ddir=\"%{zope_home}\", force=1)"

%clean
rm -rf $RPM_BUILD_ROOT


%pre
/usr/sbin/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


%postun
if [ $1 -eq 0 ]; then
  /usr/sbin/userdel %{zope_user} 2>/dev/null || :
fi


%files 
%defattr(-, root, root, -)
%doc docs README.Fedora
%config(noreplace) %{_sysconfdir}/sysconfig/zope
%config %{_initrddir}/zope
%attr(0755, root, root) %{_bindir}/zopectl
%{zope_home}
%attr(-, %{zope_user}, %{zope_group}) %verify(not md5 size mtime) %{instance_home}


%changelog
* Fri Dec 10 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-6
- activate "security-policy-implementation python" in zope.conf

* Sun Nov 21 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.5
- revert to zope's default directory tree to allow multiple instances
- make the zopectl script multiple-instaces-aware.
- add README.Fedora

* Fri Nov 12 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.4
- compile scripts in %zope_home/bin too
- keep skel dir in %zope_home to fix mkzopeinstance
- BuildRequire python, since python-devel doesn't require it.

* Fri Nov 12 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.3
- compile .pyc instead of just touch-ing them

* Thu Nov 11 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.2
- deal with leftover .pyc files
- minor spec cleanups

* Thu Nov 11 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.3-0.fdr.1
- fix scriptlets requirements
- use standard buildroot
- replace %%buildroot by RPM_BUILD_ROOT
- update to 2.7.3
- drop Hotfix
- drop patch 1, fixed upstream

* Tue Aug 10 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.2-0.fdr.3
- add hotfix from Zope.org: 
  http://zope.org/Products/Zope/Hotfix-200400807/Hotfix-20040807-alert

* Wed Aug 04 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.2-0.fdr.2
- add patch to warn the user that the initial user cannot be added while
  Zope is running (from Chris McDonough)

* Wed Aug 04 2004 Aurelien Bompard <gauret[AT]free.fr> 2.7.2-0.fdr.1
- version 2.7.2
- remove leftover byte-compilation in %%post
- Zope 2.7.x really requires python >= 2.3.3

* Wed Jul 14 2004 Rex Dieter <rexdieter at sf.net> 2.7.1-0.fdr.1
- 2.7.1
- move files created in %%post back into rpm.  Unowned files are bad.
- make (theoretically) buildable for all rh73-rh90,fc1/2,el3
  NOTE: lowerred python_minver to 2.2.2 to test builds, though (most) 
  docs claim 2.3.3 is required.  (??) 
- don't use Requires(preun,postun)
- use %%_smp_mflags

* Tue Apr 28 2004 Chris McDonough <chrism at plope.com> 2.7.0-0.fdr.1
- Prep for submission to Fedora.us by revising work done by Matthias
- Refer to source files by URL instead of by name
- Write version.txt into software home in post
- Don't ship byte-compiled files, instead compile them in post
- Add patch for inverted P_WAIT/P_NOWAIT in zdctl (fixes startup)
- Add patch for objectmanager bug that could effect sites that depend
  on userid/username separation
- Improved init script (OK and FAILED now are printed at the appropriate
  times)
- Remove runzope workaround by adding a <zoperunner> stanza to the
  config file.
- Start in runlevels 345.
- Known issues:
  - zopectl is started and runs as the root user at boot time,
    (although Zope itself runs as the zope user)
  - no distro-specific docs telling people which port the software
    runs on or how to add a user via zopectl adduser.

* Wed Feb 18 2004 Matthias Saou <http://freshrpms.net/> 2.7.0-0.6.fr
- Initial RPM release.
- The startup/stop needs to be modified further.
- Currently "zopectl" returns an error although Zope does start...



--- 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/extras/rpms/zope/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	9 Jan 2005 12:06:32 -0000	1.1
+++ .cvsignore	9 Jan 2005 12:09:24 -0000	1.2
@@ -0,0 +1 @@
+Zope-2.7.3-0.tgz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/zope/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	9 Jan 2005 12:06:32 -0000	1.1
+++ sources	9 Jan 2005 12:09:24 -0000	1.2
@@ -0,0 +1 @@
+15001ab6d429dc80b1f49735e8d2ee10  Zope-2.7.3-0.tgz




More information about the fedora-extras-commits mailing list