diff options
3 files changed, 216 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 @@ | |||
1 | From 569ac1066cd3046b8ac899153df9f07908d45145 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Fri, 21 Jun 2013 11:16:00 -0400 | ||
4 | Subject: [PATCH] openvswitch: add target perl handling | ||
5 | |||
6 | Allow the build to specify a path for the perl instead of reusing | ||
7 | the PERL variable which can lead to inconsistencies if we are cross | ||
8 | compiling. The TARGET_PERL variable will be used for script | ||
9 | substitutions to ensure the scripts will be able to properly execute | ||
10 | if the target system has a different path for the perl. | ||
11 | |||
12 | Signed-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 | |||
19 | diff --git a/Makefile.am b/Makefile.am | ||
20 | index 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' \ | ||
31 | diff --git a/configure.ac b/configure.ac | ||
32 | index 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 | ||
49 | diff --git a/utilities/ovs-parse-leaks.in b/utilities/ovs-parse-leaks.in | ||
50 | index 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 | -- | ||
60 | 1.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 @@ | |||
1 | From e8a5d34885c5fdba7d951fb1bb85131cbafca432 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Wed, 19 Jun 2013 17:25:56 -0400 | ||
4 | Subject: [PATCH] openvswitch: add target python handling | ||
5 | |||
6 | Allow the build to specify a path for the python instead of reusing | ||
7 | the PYTHON variable which can lead to inconsistencies if we are cross | ||
8 | compiling. The TARGET_PYTHON variable will be used for script | ||
9 | substitutions to ensure the scripts will be able to properly execute | ||
10 | if the target system has a different path for the python. | ||
11 | |||
12 | Signed-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 | |||
27 | diff --git a/Makefile.am b/Makefile.am | ||
28 | index 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' \ | ||
39 | diff --git a/configure.ac b/configure.ac | ||
40 | index 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 | ||
57 | diff --git a/ovsdb/ovsdbmonitor/ovsdbmonitor.in b/ovsdb/ovsdbmonitor/ovsdbmonitor.in | ||
58 | index 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"); | ||
67 | diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in | ||
68 | index 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 | ||
77 | diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in | ||
78 | index 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 | ||
87 | diff --git a/utilities/ovs-l3ping.in b/utilities/ovs-l3ping.in | ||
88 | index 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. | ||
97 | diff --git a/utilities/ovs-parse-backtrace.in b/utilities/ovs-parse-backtrace.in | ||
98 | index 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 | # | ||
107 | diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in | ||
108 | index 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 | # | ||
117 | diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in | ||
118 | index 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 | # | ||
127 | diff --git a/utilities/ovs-test.in b/utilities/ovs-test.in | ||
128 | index 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. | ||
137 | diff --git a/utilities/ovs-vlan-test.in b/utilities/ovs-vlan-test.in | ||
138 | index 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 | -- | ||
148 | 1.8.1.2 | ||
149 | |||
diff --git a/recipes-networking/openvswitch/openvswitch_1.10.0.bb b/recipes-networking/openvswitch/openvswitch_1.10.0.bb index fe112f22..2e9506f1 100644 --- a/recipes-networking/openvswitch/openvswitch_1.10.0.bb +++ b/recipes-networking/openvswitch/openvswitch_1.10.0.bb | |||
@@ -21,6 +21,8 @@ SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \ | |||
21 | file://openvswitch-switch-setup \ | 21 | file://openvswitch-switch-setup \ |
22 | file://openvswitch-controller \ | 22 | file://openvswitch-controller \ |
23 | file://openvswitch-controller-setup \ | 23 | file://openvswitch-controller-setup \ |
24 | file://openvswitch-add-target-python-handling.patch \ | ||
25 | file://openvswitch-add-target-perl-handling.patch \ | ||
24 | " | 26 | " |
25 | 27 | ||
26 | SRC_URI[md5sum] = "fe8b49efe9f86b57abab00166b971106" | 28 | SRC_URI[md5sum] = "fe8b49efe9f86b57abab00166b971106" |
@@ -32,6 +34,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=49eeb5acb1f5e510f12c44f176c42253" | |||
32 | # distro layers can enable with EXTRA_OECONF_pn_openvswitch += "" | 34 | # distro layers can enable with EXTRA_OECONF_pn_openvswitch += "" |
33 | # EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}" | 35 | # EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}" |
34 | 36 | ||
37 | EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python \ | ||
38 | TARGET_PERL=${bindir}/perl \ | ||
39 | " | ||
40 | |||
35 | ALLOW_EMPTY_${PN}-pki = "1" | 41 | ALLOW_EMPTY_${PN}-pki = "1" |
36 | PACKAGES =+ "${PN}-controller ${PN}-switch ${PN}-brcompat ${PN}-pki" | 42 | PACKAGES =+ "${PN}-controller ${PN}-switch ${PN}-brcompat ${PN}-pki" |
37 | 43 | ||