[Zope-dev] Zope RPMs/debs and Linux FHS
Chris McDonough
chrism@zope.com
13 Oct 2002 16:40:52 -0400
On Sun, 2002-10-13 at 12:15, Adam Manock wrote:
> I was planning to start from scratch with building a RPM for 2.6
> that would work on at least RedHat 8.x AND 7.x.. Coincidentally,
> this is something I planned to start on tomorrow! :-)
Oh happy coincidences! ;-)
FWIW, in order for my spec file to make any sense in the context of
Zope, you'll need to check out the 'chrism-install-branch' of Zope via:
cvs -d :pserver:cvs.zope.org:/cvs-repository -d ChrisMInstallBranch -r
chrism-install-branch Zope
Then:
cd ChrisMInstallBranch
./configure
make rpmdist
Note that the current spec file claims that Python >= 2.2.1 is required
to install the rpm. This is only because the RedHat-shipped 2.2.0
doesn't include the compiler package, required for Zope to run
properly. It should also work with 2.1.3, but RedHat doesn't have any
2.1.X RPMs. :-( To make matters worse, Python 2.2.1 has a few bugs that
are known to cause Zope to crash, so the spec file should really depend
on either "== 2.1.3" or "== 2.2.2".
In any case, if you've got patches, send them my way!
I am hoping that the chrism-install-branch will become the basis for the
configuration and packaging machinery for Zope 2.7. It supports a
"configure; make; make install" install process for source distros that
is easy to adapt for binary distros.
> Instead, I'll take a few hours tomorrow to test your spec on
> RedHat 8.0, it would be *really* good if this could be the basis
> of and future 2.6 / 2.7 packaging efforts...
2.6 doesn't (and likely wont) have the machinery for it, but 2.7
should. It'd be very cool to be ahead of the game for 2.7 as far as
packaging and distribution goes...
> Zope, Zope-zserver and Zope-PCGI packages seem like a good idea.
> Most RPM dists seem to have at least a "-server" sub package if they
> provide a daemon (eg postgresql). Init scripts, the "data" dir, etc
> all go in the "-server" subcomponent
In my mind, Zope doesn't really have a client subcomponent (Zserver
really is part of Zope proper), but it might be nice to break out
PCGI/FCGI support.
> AFAIK on RedHat /opt or "mixed in" (/usr/bin etc) is fine, the argument
> goes "if RPM tracks all the files for you, why use /usr/local or /opt?"
> /opt is used too, the only problem being that it isn't often created
> separate from the "/" partition, so there often isn't alot of space
> there!
Darn. That's true.
The FHS says that opt is a viable place for this kind of thing (whereas
/usr maybe isnt).. The resulting /opt directory structure is also only
about 26MB, as well so maybe it's OK?
> One "trick" to note is for creating the inituser (from 2.5.1):
>
> # Declare the Superuser of the Default Zope Project
> rm $RPM_BUILD_ROOT/usr/share/zope/inituser
> %{PYTHONAPP} $RPM_BUILD_ROOT/usr/bin/zpasswd -u admin -p 123
> $RPM_BUILD_ROOT/var/zope/inituser
> chmod 0640 $RPM_BUILD_ROOT/var/zope/inituser
Yeah, thanks... I'd rather not ship a default password because as soon
as we do, there's bugtraq and security people crawling all over the
place yelling at us. I added a "write_inituser" command to the zctl
front-end for this purpose, so folks will need to use it before they can
log in to Zope. It would be nice if RPM installers offered ubiquitous
interactivity the way that Debian's does, but alas.
- C