Merge branch 'master' into f16
* Thu Sep 1 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-2.2 - disable parts of test_io on ppc (rhbz#732998) - use "--findleaks --verbose" when running test suite - re-enable and fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid aliasing violations (patch 130; rhbz#698726) - add %%python3_version to the rpm macros (rhbz#719082) Conflicts: python3.spec
This commit is contained in:
commit
72dcf3b622
@ -1,4 +1,5 @@
|
||||
%__python3 /usr/bin/python3
|
||||
%python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
%python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||
%python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
|
||||
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
|
||||
|
11
python-2.7.2-disable-tests-in-test_io.patch
Normal file
11
python-2.7.2-disable-tests-in-test_io.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -up Python-2.7.2/Lib/test/test_io.py.disable-tests-in-test_io Python-2.7.2/Lib/test/test_io.py
|
||||
--- Python-2.7.2/Lib/test/test_io.py.disable-tests-in-test_io 2011-09-01 14:18:45.963304089 -0400
|
||||
+++ Python-2.7.2/Lib/test/test_io.py 2011-09-01 15:08:53.796098413 -0400
|
||||
@@ -2669,6 +2669,7 @@ class SignalsTest(unittest.TestCase):
|
||||
self.check_interrupted_read_retry(lambda x: x,
|
||||
mode="r")
|
||||
|
||||
+ @unittest.skip('rhbz#732998')
|
||||
@unittest.skipUnless(threading, 'Threading required for this test.')
|
||||
def check_interrupted_write_retry(self, item, **fdopen_kwargs):
|
||||
"""Check that a buffered write, when it gets interrupted (either
|
58
python-2.7.2-tsc-on-ppc.patch
Normal file
58
python-2.7.2-tsc-on-ppc.patch
Normal file
@ -0,0 +1,58 @@
|
||||
diff -up Python-2.7.2/Python/ceval.c.tsc-on-ppc Python-2.7.2/Python/ceval.c
|
||||
--- Python-2.7.2/Python/ceval.c.tsc-on-ppc 2011-08-23 14:59:48.051300849 -0400
|
||||
+++ Python-2.7.2/Python/ceval.c 2011-08-23 15:33:25.412162902 -0400
|
||||
@@ -37,24 +37,42 @@ typedef unsigned long long uint64;
|
||||
*/
|
||||
#if defined(__ppc__) || defined (__powerpc__)
|
||||
|
||||
-#define READ_TIMESTAMP(var) ppc_getcounter(&var)
|
||||
+#if defined( __powerpc64__) || defined(__LP64__)
|
||||
+/* 64-bit PowerPC */
|
||||
+#define READ_TIMESTAMP(var) ppc64_getcounter(&var)
|
||||
+static void
|
||||
+ppc64_getcounter(uint64 *v)
|
||||
+{
|
||||
+ /* On 64-bit PowerPC we can read the 64-bit timebase directly into a
|
||||
+ 64-bit register */
|
||||
+ uint64 timebase;
|
||||
+#ifdef _ARCH_PWR4
|
||||
+ asm volatile ("mfspr %0,268" : "=r" (timebase));
|
||||
+#else
|
||||
+ asm volatile ("mftb %0" : "=r" (timebase));
|
||||
+#endif
|
||||
+ *v = timebase;
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+/* 32-bit PowerPC */
|
||||
+#define READ_TIMESTAMP(var) ppc32_getcounter(&var)
|
||||
|
||||
static void
|
||||
-ppc_getcounter(uint64 *v)
|
||||
+ppc32_getcounter(uint64 *v)
|
||||
{
|
||||
- register unsigned long tbu, tb, tbu2;
|
||||
+ union { long long ll; long ii[2]; } u;
|
||||
+ long tmp;
|
||||
|
||||
loop:
|
||||
- asm volatile ("mftbu %0" : "=r" (tbu) );
|
||||
- asm volatile ("mftb %0" : "=r" (tb) );
|
||||
- asm volatile ("mftbu %0" : "=r" (tbu2));
|
||||
- if (__builtin_expect(tbu != tbu2, 0)) goto loop;
|
||||
-
|
||||
- /* The slightly peculiar way of writing the next lines is
|
||||
- compiled better by GCC than any other way I tried. */
|
||||
- ((long*)(v))[0] = tbu;
|
||||
- ((long*)(v))[1] = tb;
|
||||
+ asm volatile ("mftbu %0" : "=r" (u.ii[0]) );
|
||||
+ asm volatile ("mftb %0" : "=r" (u.ii[1]) );
|
||||
+ asm volatile ("mftbu %0" : "=r" (tmp));
|
||||
+ if (__builtin_expect(u.ii[0] != tmp, 0)) goto loop;
|
||||
+
|
||||
+ *v = u.ll;
|
||||
}
|
||||
+#endif /* powerpc 32/64 bit */
|
||||
|
||||
#elif defined(__i386__)
|
||||
|
33
python3.spec
33
python3.spec
@ -118,7 +118,7 @@
|
||||
Summary: Version 3 of the Python programming language aka Python 3000
|
||||
Name: python3
|
||||
Version: %{pybasever}.1
|
||||
Release: 2.1%{?dist}
|
||||
Release: 2.2%{?dist}
|
||||
License: Python
|
||||
Group: Development/Languages
|
||||
|
||||
@ -266,6 +266,17 @@ Patch128: python-3.2b2-test_sys-COUNT_ALLOCS.patch
|
||||
# Not yet sent upstream
|
||||
Patch129: python-3.2.1-fix-test-subprocess-with-nonreadable-path-dir.patch
|
||||
|
||||
# Fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid
|
||||
# aliasing violations (rhbz#698726)
|
||||
# Sent upstream as http://bugs.python.org/issue12872
|
||||
Patch130: python-2.7.2-tsc-on-ppc.patch
|
||||
|
||||
# The four tests in test_io built on top of check_interrupted_write_retry
|
||||
# fail when built in Koji, for ppc and ppc64; for some reason, the SIGALRM
|
||||
# handlers are never called, and the call to write runs to completion
|
||||
# (rhbz#732998)
|
||||
Patch131: python-2.7.2-disable-tests-in-test_io.patch
|
||||
|
||||
# This is the generated patch to "configure"; see the description of
|
||||
# %{regenerate_autotooling_patch}
|
||||
# above:
|
||||
@ -424,6 +435,11 @@ rm -r Modules/zlib || exit 1
|
||||
%patch127 -p1
|
||||
%patch128 -p1
|
||||
%patch129 -p1
|
||||
%patch130 -p1 -b .tsc-on-ppc
|
||||
|
||||
%ifarch ppc ppc64
|
||||
%patch131 -p1
|
||||
%endif
|
||||
|
||||
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
|
||||
# are many differences between 2.6 and the Python 3 library.
|
||||
@ -757,6 +773,7 @@ LD_LIBRARY_PATH=. /usr/lib/rpm/brp-python-bytecompile ./python
|
||||
find %{buildroot} \
|
||||
-perm 555 -exec chmod 755 {} \;
|
||||
|
||||
# Install macros for rpm:
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/rpm
|
||||
install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm
|
||||
install -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/rpm
|
||||
@ -902,7 +919,9 @@ CheckPython() {
|
||||
# not in the buildroot.
|
||||
|
||||
# Run the upstream test suite
|
||||
LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest -x $EXCLUDED_TESTS
|
||||
LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
|
||||
--verbose --findleaks \
|
||||
-x $EXCLUDED_TESTS
|
||||
|
||||
echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
|
||||
|
||||
@ -932,9 +951,6 @@ rm -fr %{buildroot}
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
|
||||
# ======================================================
|
||||
# Manifests of the various subpackages
|
||||
# ======================================================
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
@ -1292,6 +1308,13 @@ rm -fr %{buildroot}
|
||||
# ======================================================
|
||||
|
||||
%changelog
|
||||
* Thu Sep 1 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-2.2
|
||||
- disable parts of test_io on ppc (rhbz#732998)
|
||||
- use "--findleaks --verbose" when running test suite
|
||||
- re-enable and fix the --with-tsc option on ppc64, and rework it on 32-bit
|
||||
ppc to avoid aliasing violations (patch 130; rhbz#698726)
|
||||
- add %%python3_version to the rpm macros (rhbz#719082)
|
||||
|
||||
* Tue Aug 23 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-2.1
|
||||
- don't use --with-tsc on ppc64 debug builds (rhbz#698726)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user