Patchwork [1/3] vim: add dependency and selinux and acl support control

login
register
mail settings
Submitter Chong.Lu@windriver.com
Date April 18, 2014, 10:16 a.m.
Message ID <deccbaa80823665caeaa2763f587303595cc6115.1397816030.git.Chong.Lu@windriver.com>
Download mbox | patch
Permalink /patch/70663/
State Accepted, archived
Headers show

Comments

Chong.Lu@windriver.com - April 18, 2014, 10:16 a.m.
1. Add explicit selinux and acl support control.
2. Vim depends on gettext-native, add to the dependency list.
3. Split binary file into vim package and put others in vim-common.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
 meta-oe/recipes-support/vim/vim_7.4.258.bb | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
Paul Barker - May 5, 2014, 9:45 p.m.
On Fri, Apr 18, 2014 at 06:16:30PM +0800, Chong Lu wrote:
>  FILES_${PN}-data = "${datadir}/${PN}"
> +FILES_${PN}-common = " \
> +    ${datadir}/${PN}/${VIMDIR}/*.vim \
> +    ${datadir}/${PN}/${VIMDIR}/autoload \
> +    ${datadir}/${PN}/${VIMDIR}/colors \
> +    ${datadir}/${PN}/${VIMDIR}/compiler \
> +    ${datadir}/${PN}/${VIMDIR}/ftplugin \
> +    ${datadir}/${PN}/${VIMDIR}/indent \
> +    ${datadir}/${PN}/${VIMDIR}/keymap \
> +    ${datadir}/${PN}/${VIMDIR}/lang \
> +    ${datadir}/${PN}/${VIMDIR}/macros \
> +    ${datadir}/${PN}/${VIMDIR}/plugin \
> +    ${datadir}/${PN}/${VIMDIR}/print \
> +    ${datadir}/${PN}/${VIMDIR}/spell \
> +    ${datadir}/${PN}/${VIMDIR}/tools \
> +"
>  
>  # Recommend that runtime data is installed along with vim
>  RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-data"

Sorry to reply to an old commit but this has broke things for me. Installing vim
after this commit gives:

    vim: unsatisfied recommendation for vim-data

As everything that was in vim-data is now in vim-common. Your commit message
says "Split binary file into vim package and put others in vim-common.", but
this split was already in effect with everything in vim-data. It then got
installed by default as vim-data is in RRECOMMENDS_vim, but could be disabled by
adding things to BAD_RECOMMENDS.

What is the benefit of moving things to vim-common? I'm probably just
misunderstanding what this change is aiming to solve.

As vim-data is now left empty, can we remove it from PACKAGES and
RRECOMMENDS_vim and instead add vim-common to RRECOMMENDS_vim? Just want to make
sure that won't break anything for you before I send a patch.

