Boot into 'app' user with initialized pkg database 82/5882/1 accepted/tizen/20130719.013453 submit/tizen/20130719.015421 submit/tizen/20130719.020151
authorRusty Lynch <rusty.lynch@intel.com>
Fri, 19 Jul 2013 01:46:10 +0000 (18:46 -0700)
committerRusty Lynch <rusty.lynch@intel.com>
Fri, 19 Jul 2013 01:48:39 +0000 (18:48 -0700)
Change the full ivi images to boot directly into the 'app' user so
that the web runtime and native prelaunch daemons work as expected.

Also started initializing the app database so that launch_app finds
the dialer app

Change-Id: I5f1a0de986603c6abcd2b5f3b67c6db9fef9bdf1

packaging/meta-ivi.changes
scripts/base-weston-default.post

index fc8d0a3..2dcb493 100644 (file)
@@ -1,3 +1,6 @@
+* Thu Jul 18 2013 Rusty Lynch <rusty.lynch@intel.com> submit/tizen/20130718.211646@1e6f367
+- Boot into 'app' user with initialized pkg database
+
 * Thu Jul 18 05:36:43 UTC 2013 - tracy.graydon@intel.com
 - TIVI-1386: add gdb-server to ivi-middleware
 
index 82a9b52..73131c5 100644 (file)
@@ -1,13 +1,28 @@
+# Initialize the native application database
+pkg_initdb
+
+# Create the 'app' user
+/usr/sbin/useradd -u 5000 -g users -G audio,video,weston-launch -m app
+
 # base-weston-default.post
 mkdir -p /usr/lib/systemd/system/graphical.target.wants
-ln -sf ../user-session@.service /usr/lib/systemd/system/graphical.target.wants/user-session@1000.service
+ln -sf ../user-session@.service /usr/lib/systemd/system/graphical.target.wants/user-session@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
 cat > /etc/sysconfig/wrt <<EOF
-DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/dbus/user_bus_socket
-XDG_RUNTIME_DIR=/run/user/1000
+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
-EOF
\ No newline at end of file
+EOF
+
+# Use the same over-rides for the native prelaunch daemon
+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