All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] weston-init: add a native systemd unit file
@ 2015-11-30 17:41 Alexander Kanavin
  2015-11-30 18:59 ` Martin Jansa
  2015-12-01 10:20 ` Pau Espin Pedrol
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Kanavin @ 2015-11-30 17:41 UTC (permalink / raw)
  To: openembedded-core

Previously weston was started by systemd via a classic init script

[YOCTO #5582]

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-graphics/wayland/weston-init.bb             | 13 ++++++++++---
 meta/recipes-graphics/wayland/weston-init/weston.service | 15 +++++++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/weston-init/weston.service

diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index fc2e4f8..35fd055 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,17 +1,22 @@
-SUMMARY = "Startup script for the Weston Wayland compositor"
+SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
 
-SRC_URI = "file://init"
+SRC_URI = "file://init \
+           file://weston.service"
 
 S = "${WORKDIR}"
 
 do_install() {
 	install -d ${D}/${sysconfdir}/init.d
 	install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+
+        install -d ${D}${systemd_unitdir}/system
+        install -m0644 ${WORKDIR}/weston.service ${D}${systemd_unitdir}/system
 }
 
-inherit allarch update-rc.d distro_features_check
+inherit allarch update-rc.d distro_features_check systemd
+
 # rdepends on weston which depends on virtual/egl
 REQUIRED_DISTRO_FEATURES = "opengl"
 
@@ -19,3 +24,5 @@ RDEPENDS_${PN} = "weston kbd"
 
 INITSCRIPT_NAME = "weston"
 INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
+
+SYSTEMD_SERVICE_${PN} = "weston.service"
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
new file mode 100644
index 0000000..4f1f7ff
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Weston Wayland compositor startup
+RequiresMountsFor=/run
+
+[Service]
+User=root
+EnvironmentFile=-/etc/default/weston
+Environment="XDG_RUNTIME_DIR=/run/user/root"
+ExecStartPre=/bin/mkdir -p /run/user/root
+ExecStartPre=/bin/chmod 0700 /run/user/root
+ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
+
+[Install]
+WantedBy=multi-user.target
+
-- 
2.6.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] weston-init: add a native systemd unit file
  2015-11-30 17:41 [PATCH] weston-init: add a native systemd unit file Alexander Kanavin
@ 2015-11-30 18:59 ` Martin Jansa
  2015-12-01 10:20 ` Pau Espin Pedrol
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2015-11-30 18:59 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2942 bytes --]

On Mon, Nov 30, 2015 at 07:41:44PM +0200, Alexander Kanavin wrote:
> Previously weston was started by systemd via a classic init script
> 
> [YOCTO #5582]
> 
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/recipes-graphics/wayland/weston-init.bb             | 13 ++++++++++---
>  meta/recipes-graphics/wayland/weston-init/weston.service | 15 +++++++++++++++
>  2 files changed, 25 insertions(+), 3 deletions(-)
>  create mode 100644 meta/recipes-graphics/wayland/weston-init/weston.service
> 
> diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
> index fc2e4f8..35fd055 100644
> --- a/meta/recipes-graphics/wayland/weston-init.bb
> +++ b/meta/recipes-graphics/wayland/weston-init.bb
> @@ -1,17 +1,22 @@
> -SUMMARY = "Startup script for the Weston Wayland compositor"
> +SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
>  
> -SRC_URI = "file://init"
> +SRC_URI = "file://init \
> +           file://weston.service"
>  
>  S = "${WORKDIR}"
>  
>  do_install() {
>  	install -d ${D}/${sysconfdir}/init.d
>  	install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
> +
> +        install -d ${D}${systemd_unitdir}/system
> +        install -m0644 ${WORKDIR}/weston.service ${D}${systemd_unitdir}/system

Don't mix tabs and spaces for indentation.

>  }
>  
> -inherit allarch update-rc.d distro_features_check
> +inherit allarch update-rc.d distro_features_check systemd
> +
>  # rdepends on weston which depends on virtual/egl
>  REQUIRED_DISTRO_FEATURES = "opengl"
>  
> @@ -19,3 +24,5 @@ RDEPENDS_${PN} = "weston kbd"
>  
>  INITSCRIPT_NAME = "weston"
>  INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
> +
> +SYSTEMD_SERVICE_${PN} = "weston.service"
> diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
> new file mode 100644
> index 0000000..4f1f7ff
> --- /dev/null
> +++ b/meta/recipes-graphics/wayland/weston-init/weston.service
> @@ -0,0 +1,15 @@
> +[Unit]
> +Description=Weston Wayland compositor startup
> +RequiresMountsFor=/run
> +
> +[Service]
> +User=root
> +EnvironmentFile=-/etc/default/weston
> +Environment="XDG_RUNTIME_DIR=/run/user/root"
> +ExecStartPre=/bin/mkdir -p /run/user/root
> +ExecStartPre=/bin/chmod 0700 /run/user/root
> +ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
> +
> +[Install]
> +WantedBy=multi-user.target
> +
> -- 
> 2.6.2
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] weston-init: add a native systemd unit file
  2015-11-30 17:41 [PATCH] weston-init: add a native systemd unit file Alexander Kanavin
  2015-11-30 18:59 ` Martin Jansa
@ 2015-12-01 10:20 ` Pau Espin Pedrol
  1 sibling, 0 replies; 6+ messages in thread
