diff options
author | Joonsub Lee <joon-sub.lee@samsung.com> | 2014-11-11 17:43:06 +0900 |
---|---|---|
committer | Joonsub Lee <joon-sub.lee@samsung.com> | 2014-11-11 17:52:54 +0900 |
commit | 18783d5a3e8c3a0e9c57cf59fedba29ff60185a2 (patch) | |
tree | 6ab0d503c0770c11f1c8e03834ca4aabb5b5292e /scripts | |
parent | 3ac8b03f75ebf5003db6a64fac70688641ab1e96 (diff) | |
download | meta-mobile-18783d5a3e8c3a0e9c57cf59fedba29ff60185a2.tar.gz meta-mobile-18783d5a3e8c3a0e9c57cf59fedba29ff60185a2.tar.bz2 meta-mobile-18783d5a3e8c3a0e9c57cf59fedba29ff60185a2.zip |
Fix 'image-configurations' build fail issuesubmit/tizen_mobile/20141111.090502accepted/tizen/mobile/20141111.090922
Change-Id: Ib7e699ad17a3a285a521c8ca0fdefefd7b4218a4
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/buildname.nochroot | 5 | ||||
-rw-r--r-- | scripts/common-adaptation.post | 3 | ||||
-rw-r--r-- | scripts/common-base.post | 18 | ||||
-rw-r--r-- | scripts/common-crosswalk.post | 6 | ||||
-rw-r--r-- | scripts/common-desktop-applications.post | 9 | ||||
-rw-r--r-- | scripts/common-middleware.post | 3 | ||||
-rw-r--r-- | scripts/common-packaging.post | 49 | ||||
-rw-r--r-- | scripts/common-qt5.post | 19 | ||||
-rw-r--r-- | scripts/generic-adaptation.post | 6 | ||||
-rw-r--r-- | scripts/generic-applications.post | 3 | ||||
-rw-r--r-- | scripts/generic-base.post | 70 | ||||
-rw-r--r-- | scripts/generic-bluetooth.post | 3 | ||||
-rw-r--r-- | scripts/generic-console-tools.post | 41 | ||||
-rw-r--r-- | scripts/generic-crosswalk.post | 3 | ||||
-rw-r--r-- | scripts/generic-desktop-applications.post | 23 | ||||
-rw-r--r-- | scripts/generic-middleware.post | 3 | ||||
-rw-r--r-- | scripts/generic-multimedia-intel.post | 3 | ||||
-rw-r--r-- | scripts/generic-multimedia.post | 3 | ||||
-rw-r--r-- | scripts/generic-packaging.post | 9 | ||||
-rw-r--r-- | scripts/generic-qt5.post | 3 | ||||
-rw-r--r-- | scripts/generic-x11-intel.post | 3 | ||||
-rw-r--r-- | scripts/generic-x11.post | 9 |
22 files changed, 294 insertions, 0 deletions
diff --git a/scripts/buildname.nochroot b/scripts/buildname.nochroot new file mode 100644 index 0000000..36ae504 --- /dev/null +++ b/scripts/buildname.nochroot @@ -0,0 +1,5 @@ +# 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 +fi diff --git a/scripts/common-adaptation.post b/scripts/common-adaptation.post new file mode 100644 index 0000000..b6db847 --- /dev/null +++ b/scripts/common-adaptation.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "############### common-adaptation.post ################" + diff --git a/scripts/common-base.post b/scripts/common-base.post new file mode 100644 index 0000000..e34f86c --- /dev/null +++ b/scripts/common-base.post @@ -0,0 +1,18 @@ +#!/bin/sh +echo "############### common-base.post ################" + +######### 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 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 + + generic_base_fix_user_homedir $user +done + + + diff --git a/scripts/common-crosswalk.post b/scripts/common-crosswalk.post new file mode 100644 index 0000000..83b6f13 --- /dev/null +++ b/scripts/common-crosswalk.post @@ -0,0 +1,6 @@ +#!/bin/sh +echo "############### common-crosswalk.post ################" + +# start wrt widgets preinstall +prepare_widgets.sh + diff --git a/scripts/common-desktop-applications.post b/scripts/common-desktop-applications.post new file mode 100644 index 0000000..cca1bd1 --- /dev/null +++ b/scripts/common-desktop-applications.post @@ -0,0 +1,9 @@ +#!/bin/sh +echo "############### common-desktop-applications.post ################" + +# call function defined in meta-generic +for user in alice bob carol guest developer; do + generic_desktop_applications_fix_userhome $user +done + + diff --git a/scripts/common-middleware.post b/scripts/common-middleware.post new file mode 100644 index 0000000..b79d397 --- /dev/null +++ b/scripts/common-middleware.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "############### common-middleware.post ################" + diff --git a/scripts/common-packaging.post b/scripts/common-packaging.post new file mode 100644 index 0000000..11943b1 --- /dev/null +++ b/scripts/common-packaging.post @@ -0,0 +1,49 @@ +#!/bin/sh +echo "############### common-packaging.post ################" + +# generate repo files for zypper +function genrepo() { + local url=$1 + local reponame=$2 + local filename=${3:-$2} + local enabled=${4:-0} + + local prefix=${TZ_BUILD_VENDOR}-${TZ_BUILD_PROFILE}-${TZ_BUILD_REPO} + + # remove double slashes if any + url=$(sed -e 's|/\+|/|g' -e 's|:/|://|' <<<$url) + + cat >> /etc/zypp/repos.d/$prefix-${filename}.repo << EOF +[$prefix-${reponame}] +name=$prefix-${reponame} +enabled=$enabled +autorefresh=0 +baseurl=${url}?ssl_verify=no +type=rpm-md +gpgcheck=0 + +EOF +} + +# source /etc/tizen-build.conf to get more infos about project, repos etc. +. /etc/tizen-build.conf + +# adjust build_id if this scripts executes before the replacement in /etc/tizen-build.conf +TZ_BUILD_ID=$(echo $TZ_BUILD_ID | sed 's|@BUILD_ID[@]|@BUILD_ID@|') + +# snapshot repo +genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/packages snapshot snapshot 1 +genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/debug snapshot-debug snapshot 1 + +# latest repo +genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/packages update update 0 +genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/debug update-debug update 0 + +# daily repo +genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/packages daily daily 0 +genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/debug daily-debug daily 0 + +# weekly repo +genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/packages weekly weekly 0 +genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/debug weekly-debug weekly 0 + diff --git a/scripts/common-qt5.post b/scripts/common-qt5.post new file mode 100644 index 0000000..28be14a --- /dev/null +++ b/scripts/common-qt5.post @@ -0,0 +1,19 @@ +#!/bin/sh +echo "############### common-qt5.post ################" + +list=' +qt5-qtdeclarative-examples +qt5-cinematic-experience +' + +dst="/usr/share/applications/tizen/launcher.conf" + +if [ -w "$dst" ] ; then + for app in $list ; do + src="/usr/share/applications/$app.desktop" + + grep "$src" "$dst" \ + || { [ ! -r "$src" ] || echo "$src" >> "$dst" ; } + + done +fi diff --git a/scripts/generic-adaptation.post b/scripts/generic-adaptation.post new file mode 100644 index 0000000..2ae0730 --- /dev/null +++ b/scripts/generic-adaptation.post @@ -0,0 +1,6 @@ +#!/bin/sh +echo "#################### generic-adaptation.post ####################" + +# fix TIVI-2291 +sed -ri "s/(^blacklist i8042.*$)/#fix from base-general.post \1/" /etc/modprobe.d/blacklist.conf + diff --git a/scripts/generic-applications.post b/scripts/generic-applications.post new file mode 100644 index 0000000..a6ceebd --- /dev/null +++ b/scripts/generic-applications.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "#################### generic-applications.post ####################" + diff --git a/scripts/generic-base.post b/scripts/generic-base.post new file mode 100644 index 0000000..2bd307b --- /dev/null +++ b/scripts/generic-base.post @@ -0,0 +1,70 @@ +################ generic-base.post ################## + +# was base-general-minimal.post - not used actually +#rm /usr/lib/systemd/system/default.target +#ln -sf multi-user.target /usr/lib/systemd/system/default.target + +# 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 -p1 -d/ <<'EOF' +diff -urN bad/etc/pam.d/systemd-user good/etc/pam.d/systemd-user +--- 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 diff --git a/scripts/generic-bluetooth.post b/scripts/generic-bluetooth.post new file mode 100644 index 0000000..e2a3d25 --- /dev/null +++ b/scripts/generic-bluetooth.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "#################### generic-bluetooth.post ####################" + diff --git a/scripts/generic-console-tools.post b/scripts/generic-console-tools.post new file mode 100644 index 0000000..739f905 --- /dev/null +++ b/scripts/generic-console-tools.post @@ -0,0 +1,41 @@ +#!/bin/sh +echo "#################### generic-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/generic-crosswalk.post b/scripts/generic-crosswalk.post new file mode 100644 index 0000000..b925b1f --- /dev/null +++ b/scripts/generic-crosswalk.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "#################### generic-crosswalk.post ####################" + diff --git a/scripts/generic-desktop-applications.post b/scripts/generic-desktop-applications.post new file mode 100644 index 0000000..1c5f89e --- /dev/null +++ b/scripts/generic-desktop-applications.post @@ -0,0 +1,23 @@ +#!/bin/sh +echo "#################### generic-desktop-applications.post ####################" + +# temp workaround to fill each user app_info database with global db infos +. /etc/tizen-platform.conf +ail_initdb +pkg_initdb + +# depends on generic-base functions +function generic_desktop_applications_fix_userhome() { + user=$1 + + generic_base_user_exists $user || return 1 + homedir=$(generic_base_user_home $user) + + echo "Fix app_info.db of $user" + chown -R $user:users $homedir/.applications/dbspace/ +} + +# fix TC-320 for SDK +. /etc/tizen-build.conf +[ "${TZ_BUILD_WITH_EMULATOR}" == "1" ] && generic_desktop_applications_fix_userhome developer + diff --git a/scripts/generic-middleware.post b/scripts/generic-middleware.post new file mode 100644 index 0000000..3e17485 --- /dev/null +++ b/scripts/generic-middleware.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "#################### generic-middleware.post ####################" + diff --git a/scripts/generic-multimedia-intel.post b/scripts/generic-multimedia-intel.post new file mode 100644 index 0000000..6d652c4 --- /dev/null +++ b/scripts/generic-multimedia-intel.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "#################### generic-multimedia-intel.post ####################" + diff --git a/scripts/generic-multimedia.post b/scripts/generic-multimedia.post new file mode 100644 index 0000000..caa42d9 --- /dev/null +++ b/scripts/generic-multimedia.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "#################### generic-multimedia.post ####################" + diff --git a/scripts/generic-packaging.post b/scripts/generic-packaging.post new file mode 100644 index 0000000..c31901c --- /dev/null +++ b/scripts/generic-packaging.post @@ -0,0 +1,9 @@ +#!/bin/sh +echo "#################### generic-packaging.post ####################" + +rm -rf /root/.zypp + +# was: rpm.post +rm -f /var/lib/rpm/__db* +rpmdb --rebuilddb + diff --git a/scripts/generic-qt5.post b/scripts/generic-qt5.post new file mode 100644 index 0000000..d92bec6 --- /dev/null +++ b/scripts/generic-qt5.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "#################### generic-qt5.post ####################" + diff --git a/scripts/generic-x11-intel.post b/scripts/generic-x11-intel.post new file mode 100644 index 0000000..26c03c9 --- /dev/null +++ b/scripts/generic-x11-intel.post @@ -0,0 +1,3 @@ +#!/bin/sh +echo "#################### generic-x11-intel.post ####################" + diff --git a/scripts/generic-x11.post b/scripts/generic-x11.post new file mode 100644 index 0000000..fff82d2 --- /dev/null +++ b/scripts/generic-x11.post @@ -0,0 +1,9 @@ +#!/bin/sh +echo "#################### generic-x11.post ####################" + +# enable X11 forwarding on ssh +if [ -f /etc/ssh/sshd_config ]; then + echo "X11Forwarding yes" >>/etc/ssh/sshd_config + echo "AddressFamily inet" >>/etc/ssh/sshd_config +fi + |