adjust scripts, patterns and config for generic-[x11,wayland]-[i586,x86_64] 63/14763/2 accepted/tizen/generic/20140115.094554 submit/tizen/20140115.094233
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>
Fri, 10 Jan 2014 17:49:02 +0000 (18:49 +0100)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Tue, 14 Jan 2014 16:52:09 +0000 (17:52 +0100)
Change-Id: I66cf0b359885bf2ce6e35e66697bfb6ae237b3ca
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
23 files changed:
generic-repos.yaml
generic.yaml
ks/generic-wayland-mbr-i586.yaml [new file with mode: 0644]
ks/generic-wayland-mbr-x86_64.yaml [moved from ks/generic-mbr-i586.yaml with 55% similarity]
ks/generic-x11-mbr-i586.yaml [new file with mode: 0644]
ks/generic-x11-mbr-x86_64.yaml [new file with mode: 0644]
partitions/generic-mbr
patterns/generic-adaptation.yaml
patterns/generic-applications.yaml
patterns/generic-middleware.yaml
patterns/generic-wayland.yaml [new file with mode: 0644]
patterns/generic-x11.yaml [new file with mode: 0644]
scripts/base-general.post
scripts/base-generic-minimal.post [moved from scripts/base-ivi-minimal.post with 62% similarity]
scripts/base-weston-default.post
scripts/base-x11-default.post [new file with mode: 0644]
scripts/buildname.nochroot
scripts/customize.post [new file with mode: 0644]
scripts/efi.post [deleted file]
scripts/optimization.post
scripts/rpm.post
scripts/vconf-keys-default.post
scripts/wrt-widgets.post

index 537cfeb..cbc8bf3 100644 (file)
@@ -1,8 +1,4 @@
 Repositories:
-    -   Name: generic
-        Url:  http://download.tizen.org/live/Tizen:/Generic/x86_64-wayland/
-        Options: --ssl_verify=no
-        
     -   Name: generic-wayland_i586
         Url:  http://download.tizen.org/live/Tizen:/Generic/ia32-wayland/
         Options: --ssl_verify=no
@@ -17,4 +13,4 @@ Repositories:
         
     -   Name: generic-x11_x86_64
         Url:  http://download.tizen.org/live/Tizen:/Generic/x86_64-x11/
-        Options: --ssl_verify=no
\ No newline at end of file
+        Options: --ssl_verify=no
index 210e108..bf1d72c 100644 (file)
@@ -2,7 +2,6 @@ Default:
     Baseline: tizen-3.0
     Active: True
     Mic2Options: -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap
-    Architecture: ia32
     Part: generic-mbr
     Language: en_US.UTF-8
     Keyboard: us
@@ -11,9 +10,9 @@ Default:
     DefaultUser: tizen
     DefaultUserPass: tizen
     BootLoader: True
-    BootloaderAppend: "rootwait rootfstype=ext4 quiet rw vga=current"
+    BootloaderAppend: "rw vga=current splash rootwait rootfstype=ext4 plymouth.enable=0"
     BootloaderTimeout: 3
-    BootloaderOptions: '--ptable=gpt  --menus="install:Wipe and Install:systemd.unit=system-installer.service:test"'
+    BootloaderOptions: '--ptable=gpt --menus="install:Wipe and Install:systemd.unit=system-installer.service:test"'
     StartX: False
     Desktop: None
     Repos:
@@ -22,35 +21,41 @@ Default:
     UserGroups: "audio,video"
     Groups:
         - Base System
+        - Console Tools
         - Generic Packaging
-        - Generic Adaptation
     PostScripts:
         - base-general
         - rpm
-        - base-weston-default
-        - wrt-widgets.post
-        - vconf-keys-default 
+        - optimization
+        - customize
     NoChrootScripts:
         - buildname  
 
-Wayland-i586:
+Minimal:
+    Part: generic-mbr
+
+Wayland:
     Part: generic-mbr
     UserGroups: "audio,video,weston-launch"
     Groups:
+        - Generic Wayland
+        - Generic Adaptation
         - Generic Middleware
-        - Wayland
-        - Console Tools
         - Generic Applications
     PostScripts:
-        - optimization
+        - base-weston-default
+        - wrt-widgets
+        - vconf-keys-default
 
-Wayland-x86_64:
+X11:
     Part: generic-mbr
-    UserGroups: "audio,video,weston-launch"
     Groups:
+        - Generic X11
+        - Generic Adaptation
         - Generic Middleware
-        - Wayland
-        - Console Tools
         - Generic Applications
     PostScripts:
-        - optimization
\ No newline at end of file
+        - base-x11-default
+        - wrt-widgets
+        - vconf-keys-default
+
diff --git a/ks/generic-wayland-mbr-i586.yaml b/ks/generic-wayland-mbr-i586.yaml
new file mode 100644 (file)
index 0000000..b914080
--- /dev/null
@@ -0,0 +1,9 @@
+Name: Generic Wayland MBR i586
+Schedule: "*"
+Active: True
+Platform: Wayland
+Part: generic-mbr
+FileName: generic-wayland-mbr-i586
+Kernel: kernel-x86-generic
+Repos:
+    - generic-wayland_i586
similarity index 55%
rename from ks/generic-mbr-i586.yaml
rename to ks/generic-wayland-mbr-x86_64.yaml
index 0a8f3fe..cd07a08 100644 (file)
@@ -1,9 +1,9 @@
-Name: Generic MBR 86_x64
+Name: Generic Wayland MBR x86_64
 Schedule: "*"
 Active: True
-Platform: Wayland-i586
+Platform: Wayland
 Part: generic-mbr
-FileName: generic-mbr-i586
+FileName: generic-wayland-mbr-x86_64
 Kernel: kernel-x86-generic
 Repos:
     - generic-wayland_x86_64
diff --git a/ks/generic-x11-mbr-i586.yaml b/ks/generic-x11-mbr-i586.yaml
new file mode 100644 (file)
index 0000000..2ae7dc4
--- /dev/null
@@ -0,0 +1,9 @@
+Name: Generic X11 MBR i586
+Schedule: "*"
+Active: True
+Platform: X11
+Part: generic-mbr
+FileName: generic-x11-mbr-i586
+Kernel: kernel-x86-generic
+Repos:
+    - generic-x11_i586
diff --git a/ks/generic-x11-mbr-x86_64.yaml b/ks/generic-x11-mbr-x86_64.yaml
new file mode 100644 (file)
index 0000000..30e7ac8
--- /dev/null
@@ -0,0 +1,9 @@
+Name: Generic X11 MBR x86_64
+Schedule: "*"
+Active: True
+Platform: X11
+Part: generic-mbr
+FileName: generic-x11-mbr-x86_64
+Kernel: kernel-x86-generic
+Repos:
+    - generic-x11_x86_64
index 1a5d132..5b79934 100644 (file)
@@ -1 +1 @@
-part / --fstype="ext4" --ondisk=sda --size=6144 --active --label tizen-pc-genericdev
\ No newline at end of file
+part / --fstype="ext4" --ondisk=sda --size=6144 --active --label tizen-generic
index 413db24..0e30bc0 100644 (file)
@@ -1,10 +1,8 @@
 Description: Generic Adaptation
 Name: generic-adaptation
 Packages:
-- desktop-skin
 - linux-firmware
-- xf86-input-synaptics
-- xf86-video-intel
-- xf86-input-keyboard
-- wrt-widgets
+- kernel-x86-generic
+- dlogutil
+- system-installer
 Summary: Generic Adaptation
index fac54d4..89fd479 100644 (file)
@@ -1,7 +1,7 @@
 Description: Generic Applications
 Name: generic-applications
 Packages:
+- ail
 - ca-certificates
-- ca-certificates-mozilla
 - webkit2-efl-test
 Summary: Generic Applications
index b587d63..6663f00 100644 (file)
@@ -24,6 +24,7 @@ Packages:
 - gst-plugins-good
 - gstreamer
 - gstreamer-vaapi
+- gstreamer-utils
 - iptables
 - libprivilege-control-conf
 - libva-intel-driver
@@ -42,6 +43,7 @@ Packages:
 - pulseaudio-module-bluetooth
 - pulseaudio-utils
 - rfkill
+- sqlite3
 - tree
 - vaapi-tools
 - wpa_supplicant
@@ -56,5 +58,6 @@ Packages:
 - wrt-installer-preinstall-service
 - wrt-plugins-tizen
 - wrt-security
+- wrt-widgets
 - zypper
 Summary: Generic Middleware
diff --git a/patterns/generic-wayland.yaml b/patterns/generic-wayland.yaml
new file mode 100644 (file)
index 0000000..09bae5a
--- /dev/null
@@ -0,0 +1,11 @@
+Description: Generic Wayland
+Name: generic-wayland
+Packages:
+- cantarell-fonts
+- dejavu-fonts
+- weston
+- xkeyboard-config
+- tizen-branding-default
+- user-session-units
+- desktop-skin
+Summary: Generic Wayland
diff --git a/patterns/generic-x11.yaml b/patterns/generic-x11.yaml
new file mode 100644 (file)
index 0000000..5b722a6
--- /dev/null
@@ -0,0 +1,8 @@
+Description: Generic X11
+Name: generic-x11
+Packages:
+- xorg-server
+- xf86-input-synaptics
+- xf86-video-intel
+- xf86-input-keyboard
+Summary: Generic X11
index e944197..5a74bad 100644 (file)
@@ -1,4 +1,4 @@
-# base-general.post
+################ base-general.post ##################
 
 ln -sf /proc/self/mounts /etc/mtab
 
similarity index 62%
rename from scripts/base-ivi-minimal.post
rename to scripts/base-generic-minimal.post
index 33f28c2..65e09eb 100644 (file)
@@ -1,3 +1,4 @@
-# base-ivi-minimal.post
+################### base-generic-minimal.post #################
+
 rm /usr/lib/systemd/system/default.target
 ln -sf multi-user.target  /usr/lib/systemd/system/default.target
index 310e1f2..12e5ef5 100644 (file)
@@ -1,3 +1,6 @@
+#################### base-weston-default.post ##################
+# to be synced with profile/ivi/meta-ivi/scripts/base-weston-default.post
+
 # Initialize the native application database
 pkg_initdb
 
@@ -12,13 +15,15 @@ chown -R app:app /opt/home/app
 # home dir must have the same label
 chsmack -a User /opt/home/app
 
-# base-weston-default.post
+# Enable a logind session for 'app' user on seat0 (the default seat for
+# graphical sessions)
 mkdir -p /usr/lib/systemd/system/graphical.target.wants
+ln -s ../user-session-launch@.service /usr/lib/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service
 ln -sf weston.target  /usr/lib/systemd/user/default.target
 
 # Enable user@5000.service by setting the linger for user 'app'
-mkdir -p /var/lib/systemd/linger
-touch /var/lib/systemd/linger/app
+#mkdir -p /var/lib/systemd/linger
+#touch /var/lib/systemd/linger/app
 
 # Add over-riding environment to enable the web runtime to
 # run on an IVI image as a different user then the tizen user
@@ -37,13 +42,27 @@ EOF
 # Use the same over-rides for the native prelaunch daemon
 cp /etc/sysconfig/wrt /etc/sysconfig/launchpad
 
+# sdx: for AMD (ac.service)
+#cp /etc/sysconfig/wrt /etc/sysconfig/prelaunch
+
 # Add a rule to ensure the app user has permissions to
 # open the graphics device
 cat > /etc/udev/rules.d/99-dri.rules <<EOF
 SUBSYSTEM=="drm", MODE="0666"
 EOF
 
+############
+
+# sdx: set DBUS env inside weston shell (login shell)
+cat >/etc/profile.d/user-dbus.sh <<'EOF'
+export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/dbus/user_bus_socket
+EOF
+
 # sdx: user 'app' must own /dev/tty1 for weston to start correctly
 cat >/usr/lib/udev/rules.d/99-tty.rules <<EOF
 SUBSYSTEM=="tty", KERNEL=="tty1", GROUP="app", OWNER="app"
-EOF
\ No newline at end of file
+EOF
+
+# sdx: fix smack labels on /var/log
+chsmack -a '*' /var/log
+
diff --git a/scripts/base-x11-default.post b/scripts/base-x11-default.post
new file mode 100644 (file)
index 0000000..4d0a022
--- /dev/null
@@ -0,0 +1,5 @@
+###################### base-x11-default.post ###################
+
+# enable X11 forwarding on ssh
+echo "X11Forwarding yes" >>/etc/ssh/sshd_config
+echo "AddressFamily inet" >>/etc/ssh/sshd_config
index 36ae504..b248084 100644 (file)
@@ -1,5 +1,6 @@
-# buildname.nochroot 
+####################### 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 "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/customize.post b/scripts/customize.post
new file mode 100644 (file)
index 0000000..66745c1
--- /dev/null
@@ -0,0 +1,48 @@
+##################### customize.post ####################
+
+# customize bash prompt
+cat >/etc/profile.d/bash_prompt_custom.sh <<'EOF'
+if [ "$PS1" ]; then
+
+       function parse_git_branch {
+               [ -x "/usr/bin/git" ] && git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
+       }
+
+       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}\$(parse_git_branch)${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 dbus_find () {
+               echo export     $(tr '\0' '\n' </proc/$(pgrep gnome-session)/environ |grep ^DB)
+       }
+
+       function get_manifest () {
+               rpm -qa --queryformat="%{name} %{Version} %{Release} %{VCS}\n" | sort
+       }
+fi
+EOF
+
diff --git a/scripts/efi.post b/scripts/efi.post
deleted file mode 100644 (file)
index 00df656..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# efi.post
-/usr/sbin/setup-efi-ivi
-
index ed08671..9f1c964 100644 (file)
@@ -1,2 +1,4 @@
+######################## optimization.post #######################
+
 # Run prelink to speed up dynamic binary/library loading
 /usr/sbin/prelink --all
index be1ddcf..36da676 100644 (file)
@@ -1,3 +1,4 @@
-# rpm.post
+##################### rpm.post #######################
+
 rm -f /var/lib/rpm/__db*
 rpmdb --rebuilddb
index a79a7a7..6149b75 100644 (file)
@@ -1,2 +1,4 @@
+##################### vconf-keys-default.post #######################
+
 # Needed to fix TIVI-1629
 vconftool set -t int -f db/setting/default_memory/wap 0
index 58e8ded..beb8fa4 100644 (file)
@@ -1,6 +1,7 @@
-######################################## START WRT WIDGETS PREINSTALL ####################
+######### wrt-widgets.post #############
 
+# start wrt widgets preinstall
 prepare_widgets.sh
 install_widgets.sh
 
-######################################## END WRT WIDGETS PREINSTALL ####################
+