[Pkg-zope-developers] NEWS.Debian, and committing changes
Chris McDonough
chris.mcdonough@cox.net
31 Jul 2003 07:57:23 -0400
--=-f7vbK5m91Evdc1fXZiWd
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi Luca,
I've attached an RPM spec file I created for Zope 2.7. Install and
config related things are still in a bit of flux, and may change between
the last beta and final of 2.7.0. I still want to make it possible to
do some of the things we talked about on the Zope list, like being able
to specify that "zope home" docs go into a separate directory. But the
spec file will give you a general idea of how you can use the 2.7
installer stuff to help create binary packages. You can download the
actual SRPM from
http://www.zope.org/Members/mcdonc/Projects/rpms/zope-2.7.0-b1.src.rpm.
Also, I'd be happy to join the packager's list if you'd like me to...
HTH,
- C
On Thu, 2003-07-31 at 05:03, Luca - De Whiskey's - De Vitis wrote:
> On Thu, Jul 31, 2003 at 10:09:37AM +0200, Encolpe DEGOUTE wrote:
> > What about Zope 2.7 integration?
>
> I'll start working on it after 2.6.2 release.
>
> > I have installed it on my dev computer and it's a radically different
> > installation system.
> > actually there is some bug in it, but we can easily bypass them.
>
> Chris McDonough (from Zope crew) already showed interset in cooperating with
> us eventually fulfilling our request. We should take advantages of this
> reporting problems/improovements/suggestions/whatever to him.
>
> In the mean while, if some one wants or has free time, he can start playing
> around 2.7 packaging: it would be very helpful. I suppose it would be nice to
> report on list and eventually Cc Chris if it can be of interest for Zope
> developers.
>
> ciao,
--
Chris McDonough <chris.mcdonough@cox.net>
--=-f7vbK5m91Evdc1fXZiWd
Content-Disposition: attachment; filename=zope.spec
Content-Type: text/plain; name=zope.spec; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
%define fileid $Id: zope.spec,v 1.4 2003/07/26 00:17:02 chrism Exp $
%define name zope
%define majorversion 2.7
%define minorversion 0
%define release b1
%define version %{majorversion}.%{minorversion}
%define packagename Zope-%{version}-%{release}
%define buildroot %{_tmppath}/%{packagename}-root
%define python /usr/bin/python2.2
%define zopehome /usr/lib/%{name}%{majorversion}
%define softwarehome %{zopehome}/lib/python
%define instancehome /var/zope
%define clienthome /var/zope/data
%define statehome /var/run/zope
%define loghome /var/log/zope
%define configfile /etc/zope.conf
%define zopectl /usr/bin/zopectl
%define runzope /usr/bin/runzope
%define zopeuser zope
Summary: Zope, the open source web application server
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{packagename}.tgz
Source1: skel.tgz
License: Zope Public License (ZPL)
Group: Applications/Internet
BuildRoot: %{buildroot}
Prefix: %{_prefix}
Vendor: Zope Corporation and Contributors <zope@zope.org>
Url: http://www.zope.org
Prereq: /usr/sbin/useradd /sbin/chkconfig /bin/sh
# The autorequire script sticks "/usr/local/bin/python"
# into the required list due to script shebangs in Zope. Turn off auto
# requires/provides for this reason and roll our own Requires/Provides lists
AutoReqProv: no
Requires: python2 >= 2.2.3, ld-linux.so.2, libc.so.6
BuildRequires: python2 >= 2.2.3
%description
Zope is an application server framework that enables developers to quickly
build web applications such as intranets, portals, and content management
systems.
%prep
# remove the old build directories and untar the tarfiles
pushd $RPM_BUILD_DIR
rm -rf %{packagename}
tar xvzf $RPM_SOURCE_DIR/%{packagename}.tgz
rm -rf skel
tar xvzf $RPM_SOURCE_DIR/skel.tgz
popd
%build
cd %{packagename}
mkdir -p build
pushd build
../configure \
--with-python="%{python}" \
--prefix="%{buildroot}%{zopehome}" \
--no-compile
make build
popd
# process the skel directory into the buildroot
%{python} "utilities/copyzopeskel.py" \
--sourcedir="$RPM_BUILD_DIR/skel" \
--targetdir="%{buildroot}" \
--replace="INSTANCE_HOME:%{instancehome}" \
--replace="CLIENT_HOME:%{clienthome}" \
--replace="STATE_DIR:%{statehome}" \
--replace="LOG_DIR:%{loghome}" \
--replace="SOFTWARE_HOME:%{softwarehome}" \
--replace="ZOPE_HOME:%{zopehome}" \
--replace="CONFIG_FILE:%{configfile}" \
--replace="PYTHON:%{python}" \
--replace="ZOPECTL:%{zopectl}" \
--replace="RUNZOPE:%{runzope}" \
%install
pushd %{packagename}/build
make install
popd
%pre
# add a Zope user if one doesn't already exist
user=`cut -f1 -d: /etc/passwd|grep "^%{zopeuser}$"`
group=`cut -f1 -d: /etc/group|grep "^%{zopeuser}$"`
if [ -z "$group" ]; then
/usr/sbin/groupadd -g 65 -o -r zope
fi
if [ -z "$user" ]; then
/usr/sbin/useradd -M -n -g %{zopeuser} -o -r -s /sbin/nologin \
-d "%{instancehome}" -c "Zope service user" -u 65 %{zopeuser}
fi
%post
# byte-compile installed Python files
pushd "%{zopehome}" > /dev/null 2>&1
%{python} "%{zopehome}/bin/compilezpy.py" > /dev/null 2>&1 || :
popd > /dev/null 2>&1
# write a 10 digit random default admin password into acl_users
passwd=`head -c4 /dev/urandom | od -tu4 -N4 | sed -ne '1s/.* //p'`
%{zopectl} adduser admin $passwd
/sbin/chkconfig --add zope
# inform the user of the default username/password combo and port
echo
echo A Zope instance has been installed. Run it via
echo \"/etc/rc.d/init.d/zope start\". Log in via a browser on port 9080.
echo
echo Zope has default administrative username/password combination. The
echo administrative username is \"admin\" and the password is \"$passwd\".
echo Please remember this so you are able to log in for the first time.
echo
%preun
if [ -f "/etc/rc.d/init.d/zope" ]; then
/etc/rc.d/init.d/zope stop > /dev/null 2>&1
fi
/sbin/chkconfig --del zope
find "%{zopehome}" -name "*.py[co]"|xargs rm -f
/usr/sbin/userdel zope > /dev/null 2>&1 || :
/usr/sbin/groupdel zope > /dev/null 2>&1 || :
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%dir %{zopehome}
%{zopehome}/bin
%{zopehome}/doc
%{zopehome}/import
%{zopehome}/lib
%{zopehome}/skel
%config /etc/zope.conf
/etc/logrotate.d/zope
/etc/rc.d/init.d/zope
/usr/bin/runzope
/usr/bin/zopectl
%attr(-, %{zopeuser}, %{zopeuser}) /var/zope
%attr(-, %{zopeuser}, %{zopeuser}) %dir /var/log/zope
%attr(-, %{zopeuser}, %{zopeuser}) %dir /var/run/zope
/var/log/zope/README.txt
/var/run/zope/README.txt
%changelog
* Tue Jul 22 2003 Chris McDonough <chrism@zope.com>
- Update for Zope 2.7b1+
- run ./configure from build subdirectory instead of in Zope source root
- install an instance home with a default username and random password
- byte-compile files in postinstall instead of during install
- explicitly name directories in "files" section rather than writing
a manifest from the build
- dont use auto Requires/Provides support
- install an rc script
- install logrotate.d script
- known issues: zopesock socket file is written as root, need to
write rpm-specific doc files to /usr/share/doc/Zope-X.X.X,
dont write a random password, change mode of data.fs files to
700, optimize compiled byte files, figure out what to do about
"python" vs. "python2" requires, put rc file into /etc/init.d instead
of /etc/rc.d/init.d, write an entry into /var/lock/subsys so zope
gets shutdown cleanly on system shutdown.
* Fri Oct 11 2002 Chris McDonough <chrism@zope.com>
- Initial release
--=-f7vbK5m91Evdc1fXZiWd--