re-enable gdbm (patch 148; rhbz#742242)

* Fri Sep 30 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-7
- re-enable gdbm (patch 148; rhbz#742242)
This commit is contained in:
David Malcolm 2011-09-30 16:46:26 -04:00
parent ab415c6cdd
commit 9b8d221300
2 changed files with 25 additions and 3 deletions

View File

@ -0,0 +1,13 @@
diff -up Python-3.2.2/Lib/dbm/__init__.py.gdbm-1.9-magic Python-3.2.2/Lib/dbm/__init__.py
--- Python-3.2.2/Lib/dbm/__init__.py.gdbm-1.9-magic 2011-09-03 12:16:40.000000000 -0400
+++ Python-3.2.2/Lib/dbm/__init__.py 2011-09-30 15:47:27.488863694 -0400
@@ -166,7 +166,7 @@ def whichdb(filename):
return ""
# Check for GNU dbm
- if magic == 0x13579ace:
+ if magic in (0x13579ace, 0x13579acd, 0x13579acf):
return "dbm.gnu"
# Later versions of Berkeley db hash file have a 12-byte pad in
diff -up Python-3.2.2/Misc/NEWS.gdbm-1.9-magic Python-3.2.2/Misc/NEWS

View File

@ -59,7 +59,7 @@
%global with_valgrind 0 %global with_valgrind 0
%endif %endif
%global with_gdbm 0 %global with_gdbm 1
# Change from yes to no to turn this off # Change from yes to no to turn this off
%global with_computed_gotos yes %global with_computed_gotos yes
@ -122,7 +122,7 @@
Summary: Version 3 of the Python programming language aka Python 3000 Summary: Version 3 of the Python programming language aka Python 3000
Name: python3 Name: python3
Version: %{pybasever}.2 Version: %{pybasever}.2
Release: 6%{?dist} Release: 7%{?dist}
License: Python License: Python
Group: Development/Languages Group: Development/Languages
@ -358,6 +358,10 @@ Patch146: 00146-hashlib-fips.patch
# Not yet sent upstream # Not yet sent upstream
Patch147: 00147-add-debug-malloc-stats.patch Patch147: 00147-add-debug-malloc-stats.patch
# Cherrypick fix for dbm version detection to cope with gdbm-1.9's magic values
# Taken from upstream http://bugs.python.org/issue13007 (rhbz#742242)
Patch148: 00148-gdbm-1.9-magic-values.patch
# (New patches go here ^^^) # (New patches go here ^^^)
# #
# When adding new patches to "python" and "python3" in Fedora 17 onwards, # When adding new patches to "python" and "python3" in Fedora 17 onwards,
@ -366,7 +370,7 @@ Patch147: 00147-add-debug-malloc-stats.patch
# - use the same patch number across both specfiles for conceptually-equivalent # - use the same patch number across both specfiles for conceptually-equivalent
# fixes, ideally with the same name # fixes, ideally with the same name
# #
# - when a patch is relevan to both specfiles, use the same introductory # - when a patch is relevant to both specfiles, use the same introductory
# comment in both specfiles where possible (to improve "diff" output when # comment in both specfiles where possible (to improve "diff" output when
# comparing them) # comparing them)
# #
@ -568,6 +572,7 @@ done
# 00145: not for python3 # 00145: not for python3
%patch146 -p1 %patch146 -p1
%patch147 -p1 %patch147 -p1
%patch148 -p1
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there # Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
# are many differences between 2.6 and the Python 3 library. # are many differences between 2.6 and the Python 3 library.
@ -655,6 +660,7 @@ BuildPython() {
--with-valgrind \ --with-valgrind \
%endif %endif
--with-system-expat \ --with-system-expat \
--with-dbmliborder=gdbm:ndbm:bdb \
$ExtraConfigArgs \ $ExtraConfigArgs \
--with-computed-gotos=%{with_computed_gotos} \ --with-computed-gotos=%{with_computed_gotos} \
%{nil} %{nil}
@ -1379,6 +1385,9 @@ rm -fr %{buildroot}
# ====================================================== # ======================================================
%changelog %changelog
* Fri Sep 30 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-7
- re-enable gdbm (patch 148; rhbz#742242)
* Fri Sep 16 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-6 * Fri Sep 16 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-6
- add a sys._debugmallocstats() function (patch 147) - add a sys._debugmallocstats() function (patch 147)