I am working on spec/RPM for Zope 2.6.x, but obviously a working
python2.1.3 install is a pre-req if I want to support RH8.0 with the
Zope RPMS :-)

Attached are the changes made to the spec so that the python 2.1.3 SRPM
from python.org would --rebuild nicely on RedHat 8.0

Made tools optional
Used "%{__prefix}/lib/python2.1/Tools" instead of tools.files for
"tools" sub-package.
Removed BuildPrereq for db1-devel. No longer included in RH8
(see: http://www.redhat.com/software/linux/technical/packages.html)

I don't have a RH7.x box to test on anymore..  (should have kept one of
my dev boxes at 7.x.......) could someone please test the below on
RedHat 7.2 and/or 7.3?

To build the source RPM as a NON ROOT user

Create necessary directories in your home directory:

mkdir $HOME/rpm
mkdir $HOME/rpm/SOURCES
mkdir $HOME/rpm/SPECS
mkdir $HOME/rpm/BUILD
mkdir $HOME/rpm/SRPMS
mkdir $HOME/rpm/RPMS
mkdir $HOME/rpm/RPMS/i386

Tell RPM to use your private rpm/ tree:
echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros

Install the source RPM:
rpm -Uvh python2.1-2.1.3-1.src.rpm

Patch the spec file
cd $HOME/rpm/SPECS
patch -p0 </path_to_attached/python2.1.spec.10-22.patch

rpmbuild -ba --without tkinter python-2.1.spec

su -l
rpm -Uvh ~yourusername/rpm/RPMS/i386/python2.1*.rpm

python2.1 /usr/lib/python2.1/test/regrtest.py

I got:
128 tests OK.
13 tests skipped:

--- python-2.1.spec     2002-04-10 00:24:47.000000000 -0400
+++ python-2.1.spec.10-22       2002-10-22 16:24:36.000000000 -0400
@@ -31,6 +31,9 @@
 %define config_tkinter 1
 %{?_without_tkinter: %{expand: %%define config_tkinter 0}}
+%define config_tools 1
+%{?_without_tools: %{expand: %%define config_tools 0}}
 %define config_pymalloc --without-pymalloc
 %{?_with_pymalloc: %{expand: %%define config_pymalloc --with-pymalloc}}
@@ -49,7 +52,7 @@
 Patch2: Python-2.1-expat.patch
 BuildRoot: /var/tmp/%{name}-%{version}-root
 BuildPrereq: expat-devel >= 1.1-3tummy
-BuildPrereq: db1-devel
+#BuildPrereq: db1-devel
 BuildPrereq: gdbm-devel
 Prefix: %{__prefix}
 Packager: Sean Reifschneider <[EMAIL PROTECTED]>
@@ -324,5 +327,8 @@
-%files -f tools.files tools
+%if %{config_tools}
+%files tools

Reply via email to