Re: [OE-core] [PATCH V5] weston-init: Add possibility to run weston as non-root user

2019-09-19 Thread Khem Raj
On Thu, Sep 19, 2019 at 7:28 AM Richard Purdie
 wrote:
>
> On Mon, 2019-09-16 at 15:35 -0700, Khem Raj wrote:
> > 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
> >
> > Signed-off-by: Khem Raj 
> > Cc: Otavio Salvador 
> > Signed-off-by: Ross Burton 
> > ---
> > v2: Drop duplicate isntall rule and use systemd_system_unitdir
> > v3: Use systemd_system_unitdir in FILES section too
> > v4: Move weston-conf logic into weston-init and delete it
> > v5: Mark machine specific
>
> You didn't actually retest this and v5 still fails the selftest. I've
> squashed the fix needed into the patch.

I tested that now the package was machine-specific instead of allarch
but I did miss SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS
thanks for fixing it. We also need to remove weston-conf from this

>
> Cheers,
>
> Richard
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH V5] weston-init: Add possibility to run weston as non-root user

2019-09-19 Thread Richard Purdie
On Mon, 2019-09-16 at 15:35 -0700, Khem Raj wrote:
> 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
> 
> Signed-off-by: Khem Raj 
> Cc: Otavio Salvador 
> Signed-off-by: Ross Burton 
> ---
> v2: Drop duplicate isntall rule and use systemd_system_unitdir
> v3: Use systemd_system_unitdir in FILES section too
> v4: Move weston-conf logic into weston-init and delete it
> v5: Mark machine specific

You didn't actually retest this and v5 still fails the selftest. I've
squashed the fix needed into the patch.

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V5] weston-init: Add possibility to run weston as non-root user

2019-09-16 Thread Khem Raj
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

Signed-off-by: Khem Raj 
Cc: Otavio Salvador 
Signed-off-by: Ross Burton 
---
v2: Drop duplicate isntall rule and use systemd_system_unitdir
v3: Use systemd_system_unitdir in FILES section too
v4: Move weston-conf logic into weston-init and delete it
v5: Mark machine specific

 meta/conf/distro/include/maintainers.inc  |  1 -
 meta/recipes-graphics/wayland/weston-conf.bb  | 35 -
 meta/recipes-graphics/wayland/weston-init.bb  | 28 +--
 .../wayland/weston-init/71-weston-drm.rules   |  2 +
 .../wayland/weston-init/qemux86-64/weston.ini |  2 +
 .../wayland/weston-init/qemux86/weston.ini|  2 +
 .../wayland/weston-init/weston.ini| 74 +++
 .../wayland/weston-init/weston.service| 13 
 .../wayland/weston-init/weston@.service   | 37 ++
 meta/recipes-graphics/wayland/weston_7.0.0.bb |  2 +-
 10 files changed, 141 insertions(+), 55 deletions(-)
 delete mode 100644 meta/recipes-graphics/wayland/weston-conf.bb
 create mode 100644 
meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules
 create mode 100644 
meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini
 create mode 100644 meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini
 create mode 100644 meta/recipes-graphics/wayland/weston-init/weston.ini
 delete mode 100644 meta/recipes-graphics/wayland/weston-init/weston.service
 create mode 100644 meta/recipes-graphics/wayland/weston-init/weston@.service

diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index 5f21f98b2b..ab0c6c5541 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -718,7 +718,6 @@ RECIPE_MAINTAINER_pn-wayland = "Denys Dmytriyenko 
"
 RECIPE_MAINTAINER_pn-wayland-protocols = "Denys Dmytriyenko "
 RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin "
 RECIPE_MAINTAINER_pn-weston = "Denys Dmytriyenko "
-RECIPE_MAINTAINER_pn-weston-conf = "Denys Dmytriyenko "
 RECIPE_MAINTAINER_pn-weston-init = "Denys Dmytriyenko "
 RECIPE_MAINTAINER_pn-wget = "Yi Zhao "
 RECIPE_MAINTAINER_pn-which = "Anuj Mittal "
diff --git a/meta/recipes-graphics/wayland/weston-conf.bb 
b/meta/recipes-graphics/wayland/weston-conf.bb
deleted file mode 100644
index f52200c46a..00
--- a/meta/recipes-graphics/wayland/weston-conf.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Weston, a Wayland compositor, configuration files"
-HOMEPAGE = "http://wayland.freedesktop.org";
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-CONFFILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini"
-
-FILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini"
-
-PACKAGES = "${PN}"
-
-do_configure[noexec] = '1'
-do_compile[noexec] = '1'
-
-do_install() {
-   :
-}
-
-do_install_qemux86() {
-   mkdir -p ${D}/${sysconfdir}/xdg/weston
-   cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini
-[core]
-backend=fbdev-backend.so
-EOF
-}
-
-do_install_qemux86-64() {
-   mkdir -p ${D}/${sysconfdir}/xdg/weston
-   cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini
-[core]
-backend=fbdev-backend.so
-EOF
-}
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
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 SRC_URI = "file://init \
-   file://weston.service \
+   file://weston.ini \
+   file://weston@.service \
+   file://71-weston-drm.rules \
file://weston-start"
 
 S = "${WORKDIR}"
 
 do_install() {
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
-   install -Dm0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
-
+   install -D -p -m0644 ${WORKDIR}/weston.ini 
${D}${sysconfdir}/xdg/weston/weston.ini
+
+   # Install Weston systemd service and accompanying udev rule
+   install -D -p -m0644 ${WORKDIR}/weston@.service 
${D}${systemd_system_unitdir}/weston@.service
+   sed -i -e s:/etc:${sysconfdir}:g \
+   -e s:/usr/bin:${bindir}:g \
+   -e s:/var:${localstatedir}:g \
+   ${D}${systemd_unitdir}/system/weston@.service
+   install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \
+   ${D}${sysconfdir}/udev/rules.