Skip to contentSkip to conversation

weston-init: Add environment file support for systemd unit file

PATCH In review Otavio Salvador 3 participants 6 messages Sep 30, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 weston-init: Add environment file support for systemd unit file

From: Fabio Berton <[email protected]>

The /etc/default/weston file is already installed and it can be used as systemd EnvironmentFile.

---

 meta/recipes-graphics/wayland/weston-init/[email protected] | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-graphics/wayland/weston-init/[email protected] +1 -0
index 0a1df15bdf..ce8f4fb71a 100644
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
 [Service]
 # Requires systemd-notify.so Weston plugin.
 Type=notify
+EnvironmentFile=/etc/default/weston
 ExecStart=/usr/bin/weston --modules=systemd-notify.so
 
 # Optional watchdog setup
Signature · 1 line
2.28.0
#1 lore raw
Quoted 18 lines · Otavio Salvador

From: Fabio Berton <[email protected]>

The /etc/default/weston file is already installed and it can be used as systemd EnvironmentFile.

---

 meta/recipes-graphics/wayland/weston-init/[email protected] | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-graphics/wayland/weston-init/[email protected] +0 -0
index 0a1df15bdf..ce8f4fb71a 100644

meta/recipes-graphics/wayland/weston-init/[email protected] ConditionPathExists=/dev/tty0 · line 32

Quoted 4 lines
meta/recipes-graphics/wayland/weston-init/[email protected] +1 -0
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
 [Service]
 # Requires systemd-notify.so Weston plugin.
 Type=notify
+EnvironmentFile=/etc/default/weston

Lets make it not fail when not there

EnvironmentFile=-/etc/default/weston

Quoted 9 lines
meta/recipes-graphics/wayland/weston-init/[email protected] +0 -1
 ExecStart=/usr/bin/weston --modules=systemd-notify.so
 
 # Optional watchdog setup
--

2.28.0

#2 lore raw

Em qua., 30 de set. de 2020 às 18:31, Khem Raj <[email protected]> escreveu:

Quoted 14 lines

meta/recipes-graphics/wayland/weston-init/[email protected] ConditionPathExists=/dev/tty0 · line 32

Quoted 9 lines · Otavio Salvador
meta/recipes-graphics/wayland/weston-init/[email protected] +1 -0
index 0a1df15bdf..ce8f4fb71a 100644
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
 [Service]
 # Requires systemd-notify.so Weston plugin.
 Type=notify
+EnvironmentFile=/etc/default/weston

Lets make it not fail when not there

Quoted 1 line

EnvironmentFile=-/etc/default/weston

We made it required as it is always installed. So I think it should be required. How it could not be available?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
#3 lore raw
Quoted 16 lines · Otavio Salvador

Em qua., 30 de set. de 2020 às 18:31, Khem Raj <[email protected]> escreveu:

Quoted 14 lines

meta/recipes-graphics/wayland/weston-init/[email protected] ConditionPathExists=/dev/tty0 · line 32

Quoted 9 lines · Otavio Salvador
meta/recipes-graphics/wayland/weston-init/[email protected] +1 -0
index 0a1df15bdf..ce8f4fb71a 100644
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
 [Service]
 # Requires systemd-notify.so Weston plugin.
 Type=notify
+EnvironmentFile=/etc/default/weston

Lets make it not fail when not there

Quoted 4 lines
Quoted 1 line

EnvironmentFile=-/etc/default/weston

We made it required as it is always installed. So I think it should be required. How it could not be available?

These are optional environment settings, this will enforce someone to push an empty file if they need to override it instead of just deleting it.

#4 lore raw

Em qua., 30 de set. de 2020 às 18:55, Khem Raj <[email protected]> escreveu:

Quoted 18 lines
Quoted 16 lines · Otavio Salvador

Em qua., 30 de set. de 2020 às 18:31, Khem Raj <[email protected]> escreveu:

Quoted 14 lines

meta/recipes-graphics/wayland/weston-init/[email protected] ConditionPathExists=/dev/tty0 · line 32

Quoted 9 lines · Otavio Salvador
meta/recipes-graphics/wayland/weston-init/[email protected] +1 -0
index 0a1df15bdf..ce8f4fb71a 100644
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
 [Service]
 # Requires systemd-notify.so Weston plugin.
 Type=notify
+EnvironmentFile=/etc/default/weston

Lets make it not fail when not there

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

EnvironmentFile=-/etc/default/weston

We made it required as it is always installed. So I think it should be required. How it could not be available?

These are optional environment settings, this will enforce someone to push an empty file if they need to override it instead of just deleting it.

The point is weston-init[1] always install it as well as the service file.

1. https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/wayland/weston-init.bb#L27

So it does sounds wrong to allow it to not be there. The recipe explicitly adds it in every case.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
#5 lore raw
Quoted 29 lines · Otavio Salvador

Em qua., 30 de set. de 2020 às 18:55, Khem Raj <[email protected]> escreveu:

Quoted 18 lines
Quoted 16 lines · Otavio Salvador

Em qua., 30 de set. de 2020 às 18:31, Khem Raj <[email protected]> escreveu:

Quoted 14 lines

meta/recipes-graphics/wayland/weston-init/[email protected] ConditionPathExists=/dev/tty0 · line 32

Quoted 9 lines · Otavio Salvador
meta/recipes-graphics/wayland/weston-init/[email protected] +1 -0
index 0a1df15bdf..ce8f4fb71a 100644
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
 [Service]
 # Requires systemd-notify.so Weston plugin.
 Type=notify
+EnvironmentFile=/etc/default/weston

Lets make it not fail when not there

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

EnvironmentFile=-/etc/default/weston

We made it required as it is always installed. So I think it should be required. How it could not be available?

These are optional environment settings, this will enforce someone to push an empty file if they need to override it instead of just deleting it.

Quoted 6 lines

The point is weston-init[1] always install it as well as the service file.

1. https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/wayland/weston-init.bb#L27

So it does sounds wrong to allow it to not be there. The recipe explicitly adds it in every case.

Hmm so we do install empty file by default. Perhaps then it will work.

Quoted 5 lines

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750