summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/files
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2013-06-26 11:21:54 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-06-27 13:40:41 -0400
commitb6dc9613cda67df165e6d0a058e82ccb33282a1d (patch)
treeef77b96b1efd74a8fe31e29ef3b5bb7761113d25 /recipes-networking/openvswitch/files
parent1fd6f2aa87c743f74e2eca24ad23101586a0103c (diff)
downloadmeta-virtualization-b6dc9613cda67df165e6d0a058e82ccb33282a1d.tar.gz
openvswitch: add split between host and target python and perl paths
Openvswitch is built with the assumption that the PYTHON and PERL variables are common between the host and target. This can result in improper paths used for script substitutions which in turn causes scripts which will fail to run on the target and the generated packages to have improper REQUIRES, making them impossible to install. These are usually not an issue since python and perl are found in the same location on the host and target, but there is no guarantee of this so the possibility of failure exists. By explicitly defining the location of the python and perl on the target we can avoid these assumptions and possibility of failure. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-networking/openvswitch/files')
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch61
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch149
2 files changed, 210 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch b/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
new file mode 100644
index 00000000..35a3d5b3
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
@@ -0,0 +1,61 @@
1From 569ac1066cd3046b8ac899153df9f07908d45145 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Fri, 21 Jun 2013 11:16:00 -0400
4Subject: [PATCH] openvswitch: add target perl handling
5
6Allow the build to specify a path for the perl instead of reusing
7the PERL variable which can lead to inconsistencies if we are cross
8compiling. The TARGET_PERL variable will be used for script
9substitutions to ensure the scripts will be able to properly execute
10if the target system has a different path for the perl.
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 Makefile.am | 1 +
15 configure.ac | 7 +++++++
16 utilities/ovs-parse-leaks.in | 2 +-
17 3 files changed, 9 insertions(+), 1 deletion(-)
18
19diff --git a/Makefile.am b/Makefile.am
20index c4f8341..45488f2 100644
21--- a/Makefile.am
22+++ b/Makefile.am
23@@ -111,6 +111,7 @@ SUFFIXES += .in
24 -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
25 -e 's,[@]DBDIR[@],$(DBDIR),g' \
26 -e 's,[@]PERL[@],$(PERL),g' \
27+ -e 's,[@]TARGET_PERL[@],$(TARGET_PERL),g' \
28 -e 's,[@]PYTHON[@],$(PYTHON),g' \
29 -e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \
30 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
31diff --git a/configure.ac b/configure.ac
32index 74cb691..5e39893 100644
33--- a/configure.ac
34+++ b/configure.ac
35@@ -101,6 +101,13 @@ AC_ARG_VAR(KARCH, [Kernel Architecture String])
36 AC_SUBST(KARCH)
37 OVS_CHECK_LINUX
38
39+if test "$TARGET_PERL"; then
40+ TARGET_PERL=$TARGET_PERL
41+else
42+ TARGET_PERL=$PERL
43+fi
44+AC_SUBST(TARGET_PERL)
45+
46 if test "$TARGET_PYTHON"; then
47 TARGET_PYTHON=$TARGET_PYTHON
48 else
49diff --git a/utilities/ovs-parse-leaks.in b/utilities/ovs-parse-leaks.in
50index 72417e5..7c9436c 100755
51--- a/utilities/ovs-parse-leaks.in
52+++ b/utilities/ovs-parse-leaks.in
53@@ -1,4 +1,4 @@
54-#! @PERL@
55+#! @TARGET_PERL@
56
57 # Copyright (c) 2009, 2010 Nicira, Inc.
58 #
59--
601.8.1.2
61
diff --git a/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch b/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch
new file mode 100644
index 00000000..59607dad
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch
@@ -0,0 +1,149 @@
1From e8a5d34885c5fdba7d951fb1bb85131cbafca432 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Wed, 19 Jun 2013 17:25:56 -0400
4Subject: [PATCH] openvswitch: add target python handling
5
6Allow the build to specify a path for the python instead of reusing
7the PYTHON variable which can lead to inconsistencies if we are cross
8compiling. The TARGET_PYTHON variable will be used for script
9substitutions to ensure the scripts will be able to properly execute
10if the target system has a different path for the python.
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 Makefile.am | 1 +
15 configure.ac | 7 +++++++
16 ovsdb/ovsdbmonitor/ovsdbmonitor.in | 2 +-
17 utilities/bugtool/ovs-bugtool.in | 2 +-
18 utilities/ovs-check-dead-ifs.in | 2 +-
19 utilities/ovs-l3ping.in | 2 +-
20 utilities/ovs-parse-backtrace.in | 2 +-
21 utilities/ovs-pcap.in | 2 +-
22 utilities/ovs-tcpundump.in | 2 +-
23 utilities/ovs-test.in | 2 +-
24 utilities/ovs-vlan-test.in | 2 +-
25 11 files changed, 17 insertions(+), 9 deletions(-)
26
27diff --git a/Makefile.am b/Makefile.am
28index b71ca1f..c4f8341 100644
29--- a/Makefile.am
30+++ b/Makefile.am
31@@ -112,6 +112,7 @@ SUFFIXES += .in
32 -e 's,[@]DBDIR[@],$(DBDIR),g' \
33 -e 's,[@]PERL[@],$(PERL),g' \
34 -e 's,[@]PYTHON[@],$(PYTHON),g' \
35+ -e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \
36 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
37 -e 's,[@]VERSION[@],$(VERSION),g' \
38 -e 's,[@]localstatedir[@],$(localstatedir),g' \
39diff --git a/configure.ac b/configure.ac
40index 060b53f..74cb691 100644
41--- a/configure.ac
42+++ b/configure.ac
43@@ -101,6 +101,13 @@ AC_ARG_VAR(KARCH, [Kernel Architecture String])
44 AC_SUBST(KARCH)
45 OVS_CHECK_LINUX
46
47+if test "$TARGET_PYTHON"; then
48+ TARGET_PYTHON=$TARGET_PYTHON
49+else
50+ TARGET_PYTHON=$PYTHON
51+fi
52+AC_SUBST(TARGET_PYTHON)
53+
54 AC_CONFIG_FILES([Makefile
55 datapath/Makefile
56 datapath/linux/Kbuild
57diff --git a/ovsdb/ovsdbmonitor/ovsdbmonitor.in b/ovsdb/ovsdbmonitor/ovsdbmonitor.in
58index e26130a..aaf1aff 100755
59--- a/ovsdb/ovsdbmonitor/ovsdbmonitor.in
60+++ b/ovsdb/ovsdbmonitor/ovsdbmonitor.in
61@@ -1,4 +1,4 @@
62-#! @PYTHON@
63+#! @TARGET_PYTHON@
64 # Copyright (c) 2010 Citrix Systems, Inc.
65 #
66 # Licensed under the Apache License, Version 2.0 (the "License");
67diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in
68index 2074e23..525939e 100755
69--- a/utilities/bugtool/ovs-bugtool.in
70+++ b/utilities/bugtool/ovs-bugtool.in
71@@ -1,4 +1,4 @@
72-#! @PYTHON@
73+#! @TARGET_PYTHON@
74
75 # This library is free software; you can redistribute it and/or
76 # modify it under the terms of version 2.1 of the GNU Lesser General Public
77diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in
78index 9b806ed..b6f6fcb 100755
79--- a/utilities/ovs-check-dead-ifs.in
80+++ b/utilities/ovs-check-dead-ifs.in
81@@ -1,4 +1,4 @@
82-#! @PYTHON@
83+#! @TARGET_PYTHON@
84
85 import os
86 import re
87diff --git a/utilities/ovs-l3ping.in b/utilities/ovs-l3ping.in
88index 1b07972..4fedb6f 100644
89--- a/utilities/ovs-l3ping.in
90+++ b/utilities/ovs-l3ping.in
91@@ -1,4 +1,4 @@
92-#! @PYTHON@
93+#! @TARGET_PYTHON@
94 #
95 # Licensed under the Apache License, Version 2.0 (the "License");
96 # you may not use this file except in compliance with the License.
97diff --git a/utilities/ovs-parse-backtrace.in b/utilities/ovs-parse-backtrace.in
98index 4f793be..4a07f47 100755
99--- a/utilities/ovs-parse-backtrace.in
100+++ b/utilities/ovs-parse-backtrace.in
101@@ -1,4 +1,4 @@
102-#! @PYTHON@
103+#! @TARGET_PYTHON@
104 #
105 # Copyright (c) 2012 Nicira, Inc.
106 #
107diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in
108index 5306480..3221c7c 100755
109--- a/utilities/ovs-pcap.in
110+++ b/utilities/ovs-pcap.in
111@@ -1,4 +1,4 @@
112-#! @PYTHON@
113+#! @TARGET_PYTHON@
114 #
115 # Copyright (c) 2010 Nicira, Inc.
116 #
117diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in
118index 0268c50..dad0bb5 100755
119--- a/utilities/ovs-tcpundump.in
120+++ b/utilities/ovs-tcpundump.in
121@@ -1,4 +1,4 @@
122-#! @PYTHON@
123+#! @TARGET_PYTHON@
124 #
125 # Copyright (c) 2010 Nicira, Inc.
126 #
127diff --git a/utilities/ovs-test.in b/utilities/ovs-test.in
128index fb1f9ad..bddd327 100644
129--- a/utilities/ovs-test.in
130+++ b/utilities/ovs-test.in
131@@ -1,4 +1,4 @@
132-#! @PYTHON@
133+#! @TARGET_PYTHON@
134 #
135 # Licensed under the Apache License, Version 2.0 (the "License");
136 # you may not use this file except in compliance with the License.
137diff --git a/utilities/ovs-vlan-test.in b/utilities/ovs-vlan-test.in
138index e229498..da64040 100755
139--- a/utilities/ovs-vlan-test.in
140+++ b/utilities/ovs-vlan-test.in
141@@ -1,4 +1,4 @@
142-#! @PYTHON@
143+#! @TARGET_PYTHON@
144 #
145 # Copyright (c) 2010 Nicira, Inc.
146 #
147--
1481.8.1.2
149