summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Durand <baptiste.durand@open.eurogiciel.org>2015-05-04 09:59:59 +0200
committerJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2015-06-16 14:31:25 +0200
commit175c2a338a8ba894d04fb5b44c7da3c3b04611e2 (patch)
tree350139148daea0954f0e137cd9463f5157be6abb
parenta5d5f962022bda878a3ba31564b4b0d350ccaec6 (diff)
downloadmeta-tizen-175c2a338a8ba894d04fb5b44c7da3c3b04611e2.tar.gz
meta-tizen-175c2a338a8ba894d04fb5b44c7da3c3b04611e2.tar.bz2
meta-tizen-175c2a338a8ba894d04fb5b44c7da3c3b04611e2.zip
Use adduser class mechanism to create system user such as tizenglobalapp & buxton
Change-Id: Ie23fbda18c9f7cc0562b11d0cab735ea4afa9c0a Signed-off-by: Baptiste Durand <baptiste.durand@open.eurogiciel.org>
-rw-r--r--meta-tizen-common-base/recipes-application-framework/ail/ail.inc21
-rw-r--r--meta-tizen-common-base/recipes-security/buxton/buxton-extraconf.inc5
-rw-r--r--meta-tizen-common-base/recipes-security/buxton/buxton.inc2
-rw-r--r--meta-tizen-common-demo/recipes-image/images/tizen-common-core-image-crosswalk.bb4
4 files changed, 22 insertions, 10 deletions
diff --git a/meta-tizen-common-base/recipes-application-framework/ail/ail.inc b/meta-tizen-common-base/recipes-application-framework/ail/ail.inc
index 7cafb1c3..50fcfc5a 100644
--- a/meta-tizen-common-base/recipes-application-framework/ail/ail.inc
+++ b/meta-tizen-common-base/recipes-application-framework/ail/ail.inc
@@ -8,7 +8,7 @@ SRC_URI = ""
S = "${WORKDIR}/git"
-inherit manifest autotools-brokensep
+inherit manifest autotools-brokensep useradd
BBCLASSEXTEND = ""
PROVIDES = ""
@@ -122,7 +122,6 @@ pkg_postinst_${PN}() {
ldconfig
# Create tizenglobalapp user needed for global installation
- useradd -d $D${prefix}/apps -m tizenglobalapp -r -c "system user for common applications" -g root
#mkdir -p %TZ_SYS_RW_APP/.config/xwalk-service/applications
#cd %TZ_SYS_RW_APP/
#ln -s .config/xwalk-service/applications/
@@ -143,14 +142,13 @@ pkg_postinst_${PN}() {
chsmack -a '*' $D${prefix}/share/icons/default/small/
chmod g+w $D${prefix}/share/applications
chmod g+w $D${prefix}/share/applications
- chown tizenglobalapp:root $D${prefix}/share/applications
- chown tizenglobalapp:root $D${prefix}/share/applications
- chown tizenglobalapp:root $D${prefix}/apps
- chown tizenglobalapp:root $D${prefix}/dbspace
- chown tizenglobalapp:root $D${prefix}/dbspace
- chown tizenglobalapp:root -R $D${prefix}/share/icons
+ chown 9998:root $D${prefix}/share/applications
+ chown 9998:root $D${prefix}/share/applications
+ chown 9998:root $D${prefix}/apps
+ chown 9998:root $D${prefix}/dbspace
+ chown 9998:root $D${prefix}/dbspace
+ chown 9998:root -R $D${prefix}/share/icons
ail_createdb 2>/dev/null
- ail_syncdb 2>/dev/null
chsmack -a '*' $D${prefix}/dbspace/.app_info.db*
@@ -207,3 +205,8 @@ PKG_ail-vconf-dev= "ail-vconf-dev"
require ail-extraconf.inc
+USERADD_PACKAGES = "ail"
+
+USERADD_PARAM_${PN} = " -u 9998 -m -d ${prefix}/apps -r -c 'system user for common applications' -g users tizenglobalapp"
+
+
diff --git a/meta-tizen-common-base/recipes-security/buxton/buxton-extraconf.inc b/meta-tizen-common-base/recipes-security/buxton/buxton-extraconf.inc
index b04e01e0..a126fa8b 100644
--- a/meta-tizen-common-base/recipes-security/buxton/buxton-extraconf.inc
+++ b/meta-tizen-common-base/recipes-security/buxton/buxton-extraconf.inc
@@ -12,6 +12,7 @@ RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-native += "coreutils"
RDEPENDS_${PN}_class-native += "smack"
+inherit useradd
do_prep_class-native() {
cd ${S}
@@ -39,3 +40,7 @@ do_compile_class-native() {
}
+
+USERADD_PACKAGES = "buxton"
+
+USERADD_PARAM_${PN} = " -u 9997 -m buxton"
diff --git a/meta-tizen-common-base/recipes-security/buxton/buxton.inc b/meta-tizen-common-base/recipes-security/buxton/buxton.inc
index e16ceae9..abc93c6a 100644
--- a/meta-tizen-common-base/recipes-security/buxton/buxton.inc
+++ b/meta-tizen-common-base/recipes-security/buxton/buxton.inc
@@ -116,8 +116,8 @@ pkg_postinst_${PN}() {
#!/bin/sh -e
[ "x$D" == "x" ] && ldconfig
+ [ "x$D" != "x" ] && exit 1
#buxtond runs as user buxton, which much be created
- useradd buxton
buxtonctl create-db base
buxtonctl create-db isp
if [ "$1" -eq 1 ] ; then
diff --git a/meta-tizen-common-demo/recipes-image/images/tizen-common-core-image-crosswalk.bb b/meta-tizen-common-demo/recipes-image/images/tizen-common-core-image-crosswalk.bb
index b002e307..3648a20c 100644
--- a/meta-tizen-common-demo/recipes-image/images/tizen-common-core-image-crosswalk.bb
+++ b/meta-tizen-common-demo/recipes-image/images/tizen-common-core-image-crosswalk.bb
@@ -4,6 +4,7 @@ SUMMARY = "A Wayland image with a terminal and crosswalk"
LICENSE = "MIT"
+inherit extrausers
DESCRIPTION = "A weston image with Tizen common ."
# Crosswalk
@@ -11,3 +12,6 @@ CORE_IMAGE_EXTRA_INSTALL += "packagegroup-tizen-crosswalk"
# Time zone
CORE_IMAGE_EXTRA_INSTALL += "tzdata security-manager"
+
+EXTRA_USERS_PARAMS = "usermod -g root tizenglobalapp;"
+