summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland/weston-init.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-09-16 15:35:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-19 15:27:02 +0100
commitb418ececee2c22f334cc31f70aff71ba9571b431 (patch)
tree75c9e22de9d5ecd6f9211c2a7ff675707f14eed3 /meta/recipes-graphics/wayland/weston-init.bb
parent9c22a5a8a8dd0d5645adeb937ca3ffc8d1c6f6ec (diff)
downloadpoky-b418ececee2c22f334cc31f70aff71ba9571b431.tar.gz
weston-init: Add possibility to run weston as non-root user
These changes are from meta-96boards primarily Launch the session via a udev rule based on what kind of display device is available delete weston-conf and move the fuctionality into weston-init other layers are doing same weston-init installs machine specific weston.ini therefore mark is machine specific now (From OE-Core rev: aa3bced2e1de2f4ba507aa014835b06edccc138a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/wayland/weston-init.bb')
-rw-r--r--meta/recipes-graphics/wayland/weston-init.bb28
1 files changed, 23 insertions, 5 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 22ba5f3fb3..8b6689717c 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -2,23 +2,35 @@ SUMMARY = "Startup script and systemd unit file for the Weston Wayland composito
2LICENSE = "MIT" 2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4 4
5PACKAGE_ARCH = "${MACHINE_ARCH}"
6
5SRC_URI = "file://init \ 7SRC_URI = "file://init \
6 file://weston.service \ 8 file://weston.ini \
9 file://weston@.service \
10 file://71-weston-drm.rules \
7 file://weston-start" 11 file://weston-start"
8 12
9S = "${WORKDIR}" 13S = "${WORKDIR}"
10 14
11do_install() { 15do_install() {
12 install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston 16 install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
13 install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service 17 install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
14 18
19 # Install Weston systemd service and accompanying udev rule
20 install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service
21 sed -i -e s:/etc:${sysconfdir}:g \
22 -e s:/usr/bin:${bindir}:g \
23 -e s:/var:${localstatedir}:g \
24 ${D}${systemd_unitdir}/system/weston@.service
25 install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \
26 ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules
15 # Install weston-start script 27 # Install weston-start script
16 install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start 28 install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
17 sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start 29 sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
18 sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start 30 sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
19} 31}
20 32
21inherit allarch update-rc.d distro_features_check systemd 33inherit update-rc.d distro_features_check systemd
22 34
23# rdepends on weston which depends on virtual/egl 35# rdepends on weston which depends on virtual/egl
24REQUIRED_DISTRO_FEATURES = "opengl" 36REQUIRED_DISTRO_FEATURES = "opengl"
@@ -28,4 +40,10 @@ RDEPENDS_${PN} = "weston kbd"
28INITSCRIPT_NAME = "weston" 40INITSCRIPT_NAME = "weston"
29INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." 41INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
30 42
31SYSTEMD_SERVICE_${PN} = "weston.service" 43FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service"
44
45CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini"
46
47SYSTEMD_SERVICE_${PN} = "weston@%i.service"
48SYSTEMD_AUTO_ENABLE = "disable"
49