Skip to contentSkip to conversation

psplash: Adding support for systemd service files

PATCH In review Sujith H 3 participants 4 messages Aug 8, 2014 – Oct 13, 2014

lore
Share & tools
lore

Sujith H

author
#0 lore raw

PATCH 1/1 psplash: Adding support for systemd service files

From: Sujith H <[email protected]>

If the DISTRO_FEATURES has systemd, then its better to have corresponding service files associated with the psplash. This change will help to do the same.

---
 meta/recipes-core/psplash/files/psplash-quit.service  | 11 +++++++++++
 meta/recipes-core/psplash/files/psplash-start.service | 11 +++++++++++
 meta/recipes-core/psplash/psplash_git.bb              | 12 +++++++++++-
 3 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/psplash/files/psplash-quit.service
 create mode 100644 meta/recipes-core/psplash/files/psplash-start.service
meta/recipes-core/psplash/files/psplash-quit.service new file +11 -0
new file mode 100644
index 0000000..14bd499
@@ -0,0 +1,11 @@
+[Unit]
+Description=Terminate Psplash Boot Screen
+After=psplash-start.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/psplash-write QUIT
+TimeoutSec=20
+
+[Install]
+WantedBy=multi-user.target
meta/recipes-core/psplash/files/psplash-start.service new file +11 -0
new file mode 100644
index 0000000..502b150
@@ -0,0 +1,11 @@
+[Unit]
+Description=Starts Psplash Boot screen
+Wants=systemd-vconsole-setup.service
+After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
+DefaultDependencies=no
+
+[Service]
+ExecStart=/usr/bin/psplash
+
+[Install]
+WantedBy=sysinit.target
meta/recipes-core/psplash/psplash_git.bb +11 -1
index 628ced4..16fa0ae 100644
@@ -11,6 +11,8 @@ PR = "r15"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN} \
            file://psplash-init \
+           file://psplash-start.service \
+           file://psplash-quit.service \
            ${SPLASH_IMAGES}"
 
 SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
