This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via 321e32316b64ae276abca02d51a822a296645bc1 (commit) via 05f64a9f8ea9959e5d947f0eca48461f73bc22d3 (commit) via 50d2d07eb84776bfc37ef4f20ad39ca78ee7e018 (commit) via 9b93424f5834b7581914b305dd030ef9f9f2a805 (commit) via 2511f7bf214861e19e6e299a834718fbdd6665b4 (commit) via 7ba4b2a03d9aba7a8e435573d020af9201197e8c (commit) from abf738371c25cfcf754e7d30e8f645ce8377ba7b (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 321e32316b64ae276abca02d51a822a296645bc1 Merge: 05f64a9 7ba4b2a Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jun 21 17:16:09 2015 +0200
Merge remote-tracking branch 'stevee/compat-xz'
commit 05f64a9f8ea9959e5d947f0eca48461f73bc22d3 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jun 21 17:14:34 2015 +0200
python3: Update to version 3.4.3
This is a major version bump and will probably render some python3-* packages incompatible.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 50d2d07eb84776bfc37ef4f20ad39ca78ee7e018 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jun 21 17:00:41 2015 +0200
perl: Rebuild against libdb
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 9b93424f5834b7581914b305dd030ef9f9f2a805 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jun 21 16:50:42 2015 +0200
compat-libgcrypt: New package
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 2511f7bf214861e19e6e299a834718fbdd6665b4 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jun 21 15:47:13 2015 +0200
pyfire: Drop package
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 7ba4b2a03d9aba7a8e435573d020af9201197e8c Author: Stefan Schantl stefan.schantl@ipfire.org Date: Tue Apr 7 21:41:23 2015 +0200
xz: Move compat libraries into own package.
Fixes #10751.
-----------------------------------------------------------------------
Summary of changes: .../compat-libgcrypt.nm | 32 +- compat-xz/compat-xz.nm | 62 ++ perl/perl.nm | 4 +- pyfire/pyfire.nm | 42 -- pyfire/src/Makefile | 32 - pyfire/src/__init__.py | 64 -- pyfire/src/config.py | 92 --- pyfire/src/executil.py | 255 -------- pyfire/src/hal.py | 70 --- pyfire/src/net.py | 175 ------ pyfire/src/web.py | 221 ------- python3/patches/00003-remove-mimeaudio-tests.patch | 51 -- python3/patches/00111-no-static-lib.patch | 59 -- .../patches/00113-more-configuration-flags.patch | 50 -- .../patches/00114-statvfs-f_flag-constants.patch | 39 -- .../patches/00125-less-verbose-COUNT_ALLOCS.patch | 20 - .../patches/00131-disable-tests-in-test_io.patch | 11 - .../00132-add-rpmbuild-hooks-to-unittest.patch | 68 -- ...0134-fix-COUNT_ALLOCS-failure-in-test_sys.patch | 21 - ...x-test-within-test_weakref-in-debug-build.patch | 17 - ...kip-distutils-tests-that-fail-in-rpmbuild.patch | 12 - ...0139-skip-test_float-known-failure-on-arm.patch | 11 - .../00141-fix-test_gc_with_COUNT_ALLOCS.patch | 22 - .../00142-skip-failing-pty-tests-in-rpmbuild.patch | 22 - python3/patches/00153-fix-test_gdb-noise.patch | 37 -- python3/patches/00155-avoid-ctypes-thunks.patch | 15 - python3/patches/00156-gdb-autoload-safepath.patch | 52 -- python3/patches/00157-uid-gid-overflows.patch | 696 --------------------- .../00160-disable-test_fs_holes-in-rpm-build.patch | 11 - ...disable-parts-of-test_socket-in-rpm-build.patch | 11 - ...64-disable-interrupted_write-tests-on-ppc.patch | 52 -- python3/patches/05000-autotool-intermediates.patch | 73 --- ...test-subprocess-with-nonreadable-path-dir.patch | 12 - ....3.0b1-lib64.patch => python-3.4.3-lib64.patch} | 84 ++- python3/python3.nm | 33 +- xz/xz.nm | 39 +- 36 files changed, 157 insertions(+), 2410 deletions(-) copy libgcrypt/libgcrypt.nm => compat-libgcrypt/compat-libgcrypt.nm (62%) create mode 100644 compat-xz/compat-xz.nm delete mode 100644 pyfire/pyfire.nm delete mode 100644 pyfire/src/Makefile delete mode 100644 pyfire/src/__init__.py delete mode 100644 pyfire/src/config.py delete mode 100644 pyfire/src/executil.py delete mode 100644 pyfire/src/hal.py delete mode 100644 pyfire/src/net.py delete mode 100644 pyfire/src/web.py delete mode 100644 python3/patches/00003-remove-mimeaudio-tests.patch delete mode 100644 python3/patches/00111-no-static-lib.patch delete mode 100644 python3/patches/00113-more-configuration-flags.patch delete mode 100644 python3/patches/00114-statvfs-f_flag-constants.patch delete mode 100644 python3/patches/00125-less-verbose-COUNT_ALLOCS.patch delete mode 100644 python3/patches/00131-disable-tests-in-test_io.patch delete mode 100644 python3/patches/00132-add-rpmbuild-hooks-to-unittest.patch delete mode 100644 python3/patches/00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch delete mode 100644 python3/patches/00135-fix-test-within-test_weakref-in-debug-build.patch delete mode 100644 python3/patches/00137-skip-distutils-tests-that-fail-in-rpmbuild.patch delete mode 100644 python3/patches/00139-skip-test_float-known-failure-on-arm.patch delete mode 100644 python3/patches/00141-fix-test_gc_with_COUNT_ALLOCS.patch delete mode 100644 python3/patches/00142-skip-failing-pty-tests-in-rpmbuild.patch delete mode 100644 python3/patches/00153-fix-test_gdb-noise.patch delete mode 100644 python3/patches/00155-avoid-ctypes-thunks.patch delete mode 100644 python3/patches/00156-gdb-autoload-safepath.patch delete mode 100644 python3/patches/00157-uid-gid-overflows.patch delete mode 100644 python3/patches/00160-disable-test_fs_holes-in-rpm-build.patch delete mode 100644 python3/patches/00163-disable-parts-of-test_socket-in-rpm-build.patch delete mode 100644 python3/patches/00164-disable-interrupted_write-tests-on-ppc.patch delete mode 100644 python3/patches/05000-autotool-intermediates.patch delete mode 100644 python3/patches/python-3.2.1-fix-test-subprocess-with-nonreadable-path-dir.patch rename python3/{python-3.3.0b1-lib64.patch => python-3.4.3-lib64.patch} (69%)
Difference in files: diff --git a/compat-libgcrypt/compat-libgcrypt.nm b/compat-libgcrypt/compat-libgcrypt.nm new file mode 100644 index 0000000..32a4374 --- /dev/null +++ b/compat-libgcrypt/compat-libgcrypt.nm @@ -0,0 +1,60 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team info@ipfire.org # +############################################################################### + +name = compat-libgcrypt +version = 1.5.4 +release = 1 +thisapp = libgcrypt-%{version} + +groups = System/Libraries +url = http://www.gnupg.org/ +license = LGPLv2.1+ +summary = A general-purpose cryptography library + +description + Libgcrypt is a general purpose crypto library based on the code used + in GNU Privacy Guard. +end + +source_dl = ftp://ftp.gnupg.org/gcrypt/libgcrypt/ +sources = %{thisapp}.tar.bz2 + +build + requires + gcc-c++ + libgpg-error-devel + end + + configure_options += \ + --enable-noexecstack + + test + make check + end + + install + # Install just the library and no headers. + mkdir -pv %{BUILDROOT}%{libdir} + + install -m 755 src/.libs/libgcrypt.so.11.8.3 %{BUILDROOT}%{libdir} + ln -svf libgcrypt.so.11.8.3 %{BUILDROOT}%{libdir}/libgcrypt.so.11 + end +end + +packages + package %{name} + provides + libgcrypt = %{thisver} + end + + obsoletes + libgcrypt <= %{thisver} + end + end + + package %{name}-debuginfo + template DEBUGINFO + end +end diff --git a/compat-xz/compat-xz.nm b/compat-xz/compat-xz.nm new file mode 100644 index 0000000..9acf280 --- /dev/null +++ b/compat-xz/compat-xz.nm @@ -0,0 +1,62 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team info@ipfire.org # +############################################################################### + +name = compat-xz +version = 4.999.9beta +release = 1 + +thisapp = xz-%{version} + +groups = Applications/Compression +url = http://tukaani.org/xz/ +license = LGPLv2+ +summary = LZMA Utils. + +description + LZMA provides very high compression ratio and fast decompression. The + core of the LZMA utils is Igor Pavlov's LZMA SDK containing the actual + LZMA encoder/decoder. LZMA utils add a few scripts which provide + gzip-like command line interface and a couple of other LZMA related + tools. +end + +source_dl = http://tukaani.org/xz/ +sources = %{thisapp}.tar.xz + +build + configure_options += \ + --disable-rpath + + test + export LD_LIBRARY_PATH=$(pwd)/src/liblzma/.libs + make check + end + + install + # Only install libraries. + mkdir -pv %{BUILDROOT}%{libdir} + cp -vr src/liblzma/.libs/liblzma.so.0* %{BUILDROOT}%{libdir} + end +end + +packages + package %{name} + provides + xz = %{thisver} + end + + obsoletes + xz-compat + end + + conflicts + xz <= %{thisver} + end + end + + package %{name}-debuginfo + template DEBUGINFO + end +end diff --git a/perl/perl.nm b/perl/perl.nm index c31463e..3a611eb 100644 --- a/perl/perl.nm +++ b/perl/perl.nm @@ -6,7 +6,7 @@ name = perl version = 5.20.2 # Never reset release in this package, just increase. -release = 13.2 +release = 13.3
perl_epoch = 2 thisver = %{perl_epoch}:%{version}-%{_release} @@ -33,10 +33,10 @@ source_dl = http://www.cpan.org/src/5.0/
build requires - db4-devel gcc-c++ gdbm-devel iana-etc + libdb-devel perl procps zlib-devel diff --git a/pyfire/pyfire.nm b/pyfire/pyfire.nm deleted file mode 100644 index 7aab8b6..0000000 --- a/pyfire/pyfire.nm +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################### -# IPFire.org - An Open Source Firewall Solution # -# Copyright (C) - IPFire Development Team info@ipfire.org # -############################################################################### - -name = pyfire -version = 0.99.1 -release = 1 - -groups = System/Libraries -url = http://www.ipfire.org -license = GPLv3+ -summary = A python library for easy functions. - -description - Pyfire is a library which offers a lot of easy to use functions. -end - -build - requires - python - end - - DIR_APP = %{DIR_SOURCE}/src - - prepare = # Nothing to do - - build = # Nothing to do - - install - make install DESTDIR=%{BUILDROOT} - make clean - end -end - -packages - package %{name} - - package %{name}-debuginfo - template DEBUGINFO - end -end diff --git a/pyfire/src/Makefile b/pyfire/src/Makefile deleted file mode 100644 index cb8674c..0000000 --- a/pyfire/src/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -NAME = pyfire - -PYTHONLIBDIR = $(DESTDIR)/usr/lib/python2.6/site-packages/$(NAME) - -all: - -install: all - -mkdir -p $(PYTHONLIBDIR) - cp -avf *.py $(PYTHONLIBDIR) - -clean: - rm -f *.o *.so *.pyc *.pyo diff --git a/pyfire/src/__init__.py b/pyfire/src/__init__.py deleted file mode 100644 index 4bd81a6..0000000 --- a/pyfire/src/__init__.py +++ /dev/null @@ -1,64 +0,0 @@ -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -__all__ = [ "config", "executil", "hal", "net", "translate", "web", ] - -import os - -import hal - -class System: - def __init__(self): - self.dbus = hal.get_device("/org/freedesktop/Hal/devices/computer") - - def getKernelVersion(self): - ret = None - try: - ret = self.dbus["system.kernel.version"] - except KeyError: - pass - return ret - - def getFormfactor(self): - return self.dbus["system.formfactor"] - - def getVendor(self): - ret = None - try: - ret = self.dbus["system.vendor"] - except KeyError: - pass - return ret - - def getProduct(self): - ret = None - try: - ret = self.dbus["system.product"] - except KeyError: - pass - return ret - - -if __name__ == "__main__": - system = System() - print "Kernel Version : %s" % system.getKernelVersion() - print "System Formfactor : %s" % system.getFormfactor() - print "System Vendor : %s" % system.getVendor() - print "System Product : %s" % system.getProduct() diff --git a/pyfire/src/config.py b/pyfire/src/config.py deleted file mode 100644 index c77ef44..0000000 --- a/pyfire/src/config.py +++ /dev/null @@ -1,92 +0,0 @@ -# -# simpleconifg.py - representation of a simple configuration file (sh-like) -# -# Matt Wilson msw@redhat.com -# Jeremy Katz katzj@redhat.com -# -# Copyright 1999-2002 Red Hat, Inc. -# -# This software may be freely redistributed under the terms of the GNU -# library public license. -# -# You should have received a copy of the GNU Library Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -import string -import os - -# use our own ASCII only uppercase function to avoid locale issues -# not going to be fast but not important -def uppercase_ASCII_string(str): - newstr = "" - for i in range(0,len(str)): - if str[i] in string.lowercase: - newstr += chr(ord(str[i])-32) - else: - newstr += str[i] - - return newstr - -class ConfigFile: - def __str__ (self): - s = "" - keys = self.info.keys () - keys.sort () - for key in keys: - # FIXME - use proper escaping - if type(self.info[key]) == type(""): - s = s + key + "="" + self.info[key] + ""\n" - return s - - def __init__ (self, filename): - self.info = {} - self.filename = filename - self.read() - - def write(self, filename=None): - if not filename: - filename = self.filename - f = open(filename, "w") - f.write(self.__str__()) - f.close() - - def read(self, filename=None): - if not filename: - filename = self.filename - if not os.access(filename, os.R_OK): - return - - f = open(filename, "r") - lines = f.readlines() - f.close() - - for line in lines: - fields = line[:-1].split('=', 2) - if len(fields) < 2: - # how am I supposed to know what to do here? - continue - key = uppercase_ASCII_string(fields[0]) - value = fields[1] - # XXX hack - value = value.replace('"', '') - value = value.replace("'", '') - self.info[key] = value - - def set(self, *args): - for (key, data) in args: - self.info[uppercase_ASCII_string(key)] = data - - def unset(self, *keys): - for key in keys: - key = uppercase_ASCII_string(key) - if self.info.has_key (key): - del self.info[key] - - def get(self, key): - key = uppercase_ASCII_string(key) - if self.info.has_key (key): - return self.info[key] - else: - return "" diff --git a/pyfire/src/executil.py b/pyfire/src/executil.py deleted file mode 100644 index df0eb64..0000000 --- a/pyfire/src/executil.py +++ /dev/null @@ -1,255 +0,0 @@ -# -# executil.py - generic utility functions for executing programs -# -# Erik Troan ewt@redhat.com -# -# Copyright 1999-2002 Red Hat, Inc. -# -# This software may be freely redistributed under the terms of the GNU -# library public license. -# -# You should have received a copy of the GNU Library Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -import os -import sys -import types -import select -import signal - -def getfd(filespec, readOnly = 0): - if type(filespec) == types.IntType: - return filespec - if filespec == None: - filespec = "/dev/null" - - flags = os.O_RDWR | os.O_CREAT - if (readOnly): - flags = os.O_RDONLY - return os.open(filespec, flags) - -def execWithRedirect(command, argv, stdin = 0, stdout = 1, stderr = 2, - searchPath = 0, root = '/', newPgrp = 0, ignoreTermSigs = 0): - stdin = getfd(stdin) - if stdout == stderr: - stdout = getfd(stdout) - stderr = stdout - else: - stdout = getfd(stdout) - stderr = getfd(stderr) - - childpid = os.fork() - if (not childpid): - if (root and root != '/'): - os.chroot(root) - os.chdir("/") - - if ignoreTermSigs: - signal.signal(signal.SIGTSTP, signal.SIG_IGN) - signal.signal(signal.SIGINT, signal.SIG_IGN) - - if type(stdin) == type("a"): - stdin = os.open(stdin, os.O_RDONLY) - if type(stdout) == type("a"): - stdout = os.open(stdout, os.O_RDWR) - if type(stderr) == type("a"): - stderr = os.open(stderr, os.O_RDWR) - - if stdin != 0: - os.dup2(stdin, 0) - os.close(stdin) - if stdout != 1: - os.dup2(stdout, 1) - if stdout != stderr: - os.close(stdout) - if stderr != 2: - os.dup2(stderr, 2) - os.close(stderr) - - if (searchPath): - os.execvp(command, argv) - else: - os.execv(command, argv) - - sys.exit(1) - - if newPgrp: - os.setpgid(childpid, childpid) - oldPgrp = os.tcgetpgrp(0) - os.tcsetpgrp(0, childpid) - - status = -1 - try: - (pid, status) = os.waitpid(childpid, 0) - except OSError, (errno, msg): - print __name__, "waitpid:", msg - - if newPgrp: - os.tcsetpgrp(0, oldPgrp) - - return status - -## Run an external program and capture standard out. -# @param command The command to run. -# @param argv A list of arguments. -# @param stdin The file descriptor to read stdin from. -# @param stderr The file descriptor to redirect stderr to. -# @param root The directory to chroot to before running command. -# @return The output of command from stdout. -def execWithCapture(command, argv, stdin = 0, stderr = 2, root='/'): - def chroot(): - os.chroot(root) - - argv = list(argv) - if type(stdin) == type("string"): - if os.access(stdin, os.R_OK): - stdin = open(stdin) - else: - stdin = 0 - if type(stderr) == type("string"): - stderr = open(stderr, "w") - - try: - pipe = subprocess.Popen([command] + argv, stdin=stdin, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - preexec_fn=chroot, cwd=root) - except OSError, (errno, msg): - log.error ("Error running " + command + ": " + msg) - raise RuntimeError, "Error running " + command + ": " + msg - - rc = pipe.stdout.read() - pipe.wait() - return rc - -def execWithCaptureStatus(command, argv, searchPath = 0, root = '/', stdin = 0, - catchfd = 1, closefd = -1): - - if not os.access (root + command, os.X_OK): - raise RuntimeError, command + " can not be run" - - (read, write) = os.pipe() - - childpid = os.fork() - if (not childpid): - if (root and root != '/'): os.chroot (root) - if isinstance(catchfd, tuple): - for fd in catchfd: - os.dup2(write, fd) - else: - os.dup2(write, catchfd) - os.close(write) - os.close(read) - - if closefd != -1: - os.close(closefd) - - if stdin: - os.dup2(stdin, 0) - os.close(stdin) - - if (searchPath): - os.execvp(command, argv) - else: - os.execv(command, argv) - - sys.exit(1) - - os.close(write) - - rc = "" - s = "1" - while (s): - select.select([read], [], []) - s = os.read(read, 1000) - rc = rc + s - - os.close(read) - - status = None - - try: - (pid, status) = os.waitpid(childpid, 0) - except OSError, (errno, msg): - print __name__, "waitpid:", msg - - if os.WIFEXITED(status) and (os.WEXITSTATUS(status) == 0): - status = os.WEXITSTATUS(status) - else: - status = -1 - - return (rc, status) - -def execWithCaptureErrorStatus(command, argv, searchPath = 0, root = '/', - stdin = 0, catchfd = 1, catcherrfd = 2, closefd = -1): - - if not os.access (root + command, os.X_OK): - raise RuntimeError, command + " can not be run" - - (read, write) = os.pipe() - (read_err,write_err) = os.pipe() - - childpid = os.fork() - if (not childpid): - if (root and root != '/'): os.chroot (root) - if isinstance(catchfd, tuple): - for fd in catchfd: - os.dup2(write, fd) - else: - os.dup2(write, catchfd) - os.close(write) - os.close(read) - - if isinstance(catcherrfd, tuple): - for fd in catcherrfd: - os.dup2(write_err, fd) - else: - os.dup2(write_err, catcherrfd) - os.close(write_err) - os.close(read_err) - - if closefd != -1: - os.close(closefd) - - if stdin: - os.dup2(stdin, 0) - os.close(stdin) - - if (searchPath): - os.execvp(command, argv) - else: - os.execv(command, argv) - - sys.exit(1) - - os.close(write) - os.close(write_err) - - rc = "" - rc_err = "" - s = "1" - t = "1" - while (s or t): - select.select([read], [], []) - s = os.read(read, 1000) - t = os.read(read_err, 1000) - rc = rc + s - rc_err = rc_err + t - - os.close(read) - os.close(read_err) - - status = None - - try: - (pid, status) = os.waitpid(childpid, 0) - except OSError, (errno, msg): - print __name__, "waitpid:", msg - - if os.WIFEXITED(status) and (os.WEXITSTATUS(status) == 0): - status = os.WEXITSTATUS(status) - else: - status = -1 - - return (rc, rc_err, status) diff --git a/pyfire/src/hal.py b/pyfire/src/hal.py deleted file mode 100644 index 6d4e6de..0000000 --- a/pyfire/src/hal.py +++ /dev/null @@ -1,70 +0,0 @@ -# -# minihal.py: Simple wrapper around HAL -# -# Copyright (C) 2007 Red Hat, Inc. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# Author(s): Bill Nottingham notting@redhat.com -# - -"""Simple wrapper around HAL""" - -import dbus - -def get_device(udi): - """Retrieve all properties of a particular device (by UDI)""" - try: - bus = dbus.SystemBus() - haldev = dbus.Interface(bus.get_object("org.freedesktop.Hal", udi), "org.freedesktop.Hal.Device") - props = haldev.GetAllProperties() - except dbus.exceptions.DBusException: - return None - - if props.has_key('block.device'): - props['device'] = props['block.device'].encode("utf-8") - elif props.has_key('linux.device_file'): - props['device'] = props['linux.device_file'].encode("utf-8") - elif props.has_key('net.interface'): - props['device'] = props['net.interface'].encode("utf-8") - else: - props['device'] = None - - props['description'] = '' - if props.has_key('info.product'): - if props.has_key('info.vendor'): - props['description'] = '%s %s' % (props['info.vendor'],props['info.product']) - else: - props['description'] = props['info.product'] - else: - props['description'] = props['info.udi'] - if props.has_key('net.originating_device'): - pdev = get_device(props['net.originating_device']) - props['description'] = pdev['description'] - - return props - -def get_devices_by_type(type): - """Retrieve all devices of a particular type""" - ret = [] - try: - bus = dbus.SystemBus() - hal = dbus.Interface(bus.get_object("org.freedesktop.Hal","/org/freedesktop/Hal/Manager"),"org.freedesktop.Hal.Manager") - except: - return ret - for udi in hal.FindDeviceByCapability(type): - dev = get_device(udi) - if dev: - ret.append(dev) - return ret diff --git a/pyfire/src/net.py b/pyfire/src/net.py deleted file mode 100644 index 94a262a..0000000 --- a/pyfire/src/net.py +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/python -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2008 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -import os -import os.path -import socket -import string - -import hal -from config import ConfigFile - -NETWORK_DEVICES="/etc/sysconfig/network-devices/" -NETWORK_SETTINGS="/etc/sysconfig/network" -NETWORK_SCRIPTS="/etc/init.d/networking/" - -class Network: - def __init__(self): - self.bridges = {} - self.nics = {} - - self.settings = NetworkSettings(NETWORK_SETTINGS) - - def getNics(self): - for device in hal.get_devices_by_type("net"): - if device.has_key('net.arp_proto_hw_id'): - if device['net.arp_proto_hw_id'] == 1 and \ - not device['info.category'] == 'net.bridge': - nic = device['device'] - self.nics[nic] = NetworkDevice(nic, device) - return self.nics - - def getNic(self, nic): - return self.nics[nic] - - def getBridges(self, colour=None): - for file in os.listdir(NETWORK_DEVICES): - bridge = os.path.basename(file) - if colour and not bridge.startswith(colour): - continue - self.bridges[bridge] = BrideDevice(bridge) - return self.bridges - - def getBridge(self, bridge): - return self.bridges[bridge] - - def addBridge(self, dev): - self.bridges[dev] = BridgeDevice(dev) - - def delBridge(self, dev): - self.bridges[dev].remove() - del self.bridges[dev] - - def write(self): - for bridge in self.bridges.items(): - self.bridges[bridge].write() - self.settings.write() - - -class NetworkSettings(ConfigFile): - def __init__(self, filename): - ConfigFile.__init__(self, filename) - - def getHostname(self): - return self.get("HOSTNAME") - - def setHostname(self, hostname): - self.set(("HOSTNAME", hostname)) - - -class BridgeDevice: - def __init__(self, dev): - self.filename = "%s/%s/" % (NETWORK_DEVICES, dev,) - self.device = dev - self.services = [] - - for file in os.listdir(self.filename): - service = Service(file, bridge=self.device) - self.addService(service) - - def addService(self, service): - self.services.append(service) - - def getPolicy(self, service): - ret = [] - for service in self.services: - if service.service == service: - ret.append(service) - return ret - - def delService(self, service): - pass # how to do this? - - def addNic(self, nic): - # requires a NetworkDevice instance - filename = os.path.join(self.filename, nic.getDevice()) - service = Service(filename, bridge=self.name, service="bridge-slave") - service.set(("DESCRIPTION", nic.getDescription()), - ("MAC", nic.getMac())) - self.addService(service) - - def write(self): - if not os.path.isdir(fn): - os.makedirs(fn) - - # Save all service information - for service in self.services: - service.write() - - -class NetworkDevice: - def __init__(self, dev, dbus): - self.device = dev - self.dbus = dbus - - def __str__(self): - return "%s (%s) - %s" % (self.device, self.getDescription(), self.getMac()) - - def getDevice(self): - return self.device - - def getMac(self): - return self.dbus["net.address"] - - def getDescription(self): - return self.dbus["description"] - - -class ServiceError(Exception): - pass - - -class Service(ConfigFile): - def __init__(self, filename, bridge=None, service=None): - self.service = None - if service: - self.setService(service) - ConfigFile.__init__(self, filename) - self.bridge = bridge - self.name = os.path.basename(self.filename) - - def setService(self, service): - if not service in listAllServices(): - raise ServiceError, "The given service is not available: %s" % service - self.service = service - - -def listAllServices(): - ret = [] - for service in os.listdir(NETWORK_SCRIPTS + "services/"): - ret.append(service) - return ret - -if __name__ == "__main__": - network = Network() - print "All available nics on this system:" - for nic, obj in network.getNics().items(): - print obj diff --git a/pyfire/src/web.py b/pyfire/src/web.py deleted file mode 100644 index b6f2172..0000000 --- a/pyfire/src/web.py +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/python -############################################################################### -# # -# IPFire.org - A linux based firewall # -# Copyright (C) 2008 Michael Tremer & Christian Schmidt # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see http://www.gnu.org/licenses/. # -# # -############################################################################### - -import os -import cgi - -import pyfire.net as net - -addPoPath("/srv/www/ipfire/cgi-bin/po/") -textdomain("ipfire") - -### Variables -allowed_endings = [ "cgi", "py",] - -class IPFireWeb: - def __init__(self, title, icon): - self.title = title - self.icon = icon - self.hostname = net.gethostname() - - ### This is a hash with all of the important vars: - ## - "title" - The title of the current page - ## - "icon" - The displayed icon - ## - "hostname" - The local hostname - self.info = { "title": self.title, - "icon": self.icon, - "hostname": self.hostname, - } - - ### This is the menu tree - ## Every index has got a hash with a few arguments: - ## - "title" which is the title of the section - ## - "subs" is a tuple with all the submenu items - ## One submenu items looks like this: - ## (_("Home"), "index.py") - ## name of the item ^^^^ ^^^^^^^^ filename - self.menu = {} - - for section in os.listdir("/etc/ipfire/menu"): - f = open("/etc/ipfire/menu/" + section) - self.menu[section] = { "title" : "", "subs" : [],} - for line in f.readlines(): - (item, filename) = line.rstrip("\n").split(":",1) - if item == "title": - self.menu[section]["title"] = _(filename) - else: - self.menu[section]["subs"].append((_(item), filename)) - f.close() - - def __run__(self): - ### This initializes the http(s) response - self.showhttpheaders() - self.getcgihash() - - ### Page - self.openpage() - self.content() - self.closepage() - - def openpage(self): - print """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<!-- HTML HEADER --> -<head> - <title>%(hostname)s - IPFire v3 - %(title)s</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <link rel="shortcut icon" href="/favicon.ico" /> - <link rel="stylesheet" type="text/css" href="include/style.css" /> -</head> -<!-- HTML HEADER END -->""" % self.info - self.openheader() - self.genbigmenu() - self.closeheader() - self.openbigbox() - - def closepage(self): - self.closebigbox() - self.footer() - - def openheader(self): - print """ -<!-- HTML BODY --> -<body> - <!-- IPFIRE HEADER --> - <div id="header"> - <div id="header_inner" class="fixed"> - <!-- IPFIRE LOGO --> - <div id="logo"> - <img src="/images/icons/%(icon)s" width="48px" height="48px" alt="Symbol" class="symbol" /> - <h1><span>%(hostname)s</span></h1> - <br /> - <h2>%(title)s</h2> - </div>""" % self.info - def closeheader(self): - print """ </div> - </div> - <!-- IPFIRE HEADER END -->""" - - def openbigbox(self): - print """ - <!-- IPFIRE BODY --> - <div id="main"> - <div id="main_inner" class="fixed"> - <div id="primaryContent_2columns"> - <div id="columnA_2columns"> - <!-- IPFIRE CONTENT -->""" - - def openbox(self, title): - print """ - <div class="post"> - <h3>%s</h3>""" % (title,) - - def closebox(self): - print """ - </div> - <br class="clear" />""" - - def closebigbox(self): - print """ - <!-- IPFIRE CONTENT END --> - </div> - </div>""" - self.genmenu() - - def genbigmenu(self): - print """ - <!-- IPFIRE MENU --> - <div id="menu"> - <ul>""" - sections = self.menu.keys() - sections.sort() - for section in sections: - filename = self.menu[section]["subs"][0][1] - print "\t\t\t\t\t\t", - print "<li><a href="/%s">%s</a></li>" % \ - (filename, self.menu[section]["title"]) - print """ - </ul> - </div>""" - - def genmenu(self): - this_file = os.path.basename(os.environ["SCRIPT_NAME"]) - this_section = None - - for i in self.menu.keys(): - for j in self.menu[i]["subs"]: - if this_file == os.path.basename(j[1]): - this_section = i - break - if not this_section is None: - break - - if this_section is None: - return - - print """ - <div id="secondaryContent_2columns"> - <div id="columnC_2columns"> - <h4><span>Side</span>menu</h4> - <ul class="links">""" - - for item in self.menu[this_section]["subs"]: - print "\t\t\t\t\t\t\t", - if item[1] == this_file: - print "<li class="selected">", - else: - print "<li>", - print "<a href="/cgi-bin/%s">%s</a></li>" \ - % (item[1], item[0],) - - print """ - </ul> - </div> - </div> - <br class="clear" />""" - - def footer(self): - print """ - <div id="footer" class="fixed"> - <span>Load average: %(load)s - </div>""" % { "load" : os.getloadavg() } - print """ - </div> - </div> -</body> -</html> -""" - - def showhttpheaders(self, type="text/html"): - print "Pragma: no-cache" - print "Cache-control: no-cache" - print "Connection: close" - print "Content-type:" + type - print - # An empty line ends the header - - def getcgihash(self): - self.cgihash = cgi.FieldStorage() - - def content(self): - self.openbox(_("Error")) - print "This site has no content defined, yet. Please define site.content()." - self.closebox() diff --git a/python3/patches/00003-remove-mimeaudio-tests.patch b/python3/patches/00003-remove-mimeaudio-tests.patch deleted file mode 100644 index 8341363..0000000 --- a/python3/patches/00003-remove-mimeaudio-tests.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -up Python-3.3.0rc1/Lib/test/test_email/test_email.py.remove-mimeaudio-tests Python-3.3.0rc1/Lib/test/test_email/test_email.py ---- Python-3.3.0rc1/Lib/test/test_email/test_email.py.remove-mimeaudio-tests 2012-08-25 15:22:10.000000000 -0400 -+++ Python-3.3.0rc1/Lib/test/test_email/test_email.py 2012-08-27 11:00:11.936964586 -0400 -@@ -1321,47 +1321,6 @@ Blah blah blah - self.assertEqual(b.getvalue(), source + b'>From R\xc3\xb6lli\n') - - --# Test the basic MIMEAudio class --class TestMIMEAudio(unittest.TestCase): -- def setUp(self): -- with openfile('audiotest.au', 'rb') as fp: -- self._audiodata = fp.read() -- self._au = MIMEAudio(self._audiodata) -- -- def test_guess_minor_type(self): -- self.assertEqual(self._au.get_content_type(), 'audio/basic') -- -- def test_encoding(self): -- payload = self._au.get_payload() -- self.assertEqual(base64.decodebytes(bytes(payload, 'ascii')), -- self._audiodata) -- -- def test_checkSetMinor(self): -- au = MIMEAudio(self._audiodata, 'fish') -- self.assertEqual(au.get_content_type(), 'audio/fish') -- -- def test_add_header(self): -- eq = self.assertEqual -- unless = self.assertTrue -- self._au.add_header('Content-Disposition', 'attachment', -- filename='audiotest.au') -- eq(self._au['content-disposition'], -- 'attachment; filename="audiotest.au"') -- eq(self._au.get_params(header='content-disposition'), -- [('attachment', ''), ('filename', 'audiotest.au')]) -- eq(self._au.get_param('filename', header='content-disposition'), -- 'audiotest.au') -- missing = [] -- eq(self._au.get_param('attachment', header='content-disposition'), '') -- unless(self._au.get_param('foo', failobj=missing, -- header='content-disposition') is missing) -- # Try some missing stuff -- unless(self._au.get_param('foobar', missing) is missing) -- unless(self._au.get_param('attachment', missing, -- header='foobar') is missing) -- -- -- - # Test the basic MIMEImage class - class TestMIMEImage(unittest.TestCase): - def setUp(self): diff --git a/python3/patches/00111-no-static-lib.patch b/python3/patches/00111-no-static-lib.patch deleted file mode 100644 index 91b24b8..0000000 --- a/python3/patches/00111-no-static-lib.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -up cpython-59223da36dec/Makefile.pre.in.no-static-lib cpython-59223da36dec/Makefile.pre.in ---- cpython-59223da36dec/Makefile.pre.in.no-static-lib 2012-08-07 16:43:43.296466422 -0400 -+++ cpython-59223da36dec/Makefile.pre.in 2012-08-07 16:44:13.299464371 -0400 -@@ -464,7 +464,7 @@ coverage: - - - # Build the interpreter --$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) -+$(BUILDPYTHON): Modules/python.o $(LDLIBRARY) $(PY3LIBRARY) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) - - platform: $(BUILDPYTHON) $(SYSCONFIGDATA) -@@ -480,18 +480,6 @@ sharedmods: $(BUILDPYTHON) $(SYSCONFIGDA - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - --# Build static library --# avoid long command lines, same as LIBRARY_OBJS --$(LIBRARY): $(LIBRARY_OBJS) -- -rm -f $@ -- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o -- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS) -- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS) -- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS) Python/frozen.o -- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS) -- $(AR) $(ARFLAGS) $@ $(MODOBJS) -- $(RANLIB) $@ -- - libpython$(LDVERSION).so: $(LIBRARY_OBJS) - if test $(INSTSONAME) != $(LDLIBRARY); then \ - $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ -@@ -581,7 +569,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.d - echo "-----------------------------------------------"; \ - fi - --Modules/_testembed: Modules/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) -+Modules/_testembed: Modules/_testembed.o $(LDLIBRARY) $(PY3LIBRARY) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) - - ############################################################################ -@@ -1155,18 +1143,6 @@ libainstall: all python-config - else true; \ - fi; \ - done -- @if test -d $(LIBRARY); then :; else \ -- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ -- if test "$(SO)" = .dll; then \ -- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ -- else \ -- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -- fi; \ -- else \ -- echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -- fi; \ -- fi - $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in diff --git a/python3/patches/00113-more-configuration-flags.patch b/python3/patches/00113-more-configuration-flags.patch deleted file mode 100644 index 1067af1..0000000 --- a/python3/patches/00113-more-configuration-flags.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -up Python-3.3.0b1/configure.ac.more-configuration-flags Python-3.3.0b1/configure.ac ---- Python-3.3.0b1/configure.ac.more-configuration-flags 2012-07-20 13:25:33.232864839 -0400 -+++ Python-3.3.0b1/configure.ac 2012-07-20 13:25:33.314863815 -0400 -@@ -2585,6 +2585,30 @@ else AC_MSG_RESULT(no) - fi], - [AC_MSG_RESULT(no)]) - -+AC_MSG_CHECKING(for --with-count-allocs) -+AC_ARG_WITH(count-allocs, -+[ --with(out)count-allocs enable/disable per-type instance accounting], [ -+if test "$withval" != no -+then -+ AC_DEFINE(COUNT_ALLOCS, 1, -+ [Define to keep records of the number of instances of each type]) -+ AC_MSG_RESULT(yes) -+else AC_MSG_RESULT(no) -+fi], -+[AC_MSG_RESULT(no)]) -+ -+AC_MSG_CHECKING(for --with-call-profile) -+AC_ARG_WITH(call-profile, -+[ --with(out)-call-profile enable/disable statistics on function call invocation], [ -+if test "$withval" != no -+then -+ AC_DEFINE(CALL_PROFILE, 1, -+ [Define to keep records on function call invocation]) -+ AC_MSG_RESULT(yes) -+else AC_MSG_RESULT(no) -+fi], -+[AC_MSG_RESULT(no)]) -+ - # Check for Python-specific malloc support - AC_MSG_CHECKING(for --with-pymalloc) - AC_ARG_WITH(pymalloc, -diff -up Python-3.3.0b1/pyconfig.h.in.more-configuration-flags Python-3.3.0b1/pyconfig.h.in ---- Python-3.3.0b1/pyconfig.h.in.more-configuration-flags 2012-07-20 13:25:33.000000000 -0400 -+++ Python-3.3.0b1/pyconfig.h.in 2012-07-20 13:26:02.826494869 -0400 -@@ -12,6 +12,12 @@ - support for AIX C++ shared extension modules. */ - #undef AIX_GENUINE_CPLUSPLUS - -+/* Define to keep records on function call invocation */ -+#undef CALL_PROFILE -+ -+/* Define to keep records of the number of instances of each type */ -+#undef COUNT_ALLOCS -+ - /* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM - mixed-endian order (byte order 45670123) */ - #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 diff --git a/python3/patches/00114-statvfs-f_flag-constants.patch b/python3/patches/00114-statvfs-f_flag-constants.patch deleted file mode 100644 index af0d780..0000000 --- a/python3/patches/00114-statvfs-f_flag-constants.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up Python-3.3.0b1/Modules/posixmodule.c.statvfs-f_flag-constants Python-3.3.0b1/Modules/posixmodule.c ---- Python-3.3.0b1/Modules/posixmodule.c.statvfs-f_flag-constants 2012-06-26 16:19:54.000000000 -0400 -+++ Python-3.3.0b1/Modules/posixmodule.c 2012-07-20 13:39:18.595546387 -0400 -@@ -11665,6 +11665,35 @@ all_ins(PyObject *d) - if (ins(d, "ST_NOSUID", (long)ST_NOSUID)) return -1; - #endif /* ST_NOSUID */ - -+ /* GNU extensions */ -+#ifdef ST_NODEV -+ if (ins(d, "ST_NODEV", (long)ST_NODEV)) return -1; -+#endif /* ST_NODEV */ -+#ifdef ST_NOEXEC -+ if (ins(d, "ST_NOEXEC", (long)ST_NOEXEC)) return -1; -+#endif /* ST_NOEXEC */ -+#ifdef ST_SYNCHRONOUS -+ if (ins(d, "ST_SYNCHRONOUS", (long)ST_SYNCHRONOUS)) return -1; -+#endif /* ST_SYNCHRONOUS */ -+#ifdef ST_MANDLOCK -+ if (ins(d, "ST_MANDLOCK", (long)ST_MANDLOCK)) return -1; -+#endif /* ST_MANDLOCK */ -+#ifdef ST_WRITE -+ if (ins(d, "ST_WRITE", (long)ST_WRITE)) return -1; -+#endif /* ST_WRITE */ -+#ifdef ST_APPEND -+ if (ins(d, "ST_APPEND", (long)ST_APPEND)) return -1; -+#endif /* ST_APPEND */ -+#ifdef ST_NOATIME -+ if (ins(d, "ST_NOATIME", (long)ST_NOATIME)) return -1; -+#endif /* ST_NOATIME */ -+#ifdef ST_NODIRATIME -+ if (ins(d, "ST_NODIRATIME", (long)ST_NODIRATIME)) return -1; -+#endif /* ST_NODIRATIME */ -+#ifdef ST_RELATIME -+ if (ins(d, "ST_RELATIME", (long)ST_RELATIME)) return -1; -+#endif /* ST_RELATIME */ -+ - /* FreeBSD sendfile() constants */ - #ifdef SF_NODISKIO - if (ins(d, "SF_NODISKIO", (long)SF_NODISKIO)) return -1; diff --git a/python3/patches/00125-less-verbose-COUNT_ALLOCS.patch b/python3/patches/00125-less-verbose-COUNT_ALLOCS.patch deleted file mode 100644 index 8cef015..0000000 --- a/python3/patches/00125-less-verbose-COUNT_ALLOCS.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up Python-2.7/Python/pythonrun.c.less-verbose-COUNT_ALLOCS Python-2.7/Python/pythonrun.c ---- Python-2.7/Python/pythonrun.c.less-verbose-COUNT_ALLOCS 2010-08-17 14:49:33.321913909 -0400 -+++ Python-2.7/Python/pythonrun.c 2010-08-17 14:54:48.750910403 -0400 -@@ -470,7 +470,15 @@ Py_Finalize(void) - - /* Debugging stuff */ - #ifdef COUNT_ALLOCS -- dump_counts(stdout); -+ /* This is a downstream Fedora modification. -+ The upstream default with COUNT_ALLOCS is to always dump the counts to -+ stdout on exit. For our debug builds its useful to have the info from -+ COUNT_ALLOCS available, but the stdout info here gets in the way, so -+ we make it optional, wrapping it in an environment variable (modelled -+ on the other PYTHONDUMP* env variables): -+ */ -+ if (Py_GETENV("PYTHONDUMPCOUNTS")) -+ dump_counts(stdout); - #endif - - PRINT_TOTAL_REFS(); diff --git a/python3/patches/00131-disable-tests-in-test_io.patch b/python3/patches/00131-disable-tests-in-test_io.patch deleted file mode 100644 index d81a2d0..0000000 --- a/python3/patches/00131-disable-tests-in-test_io.patch +++ /dev/null @@ -1,11 +0,0 @@ -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 diff --git a/python3/patches/00132-add-rpmbuild-hooks-to-unittest.patch b/python3/patches/00132-add-rpmbuild-hooks-to-unittest.patch deleted file mode 100644 index fdfbab8..0000000 --- a/python3/patches/00132-add-rpmbuild-hooks-to-unittest.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -up Python-3.2.2/Lib/unittest/case.py.add-rpmbuild-hooks-to-unittest Python-3.2.2/Lib/unittest/case.py ---- Python-3.2.2/Lib/unittest/case.py.add-rpmbuild-hooks-to-unittest 2011-09-03 12:16:44.000000000 -0400 -+++ Python-3.2.2/Lib/unittest/case.py 2011-09-09 06:35:16.365568382 -0400 -@@ -3,6 +3,7 @@ - import sys - import functools - import difflib -+import os - import pprint - import re - import warnings -@@ -101,6 +102,43 @@ def expectedFailure(func): - return wrapper - - -+# Non-standard/downstream-only hooks for handling issues with specific test -+# cases: -+ -+def _skipInRpmBuild(reason): -+ """ -+ Non-standard/downstream-only decorator for marking a specific unit test -+ to be skipped when run within the %check of an rpmbuild. -+ -+ Specifically, this takes effect when WITHIN_PYTHON_RPM_BUILD is set within -+ the environment, and has no effect otherwise. -+ """ -+ if 'WITHIN_PYTHON_RPM_BUILD' in os.environ: -+ return skip(reason) -+ else: -+ return _id -+ -+def _expectedFailureInRpmBuild(func): -+ """ -+ Non-standard/downstream-only decorator for marking a specific unit test -+ as expected to fail within the %check of an rpmbuild. -+ -+ Specifically, this takes effect when WITHIN_PYTHON_RPM_BUILD is set within -+ the environment, and has no effect otherwise. -+ """ -+ @functools.wraps(func) -+ def wrapper(*args, **kwargs): -+ if 'WITHIN_PYTHON_RPM_BUILD' in os.environ: -+ try: -+ func(*args, **kwargs) -+ except Exception: -+ raise _ExpectedFailure(sys.exc_info()) -+ raise _UnexpectedSuccess -+ else: -+ # Call directly: -+ func(*args, **kwargs) -+ return wrapper -+ - class _AssertRaisesBaseContext(object): - - def __init__(self, expected, test_case, callable_obj=None, -diff -up Python-3.2.2/Lib/unittest/__init__.py.add-rpmbuild-hooks-to-unittest Python-3.2.2/Lib/unittest/__init__.py ---- Python-3.2.2/Lib/unittest/__init__.py.add-rpmbuild-hooks-to-unittest 2011-09-03 12:16:44.000000000 -0400 -+++ Python-3.2.2/Lib/unittest/__init__.py 2011-09-09 06:35:16.366568382 -0400 -@@ -57,7 +57,8 @@ __unittest = True - - from .result import TestResult - from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf, -- skipUnless, expectedFailure) -+ skipUnless, expectedFailure, -+ _skipInRpmBuild, _expectedFailureInRpmBuild) - from .suite import BaseTestSuite, TestSuite - from .loader import (TestLoader, defaultTestLoader, makeSuite, getTestCaseNames, - findTestCases) diff --git a/python3/patches/00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch b/python3/patches/00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch deleted file mode 100644 index 087705c..0000000 --- a/python3/patches/00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys Python-3.3.0b2/Lib/test/test_sys.py ---- Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys 2012-08-11 02:54:16.000000000 -0400 -+++ Python-3.3.0b2/Lib/test/test_sys.py 2012-08-13 14:50:15.253720597 -0400 -@@ -835,12 +835,17 @@ class SizeofTest(unittest.TestCase): - # type - # static type: PyTypeObject - s = vsize('P2n15Pl4Pn9Pn11PI') -+ # COUNT_ALLOCS adds a further 3 Py_ssize_t and 2 pointers: -+ if hasattr(sys, 'getcounts'): -+ s += struct.calcsize('3P2P') - check(int, s) - # (PyTypeObject + PyNumberMethods + PyMappingMethods + - # PySequenceMethods + PyBufferProcs + 4P) - s = vsize('P2n15Pl4Pn9Pn11PI') + struct.calcsize('34P 3P 10P 2P 4P') - # Separate block for PyDictKeysObject with 4 entries - s += struct.calcsize("2nPn") + 4*struct.calcsize("n2P") -+ if hasattr(sys, 'getcounts'): -+ s += struct.calcsize('3P2P') - # class - class newstyleclass(object): pass - check(newstyleclass, s) diff --git a/python3/patches/00135-fix-test-within-test_weakref-in-debug-build.patch b/python3/patches/00135-fix-test-within-test_weakref-in-debug-build.patch deleted file mode 100644 index 6ed7801..0000000 --- a/python3/patches/00135-fix-test-within-test_weakref-in-debug-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up Python-3.2b2/Lib/test/test_weakref.py.test-weakref-COUNT_ALLOCS_fix Python-3.2b2/Lib/test/test_weakref.py ---- Python-3.2b2/Lib/test/test_weakref.py.test-weakref-COUNT_ALLOCS_fix 2010-12-28 20:33:46.963364990 -0500 -+++ Python-3.2b2/Lib/test/test_weakref.py 2010-12-28 20:35:44.115935248 -0500 -@@ -583,9 +583,10 @@ class ReferencesTestCase(TestBase): - # been cleared without their callbacks executing. OTOH, the weakref - # to C is bound to a function local (wr), and wasn't trash, so that - # callback should have been invoked when C went away. -- self.assertEqual(alist, ["C went away"]) -- # The remaining weakref should be dead now (its callback ran). -- self.assertEqual(wr(), None) -+ if not hasattr(sys, 'getcounts'): -+ self.assertEqual(alist, ["C went away"]) -+ # The remaining weakref should be dead now (its callback ran). -+ self.assertEqual(wr(), None) - - del alist[:] - gc.collect() diff --git a/python3/patches/00137-skip-distutils-tests-that-fail-in-rpmbuild.patch b/python3/patches/00137-skip-distutils-tests-that-fail-in-rpmbuild.patch deleted file mode 100644 index 8a6bc46..0000000 --- a/python3/patches/00137-skip-distutils-tests-that-fail-in-rpmbuild.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up Python-3.2.2/Lib/distutils/tests/test_bdist_rpm.py.skip-distutils-tests-that-fail-in-rpmbuild Python-3.2.2/Lib/distutils/tests/test_bdist_rpm.py ---- Python-3.2.2/Lib/distutils/tests/test_bdist_rpm.py.skip-distutils-tests-that-fail-in-rpmbuild 2011-09-03 12:16:40.000000000 -0400 -+++ Python-3.2.2/Lib/distutils/tests/test_bdist_rpm.py 2011-09-10 05:04:56.328852558 -0400 -@@ -23,6 +23,7 @@ setup(name='foo', version='0.1', py_modu - - """ - -+@unittest._skipInRpmBuild("don't try to nest one rpm build inside another rpm build") - class BuildRpmTestCase(support.TempdirManager, - support.LoggingSilencer, - unittest.TestCase): -diff -up Python-3.2.2/Lib/distutils/tests/test_build_ext.py.skip-distutils-tests-that-fail-in-rpmbuild Python-3.2.2/Lib/distutils/tests/test_build_ext.py diff --git a/python3/patches/00139-skip-test_float-known-failure-on-arm.patch b/python3/patches/00139-skip-test_float-known-failure-on-arm.patch deleted file mode 100644 index 9d0bfad..0000000 --- a/python3/patches/00139-skip-test_float-known-failure-on-arm.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up Python-2.7.2/Lib/test/test_float.py.skip-test_float-known-failure-on-arm Python-2.7.2/Lib/test/test_float.py ---- Python-2.7.2/Lib/test/test_float.py.skip-test_float-known-failure-on-arm 2011-09-08 19:34:09.000986128 -0400 -+++ Python-2.7.2/Lib/test/test_float.py 2011-09-08 19:34:57.969982779 -0400 -@@ -1072,6 +1072,7 @@ class HexFloatTestCase(unittest.TestCase - self.identical(got, expected) - - -+ @unittest.skip('Known failure on ARM: http://bugs.python.org/issue8265') - def test_from_hex(self): - MIN = self.MIN; - MAX = self.MAX; diff --git a/python3/patches/00141-fix-test_gc_with_COUNT_ALLOCS.patch b/python3/patches/00141-fix-test_gc_with_COUNT_ALLOCS.patch deleted file mode 100644 index 337e39e..0000000 --- a/python3/patches/00141-fix-test_gc_with_COUNT_ALLOCS.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up Python-3.2b2/Lib/test/test_gc.py.fix-test-gc-COUNT_ALLOCS Python-3.2b2/Lib/test/test_gc.py ---- Python-3.2b2/Lib/test/test_gc.py.fix-test-gc-COUNT_ALLOCS 2010-12-28 20:39:40.779059772 -0500 -+++ Python-3.2b2/Lib/test/test_gc.py 2010-12-28 20:41:15.890940017 -0500 -@@ -102,10 +102,16 @@ class GCTests(unittest.TestCase): - del a - self.assertNotEqual(gc.collect(), 0) - del B, C -- self.assertNotEqual(gc.collect(), 0) -+ if hasattr(sys, 'getcounts'): -+ self.assertEqual(gc.collect(), 0) -+ else: -+ self.assertNotEqual(gc.collect(), 0) - A.a = A() - del A -- self.assertNotEqual(gc.collect(), 0) -+ if hasattr(sys, 'getcounts'): -+ self.assertEqual(gc.collect(), 0) -+ else: -+ self.assertNotEqual(gc.collect(), 0) - self.assertEqual(gc.collect(), 0) - - def test_method(self): diff --git a/python3/patches/00142-skip-failing-pty-tests-in-rpmbuild.patch b/python3/patches/00142-skip-failing-pty-tests-in-rpmbuild.patch deleted file mode 100644 index 414ffcd..0000000 --- a/python3/patches/00142-skip-failing-pty-tests-in-rpmbuild.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up Python-2.7.2/Lib/test/test_openpty.py.skip-failing-pty-tests-in-rpmbuild Python-2.7.2/Lib/test/test_openpty.py ---- Python-2.7.2/Lib/test/test_openpty.py.skip-failing-pty-tests-in-rpmbuild 2011-09-09 05:09:28.698920379 -0400 -+++ Python-2.7.2/Lib/test/test_openpty.py 2011-09-09 05:10:54.805914490 -0400 -@@ -8,6 +8,7 @@ if not hasattr(os, "openpty"): - - - class OpenptyTest(unittest.TestCase): -+ @unittest._skipInRpmBuild('sometimes fails in Koji, possibly due to a mock issue (rhbz#714627)') - def test(self): - master, slave = os.openpty() - if not os.isatty(slave): -diff -up Python-2.7.2/Lib/test/test_pty.py.skip-failing-pty-tests-in-rpmbuild Python-2.7.2/Lib/test/test_pty.py ---- Python-2.7.2/Lib/test/test_pty.py.skip-failing-pty-tests-in-rpmbuild 2011-09-09 05:09:36.781919825 -0400 -+++ Python-2.7.2/Lib/test/test_pty.py 2011-09-09 05:11:14.741913127 -0400 -@@ -109,6 +109,7 @@ class PtyTest(unittest.TestCase): - os.close(master_fd) - - -+ @unittest._skipInRpmBuild('sometimes fails in Koji, possibly due to a mock issue (rhbz#714627)') - def test_fork(self): - debug("calling pty.fork()") - pid, master_fd = pty.fork() diff --git a/python3/patches/00153-fix-test_gdb-noise.patch b/python3/patches/00153-fix-test_gdb-noise.patch deleted file mode 100644 index cc9ed8c..0000000 --- a/python3/patches/00153-fix-test_gdb-noise.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up cpython-59223da36dec/Lib/test/test_gdb.py.fix-test_gdb-noise cpython-59223da36dec/Lib/test/test_gdb.py ---- cpython-59223da36dec/Lib/test/test_gdb.py.fix-test_gdb-noise 2012-08-07 06:10:57.000000000 -0400 -+++ cpython-59223da36dec/Lib/test/test_gdb.py 2012-08-07 17:13:46.592343113 -0400 -@@ -115,6 +115,15 @@ class DebuggerTests(unittest.TestCase): - # Generate a list of commands in gdb's language: - commands = ['set breakpoint pending yes', - 'break %s' % breakpoint, -+ -+ # GDB as of Fedora 17 onwards can distinguish between the -+ # value of a variable at entry vs current value: -+ # http://sourceware.org/gdb/onlinedocs/gdb/Variables.html -+ # which leads to the selftests failing with errors like this: -+ # AssertionError: 'v@entry=()' != '()' -+ # Disable this: -+ 'set print entry-values no', -+ - 'run'] - if cmds_after_breakpoint: - commands += cmds_after_breakpoint -@@ -154,8 +163,16 @@ class DebuggerTests(unittest.TestCase): - err = err.replace("warning: Cannot initialize thread debugging" - " library: Debugger service failed\n", - '') -- -+ err = '\n'.join([line -+ for line in err.splitlines() -+ if not line.startswith('warning: Unable to open') -+ if not line.startswith('Missing separate debuginfo for') -+ if not line.startswith('Try: yum --disablerepo=') -+ # In case 'set print entry-values no' failed: -+ if not line.startswith('Undefined set print command')]) -+ - # Ensure no unexpected error messages: -+ self.maxDiff = None - self.assertEqual(err, '') - return out - diff --git a/python3/patches/00155-avoid-ctypes-thunks.patch b/python3/patches/00155-avoid-ctypes-thunks.patch deleted file mode 100644 index f03890e..0000000 --- a/python3/patches/00155-avoid-ctypes-thunks.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up Python-3.2.3/Lib/ctypes/__init__.py.rhbz814391 Python-3.2.3/Lib/ctypes/__init__.py ---- Python-3.2.3/Lib/ctypes/__init__.py.rhbz814391 2012-04-20 15:12:49.017867692 -0400 -+++ Python-3.2.3/Lib/ctypes/__init__.py 2012-04-20 15:15:09.501111408 -0400 -@@ -275,11 +275,6 @@ def _reset_cache(): - # _SimpleCData.c_char_p_from_param - POINTER(c_char).from_param = c_char_p.from_param - _pointer_type_cache[None] = c_void_p -- # XXX for whatever reasons, creating the first instance of a callback -- # function is needed for the unittests on Win64 to succeed. This MAY -- # be a compiler bug, since the problem occurs only when _ctypes is -- # compiled with the MS SDK compiler. Or an uninitialized variable? -- CFUNCTYPE(c_int)(lambda: None) - - def create_unicode_buffer(init, size=None): - """create_unicode_buffer(aString) -> character array diff --git a/python3/patches/00156-gdb-autoload-safepath.patch b/python3/patches/00156-gdb-autoload-safepath.patch deleted file mode 100644 index ac2aa40..0000000 --- a/python3/patches/00156-gdb-autoload-safepath.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -up Python-3.2.3/Lib/test/test_gdb.py.gdb-autoload-safepath Python-3.2.3/Lib/test/test_gdb.py ---- Python-3.2.3/Lib/test/test_gdb.py.gdb-autoload-safepath 2012-04-30 17:16:24.092706954 -0400 -+++ Python-3.2.3/Lib/test/test_gdb.py 2012-04-30 17:17:13.275703592 -0400 -@@ -46,6 +46,19 @@ def gdb_has_frame_select(): - - HAS_PYUP_PYDOWN = gdb_has_frame_select() - -+def gdb_has_autoload_safepath(): -+ # Recent GDBs will only auto-load scripts from certain safe -+ # locations, so we will need to turn off this protection. -+ # However, if the GDB doesn't have it, then the following -+ # command will generate noise on stderr (rhbz#817072): -+ cmd = "--eval-command=set auto-load safe-path /" -+ p = subprocess.Popen(["gdb", "--batch", cmd], -+ stderr=subprocess.PIPE) -+ _, stderr = p.communicate() -+ return b'"on" or "off" expected.' not in stderr -+ -+HAS_AUTOLOAD_SAFEPATH = gdb_has_autoload_safepath() -+ - BREAKPOINT_FN='builtin_id' - - class DebuggerTests(unittest.TestCase): -@@ -106,15 +119,28 @@ class DebuggerTests(unittest.TestCase): - 'set print entry-values no', - - 'run'] -+ -+ if HAS_AUTOLOAD_SAFEPATH: -+ # Recent GDBs will only auto-load scripts from certain safe -+ # locations. -+ # Where necessary, turn off this protection to ensure that -+ # our -gdb.py script can be loaded - but not on earlier gdb builds -+ # as this would generate noise on stderr (rhbz#817072): -+ init_commands = ['set auto-load safe-path /'] -+ else: -+ init_commands = [] -+ - if cmds_after_breakpoint: - commands += cmds_after_breakpoint - else: - commands += ['backtrace'] - -+ # print init_commands - # print commands - - # Use "commands" to generate the arguments with which to invoke "gdb": - args = ["gdb", "--batch"] -+ args += ['--init-eval-command=%s' % cmd for cmd in init_commands] - args += ['--eval-command=%s' % cmd for cmd in commands] - args += ["--args", - sys.executable] diff --git a/python3/patches/00157-uid-gid-overflows.patch b/python3/patches/00157-uid-gid-overflows.patch deleted file mode 100644 index ab4cb0c..0000000 --- a/python3/patches/00157-uid-gid-overflows.patch +++ /dev/null @@ -1,696 +0,0 @@ -diff -up Python-3.3.0b1/Include/modsupport.h.uid-gid-overflows Python-3.3.0b1/Include/modsupport.h ---- Python-3.3.0b1/Include/modsupport.h.uid-gid-overflows 2012-06-26 16:19:40.000000000 -0400 -+++ Python-3.3.0b1/Include/modsupport.h 2012-07-20 14:21:46.854688763 -0400 -@@ -8,6 +8,7 @@ extern "C" { - /* Module support interface */ - - #include <stdarg.h> -+#include <sys/types.h> - - /* If PY_SSIZE_T_CLEAN is defined, each functions treats #-specifier - to mean Py_ssize_t */ -@@ -125,6 +126,17 @@ PyAPI_FUNC(PyObject *) PyModule_Create2( - PyAPI_DATA(char *) _Py_PackageContext; - #endif - -+/* -+ Non-standard extension: support for dealing with uid_t and gid_t without -+ integer overflow -+ */ -+ -+PyAPI_FUNC(PyObject *) _PyObject_FromUid(uid_t uid); -+PyAPI_FUNC(PyObject *) _PyObject_FromGid(gid_t gid); -+ -+PyAPI_FUNC(int) _PyArg_ParseUid(PyObject *in_obj, uid_t *out_uid); -+PyAPI_FUNC(int) _PyArg_ParseGid(PyObject *in_obj, gid_t *out_gid); -+ - #ifdef __cplusplus - } - #endif -diff -up Python-3.3.0b1/Lib/test/test_os.py.uid-gid-overflows Python-3.3.0b1/Lib/test/test_os.py ---- Python-3.3.0b1/Lib/test/test_os.py.uid-gid-overflows 2012-06-26 16:19:48.000000000 -0400 -+++ Python-3.3.0b1/Lib/test/test_os.py 2012-07-20 14:21:46.856688739 -0400 -@@ -1174,30 +1174,36 @@ if sys.platform != 'win32': - def test_setuid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setuid, 0) -+ self.assertRaises(TypeError, os.setuid, 'not an int') - self.assertRaises(OverflowError, os.setuid, 1<<32) - - if hasattr(os, 'setgid'): - def test_setgid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setgid, 0) -+ self.assertRaises(TypeError, os.setgid, 'not an int') - self.assertRaises(OverflowError, os.setgid, 1<<32) - - if hasattr(os, 'seteuid'): - def test_seteuid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.seteuid, 0) -+ self.assertRaises(TypeError, os.seteuid, 'not an int') - self.assertRaises(OverflowError, os.seteuid, 1<<32) - - if hasattr(os, 'setegid'): - def test_setegid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setegid, 0) -+ self.assertRaises(TypeError, os.setegid, 'not an int') - self.assertRaises(OverflowError, os.setegid, 1<<32) - - if hasattr(os, 'setreuid'): - def test_setreuid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setreuid, 0, 0) -+ self.assertRaises(TypeError, os.setreuid, 'not an int', 0) -+ self.assertRaises(TypeError, os.setreuid, 0, 'not an int') - self.assertRaises(OverflowError, os.setreuid, 1<<32, 0) - self.assertRaises(OverflowError, os.setreuid, 0, 1<<32) - -@@ -1212,6 +1218,8 @@ if sys.platform != 'win32': - def test_setregid(self): - if os.getuid() != 0: - self.assertRaises(os.error, os.setregid, 0, 0) -+ self.assertRaises(TypeError, os.setregid, 'not an int', 0) -+ self.assertRaises(TypeError, os.setregid, 0, 'not an int') - self.assertRaises(OverflowError, os.setregid, 1<<32, 0) - self.assertRaises(OverflowError, os.setregid, 0, 1<<32) - -diff -up Python-3.3.0b1/Lib/test/test_posix.py.uid-gid-overflows Python-3.3.0b1/Lib/test/test_posix.py ---- Python-3.3.0b1/Lib/test/test_posix.py.uid-gid-overflows 2012-06-26 16:19:48.000000000 -0400 -+++ Python-3.3.0b1/Lib/test/test_posix.py 2012-07-20 14:21:46.857688726 -0400 -@@ -387,10 +387,17 @@ class PosixTester(unittest.TestCase): - else: - self.assertTrue(stat.S_ISFIFO(posix.stat(support.TESTFN).st_mode)) - -- def _test_all_chown_common(self, chown_func, first_param): -+ def _test_all_chown_common(self, chown_func, stat_func, first_param): - """Common code for chown, fchown and lchown tests.""" - # test a successful chown call - chown_func(first_param, os.getuid(), os.getgid()) -+ self.assertEqual(stat_func(first_param).st_uid, os.getuid()) -+ self.assertEqual(stat_func(first_param).st_gid, os.getgid()) -+ -+ # verify that -1 works as a "do-nothing" option: -+ chown_func(first_param, -1, -1) -+ self.assertEqual(stat_func(first_param).st_uid, os.getuid()) -+ self.assertEqual(stat_func(first_param).st_gid, os.getgid()) - - if os.getuid() == 0: - try: -@@ -421,7 +428,7 @@ class PosixTester(unittest.TestCase): - - # re-create the file - support.create_empty_file(support.TESTFN) -- self._test_all_chown_common(posix.chown, support.TESTFN) -+ self._test_all_chown_common(posix.chown, posix.stat, support.TESTFN) - - @unittest.skipUnless(hasattr(posix, 'fchown'), "test needs os.fchown()") - def test_fchown(self): -@@ -431,7 +438,7 @@ class PosixTester(unittest.TestCase): - test_file = open(support.TESTFN, 'w') - try: - fd = test_file.fileno() -- self._test_all_chown_common(posix.fchown, fd) -+ self._test_all_chown_common(posix.fchown, posix.fstat, fd) - finally: - test_file.close() - -@@ -440,7 +447,7 @@ class PosixTester(unittest.TestCase): - os.unlink(support.TESTFN) - # create a symlink - os.symlink(_DUMMY_SYMLINK, support.TESTFN) -- self._test_all_chown_common(posix.lchown, support.TESTFN) -+ self._test_all_chown_common(posix.lchown, posix.lstat, support.TESTFN) - - def test_chdir(self): - if hasattr(posix, 'chdir'): -diff -up Python-3.3.0b1/Lib/test/test_pwd.py.uid-gid-overflows Python-3.3.0b1/Lib/test/test_pwd.py ---- Python-3.3.0b1/Lib/test/test_pwd.py.uid-gid-overflows 2012-06-26 16:19:48.000000000 -0400 -+++ Python-3.3.0b1/Lib/test/test_pwd.py 2012-07-20 14:21:46.857688726 -0400 -@@ -87,9 +87,9 @@ class PwdTest(unittest.TestCase): - # In some cases, byuids isn't a complete list of all users in the - # system, so if we try to pick a value not in byuids (via a perturbing - # loop, say), pwd.getpwuid() might still be able to find data for that -- # uid. Using sys.maxint may provoke the same problems, but hopefully -+ # uid. Using 2**32 - 2 may provoke the same problems, but hopefully - # it will be a more repeatable failure. -- fakeuid = sys.maxsize -+ fakeuid = 2**32 - 2 - self.assertNotIn(fakeuid, byuids) - self.assertRaises(KeyError, pwd.getpwuid, fakeuid) - -diff -up Python-3.3.0b1/Modules/grpmodule.c.uid-gid-overflows Python-3.3.0b1/Modules/grpmodule.c ---- Python-3.3.0b1/Modules/grpmodule.c.uid-gid-overflows 2012-06-26 16:19:54.000000000 -0400 -+++ Python-3.3.0b1/Modules/grpmodule.c 2012-07-20 14:21:46.858688713 -0400 -@@ -69,7 +69,7 @@ mkgrent(struct group *p) - Py_INCREF(Py_None); - } - #endif -- SET(setIndex++, PyLong_FromLong((long) p->gr_gid)); -+ SET(setIndex++, _PyObject_FromGid(p->gr_gid)); - SET(setIndex++, w); - #undef SET - -@@ -84,18 +84,16 @@ mkgrent(struct group *p) - static PyObject * - grp_getgrgid(PyObject *self, PyObject *pyo_id) - { -- PyObject *py_int_id; -- unsigned int gid; -+ gid_t gid; - struct group *p; - -- py_int_id = PyNumber_Long(pyo_id); -- if (!py_int_id) -- return NULL; -- gid = PyLong_AS_LONG(py_int_id); -- Py_DECREF(py_int_id); -+ if (!_PyArg_ParseGid(pyo_id, &gid)) { -+ return NULL; -+ } - - if ((p = getgrgid(gid)) == NULL) { -- PyErr_Format(PyExc_KeyError, "getgrgid(): gid not found: %d", gid); -+ PyErr_Format(PyExc_KeyError, -+ "getgrgid(): gid not found: %lu", (unsigned long)gid); - return NULL; - } - return mkgrent(p); -diff -up Python-3.3.0b1/Modules/posixmodule.c.uid-gid-overflows Python-3.3.0b1/Modules/posixmodule.c ---- Python-3.3.0b1/Modules/posixmodule.c.uid-gid-overflows 2012-07-20 14:21:46.788689588 -0400 -+++ Python-3.3.0b1/Modules/posixmodule.c 2012-07-20 14:24:19.626778849 -0400 -@@ -2151,8 +2151,8 @@ _pystat_fromstructstat(STRUCT_STAT *st) - PyStructSequence_SET_ITEM(v, 2, PyLong_FromLong((long)st->st_dev)); - #endif - PyStructSequence_SET_ITEM(v, 3, PyLong_FromLong((long)st->st_nlink)); -- PyStructSequence_SET_ITEM(v, 4, PyLong_FromLong((long)st->st_uid)); -- PyStructSequence_SET_ITEM(v, 5, PyLong_FromLong((long)st->st_gid)); -+ PyStructSequence_SET_ITEM(v, 4, _PyObject_FromUid(st->st_uid)); -+ PyStructSequence_SET_ITEM(v, 5, _PyObject_FromGid(st->st_gid)); - #ifdef HAVE_LARGEFILE_SUPPORT - PyStructSequence_SET_ITEM(v, 6, - PyLong_FromLongLong((PY_LONG_LONG)st->st_size)); -@@ -2957,7 +2957,6 @@ static PyObject * - posix_chown(PyObject *self, PyObject *args, PyObject *kwargs) - { - path_t path; -- long uid_l, gid_l; - uid_t uid; - gid_t gid; - int dir_fd = DEFAULT_DIR_FD; -@@ -2971,9 +2970,10 @@ posix_chown(PyObject *self, PyObject *ar - #ifdef HAVE_FCHOWN - path.allow_fd = 1; - #endif -- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&ll|$O&p:chown", keywords, -+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&O&|$O&p:chown", keywords, - path_converter, &path, -- &uid_l, &gid_l, -+ _PyArg_ParseUid, &uid, -+ _PyArg_ParseGid, &gid, - #ifdef HAVE_FCHOWNAT - dir_fd_converter, &dir_fd, - #else -@@ -3004,8 +3004,6 @@ posix_chown(PyObject *self, PyObject *ar - #endif - - Py_BEGIN_ALLOW_THREADS -- uid = (uid_t)uid_l; -- gid = (uid_t)gid_l; - #ifdef HAVE_FCHOWN - if (path.fd != -1) - result = fchown(path.fd, uid, gid); -@@ -3049,12 +3047,15 @@ static PyObject * - posix_fchown(PyObject *self, PyObject *args) - { - int fd; -- long uid, gid; -+ uid_t uid; -+ gid_t gid; - int res; -- if (!PyArg_ParseTuple(args, "ill:fchown", &fd, &uid, &gid)) -+ if (!PyArg_ParseTuple(args, "iO&O&:chown", &fd, -+ _PyArg_ParseUid, &uid, -+ _PyArg_ParseGid, &gid)) - return NULL; - Py_BEGIN_ALLOW_THREADS -- res = fchown(fd, (uid_t) uid, (gid_t) gid); -+ res = fchown(fd, uid, gid); - Py_END_ALLOW_THREADS - if (res < 0) - return posix_error(); -@@ -3074,15 +3075,17 @@ posix_lchown(PyObject *self, PyObject *a - { - PyObject *opath; - char *path; -- long uid, gid; -+ uid_t uid; -+ gid_t gid; - int res; -- if (!PyArg_ParseTuple(args, "O&ll:lchown", -+ if (!PyArg_ParseTuple(args, "O&O&O&:lchown", - PyUnicode_FSConverter, &opath, -- &uid, &gid)) -+ _PyArg_ParseUid, &uid, -+ _PyArg_ParseGid, &gid)) - return NULL; - path = PyBytes_AsString(opath); - Py_BEGIN_ALLOW_THREADS -- res = lchown(path, (uid_t) uid, (gid_t) gid); -+ res = lchown(path, uid, gid); - Py_END_ALLOW_THREADS - if (res < 0) - return posix_error_with_allocated_filename(opath); -@@ -6184,7 +6187,7 @@ Return the current process's effective g - static PyObject * - posix_getegid(PyObject *self, PyObject *noargs) - { -- return PyLong_FromLong((long)getegid()); -+ return _PyObject_FromGid(getegid()); - } - #endif - -@@ -6197,7 +6200,7 @@ Return the current process's effective u - static PyObject * - posix_geteuid(PyObject *self, PyObject *noargs) - { -- return PyLong_FromLong((long)geteuid()); -+ return _PyObject_FromUid(geteuid()); - } - #endif - -@@ -6210,7 +6213,7 @@ Return the current process's group id.") - static PyObject * - posix_getgid(PyObject *self, PyObject *noargs) - { -- return PyLong_FromLong((long)getgid()); -+ return _PyObject_FromGid(getgid()); - } - #endif - -@@ -6349,7 +6352,7 @@ posix_getgroups(PyObject *self, PyObject - if (result != NULL) { - int i; - for (i = 0; i < n; ++i) { -- PyObject *o = PyLong_FromLong((long)alt_grouplist[i]); -+ PyObject *o = _PyObject_FromGid(alt_grouplist[i]); - if (o == NULL) { - Py_DECREF(result); - result = NULL; -@@ -6380,14 +6383,15 @@ posix_initgroups(PyObject *self, PyObjec - PyObject *oname; - char *username; - int res; -- long gid; -+ gid_t gid; - -- if (!PyArg_ParseTuple(args, "O&l:initgroups", -- PyUnicode_FSConverter, &oname, &gid)) -+ if (!PyArg_ParseTuple(args, "O&O&:initgroups", -+ PyUnicode_FSConverter, &oname, -+ _PyArg_ParseGid, &gid)) - return NULL; - username = PyBytes_AS_STRING(oname); - -- res = initgroups(username, (gid_t) gid); -+ res = initgroups(username, gid); - Py_DECREF(oname); - if (res == -1) - return PyErr_SetFromErrno(PyExc_OSError); -@@ -6562,7 +6566,7 @@ Return the current process's user id."); - static PyObject * - posix_getuid(PyObject *self, PyObject *noargs) - { -- return PyLong_FromLong((long)getuid()); -+ return _PyObject_FromUid(getuid()); - } - #endif - -@@ -6702,15 +6706,9 @@ Set the current process's user id."); - static PyObject * - posix_setuid(PyObject *self, PyObject *args) - { -- long uid_arg; - uid_t uid; -- if (!PyArg_ParseTuple(args, "l:setuid", &uid_arg)) -- return NULL; -- uid = uid_arg; -- if (uid != uid_arg) { -- PyErr_SetString(PyExc_OverflowError, "user id too big"); -+ if (!PyArg_ParseTuple(args, "O&:setuid", _PyArg_ParseUid, &uid)) - return NULL; -- } - if (setuid(uid) < 0) - return posix_error(); - Py_INCREF(Py_None); -@@ -6727,15 +6725,9 @@ Set the current process's effective user - static PyObject * - posix_seteuid (PyObject *self, PyObject *args) - { -- long euid_arg; - uid_t euid; -- if (!PyArg_ParseTuple(args, "l", &euid_arg)) -+ if (!PyArg_ParseTuple(args, "O&:seteuid", _PyArg_ParseUid, &euid)) - return NULL; -- euid = euid_arg; -- if (euid != euid_arg) { -- PyErr_SetString(PyExc_OverflowError, "user id too big"); -- return NULL; -- } - if (seteuid(euid) < 0) { - return posix_error(); - } else { -@@ -6753,15 +6745,9 @@ Set the current process's effective grou - static PyObject * - posix_setegid (PyObject *self, PyObject *args) - { -- long egid_arg; - gid_t egid; -- if (!PyArg_ParseTuple(args, "l", &egid_arg)) -- return NULL; -- egid = egid_arg; -- if (egid != egid_arg) { -- PyErr_SetString(PyExc_OverflowError, "group id too big"); -+ if (!PyArg_ParseTuple(args, "O&:setegid", _PyArg_ParseGid, &egid)) - return NULL; -- } - if (setegid(egid) < 0) { - return posix_error(); - } else { -@@ -6779,23 +6765,11 @@ Set the current process's real and effec - static PyObject * - posix_setreuid (PyObject *self, PyObject *args) - { -- long ruid_arg, euid_arg; - uid_t ruid, euid; -- if (!PyArg_ParseTuple(args, "ll", &ruid_arg, &euid_arg)) -- return NULL; -- if (ruid_arg == -1) -- ruid = (uid_t)-1; /* let the compiler choose how -1 fits */ -- else -- ruid = ruid_arg; /* otherwise, assign from our long */ -- if (euid_arg == -1) -- euid = (uid_t)-1; -- else -- euid = euid_arg; -- if ((euid_arg != -1 && euid != euid_arg) || -- (ruid_arg != -1 && ruid != ruid_arg)) { -- PyErr_SetString(PyExc_OverflowError, "user id too big"); -+ if (!PyArg_ParseTuple(args, "O&O&", -+ _PyArg_ParseUid, &ruid, -+ _PyArg_ParseUid, &euid)) - return NULL; -- } - if (setreuid(ruid, euid) < 0) { - return posix_error(); - } else { -@@ -6813,23 +6787,11 @@ Set the current process's real and effec - static PyObject * - posix_setregid (PyObject *self, PyObject *args) - { -- long rgid_arg, egid_arg; - gid_t rgid, egid; -- if (!PyArg_ParseTuple(args, "ll", &rgid_arg, &egid_arg)) -- return NULL; -- if (rgid_arg == -1) -- rgid = (gid_t)-1; /* let the compiler choose how -1 fits */ -- else -- rgid = rgid_arg; /* otherwise, assign from our long */ -- if (egid_arg == -1) -- egid = (gid_t)-1; -- else -- egid = egid_arg; -- if ((egid_arg != -1 && egid != egid_arg) || -- (rgid_arg != -1 && rgid != rgid_arg)) { -- PyErr_SetString(PyExc_OverflowError, "group id too big"); -+ if (!PyArg_ParseTuple(args, "O&O&", -+ _PyArg_ParseGid, &rgid, -+ _PyArg_ParseGid, &egid)) - return NULL; -- } - if (setregid(rgid, egid) < 0) { - return posix_error(); - } else { -@@ -6847,15 +6809,9 @@ Set the current process's group id."); - static PyObject * - posix_setgid(PyObject *self, PyObject *args) - { -- long gid_arg; - gid_t gid; -- if (!PyArg_ParseTuple(args, "l:setgid", &gid_arg)) -+ if (!PyArg_ParseTuple(args, "O&:setgid", _PyArg_ParseGid, &gid)) - return NULL; -- gid = gid_arg; -- if (gid != gid_arg) { -- PyErr_SetString(PyExc_OverflowError, "group id too big"); -- return NULL; -- } - if (setgid(gid) < 0) - return posix_error(); - Py_INCREF(Py_None); -@@ -6888,27 +6844,9 @@ posix_setgroups(PyObject *self, PyObject - elem = PySequence_GetItem(groups, i); - if (!elem) - return NULL; -- if (!PyLong_Check(elem)) { -- PyErr_SetString(PyExc_TypeError, -- "groups must be integers"); -+ if (!_PyArg_ParseGid(elem, &grouplist[i])) { - Py_DECREF(elem); - return NULL; -- } else { -- unsigned long x = PyLong_AsUnsignedLong(elem); -- if (PyErr_Occurred()) { -- PyErr_SetString(PyExc_TypeError, -- "group id too big"); -- Py_DECREF(elem); -- return NULL; -- } -- grouplist[i] = x; -- /* read back the value to see if it fitted in gid_t */ -- if (grouplist[i] != x) { -- PyErr_SetString(PyExc_TypeError, -- "group id too big"); -- Py_DECREF(elem); -- return NULL; -- } - } - Py_DECREF(elem); - } -@@ -10388,9 +10326,11 @@ Set the current process's real, effectiv - static PyObject* - posix_setresuid (PyObject *self, PyObject *args) - { -- /* We assume uid_t is no larger than a long. */ -- long ruid, euid, suid; -- if (!PyArg_ParseTuple(args, "lll", &ruid, &euid, &suid)) -+ uid_t ruid, euid, suid; -+ if (!PyArg_ParseTuple(args, "O&O&O&", -+ _PyArg_ParseUid, &ruid, -+ _PyArg_ParseUid, &euid, -+ _PyArg_ParseUid, &suid)) - return NULL; - if (setresuid(ruid, euid, suid) < 0) - return posix_error(); -@@ -10406,9 +10346,11 @@ Set the current process's real, effectiv - static PyObject* - posix_setresgid (PyObject *self, PyObject *args) - { -- /* We assume uid_t is no larger than a long. */ -- long rgid, egid, sgid; -- if (!PyArg_ParseTuple(args, "lll", &rgid, &egid, &sgid)) -+ gid_t rgid, egid, sgid; -+ if (!PyArg_ParseTuple(args, "O&O&O&", -+ _PyArg_ParseGid, &rgid, -+ _PyArg_ParseGid, &egid, -+ _PyArg_ParseGid, &sgid)) - return NULL; - if (setresgid(rgid, egid, sgid) < 0) - return posix_error(); -@@ -10425,14 +10367,13 @@ static PyObject* - posix_getresuid (PyObject *self, PyObject *noargs) - { - uid_t ruid, euid, suid; -- long l_ruid, l_euid, l_suid; -+ PyObject *obj_ruid, *obj_euid, *obj_suid; - if (getresuid(&ruid, &euid, &suid) < 0) - return posix_error(); -- /* Force the values into long's as we don't know the size of uid_t. */ -- l_ruid = ruid; -- l_euid = euid; -- l_suid = suid; -- return Py_BuildValue("(lll)", l_ruid, l_euid, l_suid); -+ obj_ruid = _PyObject_FromUid(ruid); -+ obj_euid = _PyObject_FromUid(euid); -+ obj_suid = _PyObject_FromUid(suid); -+ return Py_BuildValue("(NNN)", obj_ruid, obj_euid, obj_suid); - } - #endif - -@@ -10445,14 +10386,13 @@ static PyObject* - posix_getresgid (PyObject *self, PyObject *noargs) - { - uid_t rgid, egid, sgid; -- long l_rgid, l_egid, l_sgid; -+ PyObject *obj_rgid, *obj_egid, *obj_sgid; - if (getresgid(&rgid, &egid, &sgid) < 0) - return posix_error(); -- /* Force the values into long's as we don't know the size of uid_t. */ -- l_rgid = rgid; -- l_egid = egid; -- l_sgid = sgid; -- return Py_BuildValue("(lll)", l_rgid, l_egid, l_sgid); -+ obj_rgid = _PyObject_FromGid(rgid); -+ obj_egid = _PyObject_FromGid(egid); -+ obj_sgid = _PyObject_FromGid(sgid); -+ return Py_BuildValue("(NNN)", obj_rgid, obj_egid, obj_sgid); - } - #endif - -diff -up Python-3.3.0b1/Modules/pwdmodule.c.uid-gid-overflows Python-3.3.0b1/Modules/pwdmodule.c ---- Python-3.3.0b1/Modules/pwdmodule.c.uid-gid-overflows 2012-06-26 16:19:54.000000000 -0400 -+++ Python-3.3.0b1/Modules/pwdmodule.c 2012-07-20 14:21:46.861688675 -0400 -@@ -74,8 +74,8 @@ mkpwent(struct passwd *p) - #else - SETS(setIndex++, p->pw_passwd); - #endif -- SETI(setIndex++, p->pw_uid); -- SETI(setIndex++, p->pw_gid); -+ PyStructSequence_SET_ITEM(v, setIndex++, _PyObject_FromUid(p->pw_uid)); -+ PyStructSequence_SET_ITEM(v, setIndex++, _PyObject_FromGid(p->pw_gid)); - #ifdef __VMS - SETS(setIndex++, ""); - #else -@@ -104,13 +104,14 @@ See help(pwd) for more on password datab - static PyObject * - pwd_getpwuid(PyObject *self, PyObject *args) - { -- unsigned int uid; -+ uid_t uid; - struct passwd *p; -- if (!PyArg_ParseTuple(args, "I:getpwuid", &uid)) -+ if (!PyArg_ParseTuple(args, "O&:getpwuid", -+ _PyArg_ParseUid, &uid)) - return NULL; - if ((p = getpwuid(uid)) == NULL) { - PyErr_Format(PyExc_KeyError, -- "getpwuid(): uid not found: %d", uid); -+ "getpwuid(): uid not found: %lu", (unsigned long)uid); - return NULL; - } - return mkpwent(p); -diff -up Python-3.3.0b1/Python/getargs.c.uid-gid-overflows Python-3.3.0b1/Python/getargs.c ---- Python-3.3.0b1/Python/getargs.c.uid-gid-overflows 2012-06-26 16:19:57.000000000 -0400 -+++ Python-3.3.0b1/Python/getargs.c 2012-07-20 14:21:46.861688675 -0400 -@@ -4,6 +4,7 @@ - #include "Python.h" - - #include <ctype.h> -+#include <limits.h> - - - #ifdef __cplusplus -@@ -1807,6 +1808,102 @@ _PyArg_NoKeywords(const char *funcname, - funcname); - return 0; - } -+ -+PyObject * -+_PyObject_FromUid(uid_t uid) -+{ -+ return PyLong_FromUnsignedLong((uid_t)uid); -+} -+ -+PyObject * -+_PyObject_FromGid(gid_t gid) -+{ -+ return PyLong_FromUnsignedLong((gid_t)gid); -+} -+ -+int -+_PyArg_ParseUid(PyObject *in_obj, uid_t *out_uid) -+{ -+ PyObject *index, *number = NULL; -+ long sl; -+ unsigned long ul; -+ -+ assert(out_uid); -+ -+ index = PyNumber_Index(in_obj); -+ if (index != NULL) { -+ number = PyNumber_Long(index); -+ Py_DECREF(index); -+ } -+ if (number == NULL) { -+ PyErr_SetString(PyExc_TypeError, "user id must be integer"); -+ return 0; -+ } -+ -+ /* Special case: support -1 (e.g. for use by chown) */ -+ sl = PyLong_AsLong(number); -+ if (PyErr_Occurred()) { -+ PyErr_Clear(); -+ } else if (sl == -1) { -+ Py_DECREF(number); -+ *out_uid = (uid_t)-1; -+ return 1; -+ } -+ -+ /* Otherwise, it must be >= 0 */ -+ ul = PyLong_AsUnsignedLong(number); -+ Py_DECREF(number); -+ *out_uid = ul; -+ /* read back the value to see if it fitted in uid_t */ -+ if (PyErr_Occurred() || *out_uid != ul) { -+ PyErr_SetString(PyExc_OverflowError, -+ "user id is not in range(-1, 2^32-1)"); -+ return 0; -+ } -+ return 1; -+} -+ -+int -+_PyArg_ParseGid(PyObject *in_obj, gid_t *out_gid) -+{ -+ PyObject *index, *number = NULL; -+ long sl; -+ unsigned long ul; -+ -+ assert(out_gid); -+ -+ index = PyNumber_Index(in_obj); -+ if (index != NULL) { -+ number = PyNumber_Long(index); -+ Py_DECREF(index); -+ } -+ if (number == NULL) { -+ PyErr_SetString(PyExc_TypeError, "group id must be integer"); -+ return 0; -+ } -+ -+ /* Special case: support -1 (e.g. for use by chown) */ -+ sl = PyLong_AsLong(number); -+ if (PyErr_Occurred()) { -+ PyErr_Clear(); -+ } else if (sl == -1) { -+ Py_DECREF(number); -+ *out_gid = (gid_t)-1; -+ return 1; -+ } -+ -+ ul = PyLong_AsUnsignedLong(number); -+ Py_DECREF(number); -+ *out_gid = ul; -+ /* read back the value to see if it fitted in gid_t */ -+ if (PyErr_Occurred() || *out_gid != ul) { -+ PyErr_SetString(PyExc_OverflowError, -+ "group id is not in range(-1, 2^32-1)"); -+ return 0; -+ } -+ return 1; -+} -+ - #ifdef __cplusplus - }; - #endif diff --git a/python3/patches/00160-disable-test_fs_holes-in-rpm-build.patch b/python3/patches/00160-disable-test_fs_holes-in-rpm-build.patch deleted file mode 100644 index 9fa91d5..0000000 --- a/python3/patches/00160-disable-test_fs_holes-in-rpm-build.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up cpython-59223da36dec/Lib/test/test_posix.py.disable-test_fs_holes-in-rpm-build cpython-59223da36dec/Lib/test/test_posix.py ---- cpython-59223da36dec/Lib/test/test_posix.py.disable-test_fs_holes-in-rpm-build 2012-08-07 17:15:59.000000000 -0400 -+++ cpython-59223da36dec/Lib/test/test_posix.py 2012-08-07 17:16:53.528330330 -0400 -@@ -973,6 +973,7 @@ class PosixTester(unittest.TestCase): - posix.RTLD_GLOBAL - posix.RTLD_LOCAL - -+ @unittest._skipInRpmBuild('running kernel may not match kernel in chroot') - @unittest.skipUnless(hasattr(os, 'SEEK_HOLE'), - "test needs an OS that reports file holes") - def test_fs_holes(self): diff --git a/python3/patches/00163-disable-parts-of-test_socket-in-rpm-build.patch b/python3/patches/00163-disable-parts-of-test_socket-in-rpm-build.patch deleted file mode 100644 index 0e28036..0000000 --- a/python3/patches/00163-disable-parts-of-test_socket-in-rpm-build.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up Python-3.3.0b1/Lib/test/test_socket.py.disable-test_socket-in-rpm-builds Python-3.3.0b1/Lib/test/test_socket.py ---- Python-3.3.0b1/Lib/test/test_socket.py.disable-test_socket-in-rpm-builds 2012-07-24 15:02:30.823355067 -0400 -+++ Python-3.3.0b1/Lib/test/test_socket.py 2012-07-24 15:08:13.021354999 -0400 -@@ -2188,6 +2188,7 @@ class RecvmsgGenericStreamTests(RecvmsgG - # Tests which require a stream socket and can use either recvmsg() - # or recvmsg_into(). - -+ @unittest._skipInRpmBuild('fails intermittently when run within Koji') - def testRecvmsgEOF(self): - # Receive end-of-stream indicator (b"", peer socket closed). - msg, ancdata, flags, addr = self.doRecvmsg(self.serv_sock, 1024) diff --git a/python3/patches/00164-disable-interrupted_write-tests-on-ppc.patch b/python3/patches/00164-disable-interrupted_write-tests-on-ppc.patch deleted file mode 100644 index 0db8092..0000000 --- a/python3/patches/00164-disable-interrupted_write-tests-on-ppc.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -up Python-3.3.0b1/Lib/test/test_exceptions.py.846849 Python-3.3.0b1/Lib/test/test_exceptions.py ---- Python-3.3.0b1/Lib/test/test_exceptions.py.846849 2012-06-26 22:19:47.000000000 +0200 -+++ Python-3.3.0b1/Lib/test/test_exceptions.py 2012-08-13 17:41:28.845403486 +0200 -@@ -401,6 +401,7 @@ class ExceptionTests(unittest.TestCase): - self.assertIsNone(e.__context__) - self.assertIsNone(e.__cause__) - -+ @unittest.skip('rhbz#846849') - def testChainingDescriptors(self): - try: - raise Exception() -diff -up Python-3.3.0b1/Lib/test/test_io.py.846849 Python-3.3.0b1/Lib/test/test_io.py ---- Python-3.3.0b1/Lib/test/test_io.py.846849 2012-06-26 22:19:48.000000000 +0200 -+++ Python-3.3.0b1/Lib/test/test_io.py 2012-08-13 17:41:28.846403451 +0200 -@@ -2938,12 +2938,15 @@ class SignalsTest(unittest.TestCase): - if e.errno != errno.EBADF: - raise - -+ @unittest.skip('rhbz#846849') - def test_interrupted_write_unbuffered(self): - self.check_interrupted_write(b"xy", b"xy", mode="wb", buffering=0) - -+ @unittest.skip('rhbz#846849') - def test_interrupted_write_buffered(self): - self.check_interrupted_write(b"xy", b"xy", mode="wb") - -+ @unittest.skip('rhbz#846849') - def test_interrupted_write_text(self): - self.check_interrupted_write("xy", b"xy", mode="w", encoding="ascii") - -diff -up Python-3.3.0b1/Lib/test/test_raise.py.846849 Python-3.3.0b1/Lib/test/test_raise.py ---- Python-3.3.0b1/Lib/test/test_raise.py.846849 2012-08-13 17:42:16.719714213 +0200 -+++ Python-3.3.0b1/Lib/test/test_raise.py 2012-08-13 17:43:02.544097272 +0200 -@@ -151,6 +151,7 @@ class TestRaise(unittest.TestCase): - - class TestCause(unittest.TestCase): - -+ @unittest.skip('rhbz#846849') - def testCauseSyntax(self): - try: - try: -diff -up Python-3.3.0b1/Lib/test/test_traceback.py.846849 Python-3.3.0b1/Lib/test/test_traceback.py ---- Python-3.3.0b1/Lib/test/test_traceback.py.846849 2012-08-13 17:44:19.714374275 +0200 -+++ Python-3.3.0b1/Lib/test/test_traceback.py 2012-08-13 17:44:43.515534435 +0200 -@@ -246,6 +246,7 @@ class BaseExceptionReportingTests: - self.check_zero_div(blocks[0]) - self.assertIn('inner_raise() # Marker', blocks[2]) - -+ @unittest.skip('rhbz#846849') - def test_context_suppression(self): - try: - try: diff --git a/python3/patches/05000-autotool-intermediates.patch b/python3/patches/05000-autotool-intermediates.patch deleted file mode 100644 index bd9aeca..0000000 --- a/python3/patches/05000-autotool-intermediates.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -up ./configure.autotool-intermediates ./configure ---- ./configure.autotool-intermediates 2012-08-07 17:21:25.249311751 -0400 -+++ ./configure 2012-08-07 17:21:35.503311049 -0400 -@@ -779,6 +779,8 @@ with_thread - enable_ipv6 - with_doc_strings - with_tsc -+with_count_allocs -+with_call_profile - with_pymalloc - with_valgrind - with_systemtap -@@ -1457,6 +1459,8 @@ Optional Packages: - deprecated; use --with(out)-threads - --with(out)-doc-strings disable/enable documentation strings - --with(out)-tsc enable/disable timestamp counter profile -+ --with(out)count-allocs enable/disable per-type instance accounting -+ --with(out)-call-profile enable/disable statistics on function call invocation - --with(out)-pymalloc disable/enable specialized mallocs - --with-valgrind Enable Valgrind support - --with(out)-systemtap disable/enable SystemTap support -@@ -10017,6 +10021,50 @@ $as_echo "no" >&6; } - fi - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-count-allocs" >&5 -+$as_echo_n "checking for --with-count-allocs... " >&6; } -+ -+# Check whether --with-count-allocs was given. -+if test "${with_count_allocs+set}" = set; then : -+ withval=$with_count_allocs; -+if test "$withval" != no -+then -+ -+$as_echo "#define COUNT_ALLOCS 1" >>confdefs.h -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-call-profile" >&5 -+$as_echo_n "checking for --with-call-profile... " >&6; } -+ -+# Check whether --with-call-profile was given. -+if test "${with_call_profile+set}" = set; then : -+ withval=$with_call_profile; -+if test "$withval" != no -+then -+ -+$as_echo "#define CALL_PROFILE 1" >>confdefs.h -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ - # Check for Python-specific malloc support - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 - $as_echo_n "checking for --with-pymalloc... " >&6; } -diff -up ./pyconfig.h.in.autotool-intermediates ./pyconfig.h.in diff --git a/python3/patches/python-3.2.1-fix-test-subprocess-with-nonreadable-path-dir.patch b/python3/patches/python-3.2.1-fix-test-subprocess-with-nonreadable-path-dir.patch deleted file mode 100644 index 6f43c72..0000000 --- a/python3/patches/python-3.2.1-fix-test-subprocess-with-nonreadable-path-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up Python-3.2.1/Lib/test/test_subprocess.py.non-readable-path Python-3.2.1/Lib/test/test_subprocess.py ---- Python-3.2.1/Lib/test/test_subprocess.py.non-readable-path 2011-07-09 02:58:51.000000000 -0400 -+++ Python-3.2.1/Lib/test/test_subprocess.py 2011-07-11 11:34:16.284426005 -0400 -@@ -618,7 +618,7 @@ class ProcessTestCase(BaseTestCase): - for i in range(1024): - # Windows raises IOError. Others raise OSError. - with self.assertRaises(EnvironmentError) as c: -- subprocess.Popen(['nonexisting_i_hope'], -+ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - # ignore errors that indicate the command was not found diff --git a/python3/python-3.3.0b1-lib64.patch b/python3/python-3.3.0b1-lib64.patch deleted file mode 100644 index 5ae03aa..0000000 --- a/python3/python-3.3.0b1-lib64.patch +++ /dev/null @@ -1,200 +0,0 @@ -diff -up cpython-59223da36dec/Lib/distutils/command/install.py.lib64 cpython-59223da36dec/Lib/distutils/command/install.py ---- cpython-59223da36dec/Lib/distutils/command/install.py.lib64 2012-08-07 06:10:57.000000000 -0400 -+++ cpython-59223da36dec/Lib/distutils/command/install.py 2012-08-07 16:41:00.573477549 -0400 -@@ -45,14 +45,14 @@ else: - INSTALL_SCHEMES = { - 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/lib/python$py_version_short/site-packages', -+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { - 'purelib': '$base/lib/python', -- 'platlib': '$base/lib/python', -+ 'platlib': '$base/lib64/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', -diff -up cpython-59223da36dec/Lib/distutils/sysconfig.py.lib64 cpython-59223da36dec/Lib/distutils/sysconfig.py ---- cpython-59223da36dec/Lib/distutils/sysconfig.py.lib64 2012-08-07 06:10:57.000000000 -0400 -+++ cpython-59223da36dec/Lib/distutils/sysconfig.py 2012-08-07 16:41:00.573477549 -0400 -@@ -139,8 +139,12 @@ def get_python_lib(plat_specific=0, stan - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -+ if plat_specific or standard_lib: -+ lib = "lib64" -+ else: -+ lib = "lib" - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib, "python" + get_python_version()) - if standard_lib: - return libpython - else: -diff -up cpython-59223da36dec/Lib/site.py.lib64 cpython-59223da36dec/Lib/site.py ---- cpython-59223da36dec/Lib/site.py.lib64 2012-08-07 06:10:57.000000000 -0400 -+++ cpython-59223da36dec/Lib/site.py 2012-08-07 16:41:00.573477549 -0400 -@@ -303,12 +303,16 @@ def getsitepackages(prefixes=None): - if sys.platform in ('os2emx', 'riscos'): - sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) - elif os.sep == '/': -+ sitepackages.append(os.path.join(prefix, "lib64", -+ "python" + sys.version[:3], -+ "site-packages")) - sitepackages.append(os.path.join(prefix, "lib", - "python" + sys.version[:3], - "site-packages")) - sitepackages.append(os.path.join(prefix, "lib", "site-python")) - else: - sitepackages.append(prefix) -+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages")) - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) - if sys.platform == "darwin": - # for framework builds *only* we add the standard Apple -diff -up cpython-59223da36dec/Lib/sysconfig.py.lib64 cpython-59223da36dec/Lib/sysconfig.py ---- cpython-59223da36dec/Lib/sysconfig.py.lib64 2012-08-07 06:10:57.000000000 -0400 -+++ cpython-59223da36dec/Lib/sysconfig.py 2012-08-07 16:41:00.574477549 -0400 -@@ -21,10 +21,10 @@ __all__ = [ - - _INSTALL_SCHEMES = { - 'posix_prefix': { -- 'stdlib': '{installed_base}/lib/python{py_version_short}', -- 'platstdlib': '{platbase}/lib/python{py_version_short}', -+ 'stdlib': '{installed_base}/lib64/python{py_version_short}', -+ 'platstdlib': '{platbase}/lib64/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages', - 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', - 'platinclude': -@@ -81,10 +81,10 @@ _INSTALL_SCHEMES = { - 'data': '{userbase}', - }, - 'posix_user': { -- 'stdlib': '{userbase}/lib/python{py_version_short}', -- 'platstdlib': '{userbase}/lib/python{py_version_short}', -+ 'stdlib': '{userbase}/lib64/python{py_version_short}', -+ 'platstdlib': '{userbase}/lib64/python{py_version_short}', - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', - 'scripts': '{userbase}/bin', - 'data': '{userbase}', -diff -up cpython-59223da36dec/Lib/test/test_site.py.lib64 cpython-59223da36dec/Lib/test/test_site.py ---- cpython-59223da36dec/Lib/test/test_site.py.lib64 2012-08-07 06:10:57.000000000 -0400 -+++ cpython-59223da36dec/Lib/test/test_site.py 2012-08-07 16:41:00.574477549 -0400 -@@ -239,12 +239,15 @@ class HelperFunctionsTests(unittest.Test - 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], -+ self.assertEqual(len(dirs), 3) -+ wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3], - 'site-packages') - self.assertEqual(dirs[0], wanted) -- wanted = os.path.join('xoxo', 'lib', 'site-python') -+ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], -+ 'site-packages') - self.assertEqual(dirs[1], wanted) -+ wanted = os.path.join('xoxo', 'lib', 'site-python') -+ self.assertEqual(dirs[2], wanted) - else: - # other platforms - self.assertEqual(len(dirs), 2) -diff -up cpython-59223da36dec/Makefile.pre.in.lib64 cpython-59223da36dec/Makefile.pre.in ---- cpython-59223da36dec/Makefile.pre.in.lib64 2012-08-07 16:41:00.557477550 -0400 -+++ cpython-59223da36dec/Makefile.pre.in 2012-08-07 16:41:00.575477549 -0400 -@@ -108,7 +108,7 @@ LIBDIR= @libdir@ - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib -+SCRIPTDIR= $(prefix)/lib64 - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories -diff -up cpython-59223da36dec/Modules/getpath.c.lib64 cpython-59223da36dec/Modules/getpath.c ---- cpython-59223da36dec/Modules/getpath.c.lib64 2012-08-07 06:10:57.000000000 -0400 -+++ cpython-59223da36dec/Modules/getpath.c 2012-08-07 16:41:00.575477549 -0400 -@@ -122,8 +122,8 @@ - #endif - - #ifndef PYTHONPATH --#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ -- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" -+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \ -+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload" - #endif - - #ifndef LANDMARK -@@ -135,7 +135,7 @@ static wchar_t exec_prefix[MAXPATHLEN+1] - static wchar_t progpath[MAXPATHLEN+1]; - static wchar_t *module_search_path = NULL; - static int module_search_path_malloced = 0; --static wchar_t *lib_python = L"lib/python" VERSION; -+static wchar_t *lib_python = L"lib64/python" VERSION; - - static void - reduce(wchar_t *dir) -@@ -677,7 +677,7 @@ calculate_path(void) - } - else - wcsncpy(zip_path, _prefix, MAXPATHLEN); -- joinpath(zip_path, L"lib/python00.zip"); -+ joinpath(zip_path, L"lib64/python00.zip"); - bufsz = wcslen(zip_path); /* Replace "00" with version */ - zip_path[bufsz - 6] = VERSION[0]; - zip_path[bufsz - 5] = VERSION[2]; -@@ -687,7 +687,7 @@ calculate_path(void) - fprintf(stderr, - "Could not find platform dependent libraries <exec_prefix>\n"); - wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN); -- joinpath(exec_prefix, L"lib/lib-dynload"); -+ joinpath(exec_prefix, L"lib64/lib-dynload"); - } - /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ - -diff -up cpython-59223da36dec/setup.py.lib64 cpython-59223da36dec/setup.py ---- cpython-59223da36dec/setup.py.lib64 2012-08-07 06:10:57.000000000 -0400 -+++ cpython-59223da36dec/setup.py 2012-08-07 16:41:32.153475390 -0400 -@@ -438,7 +438,7 @@ class PyBuildExt(build_ext): - # directories (i.e. '.' and 'Include') must be first. See issue - # 10520. - if not cross_compiling: -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - # only change this for cross builds for 3.3, issues on Mageia - if cross_compiling: -@@ -708,11 +708,11 @@ class PyBuildExt(build_ext): - elif curses_library: - readline_libs.append(curses_library) - elif self.compiler.find_library_file(lib_dirs + -- ['/usr/lib/termcap'], -+ ['/usr/lib64/termcap'], - 'termcap'): - readline_libs.append('termcap') - exts.append( Extension('readline', ['readline.c'], -- library_dirs=['/usr/lib/termcap'], -+ library_dirs=['/usr/lib64/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs) ) - else: -@@ -749,8 +749,8 @@ class PyBuildExt(build_ext): - if krb5_h: - ssl_incs += krb5_h - ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, -- ['/usr/local/ssl/lib', -- '/usr/contrib/ssl/lib/' -+ ['/usr/local/ssl/lib64', -+ '/usr/contrib/ssl/lib64/' - ] ) - - if (ssl_incs is not None and diff --git a/python3/python-3.4.3-lib64.patch b/python3/python-3.4.3-lib64.patch new file mode 100644 index 0000000..db5fd95 --- /dev/null +++ b/python3/python-3.4.3-lib64.patch @@ -0,0 +1,192 @@ +--- Python-3.4.0b1/Lib/distutils/command/install.py.lib64 2013-11-24 21:36:54.000000000 +0100 ++++ Python-3.4.0b1/Lib/distutils/command/install.py 2013-11-27 11:10:43.821150774 +0100 +@@ -45,14 +45,14 @@ else: + INSTALL_SCHEMES = { + 'unix_prefix': { + 'purelib': '$base/lib/python$py_version_short/site-packages', +- 'platlib': '$platbase/lib/python$py_version_short/site-packages', ++ 'platlib': '$platbase/lib64/python$py_version_short/site-packages', + 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_home': { + 'purelib': '$base/lib/python', +- 'platlib': '$base/lib/python', ++ 'platlib': '$base/lib64/python', + 'headers': '$base/include/python/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', +--- Python-3.4.0b1/Lib/distutils/sysconfig.py.lib64 2013-11-24 21:36:54.000000000 +0100 ++++ Python-3.4.0b1/Lib/distutils/sysconfig.py 2013-11-27 11:10:43.821150774 +0100 +@@ -141,8 +141,12 @@ + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": ++ if plat_specific or standard_lib: ++ lib = "lib64" ++ else: ++ lib = "lib" + libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ lib, "python" + get_python_version()) + if standard_lib: + return libpython + else: +--- Python-3.4.0b1/Lib/site.py.lib64 2013-11-24 21:36:54.000000000 +0100 ++++ Python-3.4.0b1/Lib/site.py 2013-11-27 11:10:43.822150773 +0100 +@@ -304,12 +304,16 @@ + seen.add(prefix) + + if os.sep == '/': ++ sitepackages.append(os.path.join(prefix, "lib64", ++ "python" + sys.version[:3], ++ "site-packages")) + sitepackages.append(os.path.join(prefix, "lib", + "python" + sys.version[:3], + "site-packages")) + sitepackages.append(os.path.join(prefix, "lib", "site-python")) + else: + sitepackages.append(prefix) ++ sitepackages.append(os.path.join(prefix, "lib64", "site-packages")) + sitepackages.append(os.path.join(prefix, "lib", "site-packages")) + if sys.platform == "darwin": + # for framework builds *only* we add the standard Apple +--- Python-3.4.0b1/Lib/sysconfig.py.lib64 2013-11-24 21:36:54.000000000 +0100 ++++ Python-3.4.0b1/Lib/sysconfig.py 2013-11-27 11:10:43.822150773 +0100 +@@ -20,10 +20,10 @@ + + _INSTALL_SCHEMES = { + 'posix_prefix': { +- 'stdlib': '{installed_base}/lib/python{py_version_short}', +- 'platstdlib': '{platbase}/lib/python{py_version_short}', ++ 'stdlib': '{installed_base}/lib64/python{py_version_short}', ++ 'platstdlib': '{platbase}/lib64/python{py_version_short}', + 'purelib': '{base}/lib/python{py_version_short}/site-packages', +- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages', + 'include': + '{installed_base}/include/python{py_version_short}{abiflags}', + 'platinclude': +@@ -61,10 +61,10 @@ + 'data': '{userbase}', + }, + 'posix_user': { +- 'stdlib': '{userbase}/lib/python{py_version_short}', +- 'platstdlib': '{userbase}/lib/python{py_version_short}', ++ 'stdlib': '{userbase}/lib64/python{py_version_short}', ++ 'platstdlib': '{userbase}/lib64/python{py_version_short}', + 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', + 'data': '{userbase}', +--- Python-3.4.0b1/Lib/test/test_site.py.lib64 2013-11-24 21:36:55.000000000 +0100 ++++ Python-3.4.0b1/Lib/test/test_site.py 2013-11-27 11:10:43.822150773 +0100 +@@ -244,12 +244,15 @@ + 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], ++ self.assertEqual(len(dirs), 3) ++ wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3], + 'site-packages') + self.assertEqual(dirs[0], wanted) +- wanted = os.path.join('xoxo', 'lib', 'site-python') ++ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], ++ 'site-packages') + self.assertEqual(dirs[1], wanted) ++ wanted = os.path.join('xoxo', 'lib', 'site-python') ++ self.assertEqual(dirs[2], wanted) + else: + # other platforms + self.assertEqual(len(dirs), 2) +--- Python-3.4.0b1/Makefile.pre.in.lib64 2013-11-27 11:10:43.814150786 +0100 ++++ Python-3.4.0b1/Makefile.pre.in 2013-11-27 11:10:43.823150771 +0100 +@@ -115,7 +115,7 @@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/lib64 + ABIFLAGS= @ABIFLAGS@ + + # Detailed destination directories +--- Python-3.4.0b1/Modules/getpath.c.lib64 2013-11-24 21:36:56.000000000 +0100 ++++ Python-3.4.0b1/Modules/getpath.c 2013-11-27 11:17:33.619449704 +0100 +@@ -122,8 +122,8 @@ + #endif + + #ifndef PYTHONPATH +-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ +- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" ++#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \ ++ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload" + #endif + + #ifndef LANDMARK +@@ -498,7 +498,7 @@ + _pythonpath = _Py_char2wchar(PYTHONPATH, NULL); + _prefix = _Py_char2wchar(PREFIX, NULL); + _exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL); +- lib_python = _Py_char2wchar("lib/python" VERSION, NULL); ++ lib_python = _Py_char2wchar("lib64/python" VERSION, NULL); + + if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { + Py_FatalError( +@@ -687,7 +687,7 @@ + } + else + wcsncpy(zip_path, _prefix, MAXPATHLEN); +- joinpath(zip_path, L"lib/python00.zip"); ++ joinpath(zip_path, L"lib64/python00.zip"); + bufsz = wcslen(zip_path); /* Replace "00" with version */ + zip_path[bufsz - 6] = VERSION[0]; + zip_path[bufsz - 5] = VERSION[2]; +@@ -699,7 +699,7 @@ + fprintf(stderr, + "Could not find platform dependent libraries <exec_prefix>\n"); + wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN); +- joinpath(exec_prefix, L"lib/lib-dynload"); ++ joinpath(exec_prefix, L"lib64/lib-dynload"); + } + /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ + +--- Python-3.4.0b1/setup.py.lib64 2013-11-24 21:36:56.000000000 +0100 ++++ Python-3.4.0b1/setup.py 2013-11-27 11:10:43.824150769 +0100 +@@ -441,7 +441,7 @@ + # directories (i.e. '.' and 'Include') must be first. See issue + # 10520. + if not cross_compiling: +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') ++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + # only change this for cross builds for 3.3, issues on Mageia + if cross_compiling: +@@ -718,11 +718,11 @@ + elif curses_library: + readline_libs.append(curses_library) + elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], ++ ['/usr/lib64/termcap'], + 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], ++ library_dirs=['/usr/lib64/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs) ) + else: +@@ -759,8 +759,8 @@ + if krb5_h: + ssl_incs += krb5_h + ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, +- ['/usr/local/ssl/lib', +- '/usr/contrib/ssl/lib/' ++ ['/usr/local/ssl/lib64', ++ '/usr/contrib/ssl/lib64/' + ] ) + + if (ssl_incs is not None and diff --git a/python3/python3.nm b/python3/python3.nm index 51ddda9..e7394e0 100644 --- a/python3/python3.nm +++ b/python3/python3.nm @@ -4,8 +4,8 @@ ###############################################################################
name = python3 -major_ver = 3.3 -version = %{major_ver}.0 +major_ver = 3.4 +version = %{major_ver}.3 release = 1 thisapp = Python-%{version}
@@ -34,13 +34,13 @@ build automake bzip2 bzip2-devel - db4-devel >= 1:4.8 expat-devel >= 2.1.0 findutils gdbm-devel >= 1.10 gcc-c++ glibc-devel gmp-devel + libdb-devel libffi-devel libGL-devel libX11-devel @@ -62,9 +62,8 @@ build export LINKCC = gcc
prepare_cmds - # Apply patches for x86_64. - if [ "$(uname -m)" = "x86_64" ]; then - patch -Np1 -i %{DIR_SOURCE}/python-3.3.0b1-lib64.patch + if [ "%{lib}" = "lib64" ]; then + patch -Np1 -i %{DIR_SOURCE}/python-3.4.3-lib64.patch fi
# Remove embedded copies of expat and libffi @@ -83,11 +82,27 @@ build --with-dbmliborder=gdbm:ndbm:bdb \ --with-system-expat \ --with-system-ffi \ + --enable-loadable-sqlite-extensions \ --enable-shared
- #test - # make test - #end + test + LD_LIBRARY_PATH=$(pwd) $(pwd)/python \ + -m test.regrtest \ + --verbose \ + --findleaks \ + -x test_distutils \ + -x test_faulthandler \ + -x test_gdb \ + -x test_email \ + -x test_subprocess \ + -x test_float \ + -x test_cmath \ + -x test_asynchat \ + -x test_asyncore + + # test_subprocess won't work on grsecurity-enabled kernels + # test_float and test_cmath do not work on armv5tel (soft FPU) + end
install_cmds install -d -m 0755 %{BUILDROOT}%{pylibdir}/site-packages/__pycache__ diff --git a/xz/xz.nm b/xz/xz.nm index d7b042a..d27da32 100644 --- a/xz/xz.nm +++ b/xz/xz.nm @@ -4,48 +4,33 @@ ###############################################################################
name = xz -version = 5.2.0 +version = 5.2.1 release = 1
-compat_version = 4.999.9beta - groups = Applications/Compression url = http://tukaani.org/xz/ license = LGPLv2+ summary = LZMA Utils.
description - LZMA provides very high compression ratio and fast decompression. The \ - core of the LZMA utils is Igor Pavlov's LZMA SDK containing the actual \ - LZMA encoder/decoder. LZMA utils add a few scripts which provide \ - gzip-like command line interface and a couple of other LZMA related \ + LZMA provides very high compression ratio and fast decompression. The + core of the LZMA utils is Igor Pavlov's LZMA SDK containing the actual + LZMA encoder/decoder. LZMA utils add a few scripts which provide + gzip-like command line interface and a couple of other LZMA related tools. end
source_dl = http://tukaani.org/xz/ -sources = %{thisapp}.tar.xz %{name}-%{compat_version}.tar.xz +sources = %{thisapp}.tar.xz
build - configure_options += --disable-rpath - - build_cmds - # Build compat version of library. - cd %{DIR_SRC}/%{name}-%{compat_version} - ./configure %{configure_options} - %{MACRO_FIX_LIBTOOL} - make %{PARALLELISMFLAGS} - end + configure_options += \ + --disable-rpath
test export LD_LIBRARY_PATH=$(pwd)/src/liblzma/.libs make check end - - install_cmds - # Install comapt version of library. - cd %{DIR_SRC}/%{name}-%{compat_version} - cp -vr src/liblzma/.libs/liblzma.so.0* %{BUILDROOT}%{libdir} - end end
packages @@ -80,14 +65,6 @@ packages end end
- package xz-compat-libs - summary = Compatibility version of %{name} (%{compat_version}). - - files - %{libdir}/lib*.so.0* - end - end - package %{name}-debuginfo template DEBUGINFO end
hooks/post-receive -- IPFire 3.x development tree