diff mbox series

[v4] ydotool: Add new package

Message ID 20240307200746.26808-1-andre.paiusco@gmail.com
State Accepted
Headers show
Series [v4] ydotool: Add new package | expand

Commit Message

Andre Paiusco March 7, 2024, 8:07 p.m. UTC
CC: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Andre Paiusco <andre.paiusco@gmail.com>
---
 .../packagegroups/packagegroup-meta-oe.bb     |  1 +
 .../recipes-graphics/ydotool/ydotool_git.bb   | 20 +++++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/ydotool/ydotool_git.bb

Comments

Ross Burton March 7, 2024, 10:40 p.m. UTC | #1
On 7 Mar 2024, at 20:07, André Paiusco via lists.openembedded.org <andre.paiusco=gmail.com@lists.openembedded.org> wrote:
> +DEPENDS = "systemd"

I can’t see where the in source this is a hard requirement?  It ships a systemd service file, but it can also ship an openrc service file.

Ross
Khem Raj March 8, 2024, 1:31 a.m. UTC | #2
On Thu, Mar 7, 2024 at 12:07 PM Andre Paiusco <andre.paiusco@gmail.com> wrote:
>
> CC: Khem Raj <raj.khem@gmail.com>
> Signed-off-by: Andre Paiusco <andre.paiusco@gmail.com>
> ---
>  .../packagegroups/packagegroup-meta-oe.bb     |  1 +
>  .../recipes-graphics/ydotool/ydotool_git.bb   | 20 +++++++++++++++++++
>  2 files changed, 21 insertions(+)
>  create mode 100644 meta-oe/recipes-graphics/ydotool/ydotool_git.bb
>
> diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
> index 6e2012dae..16d919cb6 100644
> --- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
> +++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
> @@ -611,6 +611,7 @@ RDEPENDS:packagegroup-meta-oe-graphics ="\
>      xcursorgen \
>      ${@bb.utils.contains("DISTRO_FEATURES", "x11 pam", "xscreensaver", "", d)} \
>      yad \
> +    ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "ydotool", "", d)} \
>      parallel-deqp-runner \
>      ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl-es-cts", "", d)} \
>      ${@bb.utils.contains("DISTRO_FEATURES", "opengl vulkan", "vulkan-cts", "", d)} \
> diff --git a/meta-oe/recipes-graphics/ydotool/ydotool_git.bb b/meta-oe/recipes-graphics/ydotool/ydotool_git.bb
> new file mode 100644
> index 000000000..2525ea70b
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/ydotool/ydotool_git.bb
> @@ -0,0 +1,20 @@
> +SUMMARY = "Generic Linux command-line automation tool (no X!)"
> +DESCRIPTION = "ydotool is not limited to Wayland. You can use it on anything as long as it accepts keyboard/mouse/whatever input."
> +LICENSE = "AGPL-3.0-or-later"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=eb1e647870add0502f8f010b19de32af"
> +
> +DEPENDS = "systemd"
> +PV = "1.0.4+git"
> +
> +SRC_URI = "git://github.com/ReimuNotMoe/ydotool;protocol=https;branch=master"
> +SRCREV = "c07ae72be46c40912023b91b8ba737630d8720e1"
> +
> +inherit cmake systemd pkgconfig features_check
> +
> +REQUIRED_DISTRO_FEATURES = "systemd"
> +
> +EXTRA_OECMAKE = "\
> +    -DBUILD_DOCS=OFF \
> +"
> +
> +SYSTEMD_SERVICE:${PN} = "ydotoold.service

this is an unterminated string, bitbake would have told you during
parsing. Please test the bits before sending for review.
It saves time.

> \ No newline at end of file
> --
> 2.44.0
>
Andre Paiusco March 8, 2024, 6:35 a.m. UTC | #3
Hello,

Two things:

First, I had a patch that I forgot to add to this, where I make the ydotoold.service be installed as a system service instead of a user service, otherwise the rootfs recipe fails as it can't enable it. I'd like suggestions to what you feel better. Sorry for missing that. If there's a more generic option for systemd user services, let me know.  
One option is: have a patch that whenever we have systemd as a dependency, we install it as system service and not user service.  
Another option is: disable the service by default, with that I can disable the hard dependency as mentioned above (seems to work just fine)

> this is an unterminated string, bitbake would have told you during
> parsing. Please test the bits before sending for review.
> It saves time.

I have no idea how this went through as last time I was only changing the packagegroup, sorry.
diff mbox series

Patch

diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index 6e2012dae..16d919cb6 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -611,6 +611,7 @@  RDEPENDS:packagegroup-meta-oe-graphics ="\
     xcursorgen \
     ${@bb.utils.contains("DISTRO_FEATURES", "x11 pam", "xscreensaver", "", d)} \
     yad \
+    ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "ydotool", "", d)} \
     parallel-deqp-runner \
     ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl-es-cts", "", d)} \
     ${@bb.utils.contains("DISTRO_FEATURES", "opengl vulkan", "vulkan-cts", "", d)} \
diff --git a/meta-oe/recipes-graphics/ydotool/ydotool_git.bb b/meta-oe/recipes-graphics/ydotool/ydotool_git.bb
new file mode 100644
index 000000000..2525ea70b
--- /dev/null
+++ b/meta-oe/recipes-graphics/ydotool/ydotool_git.bb
@@ -0,0 +1,20 @@ 
+SUMMARY = "Generic Linux command-line automation tool (no X!)"
+DESCRIPTION = "ydotool is not limited to Wayland. You can use it on anything as long as it accepts keyboard/mouse/whatever input."
+LICENSE = "AGPL-3.0-or-later"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb1e647870add0502f8f010b19de32af"
+
+DEPENDS = "systemd"
+PV = "1.0.4+git"
+
+SRC_URI = "git://github.com/ReimuNotMoe/ydotool;protocol=https;branch=master"
+SRCREV = "c07ae72be46c40912023b91b8ba737630d8720e1"
+
+inherit cmake systemd pkgconfig features_check
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+EXTRA_OECMAKE = "\
+    -DBUILD_DOCS=OFF \
+"
+
+SYSTEMD_SERVICE:${PN} = "ydotoold.service
\ No newline at end of file