diff options
author | Xiaofeng Yan <xiaofeng.yan@windriver.com> | 2011-05-30 19:27:45 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-01 18:34:35 +0100 |
commit | 505ee4b0a7443c185b101aaa6460d3a566a91fce (patch) | |
tree | 749214b0e559664de8771b7826880c33d53d2e29 /meta/recipes-extended/sudo/sudo.inc | |
parent | 92a878ef8fb246972d325f3d3021151642539f67 (diff) | |
download | poky-505ee4b0a7443c185b101aaa6460d3a566a91fce.tar.gz |
sudo.inc: Add do_install_prepend () to sudo.inc
Fix bug [YOCTO #1092]
Own a directory "/var/lib" before do_install() because if there isn't this directory during installing, \
then script "mkinstalldirs" from "sudo package" will create directory "/var/lib/sudo" by recursion with mode "0700" \
which will cause bug [YOCTO #1092]. So I add do_install_prepend() to create a "/var/lib" which can be accessed \
by common user before installing files.
(From OE-Core rev: 16bbeb2d866a07abd5379d1de30f2b747e1693fe)
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sudo/sudo.inc')
-rw-r--r-- | meta/recipes-extended/sudo/sudo.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc index 6a04a9c0b0..fd680574a3 100644 --- a/meta/recipes-extended/sudo/sudo.inc +++ b/meta/recipes-extended/sudo/sudo.inc | |||
@@ -23,6 +23,18 @@ do_configure_prepend () { | |||
23 | fi | 23 | fi |
24 | } | 24 | } |
25 | 25 | ||
26 | # The script "mkinstalldirs" from package "sudo" will create directory | ||
27 | # "/var/lib/sudo" by recursion with mode "0700" during installing files. | ||
28 | # That is to say, "var", "var/lib" and "var/lib/sudo" will possess access authority | ||
29 | # with mode "0700". It cause that directory "var" and "var/lib" | ||
30 | # can't be accessed by common user. Creating directory "/var/lib" before | ||
31 | # installing files can resolve this problem. | ||
32 | |||
33 | do_install_prepend (){ | ||
34 | mkdir -p ${D}/${localstatedir}/lib | ||
35 | } | ||
36 | |||
37 | |||
26 | pkg_postinst_${PN} () { | 38 | pkg_postinst_${PN} () { |
27 | if [ "x$D" != "x" ]; then | 39 | if [ "x$D" != "x" ]; then |
28 | exit 1 | 40 | exit 1 |