OBS User unknown 2008-09-23 22:12:56 +00:00 committed by Git OBS Bridge
parent db72344b6c
commit da47da1873
17 changed files with 838 additions and 361 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de4e8ac16a3ce4e0b903a8e025138feb1b94a970d22a65dc5a8d74c323626c79
size 10921755

3
Python-2.6rc2.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2ad716bb6fa17e71643c9f05f9e20288893094ec37c11458d1ed9bb8a4232a35
size 10801794

17
macros.python Normal file
View File

@ -0,0 +1,17 @@
%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
%py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
%py_incdir %{py_prefix}/include/python%{py_ver}
%py_sitedir %{py_libdir}/site-packages
%py_compile(O) \
find %1 -name '*.pyc' -exec rm -f {} \\; \
python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
%{-O: \
find %1 -name '*.pyo' -exec rm -f {} \\; \
python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
}
%py_requires(d) \
%define minver %py_ver \
%define maxver %(python -c "import sys; a,b=sys.version_info[:2]; print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \
BuildRequires: /usr/bin/python %{-d:python-devel} \
PreReq: python >= %minver, python < %maxver

View File

@ -1,6 +1,6 @@
--- configure.in --- configure.in
+++ configure.in +++ configure.in
@@ -450,9 +450,6 @@ then @@ -509,9 +509,6 @@
fi fi
@ -9,8 +9,8 @@
- -
# Check for unsupported systems # Check for unsupported systems
case $ac_sys_system/$ac_sys_release in case $ac_sys_system/$ac_sys_release in
Linux*/1*) atheos*|Linux*/1*)
@@ -513,6 +510,9 @@ SunOS*) @@ -572,6 +569,9 @@
;; ;;
esac esac
@ -20,13 +20,13 @@
AC_SUBST(ARCH) AC_SUBST(ARCH)
AC_MSG_CHECKING(ARCH) AC_MSG_CHECKING(ARCH)
ARCH=`uname -m` ARCH=`uname -m`
@@ -3153,9 +3153,18 @@ then @@ -3406,9 +3406,18 @@
fi fi
# check for readline 4.0 # check for readline 4.0
-AC_CHECK_LIB(readline, rl_pre_input_hook, -AC_CHECK_LIB(readline, rl_pre_input_hook,
- AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1, - AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
- [Define if you have readline 4.0]), , ) - [Define if you have readline 4.0]), ,$READLINE_LIBS)
+AC_MSG_CHECKING([for rl_pre_input_hook in -lreadline]) +AC_MSG_CHECKING([for rl_pre_input_hook in -lreadline])
+AC_CACHE_VAL(ac_cv_have_rl_re_input_hook, [ +AC_CACHE_VAL(ac_cv_have_rl_re_input_hook, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>
@ -40,5 +40,5 @@
+ [Define if you have readline 4.0]) + [Define if you have readline 4.0])
+fi +fi
# check for readline 4.2 # also in 4.0
AC_CHECK_LIB(readline, rl_completion_matches, AC_CHECK_LIB(readline, rl_completion_display_matches_hook,

View File

@ -1,156 +0,0 @@
Index: Lib/test/test_hashlib.py
===================================================================
--- Lib/test/test_hashlib.py (revision 64624)
+++ Lib/test/test_hashlib.py (working copy)
@@ -9,8 +9,8 @@
import hashlib
import unittest
from test import test_support
+from test.test_support import _4G, precisionbigmemtest
-
def hexstr(s):
import string
h = string.hexdigits
@@ -55,7 +55,6 @@
m2.update(aas + bees + cees)
self.assertEqual(m1.digest(), m2.digest())
-
def check(self, name, data, digest):
# test the direct constructors
computed = getattr(hashlib, name)(data).hexdigest()
@@ -74,8 +73,23 @@
def test_case_md5_2(self):
self.check('md5', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
'd174ab98d277d9f5a5611c2c9f419d9f')
+
+ @precisionbigmemtest(size=_4G + 5, memuse=1)
+ def test_case_md5_huge(self, size):
+ if size == _4G + 5:
+ try:
+ self.check('md5', 'A'*size, 'c9af2dff37468ce5dfee8f2cfc0a9c6d')
+ except OverflowError:
+ pass # 32-bit arch
+
+ @precisionbigmemtest(size=_4G - 1, memuse=1)
+ def test_case_md5_uintmax(self, size):
+ if size == _4G - 1:
+ try:
+ self.check('md5', 'A'*size, '28138d306ff1b8281f1a9067e1a1a2b3')
+ except OverflowError:
+ pass # 32-bit arch
-
# use the three examples from Federal Information Processing Standards
# Publication 180-1, Secure Hash Standard, 1995 April 17
# http://www.itl.nist.gov/div897/pubs/fip180-1.htm
Index: Modules/_hashopenssl.c
===================================================================
--- Modules/_hashopenssl.c (revision 64624)
+++ Modules/_hashopenssl.c (working copy)
@@ -19,7 +19,9 @@
/* EVP is the preferred interface to hashing in OpenSSL */
#include <openssl/evp.h>
+#define MUNCH_SIZE INT_MAX
+
#ifndef HASH_OBJ_CONSTRUCTOR
#define HASH_OBJ_CONSTRUCTOR 0
#endif
@@ -164,9 +166,18 @@
if (!PyArg_ParseTuple(args, "s#:update", &cp, &len))
return NULL;
+ if (len > 0 && len <= MUNCH_SIZE) {
EVP_DigestUpdate(&self->ctx, cp, Py_SAFE_DOWNCAST(len, Py_ssize_t,
unsigned int));
-
+ } else {
+ Py_ssize_t offset = 0;
+ while (len) {
+ unsigned int process = len > MUNCH_SIZE ? MUNCH_SIZE : len;
+ EVP_DigestUpdate(&self->ctx, cp + offset, process);
+ len -= process;
+ offset += process;
+ }
+ }
Py_INCREF(Py_None);
return Py_None;
}
@@ -255,10 +266,21 @@
self->name = name_obj;
Py_INCREF(self->name);
- if (cp && len)
+ if (cp && len) {
+ if (len > 0 && len <= MUNCH_SIZE) {
EVP_DigestUpdate(&self->ctx, cp, Py_SAFE_DOWNCAST(len, Py_ssize_t,
unsigned int));
-
+ } else {
+ Py_ssize_t offset = 0;
+ while (len) {
+ unsigned int process = len > MUNCH_SIZE ? MUNCH_SIZE : len;
+ EVP_DigestUpdate(&self->ctx, cp + offset, process);
+ len -= process;
+ offset += process;
+ }
+ }
+ }
+
return 0;
}
#endif
@@ -327,7 +349,7 @@
static PyObject *
EVPnew(PyObject *name_obj,
const EVP_MD *digest, const EVP_MD_CTX *initial_ctx,
- const unsigned char *cp, unsigned int len)
+ const unsigned char *cp, Py_ssize_t len)
{
EVPobject *self;
@@ -345,8 +367,20 @@
EVP_DigestInit(&self->ctx, digest);
}
- if (cp && len)
- EVP_DigestUpdate(&self->ctx, cp, len);
+ if (cp && len) {
+ if (len > 0 && len <= MUNCH_SIZE) {
+ EVP_DigestUpdate(&self->ctx, cp, Py_SAFE_DOWNCAST(len, Py_ssize_t,
+ unsigned int));
+ } else {
+ Py_ssize_t offset = 0;
+ while (len) {
+ unsigned int process = len > MUNCH_SIZE ? MUNCH_SIZE : len;
+ EVP_DigestUpdate(&self->ctx, cp + offset, process);
+ len -= process;
+ offset += process;
+ }
+ }
+ }
return (PyObject *)self;
}
@@ -383,8 +417,7 @@
digest = EVP_get_digestbyname(name);
- return EVPnew(name_obj, digest, NULL, cp, Py_SAFE_DOWNCAST(len, Py_ssize_t,
- unsigned int));
+ return EVPnew(name_obj, digest, NULL, cp, len);
}
/*
@@ -409,7 +442,7 @@
CONST_ ## NAME ## _name_obj, \
NULL, \
CONST_new_ ## NAME ## _ctx_p, \
- cp, Py_SAFE_DOWNCAST(len, Py_ssize_t, unsigned int)); \
+ cp, len); \
}
/* a PyMethodDef structure for the constructor */

