TMP IVI FIX
authorRonan Le Martret <ronan@fridu.net>
Tue, 9 Sep 2014 07:50:05 +0000 (09:50 +0200)
committerRonan Le Martret <ronan@fridu.net>
Tue, 9 Sep 2014 07:50:05 +0000 (09:50 +0200)
Change-Id: I20d2f38be3d00c816eee3fbbcc2644c79ba77e8d
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
conf/layer.conf
files/tizen-fs-perms.txt
recipes-image/images/tizen-ivi-core-image-dev.bb
recipes-tizen/user-session-units/user-session-units-extraconf.inc
recipes-tizen/wayland-ivi-extension/wayland-ivi-extension-extraconf.inc
recipes-tizen/weston-ivi-shell/weston-ivi-shell-extraconf.inc

index a23719c..877aa2a 100644 (file)
@@ -56,3 +56,5 @@ PREFERRED_VERSION_linux-yocto = "3.14.4+git%"
 WESTONSTARTUP ??= "weston-common"
 
 INHERIT += "metatizen"
+
+FILESYSTEM_PERMS_TABLES = "tizen-fs-perms.txt"
\ No newline at end of file
index f9cf548..c36cc5f 100644 (file)
@@ -45,16 +45,19 @@ ${oldincludedir}    0755    root    root    true    0644    root    root
 
 # Items from base-files
 # Links
-# ${localstatedir}/run link    volatile/run
-# ${localstatedir}/log link    volatile/log
-# ${localstatedir}/lock        link    volatile/lock
-# ${localstatedir}/tmp link    volatile/tmp
+${localstatedir}/run   link    /run
+${localstatedir}/log   link    volatile/log
+${localstatedir}/lock  link    /run/lock
+${localstatedir}/tmp   link    volatile/tmp
+
+/lib   link    usr/lib
+/sbin  link    usr/sbin
+/bin   link    usr/bin
 
 # Special permissions from base-files
 # Set 1777
 /tmp                           01777   root    root    false - - -
-# ${localstatedir}/volatile/lock       01777   root    root    false - - -
-# ${localstatedir}/volatile/tmp        01777   root    root    false - - -
+${localstatedir}/volatile/tmp  01777   root    root    false - - -
 
 # Set 2775
 /home                          02755   root    root    false - - -
index 0bf7bd5..46924fd 100644 (file)
@@ -5,6 +5,7 @@ DESCRIPTION = "A Tizen ivi image base on Tizen common and \
 
 IMAGE_FEATURES += "dev-pkgs tools-debug debug-tweaks ssh-server-openssh"
 CORE_IMAGE_EXTRA_INSTALL += "attr"
+CORE_IMAGE_EXTRA_INSTALL += "acl"
 CORE_IMAGE_EXTRA_INSTALL += "util-linux-agetty"
 CORE_IMAGE_EXTRA_INSTALL += "strace"
 CORE_IMAGE_EXTRA_INSTALL += "gdb"
index 9693b9c..5b15ad9 100644 (file)
@@ -3,17 +3,9 @@ FILESEXTRAPATHS_append := "${THISDIR}/user-session-units"
 do_install_append() {
     rm -f ${D}/lib/systemd/user/dbus.socket
 
-    mkdir -p ${D}/lib/systemd/system/multi-user.target.wants
+    mkdir -p ${D}/lib/systemd/system/graphical.target.wants
+    ln -sf ../user-session-launch@.service ${D}/lib/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service
     
-    ln -sf ../user-session-launch@.service ${D}/lib/systemd/system/multi-user.target.wants/user-session-launch@seat0-5001.service
-    ln -sf ../user-session-launch@.service ${D}/lib/systemd/system/multi-user.target.wants/user-session-launch@seat0-5002.service
-    ln -sf ../user-session-launch@.service ${D}/lib/systemd/system/multi-user.target.wants/user-session-launch@seat0-5003.service
-    ln -sf ../user-session-launch@.service ${D}/lib/systemd/system/multi-user.target.wants/user-session-launch@seat0-9999.service
-
-    ln -sf ../user-session@.service ${D}/lib/systemd/system/multi-user.target.wants/user-session@5001.service
-    ln -sf ../user-session@.service ${D}/lib/systemd/system/multi-user.target.wants/user-session@5002.service
-    ln -sf ../user-session@.service ${D}/lib/systemd/system/multi-user.target.wants/user-session@5003.service
-    ln -sf ../user-session@.service ${D}/lib/systemd/system/multi-user.target.wants/user-session@9999.service
 
     echo "[Unit]" > ${D}/lib/systemd/user/default.target
     echo "Description=User session default target" >> ${D}/lib/systemd/user/default.target
@@ -21,6 +13,10 @@ do_install_append() {
     mkdir -p ${D}/lib/systemd/user/default.target.wants
     ln -sf ../dbus.service ${D}/lib/systemd/user/default.target.wants/dbus.service
     rm ${D}/lib/systemd/user/dbus.service
+    
+    rm -f ${D}/lib/systemd/user/default.target
+    ln -sf weston.target ${D}/lib/systemd/user/default.target
+    
 }
 
 user-session-units_files += "/lib/systemd/user/*"
index 173a094..49c15c9 100644 (file)
@@ -47,4 +47,6 @@ PACKAGES += " genivi-shell-dbg "
 
 FILES_genivi-shell-dbg = "${prefix}/lib/weston/.debug/ivi-controller.so"
 
-B="${S}"
\ No newline at end of file
+B="${S}"
+
+FILES_genivi-shell += "${prefix}/bin/IVISurfaceCreator"
\ No newline at end of file
index 47cbd0b..82e3545 100644 (file)
@@ -1,9 +1,9 @@
 inherit useradd
 
-GROUPADD_PARAM_${PN} = "-g 100 users; -g 5000 app; -g 192 weston-launch"
+GROUPADD_PARAM_${PN} = "-g 100 users; -g 5000 app; -g 192 weston-launch;-g 1004 input;-g 190 systemd-journal;-g 54 lock"
 
-USERADD_PARAM_${PN} += " -u 5000 -d /home/app   -m -g users -G users,weston-launch -r -s /bin/sh app ; "
-USERADD_PARAM_${PN} += " -u 9999 -d /home/guest -m -g users -G users,weston-launch -r -s /bin/sh guest "
+USERADD_PARAM_${PN} += " -u 5000 -d /home/app   -m -g users -G users,weston-launch -r -s /bin/sh app  "
+#USERADD_PARAM_${PN} += " -u 9999 -d /home/guest -m -g users -G users,weston-launch -r -s /bin/sh guest "
 
 USERADD_PACKAGES = "${PN}"
 
@@ -60,11 +60,52 @@ do_install_append() {
 }
 
 pkg_postinst_${PN} () {
-    for user in app guest; do
+#    for user in app guest; do
+    for user in app ; do
         for appdir in desktop manifest dbspace; do
             mkdir -p $D/home/$user/.applications/$appdir
         done
         find $D/home/$user/ -type d -exec chsmack -a User {} \;
         chown -R $user:users $D/home/$user/
     done
+    
+#------------------------------------------
+# Temporary work around for bug in filesystem package resulting in the 'app' user home
+# directory being only readable by root
+chown -R app:app /home/app
+
+# Since weston-launch runs with the "User" label, the app
+# home dir must have the same label
+chsmack -a User /home/app
+
+# 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
+
+# Add over-riding environment to enable the web runtime to
+# run on an IVI image as a different user then 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
+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
+
+# 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
+#------------------------------------------
+  
 }