From: Stephane Desneux Date: Fri, 21 Mar 2014 17:43:35 +0000 (+0100) Subject: adjust user session and weston startup for multiuser mode X-Git-Tag: accepted/tizen/common/20140425.144512~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0af59873d1fe87f8d972ab1be792be6f29288d16;p=profile%2Fcommon%2Fmeta.git adjust user session and weston startup for multiuser mode - weston started as 'display' - 'tizen' user renamed 'guest' - weston-clients and weston-generic-tz-launcher packages added Change-Id: If8d943e9c324e152af2e0c3bde79378322f17783 Signed-off-by: Stephane Desneux --- diff --git a/generic.yaml b/generic.yaml index 85bcca9..a3faca9 100644 --- a/generic.yaml +++ b/generic.yaml @@ -1,14 +1,13 @@ Default: Baseline: tizen-3.0 Active: True - Architecture: ia32 Mic2Options: -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap Part: generic-mbr Language: en_US.UTF-8 Keyboard: us Timezone: America/Los_Angeles RootPass: tizen - DefaultUser: tizen + DefaultUser: guest DefaultUserPass: tizen BootLoader: True BootloaderAppend: "rw vga=current splash rootwait rootfstype=ext4 plymouth.enable=0" @@ -36,7 +35,7 @@ Minimal: Wayland: Part: generic-mbr - UserGroups: "audio,video,weston-launch" + UserGroups: "audio,video" Groups: - Generic Wayland - Generic Adaptation diff --git a/packaging/rpmlintrc b/packaging/rpmlintrc new file mode 100644 index 0000000..a785645 --- /dev/null +++ b/packaging/rpmlintrc @@ -0,0 +1,3 @@ +# suppress warnings about shebangs not present in scripts + +addFilter("script-without-shebang") diff --git a/patterns/generic-wayland.yaml b/patterns/generic-wayland.yaml index 146041d..2e694ae 100644 --- a/patterns/generic-wayland.yaml +++ b/patterns/generic-wayland.yaml @@ -5,7 +5,10 @@ Packages: - cantarell-fonts - dejavu-fonts - weston +- weston-generic - weston-generic-config +- weston-clients +- weston-generic-tz-launcher - mesa - xkeyboard-config - tizen-branding-default diff --git a/scripts/generic-base.post b/scripts/generic-base.post index 2bd307b..9c3d9eb 100644 --- a/scripts/generic-base.post +++ b/scripts/generic-base.post @@ -1,8 +1,11 @@ ################ 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 +# 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 # Run prelink to speed up dynamic binary/library loading /usr/sbin/prelink --all @@ -68,3 +71,16 @@ diff -urN bad/etc/pam.d/systemd-user good/etc/pam.d/systemd-user auth required pam_deny.so password required pam_deny.so EOF + +######### multiuser mode: create additional users +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 + chsmack -a User /home/$user + uid=$(( $uid + 1 )) +done +# fix guest homedir +chsmack -a User /home/guest + diff --git a/scripts/generic-crosswalk.post b/scripts/generic-crosswalk.post index e3ea16d..f32a535 100644 --- a/scripts/generic-crosswalk.post +++ b/scripts/generic-crosswalk.post @@ -12,22 +12,22 @@ cat </lib/systemd/user/xwalk_widgets_preinstall.service [Unit] Description=Installation of pre-installed widgets After=dbus.service -ConditionPathExists=!/home/app/.config/xwalk-service/applications.db +ConditionPathExists=!%h/.config/xwalk-service/applications.db [Service] Type=oneshot ExecStart=/usr/bin/install_widgets.sh [Install] -WantedBy=weston.target +WantedBy=default.target EOF -mkdir -p /lib/systemd/user/xwalk.target.wants -ln -sf ../xwalk_widgets_preinstall.service /lib/systemd/user/weston.target.wants/xwalk_widgets_preinstall.service - +# run xwalk and xwalk_widgets_preinstall services in default target +mkdir -p /lib/systemd/user/default.target.wants +ln -sf ../xwalk_widgets_preinstall.service /lib/systemd/user/default.target.wants/ +ln -sf ../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 < /etc/udev/rules.d/99-dri.rules </usr/lib/udev/rules.d/99-tty.rules <