From 86d6dbd5beaeea2711581ce3a1173d92a199feda Mon Sep 17 00:00:00 2001 From: wchang kim Date: Fri, 27 Oct 2017 11:51:56 +0900 Subject: [PATCH] [Update] Adding Tizen IoT Platform to common.yaml 1. Adding Tizen IoT Platform to common.yaml 2. Change the file name. common-cleanup-rpi3 -> common-cleanup-directory Change-Id: I7692c08de3c5bb00e53cd54be102583311f91d39 --- common.yaml | 33 +++++++++++++++++++--- patterns/iot-headless-base.yaml | 5 ++++ ...nup-rpi3.post => common-cleanup-directory.post} | 2 +- scripts/iot-headless-base.post | 27 ++++++++++++++++++ 4 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 patterns/iot-headless-base.yaml rename scripts/{common-cleanup-rpi3.post => common-cleanup-directory.post} (61%) create mode 100644 scripts/iot-headless-base.post diff --git a/common.yaml b/common.yaml index 087d605..aca5ed3 100644 --- a/common.yaml +++ b/common.yaml @@ -231,7 +231,7 @@ RPi3 GPS Tracker: - common-crosswalk - common-license - generic-security - - common-cleanup-rpi3 + - common-cleanup-directory - common-apply-squashfs Repos: [] NoChrootScripts: @@ -260,7 +260,7 @@ RPi3 Headless: - common-crosswalk - common-license - generic-security - - common-cleanup-rpi3 + - common-cleanup-directory Repos: [] NoChrootScripts: - buildname @@ -288,7 +288,7 @@ Artik530_710 Headless: - common-crosswalk - common-license - generic-security - - common-cleanup-rpi3 + - common-cleanup-directory Repos: [] NoChrootScripts: - buildname @@ -316,7 +316,32 @@ Artik520 Headless: - common-crosswalk - common-license - generic-security - - common-cleanup-rpi3 + - common-cleanup-directory + Repos: [] + NoChrootScripts: + - buildname + +Tizen IoT: + Part: common-3parts-ramdisk + Groups: + - IoT Headless Base + PostScripts: + - generic-adaptation + - common-adaptation + - generic-base + - iot-headless-base + - generic-wayland + - generic-middleware + - common-middleware + - generic-applications + - generic-bluetooth + - generic-multimedia + - generic-desktop-applications + - generic-crosswalk + - common-crosswalk + - common-license + - generic-security + - common-cleanup-directory Repos: [] NoChrootScripts: - buildname diff --git a/patterns/iot-headless-base.yaml b/patterns/iot-headless-base.yaml new file mode 100644 index 0000000..7805563 --- /dev/null +++ b/patterns/iot-headless-base.yaml @@ -0,0 +1,5 @@ +Summary: IoT Headless Base +Description: IoT Headless Base +Name: iot-headless-base +Packages: +- building-blocks-root-Preset_iot_core diff --git a/scripts/common-cleanup-rpi3.post b/scripts/common-cleanup-directory.post similarity index 61% rename from scripts/common-cleanup-rpi3.post rename to scripts/common-cleanup-directory.post index aac98e7..bad61fe 100644 --- a/scripts/common-cleanup-rpi3.post +++ b/scripts/common-cleanup-directory.post @@ -1,5 +1,5 @@ #!/bin/sh -echo "############### common-cleanup-rpi3.post ################" +echo "############### common-cleanup-directory.post ################" # remove manuals, docs and headers rm -rf /usr/include diff --git a/scripts/iot-headless-base.post b/scripts/iot-headless-base.post new file mode 100644 index 0000000..8fa9285 --- /dev/null +++ b/scripts/iot-headless-base.post @@ -0,0 +1,27 @@ +#!/bin/sh + +echo "############### iot-headless-base.post ################" + +######### multiuser mode: create additional users and fix their homedirs +if ! generic_base_user_exists owner; then + gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen +fi + +if ! generic_base_user_exists guest; then + gum-utils --offline --add-user --username=guest --usertype=normal --usecret=tizen +fi + +######### add 'guest' user that runs bt-service daemon to vconf_bt group +function mygetid() { sed '/^'"$1"':/!d;s/^\([^:]*:\)\{2\}\([^:]*\):.*$/\2/' "$2"; } +function mygetuid() { mygetid "$1" /etc/passwd; } +function mygetgid() { mygetid "$1" /etc/group; } + +gum-utils --offline --add-member --gid=$(mygetgid vconf_bt) --mem_uid=$(mygetuid guest) + +######### Execute pkg_initdb if there is no pkgmgr-tool pacakge +rpm -qa | grep pkgmgr-tool +if [ $? != 0 ] +then +pkg_initdb --ro +fi + -- 2.7.4