From: Pau Espin Pedrol @ 2015-12-01 10:20 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 3042 bytes --]

Hi,

Better use "${systemd_system_unitdir}" instead of
"${systemd_unitdir}/system".

Pau Espin Pedrol
mail/jabber: pespin.shar@gmail.com
http://blog.espeweb.net

2015-11-30 18:41 GMT+01:00 Alexander Kanavin <
alexander.kanavin@linux.intel.com>:

> Previously weston was started by systemd via a classic init script
>
> [YOCTO #5582]
>
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  meta/recipes-graphics/wayland/weston-init.bb             | 13
> ++++++++++---
>  meta/recipes-graphics/wayland/weston-init/weston.service | 15
> +++++++++++++++
>  2 files changed, 25 insertions(+), 3 deletions(-)
>  create mode 100644
> meta/recipes-graphics/wayland/weston-init/weston.service
>
> diff --git a/meta/recipes-graphics/wayland/weston-init.bb
> b/meta/recipes-graphics/wayland/weston-init.bb
> index fc2e4f8..35fd055 100644
> --- a/meta/recipes-graphics/wayland/weston-init.bb
> +++ b/meta/recipes-graphics/wayland/weston-init.bb
> @@ -1,17 +1,22 @@
> -SUMMARY = "Startup script for the Weston Wayland compositor"
> +SUMMARY = "Startup script and systemd unit file for the Weston Wayland
> compositor"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
>
> -SRC_URI = "file://init"
> +SRC_URI = "file://init \
> +           file://weston.service"
>
>  S = "${WORKDIR}"
>
>  do_install() {
>         install -d ${D}/${sysconfdir}/init.d
>         install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
> +
> +        install -d ${D}${systemd_unitdir}/system
> +        install -m0644 ${WORKDIR}/weston.service
> ${D}${systemd_unitdir}/system
>  }
>
> -inherit allarch update-rc.d distro_features_check
> +inherit allarch update-rc.d distro_features_check systemd
> +
>  # rdepends on weston which depends on virtual/egl
>  REQUIRED_DISTRO_FEATURES = "opengl"
>
> @@ -19,3 +24,5 @@ RDEPENDS_${PN} = "weston kbd"
>
>  INITSCRIPT_NAME = "weston"
>  INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
> +
> +SYSTEMD_SERVICE_${PN} = "weston.service"
> diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service
> b/meta/recipes-graphics/wayland/weston-init/weston.service
> new file mode 100644
> index 0000000..4f1f7ff
> --- /dev/null
> +++ b/meta/recipes-graphics/wayland/weston-init/weston.service
> @@ -0,0 +1,15 @@
> +[Unit]
> +Description=Weston Wayland compositor startup
> +RequiresMountsFor=/run
> +
> +[Service]
> +User=root
> +EnvironmentFile=-/etc/default/weston
> +Environment="XDG_RUNTIME_DIR=/run/user/root"
> +ExecStartPre=/bin/mkdir -p /run/user/root
> +ExecStartPre=/bin/chmod 0700 /run/user/root
> +ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
> +
> +[Install]
> +WantedBy=multi-user.target
> +
> --
> 2.6.2
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 4504 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] weston-init: add a native systemd unit file
@ 2015-12-01 14:00 Alexander Kanavin
  2015-12-01 14:46 ` Pau Espin Pedrol
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Kanavin @ 2015-12-01 14:00 UTC (permalink / raw)
  To: openembedded-core

Previously weston was started by systemd via a classic init script

[YOCTO #5582]

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-graphics/wayland/weston-init.bb             | 13 ++++++++++---
 meta/recipes-graphics/wayland/weston-init/weston.service | 15 +++++++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/weston-init/weston.service

diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index fc2e4f8..5f61c82 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,17 +1,22 @@
-SUMMARY = "Startup script for the Weston Wayland compositor"
+SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
 
-SRC_URI = "file://init"
+SRC_URI = "file://init \
+           file://weston.service"
 
 S = "${WORKDIR}"
 
 do_install() {
 	install -d ${D}/${sysconfdir}/init.d
 	install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+
+	install -d ${D}${systemd_unitdir}/system
+	install -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}
 }
 
-inherit allarch update-rc.d distro_features_check
+inherit allarch update-rc.d distro_features_check systemd
+
 # rdepends on weston which depends on virtual/egl
 REQUIRED_DISTRO_FEATURES = "opengl"
 
@@ -19,3 +24,5 @@ RDEPENDS_${PN} = "weston kbd"
 
 INITSCRIPT_NAME = "weston"
 INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
+
+SYSTEMD_SERVICE_${PN} = "weston.service"
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
new file mode 100644
index 0000000..4f1f7ff
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Weston Wayland compositor startup
+RequiresMountsFor=/run
+
+[Service]
+User=root
+EnvironmentFile=-/etc/default/weston
+Environment="XDG_RUNTIME_DIR=/run/user/root"
+ExecStartPre=/bin/mkdir -p /run/user/root
+ExecStartPre=/bin/chmod 0700 /run/user/root
+ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
+
+[Install]
+WantedBy=multi-user.target
+
-- 
2.6.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] weston-init: add a native systemd unit file
  2015-12-01 14:00 Alexander Kanavin
@ 2015-12-01 14:46 ` Pau Espin Pedrol
  0 siblings, 0 replies; 6+ messages in thread
