From 5839dd24f8c5d0c6c29925a7a87bcff184ef91a3 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Fri, 21 Mar 2014 11:16:59 -0400 Subject: 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 Signed-off-by: Bruce Ashfield --- meta-openstack/conf/layer.conf | 1 - ...line-switch-to-new-style-readline-typedef.patch | 50 ++++++++++++++++++++++ .../recipes-support/lvm2/lvm2_2.02.97.bbappend | 6 +++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 meta-openstack/recipes-support/lvm2/lvm2/readline-switch-to-new-style-readline-typedef.patch create mode 100644 meta-openstack/recipes-support/lvm2/lvm2_2.02.97.bbappend 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" # pre 0.4.0 greenlet versions segfault python PREFERRED_VERSION_python-greenlet = "0.4.1" -PREFERRED_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 @@ +From a8dc079aa01ecb1ec349a87c18905f29829b3ae4 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Thu, 6 Mar 2014 16:04:19 +0100 +Subject: [PATCH] readline: switch to new-style readline typedef + +commit 216c57eed72fee52e99bb5d014c9de535e631f58 from upstream +http://git.fedorahosted.org/git/lvm2.git + +Based on patch: +https://www.redhat.com/archives/lvm-devel/2014-March/msg00015.html + +The CPPFunction typedef (among others) have been deprecated in favour of +specific prototyped typedefs since readline 4.2 (circa 2001). +It's been working since because compatibility typedefs have been in +place until they where removed in the recent readline 6.3 release. +Switch to the new style to avoid build breakage. + +But also add full backward compatibility with define. + +Signed-off-by: Gustavo Zacarias +[MA: backport which dropped WHATS_NEW changes] +Signed-off-by: Mark Asselstine +--- + tools/lvm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tools/lvm.c b/tools/lvm.c +index e002a76..ac87e24 100644 +--- a/tools/lvm.c ++++ b/tools/lvm.c +@@ -27,6 +27,7 @@ int main(int argc, char **argv) + # include + # ifndef HAVE_RL_COMPLETION_MATCHES + # define rl_completion_matches(a, b) completion_matches((char *)a, b) ++# define rl_completion_func_t CPPFunction + # endif + + static struct cmdline_context *_cmdline; +@@ -186,7 +187,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline) + char *input = NULL, *args[MAX_ARGS], **argv; + + rl_readline_name = "lvm"; +- rl_attempted_completion_function = (CPPFunction *) _completion; ++ rl_attempted_completion_function = (rl_completion_func_t *) _completion; + + _read_history(cmd); + +-- +1.8.3.2 + 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 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +PRINC := "${@int(PRINC) + 1}" + +SRC_URI += " \ + file://readline-switch-to-new-style-readline-typedef.patch \ + " -- cgit v1.2.3-54-g00ecf