View File

@ -1,14 +0,0 @@
--- Lib/urllib.py
+++ Lib/urllib.py
@@ -1281,7 +1282,10 @@
for name, value in os.environ.items():
name = name.lower()
if value and name[-6:] == '_proxy':
- proxies[name[:-6]] = value
+ if name == 'https_proxy':
+ warnings.warn ("urllib can't handle https proxies, your https_proxy setting will not work", RuntimeWarning, stacklevel=2)
+ else:
+ proxies[name[:-6]] = value
return proxies
if sys.platform == 'darwin':

View File

@ -0,0 +1,11 @@
--- Modules/_ssl.c
+++ Modules/_ssl.c
@@ -311,6 +311,8 @@
goto fail;
}
+ SSL_CTX_set_options(self->ctx, SSL_OP_ALL); /* ssl compatibility */
+
if (certreq != PY_SSL_CERT_NONE) {
if (cacerts_file == NULL) {
errstr = ERRSTR("No root certificates specified for "

View File

@ -0,0 +1,16 @@
=== modified file 'Lib/urllib.py'
--- Lib/urllib.py 2008-07-02 01:57:08 +0000
+++ Lib/urllib.py 2008-09-16 12:21:26 +0000
@@ -1299,9 +1299,6 @@
proxies = {}
for name, value in os.environ.items():
name = name.lower()
- if name == 'no_proxy':
- # handled in proxy_bypass_environment
- continue
if value and name[-6:] == '_proxy':
proxies[name[:-6]] = value
return proxies

View File

@ -0,0 +1,133 @@
Index: Lib/httplib.py
===================================================================
--- Lib/httplib.py (revision 66111)
+++ Lib/httplib.py (working copy)
@@ -651,11 +651,17 @@
self.__response = None
self.__state = _CS_IDLE
self._method = None
+ self._tunnel_host = None
+ self._tunnel_port = None
self._set_hostport(host, port)
if strict is not None:
self.strict = strict
+ def _set_tunnel(self, host, port=None):
+ self._tunnel_host = host
+ self._tunnel_port = port
+
def _set_hostport(self, host, port):
if port is None:
i = host.rfind(':')
@@ -676,10 +682,24 @@
def set_debuglevel(self, level):
self.debuglevel = level
+ def _tunnel(self):
+ self._set_hostport(self._tunnel_host, self._tunnel_port)
+ self.send("CONNECT %s:%d HTTP/1.0\r\n\r\n" % (self.host, self.port))
+ response = self.response_class(self.sock, strict = self.strict, method = self._method)
+ (version, code, message) = response._read_status()
+ if code != 200:
+ self.close()
+ raise socket.error, "Tunnel connection failed: %d %s" % (code, message.strip())
+ while True:
+ line = response.fp.readline()
+ if line == '\r\n': break
+
def connect(self):
"""Connect to the host and port specified in __init__."""
self.sock = socket.create_connection((self.host,self.port),
self.timeout)
+ if self._tunnel_host:
+ self._tunnel()
def close(self):
"""Close the connection to the HTTP server."""
@@ -1069,6 +1089,9 @@
"Connect to a host on a given (SSL) port."
sock = socket.create_connection((self.host, self.port), self.timeout)
+ if self._tunnel_host:
+ self.sock = sock
+ self._tunnel()
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
__all__.append("HTTPSConnection")
Index: Lib/urllib2.py
===================================================================
--- Lib/urllib2.py (revision 66111)
+++ Lib/urllib2.py (working copy)
@@ -192,6 +192,7 @@
# self.__r_type is what's left after doing the splittype
self.host = None
self.port = None
+ self._tunnel_host = None
self.data = data
self.headers = {}
for key, value in headers.items():
@@ -252,9 +253,14 @@
return self.__r_host
def set_proxy(self, host, type):
- self.host, self.type = host, type
- self.__r_host = self.__original
+ if self.type == 'https' and not self._tunnel_host:
+ self._tunnel_host = self.host
+ else:
+ self.type = type
+ self.__r_host = self.__original
+ self.host = host
+
def has_proxy(self):
return self.__r_host == self.__original
@@ -700,7 +706,7 @@
req.add_header('Proxy-authorization', 'Basic ' + creds)
hostport = unquote(hostport)
req.set_proxy(hostport, proxy_type)
- if orig_type == proxy_type:
+ if orig_type == proxy_type or orig_type == 'https':
# let other handlers take care of it
return None
else:
@@ -1098,6 +1104,9 @@
headers["Connection"] = "close"
headers = dict(
(name.title(), val) for name, val in headers.items())
+
+ if req._tunnel_host:
+ h._set_tunnel(req._tunnel_host)
try:
h.request(req.get_method(), req.get_selector(), req.data, headers)
r = h.getresponse()
Index: Lib/test/test_urllib2.py
===================================================================
--- Lib/test/test_urllib2.py (revision 66111)
+++ Lib/test/test_urllib2.py (working copy)
@@ -939,6 +939,23 @@
self.assertEqual([(handlers[0], "http_open")],
[tup[0:2] for tup in o.calls])
+ def test_proxy_https(self):
+ o = OpenerDirector()
+ ph = urllib2.ProxyHandler(dict(https="proxy.example.com:3128"))
+ o.add_handler(ph)
+ meth_spec = [
+ [("https_open", "return response")]
+ ]
+ handlers = add_ordered_mock_handlers(o, meth_spec)
+
+ req = Request("https://www.example.com/")
+ self.assertEqual(req.get_host(), "www.example.com")
+ r = o.open(req)
+ self.assertEqual(req.get_host(), "proxy.example.com:3128")
+
+ self.assertEqual([(handlers[0], "https_open")],
+ [tup[0:2] for tup in o.calls])
+
def test_basic_auth(self, quote_char='"'):
opener = OpenerDirector()
password_manager = MockPasswordManager()

View File

@ -0,0 +1,42 @@
Index: Lib/ssl.py
===================================================================
--- Lib/ssl.py (revision 66515)
+++ Lib/ssl.py (working copy)
@@ -434,7 +434,10 @@
for compability with Python 2.5 and earlier. Will disappear in
Python 3.0."""
- ssl_sock = _ssl.sslwrap(sock._sock, 0, keyfile, certfile, CERT_NONE,
+ if hasattr(sock, "_sock"):
+ sock = sock._sock
+
+ ssl_sock = _ssl.sslwrap(sock, 0, keyfile, certfile, CERT_NONE,
PROTOCOL_SSLv23, None)
ssl_sock.do_handshake()
return ssl_sock
Index: Lib/test/test_ssl.py
===================================================================
--- Lib/test/test_ssl.py (revision 66515)
+++ Lib/test/test_ssl.py (working copy)
@@ -58,6 +58,21 @@
finally:
s.close()
+ def testSimpleSSLwrap(self):
+ try:
+ ssl.sslwrap_simple(socket.socket(socket.AF_INET))
+ except IOError, e:
+ if e.errno == 32: # broken pipe when ssl_sock.do_handshake(), this test doesn't care about that
+ pass
+ else:
+ raise
+ try:
+ ssl.sslwrap_simple(socket.socket(socket.AF_INET)._sock)
+ except IOError, e:
+ if e.errno == 32: # broken pipe when ssl_sock.do_handshake(), this test doesn't care about that
+ pass
+ else:
+ raise
def testCrucialConstants(self):
ssl.PROTOCOL_SSLv2

46
python-base.changes Normal file
View File

@ -0,0 +1,46 @@
-------------------------------------------------------------------
Fri Sep 19 20:09:50 CEST 2008 - matejcik@suse.cz
- moved tests to %check section
- update to 2.6rc2
- included patch for https proxy support that resolves bnc#214983
(in a proper way) and bnc#298378
-------------------------------------------------------------------
Wed Sep 17 22:09:12 CEST 2008 - matejcik@suse.cz
- included /etc/rpm/macros.python to fix the split-caused breakage
-------------------------------------------------------------------
Tue Sep 16 18:12:10 CEST 2008 - matejcik@suse.cz
- applied bug-no-proxy patch from python#3879, which should improve
backwards compatibility (important i.e. for bzr)
- moved python-xml to a subpackage of this (brings no additional
dependencies, so it can as well stay)
- moved Makefile and pyconfig.h to python-base, removing the need
to have python-devel for installation
- improved compatibility with older distros for 11.0
- moved ssl.py and sqlite3 module to python package - they won't work
without their respective binary modules anyway
-------------------------------------------------------------------
Mon Sep 15 18:34:27 CEST 2008 - matejcik@suse.cz
- updated to 2.6rc1 - bugfix-only pre-stable release
- renamed python-base-devel to python-devel as it should be
- removed macros from libpython package name
-------------------------------------------------------------------
Fri Sep 12 14:46:00 CEST 2008 - matejcik@suse.cz
- moved python-devel to a subpackage of this
- created libpython subpackage
- moved essential files from -devel to -base, so that distutils
should now be able to install without -devel package
-------------------------------------------------------------------
Tue Sep 9 20:30:11 CEST 2008 - matejcik@suse.cz
- initial release of python-base

398
python-base.spec Normal file
View File

@ -0,0 +1,398 @@
#
# spec file for package python-base (Version 2.6rc2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-base
BuildRequires: zlib-devel
%if %suse_version >= 1030
BuildRequires: fdupes
%endif
Url: http://www.python.org/
License: X11/MIT
Group: Development/Languages/Python
AutoReqProv: on
Summary: Python Interpreter base package
Version: 2.6rc2
Release: 1
%define tarname Python-%{version}
Source0: %{tarname}.tar.bz2
Source1: macros.python
Source6: README.SUSE
Source13: distutils.cfg
Patch01: Python-2.3.3-dirs.patch
Patch10: python-distutils-rpm-8.patch
Patch21: Python-2.6b1-multilib.patch
Patch25: python-2.6b1-canonicalize2.patch
Patch26: python-2.6b1-localpath.patch
Patch31: python-2.5.2-fwrapv.patch
Patch35: python-2.5.2-configure.patch
Patch36: python-2.6rc1-bug-no-proxy.patch
Patch37: python-2.6rc2-https-proxy.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define python_version %(echo %{version} | head -c 3)
%description
Python is an interpreted, object-oriented programming language, and is
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
of Python in the documentation and tutorials included in the python-doc
(HTML) or python-doc-pdf (PDF) packages.
This package contains all of stand-alone Python files, minus binary
modules that would pull in extra dependencies.
Authors:
--------
Guido van Rossum <guido@python.org>
%package -n python-devel
License: Python Copyright
Requires: python-base = %{version}
Summary: Include Files and Libraries Mandatory for Building Python Modules
Group: Development/Languages/Python
AutoReqProv: on
%description -n python-devel
The Python programming language's interpreter can be extended with
dynamically loaded extensions and can be embedded in other programs.
This package contains header files, a static library, and development
tools for building Python modules, extending the Python interpreter or
embedding Python in applications.
Authors:
--------
Guido van Rossum <guido@python.org>
%package -n python-xml
License: Python Copyright
Requires: python-base = %{version}
Summary: A Python XML Interface
Group: Development/Libraries/Python
AutoReqProv: on
%description -n python-xml
The expat module is a Python interface to the expat XML parser. Since
Python2.x, it is part of the core Python distribution.
%package -n libpython2_6-1_0
License: X11/MIT
Summary: Python Interpreter shared library
Group: Development/Languages/Python
AutoReqProv: on
#%description -n libpython%{lib_version}
%description -n libpython2_6-1_0
Python is an interpreted, object-oriented programming language, and is
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
of Python in the documentation and tutorials included in the python-doc
(HTML) or python-doc-pdf (PDF) packages.
This package contains libpython2.6 shared library for embedding in
other applications.
Authors:
--------
Guido van Rossum <guido@python.org>
%prep
%setup -q -n %{tarname}
# patching
%patch01
%patch10 -p1
%patch21 -p1
%patch25
%patch26
%patch31
%patch35
%patch36
%patch37
# some cleanup
find . -name .cvsignore -type f -print0 | xargs -0 rm -f
find . -name CVS -type d -print0 | xargs -0 rm -rf
%build
########################################
# use rpm_opt_flags
########################################
export OPT="$RPM_OPT_FLAGS"
########################################
# regenerate
########################################
autoreconf -f -i . # Modules/_ctypes/libffi
# prevent make from trying to rebuild asdl stuff, which requires existing
# python installation
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
########################################
# configure
########################################
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--docdir=%{_docdir}/python \
--with-fpectl \
--enable-shared \
--enable-unicode=ucs4
########################################
# compile
########################################
make %{?jobs:-j%jobs} DESTDIR=$RPM_BUILD_ROOT
%check
# on hppa, the threading of glibc is quite broken. The tests just stop
# at some point, and the machine does not build anything more until a
# timeout several hours later.
%ifnarch hppa %arm
# test_file fails in autobuild env - "stdin.seek(-1)" wrongly succeeds. probably an issue with autobuild's stdin
# test_urllib2 relies on being able to resolve local address, which is notoriously impossible in autobuild
EXCLUDE="-x test_urllib2 -x test_file"
# test_nis and test_threading are AWFULLY slow. uncomment this for sensible rebuild times
EXCLUDE="$EXCLUDE -x test_nis -x test_threading"
# Limit virtual memory to avoid spurious failures
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
ulimit -v 10000000 || :
fi
make test TESTOPTS="-l $EXCLUDE"
# use network, be verbose:
#make test TESTOPTS="-l -u network -v"
%endif
%install
# replace rest of /usr/local/bin/python or /usr/bin/python2.5 with /usr/bin/python
find . -wholename "./Parser" -prune -o -name '*.py' -type f -print0 | xargs -0 grep -lE '^#! *(/usr/.*bin/(env +)?)?python' | xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+\.[0-9]+)?@#!/usr/bin/python@'
# the grep inbetween makes it much faster
########################################
# install it
########################################
make \
OPT="$RPM_OPT_FLAGS -fPIC" \
DESTDIR=$RPM_BUILD_ROOT \
install
# install site-specific tweaks
ln -s python%{python_version} ${RPM_BUILD_ROOT}%{_bindir}/python2
install -m 644 %{S:13} ${RPM_BUILD_ROOT}%{_libdir}/python%{python_version}/distutils
install -d -m 755 ${RPM_BUILD_ROOT}/etc/rpm
install -m 644 %{S:1} ${RPM_BUILD_ROOT}/etc/rpm
########################################
# some cleanups
########################################
# remove hard links and replace them with symlinks
for dir in bin include %{_lib} ; do
rm -f $RPM_BUILD_ROOT/%{_prefix}/$dir/python
ln -s python%{python_version} $RPM_BUILD_ROOT/%{_prefix}/$dir/python
done
CLEANUP_DIR="$RPM_BUILD_ROOT%{_libdir}/python%{python_version}"
# kill imageop.so, it's insecure
rm -f $CLEANUP_DIR/lib-dynload/imageop.so
# remove various things that don't need to be in python-base
rm $RPM_BUILD_ROOT%{_bindir}/idle
#rm $RPM_BUILD_ROOT%{_bindir}/python%{python_version}-config
#rm $RPM_BUILD_ROOT%{_bindir}/python-config
#rm -r $RPM_BUILD_ROOT%{_includedir}/python
#rm -r $RPM_BUILD_ROOT%{_includedir}/python%{python_version}
#rm $RPM_BUILD_ROOT%{_libdir}/libpython%{python_version}.so
rm -r $CLEANUP_DIR/{curses,idlelib,lib-tk,sqlite3}
rm $CLEANUP_DIR/ssl.py*
# does not work without _ssl.so anyway
%if %suse_version >= 1030
# replace duplicate .pyo/.pyc with hardlinks
%fdupes $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}
%endif
########################################
# documentation
########################################
export PDOCS=${RPM_BUILD_ROOT}%{_docdir}/%{name}
install -d -m 755 $PDOCS
install -c -m 644 %{SOURCE6} $PDOCS/
install -c -m 644 LICENSE $PDOCS/
install -c -m 644 README $PDOCS/
########################################
# devel
########################################
# install Makefile.pre.in and Makefile.pre
cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/config/
%clean
rm -rf $RPM_BUILD_ROOT
#%post -n libpython%{lib_version}
%post -n libpython2_6-1_0
%{run_ldconfig}
#%postun -n libpython%{lib_version}
%postun -n libpython2_6-1_0
%{run_ldconfig}
%files -n python-devel
%defattr(-, root, root)
%{_libdir}/python%{python_version}/config/*
%defattr(644, root, root, 755)
%{_libdir}/libpython*.so
%{_includedir}/python*
%{_libdir}/python%{python_version}/test
%defattr(755, root, root)
%{_bindir}/python-config
%{_bindir}/python%{python_version}-config
%files -n python-xml
%defattr(644, root, root, 755)
%{_libdir}/python%{python_version}/xml
%{_libdir}/python%{python_version}/lib-dynload/pyexpat.so
#%files -n libpython%{lib_version}
%files -n libpython2_6-1_0
%defattr(644, root, root)
%{_libdir}/libpython*.so.*
%files
%defattr(644, root, root, 755)
%config /etc/rpm/macros.python
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/LICENSE
%doc %{_docdir}/%{name}/README.SUSE
%doc %{_mandir}/man1/python.1*
%dir %{_includedir}/python%{python_version}
%{_includedir}/python%{python_version}/pyconfig.h
%{_libdir}/python
%dir %{_libdir}/python%{python_version}
%dir %{_libdir}/python%{python_version}/config
%{_libdir}/python%{python_version}/config/Setup
%{_libdir}/python%{python_version}/config/Makefile
%{_libdir}/python%{python_version}/*.*
%{_libdir}/python%{python_version}/bsddb
%{_libdir}/python%{python_version}/compiler
%{_libdir}/python%{python_version}/ctypes
%{_libdir}/python%{python_version}/distutils
%{_libdir}/python%{python_version}/email
%{_libdir}/python%{python_version}/encodings
%{_libdir}/python%{python_version}/hotshot
%{_libdir}/python%{python_version}/json
%{_libdir}/python%{python_version}/lib2to3
%{_libdir}/python%{python_version}/logging
%{_libdir}/python%{python_version}/multiprocessing
%{_libdir}/python%{python_version}/plat-*
%{_libdir}/python%{python_version}/wsgiref
%dir %{_libdir}/python%{python_version}/site-packages
%{_libdir}/python%{python_version}/site-packages/README
%dir %{_libdir}/python%{python_version}/lib-dynload
%{_libdir}/python%{python_version}/lib-dynload/_bisect.so
%{_libdir}/python%{python_version}/lib-dynload/_bytesio.so
%{_libdir}/python%{python_version}/lib-dynload/_csv.so
%{_libdir}/python%{python_version}/lib-dynload/_collections.so
%{_libdir}/python%{python_version}/lib-dynload/_ctypes.so
%{_libdir}/python%{python_version}/lib-dynload/_ctypes_test.so
%{_libdir}/python%{python_version}/lib-dynload/_elementtree.so
%{_libdir}/python%{python_version}/lib-dynload/_fileio.so
%{_libdir}/python%{python_version}/lib-dynload/_functools.so
%{_libdir}/python%{python_version}/lib-dynload/_heapq.so
%{_libdir}/python%{python_version}/lib-dynload/_hotshot.so
%{_libdir}/python%{python_version}/lib-dynload/_json.so
%{_libdir}/python%{python_version}/lib-dynload/_locale.so
%{_libdir}/python%{python_version}/lib-dynload/_lsprof.so
%{_libdir}/python%{python_version}/lib-dynload/_md5.so
%{_libdir}/python%{python_version}/lib-dynload/_multiprocessing.so
%{_libdir}/python%{python_version}/lib-dynload/_random.so
%{_libdir}/python%{python_version}/lib-dynload/_sha.so
%{_libdir}/python%{python_version}/lib-dynload/_sha256.so
%{_libdir}/python%{python_version}/lib-dynload/_sha512.so
%{_libdir}/python%{python_version}/lib-dynload/_socket.so
%{_libdir}/python%{python_version}/lib-dynload/_struct.so
%{_libdir}/python%{python_version}/lib-dynload/_testcapi.so
%{_libdir}/python%{python_version}/lib-dynload/_weakref.so
%{_libdir}/python%{python_version}/lib-dynload/array.so
%{_libdir}/python%{python_version}/lib-dynload/binascii.so
%{_libdir}/python%{python_version}/lib-dynload/bz2.so
%{_libdir}/python%{python_version}/lib-dynload/cPickle.so
%{_libdir}/python%{python_version}/lib-dynload/cStringIO.so
%{_libdir}/python%{python_version}/lib-dynload/cmath.so
%{_libdir}/python%{python_version}/lib-dynload/crypt.so
%{_libdir}/python%{python_version}/lib-dynload/datetime.so
%{_libdir}/python%{python_version}/lib-dynload/fcntl.so
%{_libdir}/python%{python_version}/lib-dynload/future_builtins.so
%{_libdir}/python%{python_version}/lib-dynload/grp.so
%{_libdir}/python%{python_version}/lib-dynload/itertools.so
%{_libdir}/python%{python_version}/lib-dynload/linuxaudiodev.so
%{_libdir}/python%{python_version}/lib-dynload/math.so
%{_libdir}/python%{python_version}/lib-dynload/mmap.so
%{_libdir}/python%{python_version}/lib-dynload/nis.so
%{_libdir}/python%{python_version}/lib-dynload/operator.so
%{_libdir}/python%{python_version}/lib-dynload/ossaudiodev.so
%{_libdir}/python%{python_version}/lib-dynload/parser.so
%{_libdir}/python%{python_version}/lib-dynload/resource.so
%{_libdir}/python%{python_version}/lib-dynload/select.so
%{_libdir}/python%{python_version}/lib-dynload/spwd.so
%{_libdir}/python%{python_version}/lib-dynload/strop.so
%{_libdir}/python%{python_version}/lib-dynload/syslog.so
%{_libdir}/python%{python_version}/lib-dynload/termios.so
%{_libdir}/python%{python_version}/lib-dynload/time.so
%{_libdir}/python%{python_version}/lib-dynload/unicodedata.so
%{_libdir}/python%{python_version}/lib-dynload/zlib.so
%{_libdir}/python%{python_version}/lib-dynload/_codecs*.so
%{_libdir}/python%{python_version}/lib-dynload/_multibytecodec.so
%{_libdir}/python%{python_version}/lib-dynload/audioop.so
%{_libdir}/python%{python_version}/lib-dynload/Python-%{version}-py%{python_version}.egg-info
# these modules don't support 64-bit arches (disabled by setup.py)
%ifnarch alpha ia64 x86_64 s390x ppc64
# requires sizeof(int) == sizeof(long) == sizeof(char*)
%{_libdir}/python%{python_version}/lib-dynload/dl.so
%endif
%attr(755, root, root) %{_bindir}/pydoc
%attr(755, root, root) %{_bindir}/python
%attr(755, root, root) %{_bindir}/2to3
%attr(755, root, root) %{_bindir}/python%{python_version}
%attr(755, root, root) %{_bindir}/smtpd.py
%{_bindir}/python2
%changelog
* Fri Sep 19 2008 matejcik@suse.cz
- moved tests to %%check section
- update to 2.6rc2
- included patch for https proxy support that resolves bnc#214983
(in a proper way) and bnc#298378
* Thu Sep 18 2008 matejcik@suse.cz
- included /etc/rpm/macros.python to fix the split-caused breakage
* Tue Sep 16 2008 matejcik@suse.cz
- applied bug-no-proxy patch from python#3879, which should improve
backwards compatibility (important i.e. for bzr)
- moved python-xml to a subpackage of this (brings no additional
dependencies, so it can as well stay)
- moved Makefile and pyconfig.h to python-base, removing the need
to have python-devel for installation
- improved compatibility with older distros for 11.0
- moved ssl.py and sqlite3 module to python package - they won't work
without their respective binary modules anyway
* Mon Sep 15 2008 matejcik@suse.cz
- updated to 2.6rc1 - bugfix-only pre-stable release
- renamed python-base-devel to python-devel as it should be
- removed macros from libpython package name
* Fri Sep 12 2008 matejcik@suse.cz
- moved python-devel to a subpackage of this
- created libpython subpackage
- moved essential files from -devel to -base, so that distutils
should now be able to install without -devel package
* Tue Sep 09 2008 matejcik@suse.cz
- initial release of python-base

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Sep 15 18:34:58 CEST 2008 - matejcik@suse.cz
- updated to build against 2.6rc1
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 25 21:55:18 CEST 2008 - matejcik@suse.cz Wed Jun 25 21:55:18 CEST 2008 - matejcik@suse.cz

View File

@ -24,8 +24,8 @@ Group: Development/Languages/Python
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Additional Package Documentation for Python. Summary: Additional Package Documentation for Python.
Version: 2.5.1 Version: 2.5.1
Release: 104 Release: 109
%define pyver 2.6b3 %define pyver 2.6rc2
BuildArch: noarch BuildArch: noarch
%define tarname Python-%{pyver} %define tarname Python-%{pyver}
%define pyname python %define pyname python
@ -104,6 +104,8 @@ rm -rf $RPM_BUILD_ROOT
%doc %{_docdir}/%{pyname}/paper-letter %doc %{_docdir}/%{pyname}/paper-letter
%changelog %changelog
* Mon Sep 15 2008 matejcik@suse.cz
- updated to build against 2.6rc1
* Wed Jun 25 2008 matejcik@suse.cz * Wed Jun 25 2008 matejcik@suse.cz
- updated to build against 2.6b1 - updated to build against 2.6b1
- will update the docs when 2.6 final is out - will update the docs when 2.6 final is out

View File

@ -1,3 +1,36 @@
-------------------------------------------------------------------
Fri Sep 19 20:10:33 CEST 2008 - matejcik@suse.cz
- moved testsuite to %check section
- update to 2.6rc2, removing the last remaining security patch
- included fix for socket.ssl() behavior regression, fixing
bnc#426563
-------------------------------------------------------------------
Tue Sep 16 18:09:49 CEST 2008 - matejcik@suse.cz
- moved python-xml to subpackage of python-base
- moved dbm.so to gdbm subpackage
- moved ssl.py and sqlite3 module to this
-------------------------------------------------------------------
Mon Sep 15 18:34:06 CEST 2008 - matejcik@suse.cz
- update to 2.6rc1 - bugfix-only pre-stable release
-------------------------------------------------------------------
Fri Sep 12 14:44:55 CEST 2008 - matejcik@suse.cz
- split package, as per fate#305065
- moved python-devel to be a subpackage of python-base
- minor fixes & packaging cleanups
-------------------------------------------------------------------
Wed Sep 10 16:31:29 CEST 2008 - matejcik@suse.cz
- fixed misapplied ssl-compat patch (caused segfaults when
opening SSL connections, bnc#425138 )
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 3 17:17:06 CEST 2008 - matejcik@suse.cz Wed Sep 3 17:17:06 CEST 2008 - matejcik@suse.cz

View File

@ -1,5 +1,5 @@
# #
# spec file for package python (Version 2.6b3) # spec file for package python (Version 2.6rc2)
# #
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -18,7 +18,7 @@
Name: python Name: python
BuildRequires: blt db-devel gcc-c++ gdbm-devel gmp-devel libbz2-devel libopenssl-devel ncurses-devel readline-devel sqlite-devel tk-devel xorg-x11-devel BuildRequires: blt db-devel gdbm-devel gmp-devel libbz2-devel libopenssl-devel ncurses-devel readline-devel sqlite-devel tk-devel xorg-x11-devel
%if %suse_version >= 1030 %if %suse_version >= 1030
BuildRequires: fdupes BuildRequires: fdupes
%endif %endif
@ -27,9 +27,10 @@ Url: http://www.python.org/
License: X11/MIT License: X11/MIT
Group: Development/Languages/Python Group: Development/Languages/Python
AutoReqProv: on AutoReqProv: on
Requires: python-base
Obsoletes: python-nothreads python21 python-elementtree python-sqlite Obsoletes: python-nothreads python21 python-elementtree python-sqlite
Summary: Python Interpreter Summary: Python Interpreter
Version: 2.6b3 Version: 2.6rc2
Release: 1 Release: 1
%define tarname Python-%{version} %define tarname Python-%{version}
Source0: %{tarname}.tar.bz2 Source0: %{tarname}.tar.bz2
@ -39,19 +40,16 @@ Source9: python.sh
Source10: python.csh Source10: python.csh
#Source11: testfiles.tar.bz2 #Source11: testfiles.tar.bz2
# issues with copyrighted Unicode testing files # issues with copyrighted Unicode testing files
Source13: distutils.cfg
Patch01: Python-2.3.3-dirs.patch Patch01: Python-2.3.3-dirs.patch
Patch10: python-distutils-rpm-8.patch
Patch21: Python-2.6b1-multilib.patch Patch21: Python-2.6b1-multilib.patch
Patch23: ssl-compat.diff Patch23: python-2.6b3-ssl-compat.patch
Patch25: python-2.6b1-canonicalize2.patch Patch25: python-2.6b1-canonicalize2.patch
Patch26: python-2.6b1-localpath.patch Patch26: python-2.6b1-localpath.patch
Patch27: python-2.6b2-https_warn.patch
Patch30: python-2.5.1-sqlite.patch Patch30: python-2.5.1-sqlite.patch
Patch31: python-2.5.2-fwrapv.patch Patch31: python-2.5.2-fwrapv.patch
Patch35: python-2.5.2-configure.patch Patch35: python-2.5.2-configure.patch
Patch37: python-2.6b2-CVE-2008-2316-hashlib.patch
Patch38: python-2.6b3-curses-panel.patch Patch38: python-2.6b3-curses-panel.patch
Patch39: python-2.6rc2-sslwrap-simple.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define python_version %(echo %{version} | head -c 3) %define python_version %(echo %{version} | head -c 3)
%define idle_name idle %define idle_name idle
@ -105,30 +103,6 @@ programs that are useful for building or extending Python.
Authors:
--------
Guido van Rossum <guido@python.org>
%package devel
License: Python Copyright
Requires: python = %{version} python-tk
Summary: Include Files and Libraries Mandatory for Building Python Modules
Group: Development/Languages/Python
AutoReqProv: on
%description devel
The Python programming language's interpreter can be extended with
dynamically loaded extensions and can be embedded in other programs.
This package contains header files, a static library, and development
tools for building Python modules, extending the Python interpreter or
embedding Python in applications.
This also includes the Python distutils, which were in the Python
package up to version 2.2.2.
Authors: Authors:
-------- --------
Guido van Rossum <guido@python.org> Guido van Rossum <guido@python.org>
@ -193,37 +167,24 @@ Authors:
-------- --------
Guido van Rossum <guido@python.org> Guido van Rossum <guido@python.org>
%package xml
License: Python Copyright
Requires: python = %{version}
Summary: A Python XML Interface
Group: Development/Libraries/Python
AutoReqProv: on
%description xml
The expat module is a Python interface to the expat XML parser. Since
Python2.x, it is part of the core Python distribution.
%prep %prep
#%%setup -q -n %{tarname} -a11 #%%setup -q -n %{tarname} -a11
%setup -q -n %{tarname} %setup -q -n %{tarname}
# patching # patching
%patch01 %patch01
%patch10 -p1
%patch21 -p1 %patch21 -p1
%patch23 %patch23
%patch25 %patch25
%patch26 %patch26
%patch27
%patch30 %patch30
%patch31 %patch31
#%if 0%{?suse_version} #%if 0%{?suse_version}
#%endif #%endif
%patch35 %patch35
%patch37 %if %suse_version > 1100
%patch38 %patch38
%endif
%patch39
# some cleanup # some cleanup
find . -name .cvsignore -type f -print0 | xargs -0 rm -f find . -name .cvsignore -type f -print0 | xargs -0 rm -f
find . -name CVS -type d -print0 | xargs -0 rm -rf find . -name CVS -type d -print0 | xargs -0 rm -rf
@ -256,26 +217,22 @@ touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
# compile # compile
######################################## ########################################
make %{?jobs:-j%jobs} DESTDIR=$RPM_BUILD_ROOT make %{?jobs:-j%jobs} DESTDIR=$RPM_BUILD_ROOT
########################################
# test %check
########################################
# on hppa, the threading of glibc is quite broken. The tests just stop # on hppa, the threading of glibc is quite broken. The tests just stop
# at some point, and the machine does not build anything more until a # at some point, and the machine does not build anything more until a
# timeout several hours later. # timeout several hours later.
%ifnarch hppa %arm %ifnarch hppa %arm
# extensive bsddb test fails (probably on all 64-bit arches):
# Berkeley DB library configured to support only private environments
# test_file fails in autobuild env - "stdin.seek(-1)" wrongly succeeds. probably an issue with autobuild's stdin # test_file fails in autobuild env - "stdin.seek(-1)" wrongly succeeds. probably an issue with autobuild's stdin
# test_nis fails in autobuild env. probably a misconfiguration of mbuild servers # test_urllib2 fails in autobuild env, because it's notoriously impossible to resolve an address in autobuild
#EXCLUDE="-x test_file -x test_nis" EXCLUDE="-x test_urllib2 -x test_file"
EXCLUDE="-x test_unicode -x test_urllib2 -x test_file" # these two tests work fine but are awfully slow
EXCLUDE="$EXCLUDE -x test_nis -x test_threading"
# Limit virtual memory to avoid spurious failures # Limit virtual memory to avoid spurious failures
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
ulimit -v 10000000 || : ulimit -v 10000000 || :
fi fi
make test TESTOPTS="-l $EXCLUDE" make test TESTOPTS="-l $EXCLUDE"
# test bsddb:
#make test TESTOPTS="-l -u bsddb"
# use network, be verbose: # use network, be verbose:
#make test TESTOPTS="-l -u network -v" #make test TESTOPTS="-l -u network -v"
%endif %endif
@ -291,10 +248,6 @@ make \
OPT="$RPM_OPT_FLAGS -fPIC" \ OPT="$RPM_OPT_FLAGS -fPIC" \
DESTDIR=$RPM_BUILD_ROOT \ DESTDIR=$RPM_BUILD_ROOT \
install install
# install site-specific tweaks
# install -m 644 %{S:12} ${RPM_BUILD_ROOT}%{_libdir}/python%{python_version}
install -m 644 %{S:13} ${RPM_BUILD_ROOT}%{_libdir}/python%{python_version}/distutils
ln -s python%{python_version} ${RPM_BUILD_ROOT}%{_bindir}/python2
######################################## ########################################
# some cleanups # some cleanups
######################################## ########################################
@ -305,6 +258,92 @@ for dir in bin include %{_lib} ; do
done done
# kill imageop.so, it's insecure # kill imageop.so, it's insecure
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}/lib-dynload/imageop.so rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}/lib-dynload/imageop.so
#cleanup for -base
rm $RPM_BUILD_ROOT%{_bindir}/python{,2.6}
rm $RPM_BUILD_ROOT%{_bindir}/smtpd.py
rm $RPM_BUILD_ROOT%{_bindir}/pydoc
rm $RPM_BUILD_ROOT%{_bindir}/2to3
rm $RPM_BUILD_ROOT%{_mandir}/man1/python.1*
rm $RPM_BUILD_ROOT%{_libdir}/libpython*.so.*
rm $RPM_BUILD_ROOT%{_libdir}/python
find $RPM_BUILD_ROOT%{_libdir}/python%{python_version} -maxdepth 1 ! \( -name "ssl.py" \) -exec rm {} ";"
rm $RPM_BUILD_ROOT%{_bindir}/python%{python_version}-config
rm $RPM_BUILD_ROOT%{_bindir}/python-config
rm -r $RPM_BUILD_ROOT%{_includedir}/python
rm -r $RPM_BUILD_ROOT%{_includedir}/python%{python_version}
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/bsddb
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/compiler
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/config
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/ctypes
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/distutils
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/email
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/encodings
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/hotshot
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/json
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib2to3
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/logging
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/multiprocessing
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/plat-*
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/test
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/wsgiref
rm -r $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/xml
rm $RPM_BUILD_ROOT%{_libdir}/libpython%{python_version}.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/site-packages/README
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_bisect.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_bytesio.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_bsddb.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_csv.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_collections.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_ctypes.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_ctypes_test.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_elementtree.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_fileio.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_functools.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_heapq.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_hotshot.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_json.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_locale.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_lsprof.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_multiprocessing.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_random.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_socket.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_struct.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_testcapi.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_weakref.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/array.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/binascii.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/bz2.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/cPickle.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/cStringIO.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/cmath.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/crypt.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/datetime.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/fcntl.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/future_builtins.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/grp.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/itertools.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/linuxaudiodev.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/math.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/mmap.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/nis.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/operator.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/ossaudiodev.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/parser.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/pyexpat.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/resource.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/select.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/spwd.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/strop.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/syslog.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/termios.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/time.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/unicodedata.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/zlib.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_codecs*.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_multibytecodec.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/audioop.so
rm -f $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/dl.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/Python-%{version}-py%{python_version}.egg-info
%if %suse_version >= 1030 %if %suse_version >= 1030
# replace duplicate .pyo/.pyc with hardlinks # replace duplicate .pyo/.pyc with hardlinks
%fdupes $RPM_BUILD_ROOT/%{_libdir}/python%{python_version} %fdupes $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}
@ -338,11 +377,6 @@ install -d -m755 ${RPM_BUILD_ROOT}/etc/%{idle_name}
done done
) )
######################################## ########################################
# devel
########################################
# install Makefile.pre.in and Makefile.pre
cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/config/
########################################
# startup script # startup script
######################################## ########################################
install -m 644 %{S:8} $RPM_BUILD_ROOT/etc install -m 644 %{S:8} $RPM_BUILD_ROOT/etc
@ -389,124 +423,44 @@ rm -rf $RPM_BUILD_ROOT
%files gdbm %files gdbm
%defattr(644, root, root, 755) %defattr(644, root, root, 755)
%{_libdir}/python%{python_version}/lib-dynload/gdbm.so %{_libdir}/python%{python_version}/lib-dynload/gdbm.so
%{_libdir}/python%{python_version}/lib-dynload/dbm.so
%files xml
%defattr(644, root, root, 755)
%{_libdir}/python%{python_version}/xml
%{_libdir}/python%{python_version}/lib-dynload/pyexpat.so
%files devel
%defattr(-, root, root)
%{_libdir}/python%{python_version}/config
%defattr(644, root, root, 755)
%{_libdir}/libpython*.so
%{_prefix}/include/python*
%{_libdir}/python%{python_version}/test
%defattr(755, root, root)
%{_bindir}/python-config
%{_bindir}/python%{python_version}-config
%files %files
%defattr(644, root, root, 755) %defattr(644, root, root, 755)
%config /etc/pythonstart
%config /etc/profile.d/python.*
%dir %{_docdir}/%{name} %dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/README %doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/LICENSE %doc %{_docdir}/%{name}/LICENSE
%doc %{_docdir}/%{name}/README.SUSE %doc %{_docdir}/%{name}/README.SUSE
%doc %{_mandir}/man1/python.1* %config /etc/pythonstart
%{_libdir}/libpython*.so.* %config /etc/profile.d/python.*
%{_libdir}/python
%dir %{_libdir}/python%{python_version} %dir %{_libdir}/python%{python_version}
%{_libdir}/python%{python_version}/*.* %{_libdir}/python%{python_version}/ssl.py*
%{_libdir}/python%{python_version}/bsddb
%{_libdir}/python%{python_version}/compiler
%{_libdir}/python%{python_version}/ctypes
%{_libdir}/python%{python_version}/distutils
%{_libdir}/python%{python_version}/email
%{_libdir}/python%{python_version}/encodings
%{_libdir}/python%{python_version}/hotshot
%{_libdir}/python%{python_version}/json
%{_libdir}/python%{python_version}/lib2to3
%{_libdir}/python%{python_version}/logging
%{_libdir}/python%{python_version}/multiprocessing
%{_libdir}/python%{python_version}/plat-*
%{_libdir}/python%{python_version}/sqlite3 %{_libdir}/python%{python_version}/sqlite3
%{_libdir}/python%{python_version}/wsgiref
%dir %{_libdir}/python%{python_version}/site-packages
%{_libdir}/python%{python_version}/site-packages/README
%dir %{_libdir}/python%{python_version}/lib-dynload %dir %{_libdir}/python%{python_version}/lib-dynload
%{_libdir}/python%{python_version}/lib-dynload/_bisect.so
%{_libdir}/python%{python_version}/lib-dynload/_bytesio.so
%{_libdir}/python%{python_version}/lib-dynload/_bsddb.so
%{_libdir}/python%{python_version}/lib-dynload/_csv.so
%{_libdir}/python%{python_version}/lib-dynload/_collections.so
%{_libdir}/python%{python_version}/lib-dynload/_ctypes.so
%{_libdir}/python%{python_version}/lib-dynload/_ctypes_test.so
%{_libdir}/python%{python_version}/lib-dynload/_elementtree.so
%{_libdir}/python%{python_version}/lib-dynload/_fileio.so
%{_libdir}/python%{python_version}/lib-dynload/_functools.so
%{_libdir}/python%{python_version}/lib-dynload/_hashlib.so %{_libdir}/python%{python_version}/lib-dynload/_hashlib.so
%{_libdir}/python%{python_version}/lib-dynload/_heapq.so
%{_libdir}/python%{python_version}/lib-dynload/_hotshot.so
%{_libdir}/python%{python_version}/lib-dynload/_json.so
%{_libdir}/python%{python_version}/lib-dynload/_locale.so
%{_libdir}/python%{python_version}/lib-dynload/_lsprof.so
%{_libdir}/python%{python_version}/lib-dynload/_multiprocessing.so
%{_libdir}/python%{python_version}/lib-dynload/_random.so
%{_libdir}/python%{python_version}/lib-dynload/_socket.so
%{_libdir}/python%{python_version}/lib-dynload/_sqlite3.so %{_libdir}/python%{python_version}/lib-dynload/_sqlite3.so
%{_libdir}/python%{python_version}/lib-dynload/_ssl.so %{_libdir}/python%{python_version}/lib-dynload/_ssl.so
%{_libdir}/python%{python_version}/lib-dynload/_struct.so
%{_libdir}/python%{python_version}/lib-dynload/_testcapi.so
%{_libdir}/python%{python_version}/lib-dynload/_weakref.so
%{_libdir}/python%{python_version}/lib-dynload/array.so
%{_libdir}/python%{python_version}/lib-dynload/binascii.so
%{_libdir}/python%{python_version}/lib-dynload/bz2.so
%{_libdir}/python%{python_version}/lib-dynload/cPickle.so
%{_libdir}/python%{python_version}/lib-dynload/cStringIO.so
%{_libdir}/python%{python_version}/lib-dynload/cmath.so
%{_libdir}/python%{python_version}/lib-dynload/crypt.so
%{_libdir}/python%{python_version}/lib-dynload/datetime.so
%{_libdir}/python%{python_version}/lib-dynload/dbm.so
%{_libdir}/python%{python_version}/lib-dynload/fcntl.so
%{_libdir}/python%{python_version}/lib-dynload/future_builtins.so
%{_libdir}/python%{python_version}/lib-dynload/grp.so
%{_libdir}/python%{python_version}/lib-dynload/itertools.so
%{_libdir}/python%{python_version}/lib-dynload/linuxaudiodev.so
%{_libdir}/python%{python_version}/lib-dynload/math.so
%{_libdir}/python%{python_version}/lib-dynload/mmap.so
%{_libdir}/python%{python_version}/lib-dynload/nis.so
%{_libdir}/python%{python_version}/lib-dynload/operator.so
%{_libdir}/python%{python_version}/lib-dynload/ossaudiodev.so
%{_libdir}/python%{python_version}/lib-dynload/parser.so
%{_libdir}/python%{python_version}/lib-dynload/readline.so %{_libdir}/python%{python_version}/lib-dynload/readline.so
%{_libdir}/python%{python_version}/lib-dynload/resource.so
%{_libdir}/python%{python_version}/lib-dynload/select.so
%{_libdir}/python%{python_version}/lib-dynload/spwd.so
%{_libdir}/python%{python_version}/lib-dynload/strop.so
%{_libdir}/python%{python_version}/lib-dynload/syslog.so
%{_libdir}/python%{python_version}/lib-dynload/termios.so
%{_libdir}/python%{python_version}/lib-dynload/time.so
%{_libdir}/python%{python_version}/lib-dynload/unicodedata.so
%{_libdir}/python%{python_version}/lib-dynload/zlib.so
%{_libdir}/python%{python_version}/lib-dynload/_codecs*.so
%{_libdir}/python%{python_version}/lib-dynload/_multibytecodec.so
%{_libdir}/python%{python_version}/lib-dynload/audioop.so
%{_libdir}/python%{python_version}/lib-dynload/Python-%{version}-py%{python_version}.egg-info
# these modules don't support 64-bit arches (disabled by setup.py)
%ifnarch alpha ia64 x86_64 s390x ppc64
# requires sizeof(int) == sizeof(long) == sizeof(char*)
%{_libdir}/python%{python_version}/lib-dynload/dl.so
%endif
%attr(755, root, root) %{_bindir}/pydoc
%attr(755, root, root) %{_bindir}/python
%attr(755, root, root) %{_bindir}/2to3
%attr(755, root, root) %{_bindir}/python%{python_version}
%attr(755, root, root) %{_bindir}/smtpd.py
%{_bindir}/python2
%changelog %changelog
* Fri Sep 19 2008 matejcik@suse.cz
- moved testsuite to %%check section
- update to 2.6rc2, removing the last remaining security patch
- included fix for socket.ssl() behavior regression, fixing
bnc#426563
* Tue Sep 16 2008 matejcik@suse.cz
- moved python-xml to subpackage of python-base
- moved dbm.so to gdbm subpackage
- moved ssl.py and sqlite3 module to this
* Mon Sep 15 2008 matejcik@suse.cz
- update to 2.6rc1 - bugfix-only pre-stable release
* Fri Sep 12 2008 matejcik@suse.cz
- split package, as per fate#305065
- moved python-devel to be a subpackage of python-base
- minor fixes & packaging cleanups
* Wed Sep 10 2008 matejcik@suse.cz
- fixed misapplied ssl-compat patch (caused segfaults when
opening SSL connections, bnc#425138 )
* Wed Sep 03 2008 matejcik@suse.cz * Wed Sep 03 2008 matejcik@suse.cz
- updated to 2.6beta3 from BETA dist, summary of changes follows: - updated to 2.6beta3 from BETA dist, summary of changes follows:
* patches update/cleanup * patches update/cleanup

View File

@ -1,10 +0,0 @@
--- Modules/_ssl.c
+++ Modules/_ssl.c
@@ -210,6 +210,7 @@
errstr = "SSL_CTX_new error";
goto fail;
}
+ SSL_CTX_set_options(self->ctx, SSL_OP_ALL); /* ssl compatibility */
if (key_file) {
Py_BEGIN_ALLOW_THREADS