Thanks,
Chong.Lu@windriver.com - May 6, 2014, 2:55 a.m.
On 05/06/2014 05:45 AM, Paul Barker wrote:
> On Fri, Apr 18, 2014 at 06:16:30PM +0800, Chong Lu wrote:
>>   FILES_${PN}-data = "${datadir}/${PN}"
>> +FILES_${PN}-common = " \
>> +    ${datadir}/${PN}/${VIMDIR}/*.vim \
>> +    ${datadir}/${PN}/${VIMDIR}/autoload \
>> +    ${datadir}/${PN}/${VIMDIR}/colors \
>> +    ${datadir}/${PN}/${VIMDIR}/compiler \
>> +    ${datadir}/${PN}/${VIMDIR}/ftplugin \
>> +    ${datadir}/${PN}/${VIMDIR}/indent \
>> +    ${datadir}/${PN}/${VIMDIR}/keymap \
>> +    ${datadir}/${PN}/${VIMDIR}/lang \
>> +    ${datadir}/${PN}/${VIMDIR}/macros \
>> +    ${datadir}/${PN}/${VIMDIR}/plugin \
>> +    ${datadir}/${PN}/${VIMDIR}/print \
>> +    ${datadir}/${PN}/${VIMDIR}/spell \
>> +    ${datadir}/${PN}/${VIMDIR}/tools \
>> +"
>>   
>>   # Recommend that runtime data is installed along with vim
>>   RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-data"
> Sorry to reply to an old commit but this has broke things for me. Installing vim
> after this commit gives:
>
>      vim: unsatisfied recommendation for vim-data
>
> As everything that was in vim-data is now in vim-common. Your commit message
> says "Split binary file into vim package and put others in vim-common.", but
> this split was already in effect with everything in vim-data. It then got
> installed by default as vim-data is in RRECOMMENDS_vim, but could be disabled by
> adding things to BAD_RECOMMENDS.
>
> What is the benefit of moving things to vim-common? I'm probably just
> misunderstanding what this change is aiming to solve.
I just refer to Ubuntu splitting package policy.***
<https://bbs.archlinux.org/viewtopic.php?id=173515>*
>
> As vim-data is now left empty, can we remove it from PACKAGES and
> RRECOMMENDS_vim and instead add vim-common to RRECOMMENDS_vim? Just want to make
> sure that won't break anything for you before I send a patch.
Sorry for my mistake. we should remove vim-data from PACKAGES and 
RRECOMMENDS_vim and
add vim-common to RRECOMMENDS_vim.
> Thanks,
>
Chong.Lu@windriver.com - May 6, 2014, 5:08 a.m.
On 05/06/2014 05:45 AM, Paul Barker wrote:
> On Fri, Apr 18, 2014 at 06:16:30PM +0800, Chong Lu wrote:
>>   FILES_${PN}-data = "${datadir}/${PN}"
>> +FILES_${PN}-common = " \
>> +    ${datadir}/${PN}/${VIMDIR}/*.vim \
>> +    ${datadir}/${PN}/${VIMDIR}/autoload \
>> +    ${datadir}/${PN}/${VIMDIR}/colors \
>> +    ${datadir}/${PN}/${VIMDIR}/compiler \
>> +    ${datadir}/${PN}/${VIMDIR}/ftplugin \
>> +    ${datadir}/${PN}/${VIMDIR}/indent \
>> +    ${datadir}/${PN}/${VIMDIR}/keymap \
>> +    ${datadir}/${PN}/${VIMDIR}/lang \
>> +    ${datadir}/${PN}/${VIMDIR}/macros \
>> +    ${datadir}/${PN}/${VIMDIR}/plugin \
>> +    ${datadir}/${PN}/${VIMDIR}/print \
>> +    ${datadir}/${PN}/${VIMDIR}/spell \
>> +    ${datadir}/${PN}/${VIMDIR}/tools \
>> +"
>>   
>>   # Recommend that runtime data is installed along with vim
>>   RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-data"
> Sorry to reply to an old commit but this has broke things for me. Installing vim
> after this commit gives:
>
>      vim: unsatisfied recommendation for vim-data
>
> As everything that was in vim-data is now in vim-common. Your commit message
> says "Split binary file into vim package and put others in vim-common.", but
> this split was already in effect with everything in vim-data. It then got
> installed by default as vim-data is in RRECOMMENDS_vim, but could be disabled by
> adding things to BAD_RECOMMENDS.
>
> What is the benefit of moving things to vim-common? I'm probably just
> misunderstanding what this change is aiming to solve.
I just refer to Ubuntu splitting package policy.
> As vim-data is now left empty, can we remove it from PACKAGES and
> RRECOMMENDS_vim and instead add vim-common to RRECOMMENDS_vim? Just want to make
> sure that won't break anything for you before I send a patch.
Sorry for my mistake. We should remove vim-data from PACKAGES and 
RRECOMMENDS_vim and
add vim-common to RRECOMMENDS_vim.

