From 644d367805fb2d27db7ac76018b1b81cdac54ff9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?K=C3=A9vin=20THIERRY?= Date: Wed, 28 May 2014 16:48:09 +0200 Subject: [PATCH] meta-tizen: Add script to export $UID MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Busybox doesn't export such environment variable so we use a patch to do it. Change-Id: I3c7c4f5cb6908247630bf9e2d041ce3632305eb3 (From meta-tizen rev: 2eacc5602d32f3563192516795711a665c1cc8f5) Signed-off-by: Kévin THIERRY Signed-off-by: Patrick Ohly --- .../weston-common/weston-common-extraconf.inc | 7 ++++- .../0001-Add-a-script-to-export-UID.patch | 30 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta-tizen/recipes-tizen/weston-common/weston-common/0001-Add-a-script-to-export-UID.patch diff --git a/meta-tizen/recipes-tizen/weston-common/weston-common-extraconf.inc b/meta-tizen/recipes-tizen/weston-common/weston-common-extraconf.inc index 98b7313..b89abb8 100644 --- a/meta-tizen/recipes-tizen/weston-common/weston-common-extraconf.inc +++ b/meta-tizen/recipes-tizen/weston-common/weston-common-extraconf.inc @@ -1,8 +1,9 @@ inherit useradd -FILESEXTRAPATHS_prepend := "${THISDIR}/weston-common" +FILESEXTRAPATHS_append := "${THISDIR}/weston-common" SRC_URI += "file://0001-Fix-path-to-binary-ln-and-chmod.patch" +SRC_URI += "file://0001-Add-a-script-to-export-UID.patch" USERADD_PACKAGES = "${PN}" @@ -14,6 +15,10 @@ USERADD_PARAM_${PN} += " -d /home/bob -m -u 5002 -g users -G display -r -s USERADD_PARAM_${PN} += " -d /home/carole -m -u 5003 -g users -G display -r -s /bin/sh carole; " USERADD_PARAM_${PN} += " -d /home/guest -m -u 9999 -g users -G display -r -s /bin/sh guest " +do_install_append() { + install -m 755 uid.sh ${D}/etc/profile.d +} + pkg_postinst_${PN} () { for user in alice bob carol app guest; do for appdir in desktop manifest dbspace; do diff --git a/meta-tizen/recipes-tizen/weston-common/weston-common/0001-Add-a-script-to-export-UID.patch b/meta-tizen/recipes-tizen/weston-common/weston-common/0001-Add-a-script-to-export-UID.patch new file mode 100644 index 0000000..f1823a6 --- /dev/null +++ b/meta-tizen/recipes-tizen/weston-common/weston-common/0001-Add-a-script-to-export-UID.patch @@ -0,0 +1,30 @@ +From 7959e00beeb3590b759aed5e8b473d550e4ea612 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?K=C3=A9vin=20THIERRY?= +Date: Wed, 28 May 2014 16:37:48 +0200 +Subject: [PATCH] meta-tizen: Add a script to export $UID +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Busybox doesn't export such environment variable so we do it with this +script. + +Change-Id: I8e14be602f7d3b198dbd17bfac677ba73856a500 +Signed-off-by: Kévin THIERRY +--- + uid.sh | 3 +++ + 1 file changed, 3 insertions(+) + create mode 100755 uid.sh + +diff --git a/uid.sh b/uid.sh +new file mode 100755 +index 0000000..14aee34 +--- /dev/null ++++ b/uid.sh +@@ -0,0 +1,3 @@ ++#!/bin/sh ++ ++export UID=$(cut -f1,3 -d':' /etc/passwd |grep `whoami` |cut -f2 -d':') +-- +1.8.1.4 + -- 2.7.4