vim: add dependency and selinux and acl support control
cover vim: add dependency and selinux and acl support control
These patches based on "vim: Upgrade to v7.4.258"
The following changes since commit 91a4267823a6c3abf2eb5aa14549328e8868b7f5:
vim: Upgrade to v7.4.258 (2014-04-18 18:00:28 +0800)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib chonglu/vim
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/vim
Chong Lu (3):
vim: add dependency and selinux and acl support control
vim: don't check acl header if acl support disabled
vim: add knob whether elf.h are checked
.../vim/files/disable_acl_header_check.patch | 27 +++++++++++++++ .../vim-add-knob-whether-elf.h-are-checked.patch | 38 ++++++++++++++++++++++ meta-oe/recipes-support/vim/vim_7.4.258.bb | 26 +++++++++++++-- 3 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 meta-oe/recipes-support/vim/files/disable_acl_header_check.patch create mode 100644 meta-oe/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch
Signature · 1 line
1.8.1.2
PATCH 1/3 vim: add dependency and selinux and acl support control
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.
--- meta-oe/recipes-support/vim/vim_7.4.258.bb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
meta-oe/recipes-support/vim/vim_7.4.258.bb +19 -1
@@ -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"
Signature · 1 line
1.8.1.2
PATCH 2/3 vim: don't check acl header if acl support disabled
In reply to Chong LuVim/vim-tiny always check 'sys/acl.h' existence even acl support has been disabled from configure line. This works in mostly time but except for acl works in an odd mode - while acl was mirrored from sstate_cache, it will install 'sys/acl.h' to sysroot dir and and then clean the header file with sysroot_cleansstate().
If build vim/vim-tiny and acl in parallel, below errors will occur:
* os_unix.c:2668:23: fatal error: sys/acl.h: No such file or directory
This change only workaround the failure and get build running, we still need to fix it from acl side.
--- .../vim/files/disable_acl_header_check.patch | 27 ++++++++++++++++++++++ meta-oe/recipes-support/vim/vim_7.4.258.bb | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/vim/files/disable_acl_header_check.patch
meta-oe/recipes-support/vim/files/disable_acl_header_check.patch new file +27 -0
@@ -0,0 +1,27 @@ +Upstream-Status: pending + +Don't check 'sys/acl.h' if acl support disabled for vim/vim-tiny. + +Signed-off-by: Wenzong Fan <[email protected]> +================================================ +diff --git a/src/configure.in b/src/configure.in +index fb965e5..d734064 100644 +--- a/src/configure.in ++++ b/src/configure.in +@@ -2511,7 +2511,7 @@ AC_CHECK_HEADERS(stdarg.h stdint.h stdlib.h string.h \ + sys/systeminfo.h locale.h sys/stream.h termios.h \ + libc.h sys/statfs.h poll.h sys/poll.h pwd.h \ + utime.h sys/param.h libintl.h libgen.h \ +- util/debug.h util/msg18n.h frame.h sys/acl.h \ ++ util/debug.h util/msg18n.h frame.h \ + sys/access.h sys/sysinfo.h wchar.h wctype.h) + + dnl sys/ptem.h depends on sys/stream.h on Solaris +@@ -3112,6 +3112,7 @@ AC_ARG_ENABLE(acl, + , [enable_acl="yes"]) + if test "$enable_acl" = "yes"; then + AC_MSG_RESULT(no) ++AC_CHECK_HEADERS(sys/acl.h) + AC_CHECK_LIB(posix1e, acl_get_file, [LIBS="$LIBS -lposix1e"], + AC_CHECK_LIB(acl, acl_get_file, [LIBS="$LIBS -lacl" + AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),)
meta-oe/recipes-support/vim/vim_7.4.258.bb +3 -1
@@ -6,7 +6,9 @@ RSUGGESTS_${PN} = "diffutils" LICENSE = "vim" LIC_FILES_CHKSUM = "file://../runtime/doc/uganda.txt;md5=b779e18be6ed77facc770691c967b8f8" -SRC_URI = "hg://vim.googlecode.com/hg/;protocol=https;module=vim" +SRC_URI = "hg://vim.googlecode.com/hg/;protocol=https;module=vim \ + file://disable_acl_header_check.patch;patchdir=.. \ +" SRCREV = "v7-4-258" S = "${WORKDIR}/${PN}/src"
Signature · 1 line
1.8.1.2
PATCH 3/3 vim: add knob whether elf.h are checked
In reply to Chong LuPreviously, it still was checked when there was no elf library in sysroots directory. Add knob to decide whether elf.h are checked or not.
Fixed by using PACKAGECONFIG to check elf, with default disabled set.
--- .../vim-add-knob-whether-elf.h-are-checked.patch | 38 ++++++++++++++++++++++ meta-oe/recipes-support/vim/vim_7.4.258.bb | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 meta-oe/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch
meta-oe/recipes-support/vim/files/vim-add-knob-whether-elf.h-are-checked.patch new file +38 -0
@@ -0,0 +1,38 @@ +vim: add knob whether elf.h are checked + +Previously, it still was checked when there was no elf library in sysroots directory. +Add knob to decide whether elf.h are checked or not. + +Upstream-status: Pending + +Signed-off-by: Chong Lu <[email protected]> +--- + src/configure.in | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/configure.in b/src/configure.in +index d734064..f504fa6 100644 +--- a/src/configure.in ++++ b/src/configure.in +@@ -2483,11 +2483,18 @@ AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));], + AC_MSG_RESULT(no)) + + dnl Checks for header files. ++AC_MSG_CHECKING(whether or not to look for elf.h) ++AC_ARG_ENABLE(elf-check, ++ [ --enable-elf-check If elfutils, check for elf.h [default=no]], ++ , enable_elf_check="no") ++AC_MSG_RESULT($enable_elf_check) ++if test "x$enable_elf_check" != "xno"; then + AC_CHECK_HEADER(elf.h, HAS_ELF=1) + dnl AC_CHECK_HEADER(dwarf.h, SVR4=1) + if test "$HAS_ELF" = 1; then + AC_CHECK_LIB(elf, main) + fi ++fi + + AC_HEADER_DIRENT + +-- +1.7.9.5 +
meta-oe/recipes-support/vim/vim_7.4.258.bb +2 -0
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://../runtime/doc/uganda.txt;md5=b779e18be6ed77facc77069 SRC_URI = "hg://vim.googlecode.com/hg/;protocol=https;module=vim \ file://disable_acl_header_check.patch;patchdir=.. \ + file://vim-add-knob-whether-elf.h-are-checked.patch;patchdir=.. \ " SRCREV = "v7-4-258"
@@ -38,6 +39,7 @@ 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," +PACKAGECONFIG[elfutils] = "--enable-elf-check,,elfutils," EXTRA_OECONF = " \ --disable-gpm \
Signature · 1 line
1.8.1.2
Quoted 3 lines · Chong Lu
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.
All 3 merged, thanks!
Quoted 63 lines
Signed-off-by Chong Lu <[email protected]>--- meta-oe/recipes-support/vim/vim_7.4.258.bb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)meta-oe/recipes-support/vim/vim_7.4.258.bb +19
-1@@ -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"Signature · 7 lines
1.8.1.2 -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 9 lines · Chong Lu
FILES_${PN}-data = "${datadir}/${PN}"
meta-oe/recipes-support/vim/vim_7.4.258.bb +8
-0+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 \
meta-oe/recipes-support/vim/vim_7.4.258.bb FILES_${PN}-help = "${datadir}/${PN}/${VIMDIR}/doc" · line 91
Quoted 10 lines
meta-oe/recipes-support/vim/vim_7.4.258.bb +7
-0+ ${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,
Signature · 4 lines
Paul Barker Email: [email protected] http://www.paulbarker.me.uk
Quoted 25 lines · Paul Barker
Quoted 9 lines · Chong Lu
FILES_${PN}-data = "${datadir}/${PN}"meta-oe/recipes-support/vim/vim_7.4.258.bb +8
-0+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 \meta-oe/recipes-support/vim/vim_7.4.258.bb FILES_${PN}-help = "${datadir}/${PN}/${VIMDIR}/doc" · line 91
Quoted 10 lines
meta-oe/recipes-support/vim/vim_7.4.258.bb +7
-0+ ${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
Quoted 8 lines
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 toBAD_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.
Quoted 3 lines
As vim-data is now left empty, can we remove it from PACKAGES and
RRECOMMENDS_vimand instead add vim-common toRRECOMMENDS_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
Quoted 3 lines
Thanks,
Quoted 25 lines · Paul Barker
Quoted 9 lines · Chong Lu
FILES_${PN}-data = "${datadir}/${PN}"meta-oe/recipes-support/vim/vim_7.4.258.bb +8
-0+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 \meta-oe/recipes-support/vim/vim_7.4.258.bb FILES_${PN}-help = "${datadir}/${PN}/${VIMDIR}/doc" · line 91
Quoted 10 lines
meta-oe/recipes-support/vim/vim_7.4.258.bb +7
-0+ ${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
Quoted 8 lines
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 toBAD_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>*
Quoted 4 lines
As vim-data is now left empty, can we remove it from PACKAGES and
RRECOMMENDS_vimand instead add vim-common toRRECOMMENDS_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.
Quoted 2 lines
Thanks,
Quoted 37 lines · Chong Lu
Quoted 24 lines · Paul Barker
Quoted 8 lines · Chong Lu
FILES_${PN}-data = "${datadir}/${PN}"
meta-oe/recipes-support/vim/vim_7.4.258.bb +7
-0+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 \meta-oe/recipes-support/vim/vim_7.4.258.bb FILES_${PN}-help = "${datadir}/${PN}/${VIMDIR}/doc" · line 91
Quoted 10 lines
meta-oe/recipes-support/vim/vim_7.4.258.bb +8
-0+ ${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
Quoted 8 lines
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 toBAD_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>*Quoted 1 line
Quoted 6 lines
Quoted 3 lines
As vim-data is now left empty, can we remove it from PACKAGES and
RRECOMMENDS_vimand instead add vim-common toRRECOMMENDS_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_vimand
add vim-common toRRECOMMENDS_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,
Signature · 4 lines
Paul Barker Email: [email protected] http://www.paulbarker.me.uk