@@ -65,11 +67,14 @@ python __anonymous() {
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig update-rc.d update-alternatives
+inherit autotools pkgconfig update-rc.d update-alternatives systemd
 
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
 
+SYSTEMD_PACKAGES = "${@base_contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE_${PN} = "${@base_contains('DISTRO_FEATURES','systemd','psplash-start.service psplash-quit.service','',d)}"
+
 python do_compile () {
     import shutil
 
@@ -103,6 +108,11 @@ do_install_append() {
 		install -m 0755 $i ${D}${bindir}/$i
 	done
 	rm -f ${D}${bindir}/psplash
+
+	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+                install -d ${D}${systemd_unitdir}/system
+                install -m 644 ${WORKDIR}/*.service ${D}/${systemd_unitdir}/system
+        fi
 }
 
 FILES_${PN} += "/mnt/.psplash"
Signature · 1 line
1.8.4
#1 lore raw
Quoted 6 lines · Sujith H

From: Sujith H <[email protected]>

If the DISTRO_FEATURES has systemd, then its better to have corresponding service files associated with the psplash. This change will help to do the same.

Can you propose a patch to the psplash upstream which is part of the Yocto Project (send the patch to [email protected]) and then we can do a psplash upgrade to include these files directly?

Thanks
Sau!

Quoted 86 lines
---
  meta/recipes-core/psplash/files/psplash-quit.service  | 11 +++++++++++
  meta/recipes-core/psplash/files/psplash-start.service | 11 +++++++++++
  meta/recipes-core/psplash/psplash_git.bb              | 12 +++++++++++-
  3 files changed, 33 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-core/psplash/files/psplash-quit.service create mode 100644 meta/recipes-core/psplash/files/psplash-start.service

meta/recipes-core/psplash/files/psplash-quit.service new file +11 -0
new file mode 100644
index 0000000..14bd499
@@ -0,0 +1,11 @@
+[Unit]
+Description=Terminate Psplash Boot Screen
+After=psplash-start.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/psplash-write QUIT
+TimeoutSec=20
+
+[Install]
+WantedBy=multi-user.target
meta/recipes-core/psplash/files/psplash-start.service new file +11 -0
new file mode 100644
index 0000000..502b150
@@ -0,0 +1,11 @@
+[Unit]
+Description=Starts Psplash Boot screen
+Wants=systemd-vconsole-setup.service
+After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
+DefaultDependencies=no
+
+[Service]
+ExecStart=/usr/bin/psplash
+
+[Install]
+WantedBy=sysinit.target
meta/recipes-core/psplash/psplash_git.bb +11 -1
index 628ced4..16fa0ae 100644
@@ -11,6 +11,8 @@ PR = "r15"
 
  SRC_URI = "git://git.yoctoproject.org/${BPN} \
             file://psplash-init \
+           file://psplash-start.service \
+           file://psplash-quit.service \
             ${SPLASH_IMAGES}"
 
  SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
@@ -65,11 +67,14 @@ python __anonymous() {
 
  S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig update-rc.d update-alternatives
+inherit autotools pkgconfig update-rc.d update-alternatives systemd
 
  ALTERNATIVE_PRIORITY = "100"
  ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
 
+SYSTEMD_PACKAGES = "${@base_contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE_${PN} = "${@base_contains('DISTRO_FEATURES','systemd','psplash-start.service psplash-quit.service','',d)}"
+
  python do_compile () {
      import shutil
 
@@ -103,6 +108,11 @@ do_install_append() {
  		install -m 0755 $i ${D}${bindir}/$i
  	done
  	rm -f ${D}${bindir}/psplash
+
+	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+                install -d ${D}${systemd_unitdir}/system
+                install -m 644 ${WORKDIR}/*.service ${D}/${systemd_unitdir}/system
+        fi
  }
 
  FILES_${PN} += "/mnt/.psplash"
author
#2 lore raw
Quoted 4 lines · Saul Wold
Quoted 2 lines · Sujith H

From: Sujith H <[email protected]>

Quoted 8 lines
Quoted 5 lines

If the DISTRO_FEATURES has systemd, then its better to have corresponding service files associated with the psplash. This change will help to do the same.

Can you propose a patch to the psplash upstream which is part of the

Yocto Project (send the patch to [email protected]) and then we can do a psplash upgrade to include these files directly?

Ok then I will submit the same patch to Yocto Project.

Thanks,
Sujith H

Quoted 102 lines

Thanks
Sau!

Quoted 96 lines
---
  meta/recipes-core/psplash/files/psplash-quit.service  | 11 +++++++++++
  meta/recipes-core/psplash/files/psplash-start.service | 11 +++++++++++
  meta/recipes-core/psplash/psplash_git.bb              | 12 +++++++++++-
  3 files changed, 33 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-core/psplash/files/psplash-quit.service create mode 100644 meta/recipes-core/psplash/
files/psplash-start.service

meta/recipes-core/psplash/files/psplash-quit.service new file +11 -0
new file mode 100644
index 0000000..14bd499
@@ -0,0 +1,11 @@
+[Unit]
+Description=Terminate Psplash Boot Screen
+After=psplash-start.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/psplash-write QUIT
+TimeoutSec=20
+
+[Install]
+WantedBy=multi-user.target
meta/recipes-core/psplash/files/psplash-start.service new file +4 -0
new file mode 100644
index 0000000..502b150
@@ -0,0 +1,11 @@
+[Unit]
+Description=Starts Psplash Boot screen
+Wants=systemd-vconsole-setup.service
+After=systemd-vconsole-setup.service systemd-udev-trigger.service

systemd-udevd.service

meta/recipes-core/psplash/files/psplash-start.service new file +7 -0
+DefaultDependencies=no
+
+[Service]
+ExecStart=/usr/bin/psplash
+
+[Install]
+WantedBy=sysinit.target
meta/recipes-core/psplash/psplash_git.bb +2 -0
index 628ced4..16fa0ae 100644
@@ -11,6 +11,8 @@ PR = "r15"
 
  SRC_URI = "git://git.yoctoproject.org/${BPN}
 <http://git.yoctoproject.org/$%7BBPN%7D> \
             file://psplash-init \
+           file://psplash-start.service \
+           file://psplash-quit.service \
             ${SPLASH_IMAGES}"
 

SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"

meta/recipes-core/psplash/psplash_git.bb +2 -1
@@ -65,11 +67,14 @@ python __anonymous() {
 
  S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig update-rc.d update-alternatives
+inherit autotools pkgconfig update-rc.d update-alternatives systemd
 
  ALTERNATIVE_PRIORITY = "100"
  ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
 
+SYSTEMD_PACKAGES = "${@base_contains('DISTRO_

FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE_${PN} = "${@base_contains('DISTRO_ FEATURES','systemd','psplash-start.service psplash-quit.service','',d)}"

meta/recipes-core/psplash/psplash_git.bb +3 -0
+
  python do_compile () {
      import shutil
@@ -103,6 +108,11 @@ do_install_append() {
                install -m 0755 $i ${D}${bindir}/$i
        done
        rm -f ${D}${bindir}/psplash
+
+       if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};

then

meta/recipes-core/psplash/psplash_git.bb +2 -0
+                install -d ${D}${systemd_unitdir}/system
+                install -m 644 ${WORKDIR}/*.service

${D}/${systemd_unitdir}/system
+ fi
}

  FILES_${PN} += "/mnt/.psplash"
Signature · 5 lines
സുജിത് ഹരിദാസന്
Bangalore
<Project>Contributor to KDE project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info
#3 lore raw

Does anybody know what's the current state of this issue?

Thanks,
Chen Qi

Quoted 151 lines · sujith h

On Fri, Aug 8, 2014 at 11:37 PM, Saul Wold <[email protected] <mailto:[email protected]>> wrote:

On 08/08/2014 02:09 AM, Sujith H wrote:

From: Sujith H <[email protected] <mailto:[email protected]>>

If the DISTRO_FEATURES has systemd, then its better to have corresponding service files associated with the psplash. This change will help to do the same.

Can you propose a patch to the psplash upstream which is part of the Yocto Project (send the patch to [email protected] <mailto:[email protected]>) and then we can do a psplash upgrade to include these files directly?

Ok then I will submit the same patch to Yocto Project.

Thanks,
Sujith H

    Thanks
            Sau!


        Signed-off-by: Muzaffar Mahmood <[email protected]
        <mailto:[email protected]>>
        Signed-off-by: Sujith H <[email protected]
        <mailto:[email protected]>>
        ---
          meta/recipes-core/psplash/files/psplash-quit.service  | 11
        +++++++++++
          meta/recipes-core/psplash/files/psplash-start.service | 11
        +++++++++++
          meta/recipes-core/psplash/psplash_git.bb
        <http://psplash_git.bb>              | 12 +++++++++++-
          3 files changed, 33 insertions(+), 1 deletion(-)
          create mode 100644
        meta/recipes-core/psplash/files/psplash-quit.service
          create mode 100644
        meta/recipes-core/psplash/files/psplash-start.service

        diff --git
        a/meta/recipes-core/psplash/files/psplash-quit.service
        b/meta/recipes-core/psplash/files/psplash-quit.service
        new file mode 100644
        index 0000000..14bd499
        --- /dev/null
        +++ b/meta/recipes-core/psplash/files/psplash-quit.service
        @@ -0,0 +1,11 @@
        +[Unit]
        +Description=Terminate Psplash Boot Screen
        +After=psplash-start.service
        +
        +[Service]
        +Type=oneshot
        +ExecStart=/usr/bin/psplash-write QUIT
        +TimeoutSec=20
        +
        +[Install]
        +WantedBy=multi-user.target
        diff --git
        a/meta/recipes-core/psplash/files/psplash-start.service
        b/meta/recipes-core/psplash/files/psplash-start.service
        new file mode 100644
        index 0000000..502b150
        --- /dev/null
        +++ b/meta/recipes-core/psplash/files/psplash-start.service
        @@ -0,0 +1,11 @@
        +[Unit]
        +Description=Starts Psplash Boot screen
        +Wants=systemd-vconsole-setup.service
        +After=systemd-vconsole-setup.service
        systemd-udev-trigger.service systemd-udevd.service
        +DefaultDependencies=no
        +
        +[Service]
        +ExecStart=/usr/bin/psplash
        +
        +[Install]
        +WantedBy=sysinit.target
        diff --git a/meta/recipes-core/psplash/psplash_git.bb
        <http://psplash_git.bb>
        b/meta/recipes-core/psplash/psplash_git.bb <http://psplash_git.bb>
        index 628ced4..16fa0ae 100644
        --- a/meta/recipes-core/psplash/psplash_git.bb
        <http://psplash_git.bb>
        +++ b/meta/recipes-core/psplash/psplash_git.bb
        <http://psplash_git.bb>
        @@ -11,6 +11,8 @@ PR = "r15"

          SRC_URI = "git://git.yoctoproject.org/${BPN}
        <http://git.yoctoproject.org/$%7BBPN%7D> \
                     file://psplash-init \
        +           file://psplash-start.service \
        +           file://psplash-quit.service \
                     ${SPLASH_IMAGES}"

          SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
        @@ -65,11 +67,14 @@ python __anonymous() {

          S = "${WORKDIR}/git"

        -inherit autotools pkgconfig update-rc.d update-alternatives
        +inherit autotools pkgconfig update-rc.d update-alternatives
        systemd

          ALTERNATIVE_PRIORITY = "100"
          ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"

        +SYSTEMD_PACKAGES =
        "${@base_contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
        +SYSTEMD_SERVICE_${PN} =
        "${@base_contains('DISTRO_FEATURES','systemd','psplash-start.service
        psplash-quit.service','',d)}"
        +
          python do_compile () {
              import shutil

        @@ -103,6 +108,11 @@ do_install_append() {
                        install -m 0755 $i ${D}${bindir}/$i
                done
                rm -f ${D}${bindir}/psplash
        +
        +       if
        ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
        then
        +                install -d ${D}${systemd_unitdir}/system
        +                install -m 644 ${WORKDIR}/*.service
        ${D}/${systemd_unitdir}/system
        +        fi
          }

          FILES_${PN} += "/mnt/.psplash"
Signature · 5 lines
സുജിത് ഹരിദാസന്
Bangalore
<Project>Contributor to KDE project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info