[python] 2.7.3-33: add workaround for cmpi-bindings issue (rhbz#817554)
dmalcolm
dmalcolm at fedoraproject.org
Wed Mar 6 20:04:13 UTC 2013
commit 4e8ad3c0992c75b72400b3a99c7886d275142ebc
Author: David Malcolm <dmalcolm at redhat.com>
Date: Wed Mar 6 15:03:56 2013 -0500
2.7.3-33: add workaround for cmpi-bindings issue (rhbz#817554)
* Wed Mar 6 2013 David Malcolm <dmalcolm at redhat.com> - 2.7.3-33
- add workaround for cmpi-bindings issue (rhbz#817554)
00174-fix-for-usr-move.patch | 28 ++++++++++++++++++++++++++++
python.spec | 14 +++++++++++++-
2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/00174-fix-for-usr-move.patch b/00174-fix-for-usr-move.patch
new file mode 100644
index 0000000..640986e
--- /dev/null
+++ b/00174-fix-for-usr-move.patch
@@ -0,0 +1,28 @@
+diff -up Python-2.7.3/Modules/getpath.c.fix-for-usr-move Python-2.7.3/Modules/getpath.c
+--- Python-2.7.3/Modules/getpath.c.fix-for-usr-move 2013-03-06 14:25:32.801828698 -0500
++++ Python-2.7.3/Modules/getpath.c 2013-03-06 14:59:05.399691078 -0500
+@@ -510,6 +510,24 @@ calculate_path(void)
+ MAXPATHLEN bytes long.
+ */
+
++ /*
++ Workaround for rhbz#817554, where an empty argv0_path erroneously
++ locates "prefix" as "/lib[64]/python2.7" due to it finding
++ "/lib[64]/python2.7/os.py" via the /lib -> /usr/lib symlink for
++ https://fedoraproject.org/wiki/Features/UsrMove
++ */
++ if (argv0_path[0] == '\0') {
++ /*
++ We have an empty argv0_path, presumably because prog aka
++ Py_GetProgramName() was not found on $PATH.
++
++ Set argv0_path to "/usr/" so that search_for_prefix() and
++ search_for_exec_prefix() don't erroneously pick up
++ on /lib/ via the UsrMove symlink:
++ */
++ strcpy(argv0_path, "/usr/");
++ }
++
+ if (!(pfound = search_for_prefix(argv0_path, home))) {
+ if (!Py_FrozenFlag)
+ fprintf(stderr,
diff --git a/python.spec b/python.spec
index 2514b6d..15081d3 100644
--- a/python.spec
+++ b/python.spec
@@ -106,7 +106,7 @@ Summary: An interpreted, interactive, object-oriented programming language
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.7.3
-Release: 32%{?dist}
+Release: 33%{?dist}
License: Python
Group: Development/Languages
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
@@ -811,6 +811,14 @@ Patch172: 00172-use-poll-for-multiprocessing-socket-connection.patch
# (rhbz#913732)
Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch
+# 00174 #
+# Workaround for failure to set up prefix/exec_prefix when running
+# an embededed libpython that sets Py_SetProgramName() to a name not
+# on $PATH when run from the root directory due to
+# https://fedoraproject.org/wiki/Features/UsrMove
+# e.g. cmpi-bindings under systemd (rhbz#817554):
+Patch174: 00174-fix-for-usr-move.patch
+
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora 17 onwards,
@@ -1151,6 +1159,7 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
%patch171 -p1 -b .raise-correct-exception-when-dev-urandom-is-missing
%patch172 -p1
%patch173 -p1
+%patch174 -p1 -b .fix-for-usr-move
# This shouldn't be necesarry, but is right now (2.2a3)
@@ -1983,6 +1992,9 @@ rm -fr %{buildroot}
# ======================================================
%changelog
+* Wed Mar 6 2013 David Malcolm <dmalcolm at redhat.com> - 2.7.3-33
+- add workaround for cmpi-bindings issue (rhbz#817554)
+
* Mon Mar 4 2013 David Malcolm <dmalcolm at redhat.com> - 2.7.3-32
- add workaround for ENOPROTOOPT seen running selftests in Koji
(rhbz#913732)
More information about the scm-commits
mailing list