diff options
Diffstat (limited to 'recipes-extended/glusterfs/files/python-work-around-host-and-target-python.patch')
-rw-r--r-- | recipes-extended/glusterfs/files/python-work-around-host-and-target-python.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/recipes-extended/glusterfs/files/python-work-around-host-and-target-python.patch b/recipes-extended/glusterfs/files/python-work-around-host-and-target-python.patch new file mode 100644 index 0000000..9bb90d7 --- /dev/null +++ b/recipes-extended/glusterfs/files/python-work-around-host-and-target-python.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From 485cf109af4adf3050b558cf16c61b620d7b9fb0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Thu, 27 Feb 2014 21:50:40 -0500 | ||
4 | Subject: [PATCH] python: work around host and target python | ||
5 | |||
6 | In order to allow for the build system to make use of python but not | ||
7 | influence the installed software we create a split between PYTHON and | ||
8 | TARGET_PYTHON. | ||
9 | |||
10 | gsyncd.c is the only use of PYTHON on the insalled system so we can | ||
11 | restrict the introduction of TARGET_PYTHON to gsyncd.c and the | ||
12 | associated Makefile. | ||
13 | |||
14 | Upstream-Status: Inappropriate [embedded specific] | ||
15 | |||
16 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
17 | [Xulin: minor adjust the code to apply the patch] | ||
18 | Signed-off-by: Xulin Sun <xulin.sun@windriver.com> | ||
19 | [Yi: minor adjust the code to apply the patch on 3.11.1] | ||
20 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
21 | --- | ||
22 | configure.ac | 2 ++ | ||
23 | geo-replication/src/Makefile.am | 3 ++- | ||
24 | geo-replication/src/gsyncd.c | 6 +++--- | ||
25 | 3 files changed, 7 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/configure.ac b/configure.ac | ||
28 | index 7a31038..e54d92b 100644 | ||
29 | --- a/configure.ac | ||
30 | +++ b/configure.ac | ||
31 | @@ -270,6 +270,8 @@ AC_CANONICAL_HOST | ||
32 | AC_PROG_CC | ||
33 | AC_DISABLE_STATIC | ||
34 | AC_PROG_LIBTOOL | ||
35 | +AC_SUBST(TARGET_PYTHON) | ||
36 | + | ||
37 | AC_SUBST([shrext_cmds]) | ||
38 | |||
39 | AC_CHECK_PROG([RPCGEN], [rpcgen], [yes], [no]) | ||
40 | diff --git a/geo-replication/src/Makefile.am b/geo-replication/src/Makefile.am | ||
41 | index 9937a0b..07456fb 100644 | ||
42 | --- a/geo-replication/src/Makefile.am | ||
43 | +++ b/geo-replication/src/Makefile.am | ||
44 | @@ -22,7 +22,8 @@ noinst_HEADERS = procdiggy.h | ||
45 | AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \ | ||
46 | -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \ | ||
47 | -DGSYNCD_PREFIX=\"$(GLUSTERFS_LIBEXECDIR)\" -DUSE_LIBGLUSTERFS \ | ||
48 | - -DSBIN_DIR=\"$(sbindir)\" -DPYTHON=\"$(PYTHON)\" | ||
49 | + -DSBIN_DIR=\"$(sbindir)\" -DPYTHON=\"$(PYTHON)\"\ | ||
50 | + -DTARGET_PYTHON=\"$(TARGET_PYTHON)\" | ||
51 | |||
52 | AM_CFLAGS = -Wall $(GF_CFLAGS) | ||
53 | |||
54 | diff --git a/geo-replication/src/gsyncd.c b/geo-replication/src/gsyncd.c | ||
55 | index 2c48ca5..b1d1126 100644 | ||
56 | --- a/geo-replication/src/gsyncd.c | ||
57 | +++ b/geo-replication/src/gsyncd.c | ||
58 | @@ -153,9 +153,9 @@ invoke_gsyncd (int argc, char **argv) | ||
59 | goto error; | ||
60 | |||
61 | j = 0; | ||
62 | - python = getenv("PYTHON"); | ||
63 | + python = getenv("TARGET_PYTHON"); | ||
64 | if(!python) | ||
65 | - python = PYTHON; | ||
66 | + python = TARGET_PYTHON; | ||
67 | nargv[j++] = python; | ||
68 | nargv[j++] = GSYNCD_PREFIX"/python/syncdaemon/"GSYNCD_PY; | ||
69 | for (i = 1; i < argc; i++) | ||
70 | @@ -205,7 +205,7 @@ find_gsyncd (pid_t pid, pid_t ppid, char *name, void *data) | ||
71 | ret = 0; | ||
72 | switch (zeros) { | ||
73 | case 2: | ||
74 | - if ((strcmp (basename (buf), basename (PYTHON)) || | ||
75 | + if ((strcmp (basename (buf), basename (TARGET_PYTHON)) || | ||
76 | strcmp (basename (buf + strlen (buf) + 1), GSYNCD_PY)) == 0) { | ||
77 | ret = 1; | ||
78 | break; | ||
79 | -- | ||
80 | 1.9.1 | ||
81 | |||