Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-core][PATCH v2] rng-tools: splitting the rng-tools systemd/sysvinit serivce as a package
@ 2023-03-21  2:30 Xiangyu Chen
  2023-03-21 22:27 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Xiangyu Chen @ 2023-03-21  2:30 UTC (permalink / raw)
  To: alex.kanavin; +Cc: openembedded-core

From: Xiangyu Chen <xiangyu.chen@windriver.com>

Since we removed the openssh dependency[1] on rng-tools, there are no package requiring
rng-tools in oe-core, meta-oe, meta-virt, and the /dev/random won't block anymore after
linux-5.6[2], one of the reasons for keeping rng-tools build into the image is that it
can be used to test[3], so splitting the rng-tools systemd/systvinit service as a package.
If someone needs rng-tools daemon service, they can enable the rng-tools-service package by 
directly.

Reference:
[1] https://git.openembedded.org/openembedded-core/commit/?id=868dfb46d96a27ec9041cb902fb769330277257d
[2] https://github.com/torvalds/linux/commit/30c08efec8884fb106b8e57094baa51bb4c44e32
[3] https://linux.die.net/man/1/rngtest

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
---
V1 -> V2 changes:
according to the review comments, using FILES/PACKAGES to split the service package instead of adding 
a custom variable to disable the rngd daemon.
---

 meta/recipes-support/rng-tools/rng-tools_6.16.bb | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/rng-tools/rng-tools_6.16.bb b/meta/recipes-support/rng-tools/rng-tools_6.16.bb
index 4e664a9145..7324e42e08 100644
--- a/meta/recipes-support/rng-tools/rng-tools_6.16.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_6.16.bb
@@ -31,13 +31,20 @@ PACKAGECONFIG[libp11] = "--with-pkcs11,--without-pkcs11,libp11 openssl"
 PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2"
 PACKAGECONFIG[qrypt] = "--with-qrypt,--without-qrypt,curl"
 
-INITSCRIPT_NAME = "rng-tools"
-INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ."
+INITSCRIPT_NAME:${PN}-service = "rng-tools"
+INITSCRIPT_PARAMS:${PN}-service = "start 03 2 3 4 5 . stop 30 0 6 1 ."
 
-SYSTEMD_SERVICE:${PN} = "rng-tools.service"
+SYSTEMD_SERVICE:${PN}-service = "rng-tools.service"
 
 CFLAGS += " -DJENT_CONF_ENABLE_INTERNAL_TIMER "
 
+PACKAGES =+ "${PN}-service"
+
+FILES:${PN}-service += " \
+    ${sysconfdir}/init.d/rng-tools \
+    ${sysconfdir}/default/rng-tools \
+"
+
 # Refer autogen.sh in rng-tools
 do_configure:prepend() {
     cp ${S}/README.md ${S}/README
-- 
2.34.1



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

end of thread, other threads:[~2023-03-21 22:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-21  2:30 [OE-core][PATCH v2] rng-tools: splitting the rng-tools systemd/sysvinit serivce as a package Xiangyu Chen
2023-03-21 22:27 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox