3 FILESEXTRAPATHS_append := "${THISDIR}/weston-common"
5 SRC_URI += "file://0001-Yocto-correct-paths-to-ln-and-chmod.patch"
6 SRC_URI += "file://0002-Add-a-script-to-export-UID.patch"
7 SRC_URI += "file://0003-Automatically-restart-display-manager.patch"
8 SRC_URI += "file://0004-Modifications-for-yocto-build.patch"
10 USERADD_PACKAGES = "${PN}"
12 GROUPADD_PARAM_${PN} = "-g 191 display;-g 100 users;-g 1004 input;-g 190 systemd-journal;-g 54 lock"
14 USERADD_PARAM_${PN} = " -d /run/display -m -u 115 -g display -G users,input,tty,display -s /bin/sh display; "
15 USERADD_PARAM_${PN} += " -d /home/alice -m -u 5001 -g users -G users,display -r -s /bin/sh alice; "
16 USERADD_PARAM_${PN} += " -d /home/bob -m -u 5002 -g users -G users,display -r -s /bin/sh bob; "
17 USERADD_PARAM_${PN} += " -d /home/carol -m -u 5003 -g users -G users,display -r -s /bin/sh carol; "
18 USERADD_PARAM_${PN} += " -d /home/guest -m -u 9999 -g users -G users,display -r -s /bin/sh guest; "
19 USERADD_PARAM_${PN} += " -d /home/app -m -u 5000 -g users -G users,display -r -s /bin/sh app "
23 # user 'display' must own /dev/tty7 for weston to start correctly
24 cat >${D}${sysconfdir}/udev/rules.d/99-tty.rules <<'EOF'
25 SUBSYSTEM=="tty", KERNEL=="tty7", OWNER="display", SMACK="*"
28 # user 'display' must also be able to access /dev/input/event*
29 cat >${D}${sysconfdir}/udev/rules.d/99-input.rules <<'EOF'
30 SUBSYSTEM=="input", KERNEL=="event*", MODE="0660", GROUP="input", SMACK="*"
33 install -m 755 uid.sh ${D}/etc/profile.d
35 mkdir -p ${D}/lib/systemd/user/default.target.wants
36 ln -sf ../weston-user.service ${D}/lib/systemd/user/default.target.wants/weston-user.service
39 pkg_postinst_${PN} () {
40 for user in alice bob carol app guest; do
41 for appdir in desktop manifest dbspace; do
42 mkdir -p $D/home/$user/.applications/$appdir
44 find $D/home/$user/ -type d -exec chsmack -a User {} \;
45 chown -R $user:users $D/home/$user/
49 weston-common_files += "/lib/systemd/user/default.target.wants/weston-user.service"
50 weston-common_files += "/home/*"