Best Regards
Chong
>
> Thanks,
>
Paul Barker - May 6, 2014, 10:01 a.m.
On Tue, May 06, 2014 at 10:55:22AM +0800, Chong Lu wrote:
> 
> On 05/06/2014 05:45 AM, Paul Barker wrote:
> >On Fri, Apr 18, 2014 at 06:16:30PM +0800, Chong Lu wrote:
> >>  FILES_${PN}-data = "${datadir}/${PN}"
> >>+FILES_${PN}-common = " \
> >>+    ${datadir}/${PN}/${VIMDIR}/*.vim \
> >>+    ${datadir}/${PN}/${VIMDIR}/autoload \
> >>+    ${datadir}/${PN}/${VIMDIR}/colors \
> >>+    ${datadir}/${PN}/${VIMDIR}/compiler \
> >>+    ${datadir}/${PN}/${VIMDIR}/ftplugin \
> >>+    ${datadir}/${PN}/${VIMDIR}/indent \
> >>+    ${datadir}/${PN}/${VIMDIR}/keymap \
> >>+    ${datadir}/${PN}/${VIMDIR}/lang \
> >>+    ${datadir}/${PN}/${VIMDIR}/macros \
> >>+    ${datadir}/${PN}/${VIMDIR}/plugin \
> >>+    ${datadir}/${PN}/${VIMDIR}/print \
> >>+    ${datadir}/${PN}/${VIMDIR}/spell \
> >>+    ${datadir}/${PN}/${VIMDIR}/tools \
> >>+"
> >>  # Recommend that runtime data is installed along with vim
> >>  RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-data"
> >Sorry to reply to an old commit but this has broke things for me. Installing vim
> >after this commit gives:
> >
> >     vim: unsatisfied recommendation for vim-data
> >
> >As everything that was in vim-data is now in vim-common. Your commit message
> >says "Split binary file into vim package and put others in vim-common.", but
> >this split was already in effect with everything in vim-data. It then got
> >installed by default as vim-data is in RRECOMMENDS_vim, but could be disabled by
> >adding things to BAD_RECOMMENDS.
> >
> >What is the benefit of moving things to vim-common? I'm probably just
> >misunderstanding what this change is aiming to solve.
> I just refer to Ubuntu splitting package policy.***
> <https://bbs.archlinux.org/viewtopic.php?id=173515>*
> >
> >As vim-data is now left empty, can we remove it from PACKAGES and
> >RRECOMMENDS_vim and instead add vim-common to RRECOMMENDS_vim? Just want to make
> >sure that won't break anything for you before I send a patch.
> Sorry for my mistake. we should remove vim-data from PACKAGES and
> RRECOMMENDS_vim and
> add vim-common to RRECOMMENDS_vim.

No problem, it's an easy fix. I'll put together a patch later this week unless
you'd like to do it.

Thanks,

Patch

diff --git a/meta-oe/recipes-support/vim/vim_7.4.258.bb b/meta-oe/recipes-support/vim/vim_7.4.258.bb
index 878c79e..023e8fc 100644
--- a/meta-oe/recipes-support/vim/vim_7.4.258.bb
+++ b/meta-oe/recipes-support/vim/vim_7.4.258.bb
@@ -1,6 +1,6 @@ 
 SUMMARY = "Vi IMproved - enhanced vi editor"
 SECTION = "console/utils"
-DEPENDS = "ncurses"
+DEPENDS = "ncurses gettext-native"
 # vimdiff doesn't like busybox diff
 RSUGGESTS_${PN} = "diffutils"
 LICENSE = "vim"
@@ -28,11 +28,14 @@  do_configure () {
 
 #Available PACKAGECONFIG options are gtkgui, acl, x11, tiny
 PACKAGECONFIG ??= ""
+PACKAGECONFIG += "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
+PACKAGECONFIG += "${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
 
 PACKAGECONFIG[gtkgui] = "--enable-gtk2-test --enable-gui=gtk2,--enable-gui=no,gtk+,"
 PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
 PACKAGECONFIG[x11] = "--with-x,--without-x,xt,"
 PACKAGECONFIG[tiny] = "--with-features=tiny,--with-features=big,,"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,"
 
 EXTRA_OECONF = " \
     --disable-gpm \
@@ -68,6 +71,21 @@  FILES_${PN}-help = "${datadir}/${PN}/${VIMDIR}/doc"
 FILES_${PN}-tutor = "${datadir}/${PN}/${VIMDIR}/tutor ${bindir}/${PN}tutor"
 FILES_${PN}-vimrc = "${datadir}/${PN}/vimrc"
 FILES_${PN}-data = "${datadir}/${PN}"
+FILES_${PN}-common = " \
+    ${datadir}/${PN}/${VIMDIR}/*.vim \
+    ${datadir}/${PN}/${VIMDIR}/autoload \
+    ${datadir}/${PN}/${VIMDIR}/colors \
+    ${datadir}/${PN}/${VIMDIR}/compiler \
+    ${datadir}/${PN}/${VIMDIR}/ftplugin \
+    ${datadir}/${PN}/${VIMDIR}/indent \
+    ${datadir}/${PN}/${VIMDIR}/keymap \
+    ${datadir}/${PN}/${VIMDIR}/lang \
+    ${datadir}/${PN}/${VIMDIR}/macros \
+    ${datadir}/${PN}/${VIMDIR}/plugin \
+    ${datadir}/${PN}/${VIMDIR}/print \
+    ${datadir}/${PN}/${VIMDIR}/spell \
+    ${datadir}/${PN}/${VIMDIR}/tools \
+"
 
 # Recommend that runtime data is installed along with vim
 RRECOMMENDS_${PN} = "${PN}-syntax ${PN}-help ${PN}-tutor ${PN}-vimrc ${PN}-data"