2 # - check why initgroups() crashes on AMD64 and something, better than
3 # disabling initgroups() completely, with that
4 # - no/more secure initial user/password settings (currently: zope/zope)
5 # - ZEO support (mkzeoinstance is not tested and probably doesn't work)
7 # - update to 2.9.x? rename to Zope27?
8 # - how to apply the hotfix?
10 Summary: An application server and portal toolkit for building Web sites
11 Summary(es.UTF-8): Un servidor de aplicaciones y un conjunto de herramientas para la construcción de sitios Web
12 Summary(pl.UTF-8): Serwer aplikacji i toolkit portalowy do tworzenia serwisów WWW
13 Summary(pt_BR.UTF-8): Um servidor de aplicações e um conjunto de ferramentas para construção de sites Web
18 License: Zope Public License (ZPL)
19 Group: Networking/Daemons
20 Source0: http://www.zope.org/Products/Zope/%{version}/%{name}-%{version}-final.tgz
21 # Source0-md5: 208e235087d707ec0ff07a47cb43c786
23 Source2: %{name}.sysconfig
24 Source3: %{name}.logrotate
25 Source4: %{name}-mkzopeinstance
26 Source5: %{name}-mkzeoinstance
27 Source6: %{name}-runzope
28 Source7: %{name}-zopectl
29 Source8: %{name}-installzopeproduct
30 Source9: http://www.zope.org/Products/Zope/Hotfix-2006-07-05/Hotfix-20060705/Hotfix_20060705.tar.gz
31 # Source9-md5: 6dec58130117fd860adc7fd58f8062e7
32 Patch0: %{name}-default_config.patch
33 Patch1: %{name}-instance_paths.patch
34 Patch2: %{name}-pld_makefile_fix.patch
35 URL: http://www.zope.org/
36 BuildRequires: perl-base
37 BuildRequires: python-devel >= 1:2.3.3
38 BuildRequires: rpmbuild(macros) >= 1.268
39 Requires(post,preun): /sbin/chkconfig
40 Requires(postun): /usr/sbin/groupdel
41 Requires(postun): /usr/sbin/userdel
42 Requires(pre): /bin/id
43 Requires(pre): /usr/bin/getgid
44 Requires(pre): /usr/sbin/groupadd
45 Requires(pre): /usr/sbin/useradd
46 Requires: expat >= 1.95.7
48 Requires: python >= 2.3.3
49 Requires: python-PyXML >= 0.8.3
50 Requires: python-libs >= 2.3.3
51 Requires: python-modules >= 2.3.3
56 Obsoletes: Zope-Hotfix = 040713
57 Obsoletes: Zope-Hotfix = 040714
58 Obsoletes: Zope-Hotfix = 050405
59 # extracted from lib/python/App/Hotfixes.py
60 Obsoletes: Zope-Hotfix = 2001-09-28
61 Obsoletes: Zope-Hotfix = 2002-03-01
62 Obsoletes: Zope-Hotfix = 2002-04-15
63 Obsoletes: Zope-Hotfix = 2002-06-14
65 Obsoletes: Zope-Hotfix = 20060704
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 %define zope_dir /usr/lib/zope
71 The Z Object Programming Environment (Zope) is a free, Open Source
72 Python-based application server for building high-performance, dynamic
73 web sites, using a powerful and simple scripting object model and
74 high-performance, integrated object database.
76 %description -l es.UTF-8
77 Zope es una aplicación basada en Python, Open Source[tm], para la
78 construcción de sitios dinámicos, usa un modelo de escritura de
79 guiones poderoso y sencillo. Para instalar la aplicación Zope, instale
80 ese paquete y después, Zope-server, para un servidor HTTP integrado
81 simple, Zope-pcgi, para uso con el servidor Apache. Si desea instalar
82 solamente algunas partes de la aplicación Zope, están diponibles otros
83 subpaquetes, usted debe instalar éstos en vez de ese RPM.
85 %description -l pl.UTF-8
86 Zope (Z Object Programming Environment - Obiektowe Środowisko
87 Programistyczne Z) jest opartym o Pythona serwerem aplikacji do
88 tworzenia wysoko wydajnych, dynamicznych serwisów WWW, przy użyciu
89 użytecznego i prostego modelu obiektowego skryptów oraz wysoko
90 wydajnej zintegrowanej obiektowej bazy danych.
92 %description -l pt_BR.UTF-8
93 Zope é uma aplicação baseada em Python, Open Source[tm], para
94 construção de sites dinâmicos, usando um modelo de scripting poderoso
95 e simples Para instalar o Zope, instale esse pacote e depois, ou o
96 Zope-server, para um servidor HTTP integrado simples, ou Zope-pcgi,
97 para uso com o Apache. Se você quiser instalar apenas algumas partes
98 do Zope, outros sub-pacotes estão disponíveis, e você deveria instalar
99 eles ao invés desse RPM.
102 %setup -q -a9 -n %{name}-%{version}-final
106 # how to apply the hotfix?
107 #mv Hotfix_20060705 lib/python/Products
111 --prefix=%{zope_dir} \
112 --with-python=%{__python} \
118 rm -rf $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT{/var/lib/zope/main,/var/run/zope,/var/log/zope/main} \
121 $RPM_BUILD_ROOT{/etc/logrotate.d,/etc/sysconfig,/etc/rc.d/init.d} \
122 $RPM_BUILD_ROOT{%{_sysconfdir}/zope/main,%{_sbindir}} \
123 $RPM_BUILD_ROOT%{zope_dir}/bin
125 ln -sfn %{_bindir}/python $RPM_BUILD_ROOT%{zope_dir}/bin/python
128 INSTALL_FLAGS="--root $RPM_BUILD_ROOT"
130 mv $RPM_BUILD_ROOT%{zope_dir}/bin/zpasswd.py $RPM_BUILD_ROOT%{_sbindir}/zpasswd
131 mv $RPM_BUILD_ROOT%{zope_dir}/skel $RPM_BUILD_ROOT%{_sysconfdir}/zope
133 rm -rf $RPM_BUILD_ROOT%{zope_dir}/doc
134 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/zope/skel/log
135 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/zope/skel/bin/{runzope.bat,zopeservice.py}.in
137 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/zope
138 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/zope
139 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/zope
140 install %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/mkzopeinstance
141 install %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/mkzeoinstance
142 install %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/runzope
143 install %{SOURCE7} $RPM_BUILD_ROOT%{_sbindir}/zopectl
144 install %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}/installzopeproduct
146 touch $RPM_BUILD_ROOT/var/log/zope/main/event.log
147 touch $RPM_BUILD_ROOT/var/log/zope/main/Z2.log
150 rm -rf $RPM_BUILD_ROOT
153 %groupadd -g 112 zope
154 %useradd -u 112 -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope
157 /sbin/chkconfig --add zope
158 # TODO: move this migration to trigger
159 if [ ! -f %{_sysconfdir}/zope/main/zope.conf ] ; then
160 echo "Creating initial 'main' instance..."
161 %{_sbindir}/mkzopeinstance main zope:zope
162 echo "Instance created. Listening on 127.0.0.1:8080, initial user: 'zope' with password: 'zope'"
164 echo "Old %{_sysconfdir}/zope/zope.conf detected - look at changes about upgrade!" >&2
167 for dir in /var/lib/zope/main /var/lib/zope ; do
168 if [ -f $dir/Data.fs ]; then
169 echo "Found the database in old location. Migrating..."
170 if [ -f /var/lock/subsys/zope ]; then
171 /sbin/service zope stop >&2
175 [ -d /var/lib/zope/main ] && cd $dir && mv -f Data* /var/lib/zope/main/var 2>/dev/null
176 if [ "x$was_stopped" = "x1" ]; then
177 /sbin/service zope start >&2
179 echo "Migration completed (new db location is /var/lib/zope/main/var)"
183 if [ -f /var/lock/subsys/zope ]; then
184 if [ "x$was_stopped" != "x1" ]; then
185 /sbin/service zope restart >&2
188 echo "look at %{_sysconfdir}/zope/main/zope.conf" >&2
189 echo "Run then \"/sbin/service zope start\" to start Zope." >&2
190 echo "You may create new Zope instances with mkzopeinstance" >&2
194 if [ "$1" = "0" ]; then
196 /sbin/chkconfig --del zope
200 if [ "$1" = "0" ] ; then
206 %defattr(644,root,root,755)
208 %attr(754,root,root) /etc/rc.d/init.d/zope
209 %attr(755,root,root) %{_sbindir}/*
211 %attr(775,zope,zope) %dir /var/run/zope
212 %attr(775,zope,zope) %dir /var/lib/zope
213 %attr(775,zope,zope) %dir /var/lib/zope/main
214 %attr(775,zope,zope) %dir /var/log/zope
215 %attr(775,zope,zope) %dir /var/log/zope/main
216 %attr(640,root,root) %dir %{_sysconfdir}/zope
217 %attr(640,root,root) %dir %{_sysconfdir}/zope/skel
218 %attr(640,root,root) %dir %{_sysconfdir}/zope/main
219 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zope/skel/*
220 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/zope
221 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/zope
222 %ghost /var/log/zope/main/event.log
223 %ghost /var/log/zope/main/Z2.log