summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Durand <baptiste.durand@open.eurogiciel.org>2015-05-04 09:59:59 +0200
committerBaptiste Durand <baptiste.durand@open.eurogiciel.org>2015-05-04 09:59:59 +0200
commite70469c0e4329894be0aa1ff9287c423900974d0 (patch)
treecfca02fa599821646cc2fb06c1a3abfb18b59bb0
parent7aa7fc150fb88a7d68b0219a69e3692b039b514c (diff)
downloadmeta-tizen-e70469c0e4329894be0aa1ff9287c423900974d0.tar.gz
meta-tizen-e70469c0e4329894be0aa1ff9287c423900974d0.tar.bz2
meta-tizen-e70469c0e4329894be0aa1ff9287c423900974d0.zip
Use adduser class mechanism to create system user such as tizenglobalapp & buxton
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 685cc8b2..d030fe1a 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 23e92130..ba685f97 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 a72aded6..e41254d0 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;"
+