] recipes-support: rng-tools change systemd service name
PATCH v2 1/1 ] recipes-support: rng-tools change systemd service name
From: Aníbal Limón <[email protected]>
Change systemd service name from rngd -> rng-tools to avoid load twice the service when sysvinit compatibility is enabled,
...
root@:~# ps | grep rng 23 root 0 SW [hwrng] 13109 root 3528 R /usr/sbin/rngd -f -r /dev/hwrng 13117 root 2348 S grep rng 29418 root 12756 S /usr/sbin/rngd -r /dev/hwrng ...
---
.../rng-tools/{rngd.service => rng-tools.service} | 0
meta/recipes-support/rng-tools/rng-tools_6.15.bb | 12 ++++++------
2 files changed, 6 insertions(+), 6 deletions(-)
rename meta/recipes-support/rng-tools/rng-tools/{rngd.service => rng-tools.service} (100%)meta/recipes-support/rng-tools/rng-tools/rng-tools.service renamed from meta/recipes-support/rng-tools/rng-tools/rngd.service +0 -0
meta/recipes-support/rng-tools/rng-tools_6.15.bb +6 -6
@@ -11,7 +11,7 @@ DEPENDS = "sysfsutils openssl" SRC_URI = "git://github.com/nhorman/rng-tools.git;branch=master;protocol=https \ file://init \ file://default \ - file://rngd.service \ + file://rng-tools.service \ " SRCREV = "381f69828b782afda574f259c1b7549f48f9bb77"
@@ -32,7 +32,7 @@ PACKAGECONFIG[nistbeacon] = "--with-nistbeacon,--without-nistbeacon,curl libxml2 INITSCRIPT_NAME = "rng-tools" INITSCRIPT_PARAMS = "start 03 2 3 4 5 . stop 30 0 6 1 ." -SYSTEMD_SERVICE:${PN} = "rngd.service" +SYSTEMD_SERVICE:${PN} = "rng-tools.service" CFLAGS += " -DJENT_CONF_ENABLE_INTERNAL_TIMER "
@@ -44,18 +44,18 @@ do_configure:prepend() { do_install:append() { install -Dm 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools install -Dm 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools - install -Dm 0644 ${WORKDIR}/rngd.service \ - ${D}${systemd_system_unitdir}/rngd.service + install -Dm 0644 ${WORKDIR}/rng-tools.service \ + ${D}${systemd_system_unitdir}/rng-tools.service sed -i \ -e 's,@SYSCONFDIR@,${sysconfdir},g' \ -e 's,@SBINDIR@,${sbindir},g' \ ${D}${sysconfdir}/init.d/rng-tools \ - ${D}${systemd_system_unitdir}/rngd.service + ${D}${systemd_system_unitdir}/rng-tools.service if [ "${@bb.utils.contains('PACKAGECONFIG', 'nistbeacon', 'yes', 'no', d)}" = "yes" ]; then sed -i \ -e '/^IPAddressDeny=any/d' \ -e '/^RestrictAddressFamilies=/ s/$/ AF_INET AF_INET6/' \ - ${D}${systemd_system_unitdir}/rngd.service + ${D}${systemd_system_unitdir}/rng-tools.service fi }
Signature · 1 line
2.36.1
Hello Aníbal,
Quoted 29 lines · On Tue, 26 Jul 2022 14:33:22 -0500 "An?bal Lim?n" <[email protected]>…
From: Aníbal Limón <[email protected]>
Change systemd service name from rngd -> rng-tools to avoid load twice the service when sysvinit compatibility is enabled,
...
root@:~# ps | grep rng 23 root 0 SW [hwrng] 13109 root 3528 R /usr/sbin/rngd -f -r /dev/hwrng 13117 root 2348 S grep rng 29418 root 12756 S /usr/sbin/rngd -r /dev/hwrng ...Signed-off-by Aníbal Limón <[email protected]>--- .../rng-tools/{rngd.service => rng-tools.service} | 0 meta/recipes-support/rng-tools/rng-tools_6.15.bb | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) rename meta/recipes-support/rng-tools/rng-tools/{rngd.service => rng-tools.service} (100%)meta/recipes-support/rng-tools/rng-tools/rng-tools.service renamed from meta/recipes-support/rng-tools/rng-tools/rngd.service +0
-0meta/recipes-support/rng-tools/rng-tools_6.15.bb +0
-0
meta/recipes-support/rng-tools/rng-tools_6.15.bb DEPENDS = "sysfsutils openssl" · line 14
Quoted 5 lines
meta/recipes-support/rng-tools/rng-tools_6.15.bb +1
-1@@ -11,7 +11,7 @@ DEPENDS = "sysfsutils openssl" SRC_URI = "git://github.com/nhorman/rng-tools.git;branch=master;protocol=https \ file://init \ file://default \ - file://rngd.service \ + file://rng-tools.service \
This feels strange to me: "rng-tools" does not look like a daemon name, but rather a, well, tools name. Maybe "rng-daemon" would clarify?
Still I'm taking this patch for testing, I'll replace it with v2 should you send one.
However please note there is an extra ']' in the subject: [PATCHv2]] should be [PATCHv2]. This leads 'git am' to produce a commit starting with a "] " prefix. I fixed it while applying, however you should check that in the future.
Best regards.
Signature · 3 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 39 lines · Luca Ceresoli
Hello Aníbal,
Quoted 13 lines · On Tue, 26 Jul 2022 14:33:22 -0500 "An?bal Lim?n" <[email protected]>…
From: Aníbal Limón <[email protected]>
Change systemd service name from rngd -> rng-tools to avoid load twice the service when sysvinit compatibility is enabled,
...
root@:~# ps | grep rng 23 root 0 SW [hwrng] 13109 root 3528 R /usr/sbin/rngd -f -r /dev/hwrng 13117 root 2348 S grep rng 29418 root 12756 S /usr/sbin/rngd -r /dev/hwrng ...Quoted 6 lines
Signed-off-by Aníbal Limón <[email protected]>--- .../rng-tools/{rngd.service => rng-tools.service} | 0 meta/recipes-support/rng-tools/rng-tools_6.15.bb | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) rename meta/recipes-support/rng-tools/rng-tools/{rngd.service =>rng-tools.service} (100%)
Review
Quoted 2 lines
(quoted diff) +0
-0b/meta/recipes-support/rng-tools/rng-tools/rng-tools.service
Review
Quoted 4 lines
similarity index 100%
rename from meta/recipes-support/rng-tools/rng-tools/rngd.service rename to meta/recipes-support/rng-tools/rng-tools/rng-tools.service(quoted diff) +0
-0b/meta/recipes-support/rng-tools/rng-tools_6.15.bb
meta/recipes-support/rng-tools/rng-tools_6.15.bb DEPENDS = "sysfsutils openssl" · line 11
Quoted 5 lines
index 0696351903..efc08b5e0a 100644
meta/recipes-support/rng-tools/rng-tools_6.15.bb +0
-0@@ -11,7 +11,7 @@ DEPENDS = "sysfsutils openssl" SRC_URI = "git://github.com/nhorman/rng-tools.git;branch=master;protocol=https \
Quoted 8 lines
meta/recipes-support/rng-tools/rng-tools_6.15.bb DEPENDS = "sysfsutils openssl" · line 14
Quoted 4 lines
meta/recipes-support/rng-tools/rng-tools_6.15.bb +1
-1file://init \ file://default \ - file://rngd.service \ + file://rng-tools.service \This feels strange to me: "rng-tools" does not look like a daemon name, but rather a, well, tools name. Maybe "rng-daemon" would clarify?
Another option is to change the init daemon to be called rngd.
Regards,
Anibal
Quoted 15 lines
Still I'm taking this patch for testing, I'll replace it with v2 should you send one.
However please note there is an extra ']' in the subject: [PATCHv2]] should be [PATCHv2]. This leads 'git am' to produce a commit starting with a "] " prefix. I fixed it while applying, however you should check that in the future.
Best regards.
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Quoted 63 lines · An?bal Lim?n
On Wed, Jul 27, 2022 at 5:44 AM Luca Ceresoli <[email protected] <mailto:[email protected]>> wrote:
Hello Aníbal, On Tue, 26 Jul 2022 14:33:22 -0500 "An?bal Lim?n" <[email protected] <mailto:[email protected]>> wrote: > From: Aníbal Limón <[email protected] <mailto:[email protected]>> > > Change systemd service name from rngd -> rng-tools to avoid load twice > the service when sysvinit compatibility is enabled, > > ... > root@:~# ps | grep rng > 23 root 0 SW [hwrng] > 13109 root 3528 R /usr/sbin/rngd -f -r /dev/hwrng > 13117 root 2348 S grep rng > 29418 root 12756 S /usr/sbin/rngd -r /dev/hwrng > ... > > Signed-off-by: Aníbal Limón <[email protected] <mailto:[email protected]>> > --- > .../rng-tools/{rngd.service => rng-tools.service} | 0 > meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> | 12 ++++++------ > 2 files changed, 6 insertions(+), 6 deletions(-) > rename meta/recipes-support/rng-tools/rng-tools/{rngd.service => rng-tools.service} (100%) > > diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service b/meta/recipes-support/rng-tools/rng-tools/rng-tools.service > similarity index 100% > rename from meta/recipes-support/rng-tools/rng-tools/rngd.service > rename to meta/recipes-support/rng-tools/rng-tools/rng-tools.service > diff --git a/meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> b/meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> > index 0696351903..efc08b5e0a 100644 > --- a/meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> > +++ b/meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> > @@ -11,7 +11,7 @@ DEPENDS = "sysfsutils openssl" > SRC_URI = "git://github.com/nhorman/rng-tools.git;branch=master;protocol=https <http://github.com/nhorman/rng-tools.git;branch=master;protocol=https> \ > file://init \ > file://default \ > - file://rngd.service \ > + file://rng-tools.service \ This feels strange to me: "rng-tools" does not look like a daemon name, but rather a, well, tools name. Maybe "rng-daemon" would clarify?
Quoted 1 line
Another option is to change the init daemon to be called rngd.
I think yet another way is to check for condition when sysvinit compatibility is enabled during install time and decide if we need to install both sysvinit script and systemd service or not. I do not think renaming .service file is a good solution here.
Quoted 23 lines
Regards,
AnibalStill I'm taking this patch for testing, I'll replace it with v2 should you send one.
However please note there is an extra ']' in the subject: [PATCHv2]] should be [PATCHv2]. This leads 'git am' to produce a commit starting with a "] " prefix. I fixed it while applying, however you should check that in the future.
Best regards.
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com <https://bootlin.com>
Quoted 70 lines · Khem Raj
Quoted 34 lines · An?bal Lim?n
On Wed, Jul 27, 2022 at 5:44 AM Luca Ceresoli <[email protected] <mailto:[email protected]>> wrote:
Hello Aníbal, On Tue, 26 Jul 2022 14:33:22 -0500 "An?bal Lim?n" <[email protected] <mailto:[email protected]>> wrote: > From: Aníbal Limón <[email protected] <mailto:[email protected]>> > > Change systemd service name from rngd -> rng-tools to avoid load twice > the service when sysvinit compatibility is enabled, > > ... > root@:~# ps | grep rng > 23 root 0 SW [hwrng] > 13109 root 3528 R /usr/sbin/rngd -f -r /dev/hwrng > 13117 root 2348 S grep rng > 29418 root 12756 S /usr/sbin/rngd -r /dev/hwrng > ... > > Signed-off-by: Aníbal Limón <[email protected] <mailto:[email protected]>> > --- > .../rng-tools/{rngd.service => rng-tools.service} | 0 > meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> | 12 ++++++------ > 2 files changed, 6 insertions(+), 6 deletions(-) > rename meta/recipes-support/rng-tools/rng-tools/{rngd.service =>Quoted 8 lines
rng-tools.service} (100%) > > diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service b/meta/recipes-support/rng-tools/rng-tools/rng-tools.service > similarity index 100% > rename from meta/recipes-support/rng-tools/rng-tools/rngd.service > rename tometa/recipes-support/rng-tools/rng-tools/rng-tools.service
Quoted 5 lines
> diff --git a/meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> b/meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> > index 0696351903..efc08b5e0a 100644Quoted 8 lines
> --- a/meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> > +++ b/meta/recipes-support/rng-tools/rng-tools_6.15.bb <http://rng-tools_6.15.bb> > @@ -11,7 +11,7 @@ DEPENDS = "sysfsutils openssl" > SRC_URI = "git://github.com/nhorman/rng-tools.git;branch=master;protocol=https <http://github.com/nhorman/rng-tools.git;branch=master;protocol=https> \
Quoted 6 lines
> file://init \ > file://default \ > - file://rngd.service \ > + file://rng-tools.service \This feels strange to me: "rng-tools" does not look like a daemon
name,
Quoted 3 lines
but rather a, well, tools name. Maybe "rng-daemon" would clarify?
Quoted 7 lines
Quoted 1 line
Another option is to change the init daemon to be called rngd.
I think yet another way is to check for condition when sysvinit compatibility is enabled during install time and decide if we need to install both sysvinit script and systemd service or not. I do not think renaming .service file is a good solution here.
I have that solution on the first version of this patch,
Regards,
Anibal
Quoted 35 lines
Quoted 7 lines
Regards,
AnibalStill I'm taking this patch for testing, I'll replace it with v2
should
Quoted 5 lines
you send one.
However please note there is an extra ']' in the subject: [PATCHv2]] should be [PATCHv2]. This leads 'git am' to produce a commit starting with a "] " prefix. I fixed it while applying, however you should
check
Quoted 10 lines
that in the future.
Best regards.
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com <https://bootlin.com>Quoted 3 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#168566):https://lists.openembedded.org/g/openembedded-core/message/168566
Quoted 3 lines
Mute This Topic: https://lists.openembedded.org/mt/92635255/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [Quoted 2 lines
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 93 lines · Anibal Limón
Quoted 79 lines · Khem Raj
Quoted 76 lines · An?bal Lim?n
On Wed, Jul 27, 2022 at 5:44 AM Luca Ceresoli
<[email protected]
<mailto:[email protected]>> wrote:Hello Aníbal,
On Tue, 26 Jul 2022 14:33:22 -0500
"An?bal Lim?n" <[email protected]
<mailto:[email protected]>> wrote:> From: Aníbal Limón <[email protected] <mailto:[email protected]>>
>
> Change systemd service name from rngd -> rng-tools to avoid load
twice
> the service when sysvinit compatibility is enabled, >
> ...
> root@:~# ps | grep rng
> 23 root 0 SW [hwrng]
> 13109 root 3528 R/usr/sbin/rngd-f -r/dev/hwrng> 13117 root 2348 S grep rng
> 29418 root 12756 S/usr/sbin/rngd-r/dev/hwrng> ...
>
> Signed-off-by: Aníbal Limón <[email protected] <mailto:[email protected]>>
> ---
> .../rng-tools/{rngd.service => rng-tools.service} | 0
> meta/recipes-support/rng-tools/rng-tools_6.15.bb
<http://rng-tools_6.15.bb> | 12 ++++++------
> 2 files changed, 6 insertions(+), 6 deletions(-) > rename meta/recipes-support/rng-tools/rng-tools/{rngd.service=>
rng-tools.service} (100%)
>
> diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service b/meta/recipes-support/rng-tools/rng-tools/rng-tools.service > similarity index 100%
> rename from meta/recipes-support/rng-tools/rng-tools/rngd.service
> rename to meta/recipes-support/rng-tools/rng-tools/rng- tools.service
> diff --git a/meta/recipes-support/rng-tools/rng- tools_6.15.bb
<http://rng-tools_6.15.bb>
b/meta/recipes-support/rng-tools/rng-tools_6.15.bb
<http://rng-tools_6.15.bb>
> index 0696351903..efc08b5e0a 100644
> --- a/meta/recipes-support/rng-tools/rng-tools_6.15.bb
<http://rng-tools_6.15.bb>
> +++ b/meta/recipes-support/rng-tools/rng-tools_6.15.bb
<http://rng-tools_6.15.bb>
> @@ -11,7 +11,7 @@ DEPENDS = "sysfsutils openssl" >SRC_URI=
"git://github.com/nhorman/rng- tools.git;branch=master;protocol=https
<http://github.com/nhorman/rng-tools.git;branch=master;protocol=
https> \
> file://init \
> file://default \
> - file://rngd.service \
> + file://rng-tools.service \This feels strange to me: "rng-tools" does not look like a daemon name,
but rather a, well, tools name. Maybe "rng-daemon" would clarify?Quoted 9 lines
Quoted 1 line
Another option is to change the init daemon to be called rngd.
I think yet another way is to check for condition when sysvinit compatibility is enabled during install time and decide if we need to
install both sysvinit script and systemd service or not. I do not think
renaming .service file is a good solution here.
Quoted 3 lines
I have that solution on the first version of this patch,
I took the v2 as I think it is the less invasive solution.
Cheers,
Richard