summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-07-17 20:00:28 +0200
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>2014-08-08 02:23:46 -0700
commit03c3c4ccf324f0d7c7236beb320128eed1ed0881 (patch)
tree6a233bf47e598fe9585b62fb504069bd922d8171 /scripts
parent1a07b29fa9a16e231abdd02a46bc56c928c8fd3c (diff)
downloadmeta-03c3c4ccf324f0d7c7236beb320128eed1ed0881.tar.gz
meta-03c3c4ccf324f0d7c7236beb320128eed1ed0881.tar.bz2
meta-03c3c4ccf324f0d7c7236beb320128eed1ed0881.zip
Define new ARM images. Define new X11 images and repos Change-Id: Id57f0f32eb21af13e5b8f8c8e9f8094ce369913a Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org> Bug-Tizen: TC-1234
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildname.nochroot6
-rw-r--r--scripts/common-adaptation.post1
-rw-r--r--scripts/common-applications.post2
-rw-r--r--scripts/common-autoqa.post34
-rw-r--r--scripts/common-base-micro.post2
-rw-r--r--scripts/common-base.post115
-rw-r--r--scripts/common-bluetooth.post2
-rw-r--r--scripts/common-console-tools.post40
-rw-r--r--scripts/common-crosswalk.post22
-rw-r--r--scripts/common-desktop-applications.post45
-rw-r--r--scripts/common-development.post2
-rw-r--r--scripts/common-middleware.post3
-rw-r--r--scripts/common-multimedia.post19
-rw-r--r--scripts/common-packaging.post9
-rw-r--r--scripts/common-qa.post3
-rw-r--r--scripts/common-qt5.post2
-rw-r--r--scripts/common-wayland.post17
-rw-r--r--scripts/common-webkit.post59
18 files changed, 34 insertions, 349 deletions
diff --git a/scripts/buildname.nochroot b/scripts/buildname.nochroot
deleted file mode 100644
index b248084..0000000
--- a/scripts/buildname.nochroot
+++ /dev/null
@@ -1,6 +0,0 @@
-####################### buildname.nochroot #######################
-if [ -n "$IMG_NAME" ]; then
- echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release
- echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release
- echo "$IMG_NAME @BUILD_ID@" >>$INSTALL_ROOT/etc/tizen-snapshot
-fi
diff --git a/scripts/common-adaptation.post b/scripts/common-adaptation.post
deleted file mode 100644
index f40abd4..0000000
--- a/scripts/common-adaptation.post
+++ /dev/null
@@ -1 +0,0 @@
-############### common-adaptation.post ################
diff --git a/scripts/common-applications.post b/scripts/common-applications.post
deleted file mode 100644
index 5a7c804..0000000
--- a/scripts/common-applications.post
+++ /dev/null
@@ -1,2 +0,0 @@
-############### common-applications.post ################
-
diff --git a/scripts/common-autoqa.post b/scripts/common-autoqa.post
deleted file mode 100644
index c34dc2a..0000000
--- a/scripts/common-autoqa.post
+++ /dev/null
@@ -1,34 +0,0 @@
-##################### common-autoqa.post #######################
-
-# generate private/public key for autologin as root
-
-mkdir /root/.ssh
-chown root:root /root/.ssh
-chmod 700 /root/.ssh
-
-# the private key: use the following key on the ssh client side (copied here for reference)
-cat <<EOF >/root/.ssh/id_eat_dsa
------BEGIN DSA PRIVATE KEY-----
-MIIBugIBAAKBgQCE/Ulli3iKf8IwKVacoGCDyZhuabZ+h2oBSd/xlURZa/p3EQVg
-9cFXcyYcjDvKqDu/OZ82l1L33ytZQ1D7Ag/4WOTdUZImQiQakntE6tMLeEtkiXBd
-l4s9QQY8BrHcuoB4fZoLlbs2Jqbz+e2HDlUD+rKmzba/5d70Ze9YmFyDRQIVANH/
-yWdBBWXrFRexL6DIBTwFATM3AoGAcTiEj7Ai18KkajMW/TeiTWA+O3ZeBCFHLPGx
-tSyQKkJ0EUJfTSg9ixn4XfLW61JuY/pkhRDMwCbAto1ymy11hqWKRadpxAmu4czQ
-vWYUSERiS/28xGjKrazWjpM0sSmqZ+Tgezc1FWfCWAfHHpEg0YcttnOvJTB8hj6V
-d84WHKoCgYAw/uP6bE7xxCWUqAtQKob2P/xkXPPWKZ2nAWCxgnYVimGuXc+jThOo
-UBhkIpD+fdMtbRHdLtbzOLohUgaZokgEi58+pjJAJU/tW4Lvzw0nBfReG5OTvfuu
-CLchiFnppSDLi8u4Q4URorg4WFudXrGvUBwvHSGJYNczj7e3XJissAIUTPS6vh9U
-pp1kboovuWeQFduOSOU=
------END DSA PRIVATE KEY-----
-EOF
-
-# the public key
-cat <<EOF >/root/.ssh/id_eat_dsa.pub
-ssh-dss AAAAB3NzaC1kc3MAAACBAIT9SWWLeIp/wjApVpygYIPJmG5ptn6HagFJ3/GVRFlr+ncRBWD1wVdzJhyMO8qoO785nzaXUvffK1lDUPsCD/hY5N1RkiZCJBqSe0Tq0wt4S2SJcF2Xiz1BBjwGsdy6gHh9mguVuzYmpvP57YcOVQP6sqbNtr/l3vRl71iYXINFAAAAFQDR/8lnQQVl6xUXsS+gyAU8BQEzNwAAAIBxOISPsCLXwqRqMxb9N6JNYD47dl4EIUcs8bG1LJAqQnQRQl9NKD2LGfhd8tbrUm5j+mSFEMzAJsC2jXKbLXWGpYpFp2nECa7hzNC9ZhRIRGJL/bzEaMqtrNaOkzSxKapn5OB7NzUVZ8JYB8cekSDRhy22c68lMHyGPpV3zhYcqgAAAIAw/uP6bE7xxCWUqAtQKob2P/xkXPPWKZ2nAWCxgnYVimGuXc+jThOoUBhkIpD+fdMtbRHdLtbzOLohUgaZokgEi58+pjJAJU/tW4Lvzw0nBfReG5OTvfuuCLchiFnppSDLi8u4Q4URorg4WFudXrGvUBwvHSGJYNczj7e3XJissA== meego@testCtrlPC
-EOF
-
-# public key is authorized to login (automatically)
-cat /root/.ssh/id_eat_dsa.pub >>/root/.ssh/authorized_keys
-
-# adjust permissions on ssh config files
-chmod 600 /root/.ssh/*
diff --git a/scripts/common-base-micro.post b/scripts/common-base-micro.post
deleted file mode 100644
index cc211f5..0000000
--- a/scripts/common-base-micro.post
+++ /dev/null
@@ -1,2 +0,0 @@
-############### common-base-micro.post ################
-
diff --git a/scripts/common-base.post b/scripts/common-base.post
index 3c2825f..e34f86c 100644
--- a/scripts/common-base.post
+++ b/scripts/common-base.post
@@ -1,111 +1,18 @@
-################ common-base.post ##################
+#!/bin/sh
+echo "############### common-base.post ################"
-# setup systemd default target for user session
-cat <<'EOF' >>/lib/systemd/user/default.target
-[Unit]
-Description=User session default target
-EOF
-mkdir -p /lib/systemd/user/default.target.wants
-
-# start dbus session
-ln -s ../dbus.service /lib/systemd/user/default.target.wants/
-
-# Run prelink to speed up dynamic binary/library loading
-/usr/sbin/prelink --all
-
-ln -sf /proc/self/mounts /etc/mtab
-
-# fix TIVI-2291
-sed -ri "s/(^blacklist i8042.*$)/#fix from base-general.post \1/" /etc/modprobe.d/blacklist.conf
-
-# sdx: fix smack labels on /var/log
-chsmack -a '*' /var/log
-
-# Temporary work around for bug in filesystem package resulting in the 'app' user home
-# directory being only readable by root
-chown -R app:app /opt/home/app
-
-# Since weston-launch runs with the "User" label, the app
-# home dir must have the same label
-chsmack -a User /opt/home/app
-
-# bug workaround on MIC (DEVT-160)
-if [ -e /etc/sysconfig/i18n -a ! -e /etc/locale.conf ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_PAPER
- unset LC_NAME
- unset LC_ADDRESS
- unset LC_TELEPHONE
- unset LC_MEASUREMENT
- unset LC_IDENTIFICATION
- . /etc/sysconfig/i18n
- rm -f /etc/sysconfig/i18n
- [ -n "$LANG" ] && echo LANG=$LANG > /etc/locale.conf
- [ -n "$LC_CTYPE" ] && echo LC_CTYPE=$LC_CTYPE >> /etc/locale.conf
- [ -n "$LC_NUMERIC" ] && echo LC_NUMERIC=$LC_NUMERIC >> /etc/locale.conf
- [ -n "$LC_TIME" ] && echo LC_TIME=$LC_TIME >> /etc/locale.conf
- [ -n "$LC_COLLATE" ] && echo LC_COLLATE=$LC_COLLATE >> /etc/locale.conf
- [ -n "$LC_MONETARY" ] && echo LC_MONETARY=$LC_MONETARY >> /etc/locale.conf
- [ -n "$LC_MESSAGES" ] && echo LC_MESSAGES=$LC_MESSAGES >> /etc/locale.conf
- [ -n "$LC_PAPER" ] && echo LC_PAPER=$LC_PAPER >> /etc/locale.conf
- [ -n "$LC_NAME" ] && echo LC_NAME=$LC_NAME >> /etc/locale.conf
- [ -n "$LC_ADDRESS" ] && echo LC_ADDRESS=$LC_ADDRESS >> /etc/locale.conf
- [ -n "$LC_TELEPHONE" ] && echo LC_TELEPHONE=$LC_TELEPHONE >> /etc/locale.conf
- [ -n "$LC_MEASUREMENT" ] && echo LC_MEASUREMENT=$LC_MEASUREMENT >> /etc/locale.conf
- [ -n "$LC_IDENTIFICATION" ] && echo LC_IDENTIFICATION=$LC_IDENTIFICATION >> /etc/locale.conf
-fi
-
-# workaround for bug PTREL-763
-patch -b -p1 -d/ <<'EOF'
---- bad/etc/pam.d/systemd-user 2014-03-20 10:01:36.657843073 +0100
-+++ good/etc/pam.d/systemd-user 2014-03-20 10:06:51.586121696 +0100
-@@ -4,5 +4,6 @@
-
- account include system-auth
- session include system-auth
-+session required pam_systemd.so
- auth required pam_deny.so
- password required pam_deny.so
-EOF
-
-# extra fix to avoid root and display sessions
-patch -b -p1 -d/ <<'EOF'
---- bad/etc/pam.d/system-auth 2014-04-07 06:16:51.888018876 -0700
-+++ good/etc/pam.d/system-auth 2014-04-07 06:16:46.335018503 -0700
-@@ -11,7 +11,6 @@
- password required pam_deny.so
-
- session optional pam_keyinit.so revoke
--session optional pam_systemd.so
- session required pam_limits.so
- session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
- session required pam_unix.so
-EOF
-
-######### multiuser mode: create additional users
+######### multiuser mode: create additional users and fix their homedirs
tizen_crypted_pass=$(perl -e 'print crypt("tizen", "aa")')
uid=5001
-for user in alice bob carol; do
- useradd -u $uid -d /home/$user -g users -G audio,video,users,display -m --password "$tizen_crypted_pass" $user
- uid=$(( $uid + 1 ))
-done
+for user in alice bob carol guest; do
+ if ! generic_base_user_exists $user; then
+ useradd -u $uid -d /home/$user -g users -G audio,video,users,display -m --password "$tizen_crypted_pass" $user
+ uid=$(( $uid + 1 ))
+ fi
-# create appfw dirs inside homes
-for user in alice bob carol app guest; do
- for appdir in desktop manifest dbspace; do
- mkdir -p /home/$user/.applications/$appdir
- done
- find /home/$user/ -type d -exec chsmack -a User {} \;
- chown -R $user:users /home/$user/
+ generic_base_fix_user_homedir $user
done
-# adjust app group: main group 'users', extra group 'app'
-usermod -g users app
-usermod -G app app
+
+
diff --git a/scripts/common-bluetooth.post b/scripts/common-bluetooth.post
deleted file mode 100644
index 6759999..0000000
--- a/scripts/common-bluetooth.post
+++ /dev/null
@@ -1,2 +0,0 @@
-############### common-bluetooth.post ################
-
diff --git a/scripts/common-console-tools.post b/scripts/common-console-tools.post
deleted file mode 100644
index 75cbba0..0000000
--- a/scripts/common-console-tools.post
+++ /dev/null
@@ -1,40 +0,0 @@
-##################### common-console-tools.post ####################
-
-# customize bash prompt
-cat >/etc/profile.d/bash_prompt_custom.sh <<'EOF'
-if [ "$PS1" ]; then
-
- function proml {
- # set a fancy prompt (overwrite the one in /etc/profile)
- local default="\[\e[0m\]"
- local usercol='\[\e[1;34m\]' # blue
- local hostcol='\[\e[1;32m\]' # green
- local pathcol='\[\e[1;33m\]' # yellow
- local gitcol='\[\e[1;31m\]' # light red
- local termcmd=''
- local _p="$";
-
- if [ "`id -u`" -eq 0 ]; then
- usercol='\[\e[1;31m\]'
- _p="#"
- fi
-
- PS1="${usercol}\u${default}@${hostcol}\h${default}:${pathcol}\w${default}${gitcol}${default}${_p} ${termcmd}"
- }
-
- proml
-
- function rcd () {
- [ "${1:0:1}" == "/" ] && { cd $1; } || { cd $(pwd -P)/$1; }
- }
-
- alias ll="ls -lZ"
- alias lr="ls -ltrZ"
- alias la="ls -alZ"
-
- function get_manifest () {
- rpm -qa --queryformat="%{name} %{Version} %{Release} %{VCS}\n" | sort
- }
-fi
-EOF
-
diff --git a/scripts/common-crosswalk.post b/scripts/common-crosswalk.post
index 793b49f..83b6f13 100644
--- a/scripts/common-crosswalk.post
+++ b/scripts/common-crosswalk.post
@@ -1,24 +1,6 @@
-############### common-crosswalk.post ################
+#!/bin/sh
+echo "############### common-crosswalk.post ################"
# start wrt widgets preinstall
prepare_widgets.sh
-# make crosswak start in default target
-mkdir -p /lib/systemd/user/default.target.wants/
-ln -s ../xwalk.service /lib/systemd/user/default.target.wants/
-
-# add launchers to weston.ini
-if [ -f /usr/bin/weston ]; then
-
- cat >>/etc/xdg/weston/weston.ini <<EOF
-
-## crosswalk applications ##
-
-[launcher]
-icon=/usr/share/icons/tizen/32x32/web-browser.png
-path=/usr/lib64/xwalk/xwalk http://www.google.com
-
-EOF
-
-fi
-
diff --git a/scripts/common-desktop-applications.post b/scripts/common-desktop-applications.post
index 8628a18..db4d7b2 100644
--- a/scripts/common-desktop-applications.post
+++ b/scripts/common-desktop-applications.post
@@ -1,44 +1,9 @@
-############### common-desktop-applications.post ################
+#!/bin/sh
+echo "############### common-desktop-applications.post ################"
-# temp workaround to fill each user app_info database with global db infos
-. /etc/tizen-platform.conf
-ail_initdb
-pkg_initdb
-
-echo "Fixing multiuser app_info dbs"
-chsmack -a "_" $TZ_SYS_DB/.app_info.db*
-chmod 764 $TZ_SYS_DB/.app_info.db*
-
-for user in alice bob carol guest app; do
- [ ! -d /home/$user ] && continue
- echo "Fix app_info.db of $user"
- chown -R $user:users /home/$user/.applications/dbspace/
-
- if [ -f /home/$user/.applications/dbspace/.app_info.db ]; then
- sqlite3 /home/$user/.applications/dbspace/.app_info.db <<EOF
-attach database '$TZ_SYS_DB/.app_info.db' as common;
-insert into app_info select * from common.app_info;
-EOF
- else
- cp $TZ_SYS_DB/.app_info.db /home/$user/.applications/dbspace/.app_info.db
- fi
-
- chown -R $user:users /home/$user/.applications/dbspace/
- chsmack -a User /home/$user/.applications/dbspace/.app_info.db*
+# call function defined in meta-generic
+for user in alice bob carol guest; do
+ generic_desktop_applications_fix_userhome $user
done
-if [ -f /usr/bin/weston ]; then
-
- cat >>/etc/xdg/weston/weston.ini <<EOF
-
-## desktop applications ##
-
-[launcher]
-icon=/usr/share/icons/tizen/32x32/calculator.png
-path=/usr/apps/org.tizen.calculator/bin/calculator
-
-EOF
-
-fi
-
diff --git a/scripts/common-development.post b/scripts/common-development.post
deleted file mode 100644
index 3d27306..0000000
--- a/scripts/common-development.post
+++ /dev/null
@@ -1,2 +0,0 @@
-############### common-development.post ################
-
diff --git a/scripts/common-middleware.post b/scripts/common-middleware.post
index d3e9684..b79d397 100644
--- a/scripts/common-middleware.post
+++ b/scripts/common-middleware.post
@@ -1,2 +1,3 @@
-############### common-middleware.post ################
+#!/bin/sh
+echo "############### common-middleware.post ################"
diff --git a/scripts/common-multimedia.post b/scripts/common-multimedia.post
deleted file mode 100644
index e60e498..0000000
--- a/scripts/common-multimedia.post
+++ /dev/null
@@ -1,19 +0,0 @@
-############### common-multimedia.post ################
-
-if [ -f /usr/bin/weston ]; then
-
- cat >>/etc/xdg/weston/weston.ini <<EOF
-
-## multimedia applications ##
-
-[launcher]
-icon=/usr/share/icons/tizen/32x32/webcam.png
-path=/usr/bin/launch_cam.sh
-
-[launcher]
-icon=/usr/share/icons/tizen/32x32/video.png
-path=/usr/bin/launch_video.sh
-
-EOF
-
-fi
diff --git a/scripts/common-packaging.post b/scripts/common-packaging.post
index 18d8ffe..1aade3d 100644
--- a/scripts/common-packaging.post
+++ b/scripts/common-packaging.post
@@ -1,10 +1,5 @@
-############### common-packaging.post ################
-
-rm -rf /root/.zypp
-
-# was: rpm.post
-rm -f /var/lib/rpm/__db*
-rpmdb --rebuilddb
+#!/bin/sh
+echo "############### common-packaging.post ################"
# generate repo files for zypper
function genrepo() {
diff --git a/scripts/common-qa.post b/scripts/common-qa.post
index 4d1f554..313dc4a 100644
--- a/scripts/common-qa.post
+++ b/scripts/common-qa.post
@@ -1,2 +1,3 @@
-############### common-qa.post ################
+#!/bin/sh
+echo "############### common-qa.post ################"
diff --git a/scripts/common-qt5.post b/scripts/common-qt5.post
index 8d17d24..28be14a 100644
--- a/scripts/common-qt5.post
+++ b/scripts/common-qt5.post
@@ -1,5 +1,5 @@
#!/bin/sh
-############### common-qt5.post ################
+echo "############### common-qt5.post ################"
list='
qt5-qtdeclarative-examples
diff --git a/scripts/common-wayland.post b/scripts/common-wayland.post
index c855032..1dfdaa3 100644
--- a/scripts/common-wayland.post
+++ b/scripts/common-wayland.post
@@ -1,11 +1,11 @@
-#################### common-wayland.post ##################
-
-# Add 'app' user to the display group
-/usr/sbin/groupmod -A app display
-
-# add other users to display group
-for user in alice bob carol guest; do
- /usr/sbin/groupmod -A $user display
+#!/bin/sh
+echo "#################### common-wayland.post ##################"
+
+# add 'app' and other users to display group
+for user in alice bob carol guest app; do
+ if generic_base_user_exists $user; then
+ /usr/sbin/groupmod -A $user display
+ fi
done
# Enable a logind session for users on seat0 (the default seat for
@@ -13,6 +13,7 @@ done
unitdir=/usr/lib/systemd/system
mkdir -p $unitdir/graphical.target.wants
for user in app alice bob carol guest; do
+ generic_base_user_exists $user || continue
uid=$(getent passwd $user|cut -f3 -d':')
ln -s ../user-session-launch@.service $unitdir/graphical.target.wants/user-session-launch@seat0-$uid.service
done
diff --git a/scripts/common-webkit.post b/scripts/common-webkit.post
deleted file mode 100644
index c186deb..0000000
--- a/scripts/common-webkit.post
+++ /dev/null
@@ -1,59 +0,0 @@
-######### common-webkit.post #############
-
-################ WAYLAND MODE #####################################
-# Add over-riding environment to enable the web runtime to
-# run as a different user than the tizen user
-# Some notes on some of the variables:
-# - ELM_THEME is needed in order for the wrt to have visible content
-# - WRT_PROCESS_POOL_DISABLE is a work around for TIVI-2062
-if [ -x /usr/bin/weston ]; then
- cat > /etc/sysconfig/wrt <<EOF
-DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket
-XDG_RUNTIME_DIR=/run/user/5000
-ELM_ENGINE=wayland_egl
-ECORE_EVAS_ENGINE=wayland_egl
-ELM_THEME=tizen-HD-light
-WRT_PROCESS_POOL_DISABLE=1
-EOF
-
- # Use the same over-rides for the native prelaunch daemon
- cp /etc/sysconfig/wrt /etc/sysconfig/launchpad
-fi
-
-# Initialize the native application database
-pkg_initdb
-
-# start wrt widgets preinstall
-prepare_widgets.sh
-install_widgets.sh
-
-# Needed to fix TIVI-1629
-if [ -x /usr/bin/vconftool ]; then
- vconftool set -t int -f db/setting/default_memory/wap 0
-fi
-
-if [ -f /usr/bin/weston ]; then
-
- cat >>/etc/xdg/weston/weston.ini <<EOF
-
-## crosswalk applications ##
-
-[launcher]
-icon=/usr/share/icons/tizen/32x32/annex.png
-path=/usr/bin/wrt-launcher -s 33CFo0eFJe.annex
-
-[launcher]
-icon=/usr/share/icons/tizen/32x32/bubblewrap.png
-path=/usr/bin/wrt-launcher -s ewqPdCunAO.bubblewrap
-
-[launcher]
-icon=/usr/share/icons/tizen/32x32/go.png
-path=/usr/bin/wrt-launcher -s SM31mV8fq9.go
-
-[launcher]
-icon=/usr/share/icons/tizen/32x32/mancala.png
-path=/usr/bin/wrt-launcher -s yKrWwxz1KX.mancala
-
-EOF
-
-fi