Skip to contentSkip to conversation

package/psplash: fix systemd unit ordering and dependencies

PATCH In review Norbert Lange 3 participants 3 messages Jan 16, 2024 – May 2, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/psplash: fix systemd unit ordering and dependencies

Fix a typo in the dependencies, and switch the type to 'exec'. This ensures that the psplash-systemd service will find the FIFO created by psplash.

Change the psplash-systemd dependency to BindsTo, so stopping psplash itself will also end this service and free resources.

psplash-start service need to start early, otherwise it might try to compete/take away the framebuffer from the final graphical stack. Order it before sysinit.target.

---
 package/psplash/psplash-start.service   | 2 ++
 package/psplash/psplash-systemd.service | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
package/psplash/psplash-start.service +2 -0
index b97e883e54..74cbc33955 100644
@@ -2,8 +2,10 @@
 Description=Starts Psplash Boot screen
 DefaultDependencies=no
 RequiresMountsFor=/run
+Before=sysinit.target
 
 [Service]
+Type=exec
 ExecStart=/usr/bin/psplash -n
 
 [Install]
package/psplash/psplash-systemd.service +2 -2
index 249aa54039..f89bc5f4fe 100644
@@ -1,8 +1,8 @@
 [Unit]
 Description=Start psplash-systemd progress communication helper
 DefaultDependencies=no
-After=systemd-start.service
-Requires=psplash-start.service
+After=psplash-start.service
+BindsTo=psplash-start.service
 RequiresMountsFor=/run
 
 [Service]
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 3 lines · Norbert Lange

Fix a typo in the dependencies, and switch the type to 'exec'. This ensures that the psplash-systemd service will find the FIFO created by psplash.

It doesn't actually ensure that: systemd considers the unit ready as soon as
it has done execve, but the pipe will only be created later.

The solution is to make the psplash-systemd service wait until the pipe
actually exists, but I'm not sure how to do that.

Anyway, this is already an improvement, so applied to master, thanks.

Regards,
Arnout

Quoted 34 lines

Change the psplash-systemd dependency to BindsTo, so stopping psplash itself will also end this service and free resources.

psplash-start service need to start early, otherwise it might try to compete/take away the framebuffer from the final graphical stack. Order it before sysinit.target.

---
  package/psplash/psplash-start.service   | 2 ++
  package/psplash/psplash-systemd.service | 4 ++--
  2 files changed, 4 insertions(+), 2 deletions(-)
package/psplash/psplash-start.service +2 -0
index b97e883e54..74cbc33955 100644
@@ -2,8 +2,10 @@
  Description=Starts Psplash Boot screen
  DefaultDependencies=no
  RequiresMountsFor=/run
+Before=sysinit.target
 
  [Service]
+Type=exec
  ExecStart=/usr/bin/psplash -n
 
  [Install]
package/psplash/psplash-systemd.service +0 -0
index 249aa54039..f89bc5f4fe 100644

package/psplash/psplash-systemd.service line 8

Quoted 10 lines
package/psplash/psplash-systemd.service +2 -2
@@ -1,8 +1,8 @@
  [Unit]
  Description=Start psplash-systemd progress communication helper
  DefaultDependencies=no
-After=systemd-start.service
-Requires=psplash-start.service
+After=psplash-start.service
+BindsTo=psplash-start.service
  RequiresMountsFor=/run
 
  [Service]

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle via buildroot <[email protected]> writes:

Quoted 3 lines · Norbert Lange

Fix a typo in the dependencies, and switch the type to 'exec'. This ensures that the psplash-systemd service will find the FIFO created by psplash.

Quoted 7 lines

It doesn't actually ensure that: systemd considers the unit ready as soon as it has done execve, but the pipe will only be created later.

The solution is to make the psplash-systemd service wait until the pipe actually exists, but I'm not sure how to do that.

Anyway, this is already an improvement, so applied to master, thanks.

Committed to 2024.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot