Hello community, here is the log from the commit of package python3 for openSUSE:Factory checked in at 2012-04-12 09:47:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3 (Old) and /work/SRC/openSUSE:Factory/.python3.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/python3/python3-base.changes 2012-01-04 07:30:23.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3.new/python3-base.changes 2012-04-12 09:47:03.000000000 +0200 @@ -1,0 +2,33 @@ +Thu Mar 29 15:44:33 UTC 2012 - [email protected] + +- update to 3.2.3rc2 + * fixes several security issues: + * CVE-2012-0845, bnc#747125 + * CVE-2012-1150, bnc#751718 + * CVE-2011-4944, bnc#754447 + * CVE-2011-3389, bnc#754677 +- fix for insecure .pypirc (CVE-2011-4944, bnc#754447) +- disable test_gdb because it is broken by our gdb + +------------------------------------------------------------------- +Thu Feb 16 12:33:12 UTC 2012 - [email protected] + +- skip broken test_io test on ppc + +------------------------------------------------------------------- +Wed Jan 18 15:49:47 UTC 2012 - [email protected] + +- update to 3.2.2 + * bugfix-only release + * reports "linux2" as sys.platform regardless of Linux kernel +- added pre_checkin.sh to copy common spec sections to python3.spec +- added PACKAGING-NOTES with some helpful info for packagers + +------------------------------------------------------------------- +Sun Dec 25 13:25:01 UTC 2011 - [email protected] + +- Use system ffi, included one is broken see + http://bugs.python.org/issue11729 and + http://bugs.python.org/issue12081 + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/python3/python3-doc.changes 2011-09-23 12:43:31.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3.new/python3-doc.changes 2012-04-12 09:47:03.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Jan 18 15:52:06 UTC 2012 - [email protected] + +- update to build against 3.2.2 + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/python3/python3.changes 2012-01-04 07:30:23.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3.new/python3.changes 2012-04-12 09:47:03.000000000 +0200 @@ -1,0 +2,7 @@ +Sun Dec 25 13:26:04 UTC 2011 - [email protected] + +- Use system ffi, included one is broken see + http://bugs.python.org/issue11729 and + http://bugs.python.org/issue12081 + +------------------------------------------------------------------- Old: ---- Python-3.2.1.tar.bz2 python-3.2-linux3.patch python-3.2rc2-localpath.patch New: ---- PACKAGING-NOTES Python-3.2.3rc2.tar.bz2 pre_checkin.sh python-3.2.2-disable-tests-in-test_io.patch python-3.2.3rc2-localpath.patch python-3.2.3rc2-pypirc-secure.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-base.spec ++++++ --- /var/tmp/diff_new_pack.CKeTPt/_old 2012-04-12 09:47:07.000000000 +0200 +++ /var/tmp/diff_new_pack.CKeTPt/_new 2012-04-12 09:47:07.000000000 +0200 @@ -16,17 +16,26 @@ # +# !!!! +# this is the master spec file, but changes should be submitted +# against python3, not python3-base +# +# see PACKAGING-NOTES for details +# !!!! Name: python3-base -BuildRequires: zlib-devel fdupes pkg-config automake +BuildRequires: automake +BuildRequires: fdupes +BuildRequires: pkg-config +BuildRequires: zlib-devel Url: http://www.python.org/ +Summary: Python3 Interpreter License: Python-2.0 Group: Development/Languages/Python -AutoReqProv: on -Summary: Python3 Interpreter -Version: 3.2.1 -Release: 2 -%define tarversion %{version} +Version: 3.2.2.99rc2 +Release: 0 +#%%define tarversion %{version} +%define tarversion 3.2.3rc2 %define tarname Python-%{tarversion} # python 3.1 didn't have a separate python-base, so it is wrongly @@ -43,6 +52,11 @@ Source6: distutils.cfg Source7: macros.python3.py +Source99: PACKAGING-NOTES +# this is documentation for packagers, put here to silence Factory source_validator + +### COMMON-PATCH-BEGIN ### + # implement "--record-rpm" option for distutils installations Patch01: Python-3.0b1-record-rpm.patch # support lib-vs-lib64 distinction @@ -50,23 +64,31 @@ # securing usage of readlink/realpath in PySys_SetArgv Patch03: python-2.6b1-canonicalize2.patch # support finding packages in /usr/local, install to /usr/local by default -Patch04: python-3.2rc2-localpath.patch +Patch04: python-3.2.3rc2-localpath.patch # fix usage of "python" executable in "make install" Patch05: python-3.2b2-buildtime-generate.patch # replace DATE, TIME and COMPILER by fixed definitions to aid reproducible builds Patch06: python-3.2.1-fix_date_time_compiler.patch -# support for "linux3" platform, for linux 3 kernel -Patch07: python-3.2-linux3.patch +# fix wrong include path in curses-panel module +Patch07: python-2.6b3-curses-panel.patch +# disable test_io test on ppc +Patch08: python-3.2.2-disable-tests-in-test_io.patch +# fix .pypirc creation vulnerability +Patch09: python-3.2.3rc2-pypirc-secure.patch +### COMMON-PATCH-END ### BuildRoot: %{_tmppath}/%{name}-%{version}-build +### COMMON-DEF-BEGIN ### + %define python_version %(echo %{tarversion} | head -c 3) %define shortver %(echo %{python_version} | cut -c 1,3) +%define sitedir %{_libdir}/python%{python_version} # three possible ABI kinds: m - pymalloc, d - debug build, u - wide unicode # see PEP 3149 %define abi_kind mu -# python ABI version - used in some file names, unsure why +# python ABI version - used in some file names %define python_abi %{python_version}%{abi_kind} # soname ABI tag defined in PEP 3149 %define abi_tag %{shortver}%{abi_kind} @@ -74,6 +96,8 @@ #%define so_version %(echo %{python_version} | tr . _)%{abi_kind}1_0 %define so_version 3_2%{abi_kind}1_0 +### COMMON-DEF-END ### + %description Python is an interpreted, object-oriented programming language, and is often compared to Tcl, Perl, Scheme, or Java. You can find an overview @@ -84,17 +108,15 @@ install python-devel package. - Authors: -------- Guido van Rossum <[email protected]> + %package -n python3-tools -License: Python-2.0 Requires: %{name} = %{version} Summary: Python Utility and Demonstration Scripts Group: Development/Languages/Python -AutoReqProv: on Obsoletes: python3-demo < %{version} Provides: python3-demo = %{version} @@ -104,11 +126,9 @@ %package -n python3-idle -License: Python-2.0 Requires: %{name} = %{version} python3-tk Summary: An Integrated Development Environment for Python Group: Development/Languages/Python -AutoReqProv: on %description -n python3-idle IDLE is a Tkinter based integrated development environment for Python. @@ -118,11 +138,9 @@ %package -n python3-devel -License: Python-2.0 Requires: %{name} = %{version} Summary: Include Files and Libraries Mandatory for Building Python Modules Group: Development/Languages/Python -AutoReqProv: on %description -n python3-devel The Python programming language's interpreter can be extended with @@ -136,12 +154,22 @@ package up to version 2.2.2. +%package -n python3-testsuite +Requires: python3 = %{version} +Requires: python3-tkinter = %{version} +Summary: Unit tests for Python and its standard library +Group: Development/Languages/Python + +%description -n python3-testsuite +Unit tests that are useful for verifying integrity and functionality +of the installed Python interpreter and standard library. +They are a documented part of stdlib, as a module 'test'. + + %package -n python3-xml -License: Python-2.0 Requires: %{name} = %{version} Summary: A Python XML Interface Group: Development/Libraries/Python -AutoReqProv: on %description -n python3-xml The expat module is a Python interface to the expat XML parser. Since @@ -149,21 +177,16 @@ %package -n python3-2to3 -License: Python-2.0 Requires: %{name} = %{version} Summary: Python 3.0 conversion tool Group: Development/Languages/Python -AutoReqProv: on %description -n python3-2to3 -Python3's version of the 2to3 conversion library. For all intents and -purposes it appears to be identical to the one shipped with Python 2.6. +Python3's version of the 2to3 conversion library. %package -n libpython%{so_version} -License: Python-2.0 Summary: Python Interpreter shared library Group: Development/Languages/Python -AutoReqProv: on %description -n libpython%{so_version} Python is an interpreted, object-oriented programming language, and is @@ -171,13 +194,15 @@ 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 +This package contains libpython3.2 shared library for embedding in other applications. %prep %setup -q -n %{tarname} +### COMMON-PREP-BEGIN ### + %patch01 -p1 %patch02 -p1 #%%patch03 @@ -185,15 +210,21 @@ %patch04 %patch05 -p1 %patch06 -p1 -%patch07 -p1 +%patch07 +#disable test_io on ppc +%ifarch ppc ppc64 +%patch08 -p1 +%endif +%patch09 -p1 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.in +### COMMON-PREP-END ### + %build # use rpm_opt_flags -export OPT="$RPM_OPT_FLAGS" -#export OPT="-O0 -g" +export OPT="%{optflags}" touch -r %{S:0} Makefile.pre.in @@ -215,10 +246,6 @@ make %{?_smp_mflags} profile-opt %check -# 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 -#EXCLUDE="-x test_file -x test_nis" - # test_ctypes breaks on ARM - even on real machines %ifarch %arm EXCLUDE="$EXCLUDE -x test_ctypes" @@ -227,12 +254,14 @@ %if 0%{?qemu_user_space_build} > 0 EXCLUDE="$EXCLUDE -x test_threading test_threadedtempfile test_io test_ioctl test_mmap test_openpty test_pty" %endif +# SUSE's gdb breaks test_gdb by producing spurious output (zypper suggestions) +EXCLUDE="-x test_gdb" # 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" +make test TESTOPTS="-l $EXCLUDE" TESTPYTHONOPTS="-R" # use network, be verbose: #make test TESTOPTS="-l -u network -v" @@ -247,12 +276,10 @@ # install it make \ - OPT="$RPM_OPT_FLAGS -fPIC" \ + OPT="%{optflags} -fPIC" \ DESTDIR=$RPM_BUILD_ROOT \ install -%define sitedir %{_libdir}/python%{python_version} - # remove .a find ${RPM_BUILD_ROOT} -name "*.a" -exec rm {} ";" @@ -267,7 +294,7 @@ rm $RPM_BUILD_ROOT%{sitedir}/lib-dynload/$so.* done for dir in curses dbm sqlite3 tkinter; do - rm -r $RPM_BUILD_ROOT%{sitedir}/$dir + find $RPM_BUILD_ROOT%{sitedir}/$dir/* -maxdepth 0 -name "test" -o -exec rm -rf {} ";" done # install site-specific tweaks @@ -360,14 +387,21 @@ %{_libdir}/pkgconfig/* %{_prefix}/include/python%{python_abi} %exclude %{_prefix}/include/python%{python_abi}/pyconfig.h -%{sitedir}/test -%{dynlib _ctypes_test} -%{dynlib _testcapi} %defattr(755, root, root) %{_bindir}/python%{python_abi}-config %{_bindir}/python%{python_version}-config %{_bindir}/python3-config +%files -n python3-testsuite +%defattr(644, root, root, 755) +%{sitedir}/test +%{sitedir}/*/test +%{dynlib _ctypes_test} +%{dynlib _testcapi} +# workaround for missing packages +%dir %{sitedir}/sqlite3 +%dir %{sitedir}/tkinter + %files -n python3-2to3 %defattr(644, root, root, 755) %attr(755, root, root) %{_bindir}/2to3 @@ -442,6 +476,7 @@ %dir %{sitedir} %dir %{sitedir}/site-packages %dir %{sitedir}/site-packages/__pycache__ +%exclude %{sitedir}/*/test %{sitedir}/*.* %{sitedir}/ctypes %{sitedir}/concurrent ++++++ python3-doc.spec ++++++ --- /var/tmp/diff_new_pack.CKeTPt/_old 2012-04-12 09:47:07.000000000 +0200 +++ /var/tmp/diff_new_pack.CKeTPt/_new 2012-04-12 09:47:07.000000000 +0200 @@ -15,19 +15,18 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: python3-doc Url: http://www.python.org/ -License: Python-2.0 -Group: Development/Languages/Python BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Additional Package Documentation for Python. +License: Python-2.0 +Group: Development/Languages/Python Version: 3.2 -Release: 3 -%define pyver 3.2.1 +Release: 0 +%define pyver 3.2.2.99rc2 BuildArch: noarch -%define tarname Python-%{pyver} +#%%define tarname Python-%{pyver} +%define tarname Python-3.2.3rc2 %define pyname python Enhances: %{pyname}=%{pyver} Source0: %{tarname}.tar.bz2 @@ -45,12 +44,10 @@ %package pdf -License: Python-2.0 Provides: pyth_pdf Obsoletes: pyth_pdf Summary: Python PDF Documentation Group: Development/Languages/Python -AutoReqProv: on %description pdf Tutorial, Global Module Index, Language Reference, Library Reference, ++++++ python3.spec ++++++ --- /var/tmp/diff_new_pack.CKeTPt/_old 2012-04-12 09:47:07.000000000 +0200 +++ /var/tmp/diff_new_pack.CKeTPt/_new 2012-04-12 09:47:07.000000000 +0200 @@ -15,18 +15,31 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: python3 -BuildRequires: db-devel fdupes gcc-c++ gdbm-devel gettext-tools gmp-devel intltool libbz2-devel libopenssl-devel ncurses-devel readline-devel sqlite-devel tk-devel xorg-x11-devel automake +BuildRequires: automake +BuildRequires: db-devel +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: gdbm-devel +BuildRequires: gettext-tools +BuildRequires: gmp-devel +BuildRequires: intltool +BuildRequires: libbz2-devel +BuildRequires: libffi-devel +BuildRequires: libopenssl-devel +BuildRequires: ncurses-devel +BuildRequires: readline-devel +BuildRequires: sqlite-devel +BuildRequires: tk-devel +BuildRequires: xorg-x11-devel Url: http://www.python.org/ +Summary: Python3 Interpreter License: Python-2.0 Group: Development/Languages/Python -AutoReqProv: on -Summary: Python3 Interpreter -Version: 3.2.1 -Release: 2 -%define tarversion %{version} +Version: 3.2.2.99rc2 +Release: 0 +#%%define tarversion %{version} +%define tarversion 3.2.3rc2 %define tarname Python-%{tarversion} Requires: python3-base = %{version} @@ -36,22 +49,61 @@ #Source11: testfiles.tar.bz2 # issues with copyrighted Unicode testing files -Patch01: Python-3.2.1-multilib.patch -Patch02: python-2.6b3-curses-panel.patch -Patch03: python-3.2-linux3.patch +# do not add patches here, please edit python3-base.spec instead +# and run pre_checkin.sh +# +# see PACKAGING-NOTES for details + +### COMMON-PATCH-BEGIN ### + +# implement "--record-rpm" option for distutils installations +Patch01: Python-3.0b1-record-rpm.patch +# support lib-vs-lib64 distinction +Patch02: Python-3.2.1-multilib.patch +# securing usage of readlink/realpath in PySys_SetArgv +Patch03: python-2.6b1-canonicalize2.patch +# support finding packages in /usr/local, install to /usr/local by default +Patch04: python-3.2.3rc2-localpath.patch +# fix usage of "python" executable in "make install" +Patch05: python-3.2b2-buildtime-generate.patch +# replace DATE, TIME and COMPILER by fixed definitions to aid reproducible builds +Patch06: python-3.2.1-fix_date_time_compiler.patch +# fix wrong include path in curses-panel module +Patch07: python-2.6b3-curses-panel.patch +# disable test_io test on ppc +Patch08: python-3.2.2-disable-tests-in-test_io.patch +# fix .pypirc creation vulnerability +Patch09: python-3.2.3rc2-pypirc-secure.patch +### COMMON-PATCH-END ### BuildRoot: %{_tmppath}/%{name}-%{version}-build +# do not add defs here, please edit python3-base.spec instead +# and run pre_checkin.sh +# +# see PACKAGING-NOTES for details + +### COMMON-DEF-BEGIN ### + %define python_version %(echo %{tarversion} | head -c 3) %define shortver %(echo %{python_version} | cut -c 1,3) +%define sitedir %{_libdir}/python%{python_version} +# three possible ABI kinds: m - pymalloc, d - debug build, u - wide unicode +# see PEP 3149 %define abi_kind mu +# python ABI version - used in some file names %define python_abi %{python_version}%{abi_kind} +# soname ABI tag defined in PEP 3149 %define abi_tag %{shortver}%{abi_kind} -%define sitedir %{_libdir}/python%{python_version} + +#%define so_version %(echo %{python_version} | tr . _)%{abi_kind}1_0 +%define so_version 3_2%{abi_kind}1_0 + +### COMMON-DEF-END ### %description -Python is an interpreted, object-oriented programming language, and is +Python 3 is modern interpreted, object-oriented programming language, 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. @@ -67,11 +119,9 @@ %package tk -License: Python-2.0 Requires: %{name} = %{version} Summary: TkInter - Python Tk Interface Group: Development/Libraries/Python -AutoReqProv: on %description tk Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The @@ -79,11 +129,9 @@ %package curses -License: Python-2.0 Requires: %{name} = %{version} Summary: Python Interface to the (N)Curses Library Group: Development/Libraries/Python -AutoReqProv: on %description curses An easy to use interface to the (n)curses CUI library. CUI stands for @@ -91,11 +139,9 @@ %package dbm -License: Python-2.0 Requires: %{name} = %{version} Summary: Python Interface to the GDBM Library Group: Development/Languages/Python -AutoReqProv: on %description dbm An easy to use interface for Unix DBM databases, and more specifically, @@ -104,17 +150,30 @@ %prep %setup -q -n %{tarname} -# patching +### COMMON-PREP-BEGIN ### + %patch01 -p1 -%patch02 -%patch03 -p1 +%patch02 -p1 +#%%patch03 +#- canonicalize disabled, needs testing whether the exploit still works +%patch04 +%patch05 -p1 +%patch06 -p1 +%patch07 +#disable test_io on ppc +%ifarch ppc ppc64 +%patch08 -p1 +%endif +%patch09 -p1 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.in +### COMMON-PREP-END ### + %build export SUSE_ASNEEDED=0 -export OPT="$RPM_OPT_FLAGS" +export OPT="%{optflags}" autoreconf -f -i . # prevent make from trying to rebuild asdl stuff, which requires existing @@ -129,9 +188,10 @@ --enable-ipv6 \ --with-fpectl \ --enable-shared \ - --with-wide-unicode + --with-wide-unicode \ + --with-system-ffi -make %{?jobs:-j%jobs} # DESTDIR=$RPM_BUILD_ROOT +make %{?_smp_mflags} # DESTDIR=$RPM_BUILD_ROOT %check # Limit virtual memory to avoid spurious failures @@ -140,8 +200,7 @@ fi # only test the parts skipped in python3-base TESTS="test_dbm_gnu test_dbm_ndbm test_readline test_ssl test_tcl test_tk test_ttk_guionly test_ttk_textonly test_curses test_socketserver test_sqlite test_hashlib" -make test TESTOPTS="-l $TESTS $EXCLUDE" - +make test TESTOPTS="-l $TESTS $EXCLUDE" TESTPYTHONOPTS="-R" %install # replace rest of /usr/local/bin/python or /usr/bin/python2.5 with /usr/bin/python3 @@ -150,7 +209,7 @@ # install it make \ - OPT="$RPM_OPT_FLAGS -fPIC" \ + OPT="%{optflags} -fPIC" \ DESTDIR=$RPM_BUILD_ROOT \ install @@ -189,7 +248,6 @@ %fdupes $RPM_BUILD_ROOT/%{_libdir}/python%{python_version} - %define dynlib() %{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}.so %files tk ++++++ PACKAGING-NOTES ++++++ Notes for packagers of Python3 ============================== I. python3 and python3-base naming confusion -------------------------------------------- 1. the important stuff first This is package "python3". However, master spec file for this package is "python3-base.spec". That means that all important changes should be put into "python3-base.spec" and then submitted against "python3" in OBS. Changelogs of python3-base and python3 will be merged at some point. Now they arent, but feel free to enter changes in either or both. 2. why is that? Technical reasons. python3-base was originally supposed to be a minimal package with no external dependencies - so that it can build early in the distribution rebuild. There were also some build loops involved. Turns out, 90% of Python's standard library can be built without external dependencies. That's what we do - in python3-base. python3 then only contains the remaining bits - dependency-heavy subpackages and some small pieces like ssl, hashlib and sqlite. Logically, python3-base must be the master spec because it builds the important parts. 3. why not rename the whole package to python3-base? Because that would be stupid. The package is called python3. 4. so why not make python3 the minimal package and put the rest in python3-the-rest? Because other distributions use python3-base as the minimal package as well. Also, packages that require python3 expect the whole deal, not a stripped-down version. 5. alright, let's build python3-base from python3.spec and python3 from someother.spec Tried that, abandoned it. It is more trouble than it's worth. II. pre_checkin.sh ------------------ Our pre_checkin.sh takes care of copying relevant portions of python3-base.spec to python3.spec. The "relevant portions" are: * list of patches * list of macro definitions * patch apply sequence in %prep That means that when you're adding a patch, you need only add it to python3-base.spec and it will appear magically in python3.spec too. If you want to replicate another section from py3-base to py3, just mark the section with NEW-SECTION-BEGIN and NEW-SECTION-END (in both py3-base and py3) and add NEW-SECTION to list of $sections in pre_checkin.sh ++++++ pre_checkin.sh ++++++ #!/bin/bash # This script is called automatically during autobuild checkin. master=python3-base.spec slaves=python3.spec sections="COMMON-PATCH COMMON-DEF COMMON-PREP" for slave in $slaves; do # yes, you are right. we don't need the 'for'. but as long as it's there, why not keep it { prev=1 for section in $sections; do begin="/$section-BEGIN/" end="/$section-END/" sed -n -e "${prev},${begin}p" $slave sed -n -e "${begin},${end}p" $master | head -n -1 | tail -n +2 prev=$end done sed -n -e "${prev},\$p" $slave } > $slave.tmp && mv $slave.tmp $slave done ++++++ python-3.2.2-disable-tests-in-test_io.patch ++++++ Index: Python-3.2.2/Lib/test/test_io.py =================================================================== --- Python-3.2.2.orig/Lib/test/test_io.py +++ Python-3.2.2/Lib/test/test_io.py @@ -2804,6 +2804,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 ++++++ python-3.2rc2-localpath.patch -> python-3.2.3rc2-localpath.patch ++++++ --- /work/SRC/openSUSE:Factory/python3/python-3.2rc2-localpath.patch 2011-09-23 12:43:31.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3.new/python-3.2.3rc2-localpath.patch 2012-04-12 09:47:03.000000000 +0200 @@ -1,8 +1,8 @@ Index: Lib/site.py =================================================================== ---- Lib/site.py.orig -+++ Lib/site.py -@@ -57,7 +57,7 @@ import os +--- Lib/site.py.orig 2012-03-29 16:34:50.000000000 +0200 ++++ Lib/site.py 2012-03-29 16:34:50.000000000 +0200 +@@ -58,7 +58,7 @@ import traceback # Prefixes for site-packages; add additional prefixes like /usr/local here @@ -13,12 +13,12 @@ ENABLE_USER_SITE = None Index: Lib/test/test_site.py =================================================================== ---- Lib/test/test_site.py.orig -+++ Lib/test/test_site.py -@@ -164,12 +164,27 @@ class HelperFunctionsTests(unittest.Test - wanted = os.path.join('xoxo', 'Lib', 'site-packages') - self.assertEqual(dirs[0], wanted) +--- Lib/test/test_site.py.orig 2012-03-18 07:36:05.000000000 +0100 ++++ Lib/test/test_site.py 2012-03-29 16:35:50.000000000 +0200 +@@ -236,12 +236,27 @@ + self.assertEqual(dirs[2], wanted) elif os.sep == '/': + # OS X non-framwework builds, Linux, FreeBSD, etc - self.assertEqual(len(dirs), 2) - wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], + i = 0 @@ -46,5 +46,5 @@ + self.assertTrue(i in [2,4]) + self.assertEqual(len(dirs), i) else: + # other platforms self.assertEqual(len(dirs), 2) - self.assertEqual(dirs[0], 'xoxo') ++++++ python-3.2.3rc2-pypirc-secure.patch ++++++ # HG changeset patch # User Philip Jenvey <[email protected]> # Date 1322701507 28800 # Branch 2.7 # Node ID e7c20a8476a0e2ca18f8040864cbc400818d8f24 # Parent 3ecddf168f1f554a17a047384fe0b02f2d688277 create the .pypirc securely Index: Python-3.2.3rc2/Lib/distutils/config.py =================================================================== --- Python-3.2.3rc2.orig/Lib/distutils/config.py 2012-03-18 07:36:03.000000000 +0100 +++ Python-3.2.3rc2/Lib/distutils/config.py 2012-03-29 16:39:59.000000000 +0200 @@ -43,16 +43,8 @@ def _store_pypirc(self, username, password): """Creates a default .pypirc file.""" rc = self._get_rc_file() - f = open(rc, 'w') - try: - f.write(DEFAULT_PYPIRC % (username, password)) - finally: - f.close() - try: - os.chmod(rc, 0o600) - except OSError: - # should do something better here - pass + with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0o600), 'w') as fp: + fp.write(DEFAULT_PYPIRC % (username, password)) def _read_pypirc(self): """Reads the .pypirc file.""" -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