From: Pau Espin Pedrol @ 2015-12-01 14:46 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

2015-12-01 15:00 GMT+01:00 Alexander Kanavin <
alexander.kanavin@linux.intel.com>:

> +       install -d ${D}${systemd_unitdir}/system
> +       install -m0644 ${WORKDIR}/weston.service
> ${D}${systemd_system_unitdir}
>

Sorry to be picky, but you only changed
"systemd_unitdir/system"->"systemd_system_unitdir" in one of the two lines
containing it! ;)

Pau Espin Pedrol
mail/jabber: pespin.shar@gmail.com
http://blog.espeweb.net

[-- Attachment #2: Type: text/html, Size: 1029 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] weston-init: add a native systemd unit file
@ 2015-12-01 15:35 Alexander Kanavin
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2015-12-01 15:35 UTC (permalink / raw)
  To: openembedded-core

Previously weston was started by systemd via a classic init script

[YOCTO #5582]

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-graphics/wayland/weston-init.bb             | 13 ++++++++++---
 meta/recipes-graphics/wayland/weston-init/weston.service | 15 +++++++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/weston-init/weston.service

diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index fc2e4f8..653541e 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,17 +1,22 @@
-SUMMARY = "Startup script for the Weston Wayland compositor"
+SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
 
-SRC_URI = "file://init"
+SRC_URI = "file://init \
+           file://weston.service"
 
 S = "${WORKDIR}"
 
 do_install() {
 	install -d ${D}/${sysconfdir}/init.d
 	install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+
+	install -d ${D}${systemd_system_unitdir}
+	install -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}
 }
 
-inherit allarch update-rc.d distro_features_check
+inherit allarch update-rc.d distro_features_check systemd
+
 # rdepends on weston which depends on virtual/egl
 REQUIRED_DISTRO_FEATURES = "opengl"
 
@@ -19,3 +24,5 @@ RDEPENDS_${PN} = "weston kbd"
 
 INITSCRIPT_NAME = "weston"
 INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
+
+SYSTEMD_SERVICE_${PN} = "weston.service"
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
new file mode 100644
index 0000000..4f1f7ff
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Weston Wayland compositor startup
+RequiresMountsFor=/run
+
+[Service]
+User=root
+EnvironmentFile=-/etc/default/weston
+Environment="XDG_RUNTIME_DIR=/run/user/root"
+ExecStartPre=/bin/mkdir -p /run/user/root
+ExecStartPre=/bin/chmod 0700 /run/user/root
+ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
+
+[Install]
+WantedBy=multi-user.target
+
-- 
2.6.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-01 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 17:41 [PATCH] weston-init: add a native systemd unit file Alexander Kanavin
2015-11-30 18:59 ` Martin Jansa
2015-12-01 10:20 ` Pau Espin Pedrol
  -- strict thread matches above, loose matches on Subject: below --
2015-12-01 14:00 Alexander Kanavin
2015-12-01 14:46 ` Pau Espin Pedrol
2015-12-01 15:35 Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.