summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2014-03-21 11:16:59 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-03-22 00:13:06 -0400
commit5839dd24f8c5d0c6c29925a7a87bcff184ef91a3 (patch)
tree9a2e324793121670c725d1840d6e61219cf11de9
parent8585d6f3947ee93d799d40d924294687048aee46 (diff)
downloadmeta-cloud-services-5839dd24f8c5d0c6c29925a7a87bcff184ef91a3.tar.gz
lvm2: fix compilation with latest readline version
Commit 0460bd62663d6db4c9b6aed5edd73fb0d052ffb2 [lvm2: allow compiles to use latest readline] forced us to use an old version of readline. Here we backport an upstream lvm2 commit which allows us to use new readline and drop the PREFERRED_VERSION_ for readline. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--meta-openstack/conf/layer.conf1
-rw-r--r--meta-openstack/recipes-support/lvm2/lvm2/readline-switch-to-new-style-readline-typedef.patch50
-rw-r--r--meta-openstack/recipes-support/lvm2/lvm2_2.02.97.bbappend6
3 files changed, 56 insertions, 1 deletions
diff --git a/meta-openstack/conf/layer.conf b/meta-openstack/conf/layer.conf
index 2a7ef9e..7ac26f5 100644
--- a/meta-openstack/conf/layer.conf
+++ b/meta-openstack/conf/layer.conf
@@ -12,4 +12,3 @@ BB_DANGLINGAPPENDS_WARNONLY ?= "true"
12 12
13# pre 0.4.0 greenlet versions segfault python 13# pre 0.4.0 greenlet versions segfault python
14PREFERRED_VERSION_python-greenlet = "0.4.1" 14PREFERRED_VERSION_python-greenlet = "0.4.1"
15PREFERRED_VERSION_readline = "5.2"
diff --git a/meta-openstack/recipes-support/lvm2/lvm2/readline-switch-to-new-style-readline-typedef.patch b/meta-openstack/recipes-support/lvm2/lvm2/readline-switch-to-new-style-readline-typedef.patch
new file mode 100644
index 0000000..438de2a
--- /dev/null
+++ b/meta-openstack/recipes-support/lvm2/lvm2/readline-switch-to-new-style-readline-typedef.patch
@@ -0,0 +1,50 @@
1From a8dc079aa01ecb1ec349a87c18905f29829b3ae4 Mon Sep 17 00:00:00 2001
2From: Zdenek Kabelac <zkabelac@redhat.com>
3Date: Thu, 6 Mar 2014 16:04:19 +0100
4Subject: [PATCH] readline: switch to new-style readline typedef
5
6commit 216c57eed72fee52e99bb5d014c9de535e631f58 from upstream
7http://git.fedorahosted.org/git/lvm2.git
8
9Based on patch:
10https://www.redhat.com/archives/lvm-devel/2014-March/msg00015.html
11
12The CPPFunction typedef (among others) have been deprecated in favour of
13specific prototyped typedefs since readline 4.2 (circa 2001).
14It's been working since because compatibility typedefs have been in
15place until they where removed in the recent readline 6.3 release.
16Switch to the new style to avoid build breakage.
17
18But also add full backward compatibility with define.
19
20Signed-off-by: Gustavo Zacarias <gustavo zacarias com ar>
21[MA: backport which dropped WHATS_NEW changes]
22Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
23---
24 tools/lvm.c | 3 ++-
25 1 file changed, 2 insertions(+), 1 deletion(-)
26
27diff --git a/tools/lvm.c b/tools/lvm.c
28index e002a76..ac87e24 100644
29--- a/tools/lvm.c
30+++ b/tools/lvm.c
31@@ -27,6 +27,7 @@ int main(int argc, char **argv)
32 # include <readline/history.h>
33 # ifndef HAVE_RL_COMPLETION_MATCHES
34 # define rl_completion_matches(a, b) completion_matches((char *)a, b)
35+# define rl_completion_func_t CPPFunction
36 # endif
37
38 static struct cmdline_context *_cmdline;
39@@ -186,7 +187,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
40 char *input = NULL, *args[MAX_ARGS], **argv;
41
42 rl_readline_name = "lvm";
43- rl_attempted_completion_function = (CPPFunction *) _completion;
44+ rl_attempted_completion_function = (rl_completion_func_t *) _completion;
45
46 _read_history(cmd);
47
48--
491.8.3.2
50
diff --git a/meta-openstack/recipes-support/lvm2/lvm2_2.02.97.bbappend b/meta-openstack/recipes-support/lvm2/lvm2_2.02.97.bbappend
new file mode 100644
index 0000000..abd0a5e
--- /dev/null
+++ b/meta-openstack/recipes-support/lvm2/lvm2_2.02.97.bbappend
@@ -0,0 +1,6 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2PRINC := "${@int(PRINC) + 1}"
3
4SRC_URI += " \
5 file://readline-switch-to-new-style-readline-typedef.patch \
6 "