aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/rng-tools
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2019-07-02 04:32:40 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-03 09:09:50 +0100
commitedf760682270de36850407c860bea5aea29e30bc (patch)
tree0adc90832ac6692ccc39646fb20a13f252b54ec3 /meta/recipes-support/rng-tools
parent1654e8a6ec53799ce55302dfc075d4b1bd5a6cc0 (diff)
downloadopenembedded-core-contrib-edf760682270de36850407c860bea5aea29e30bc.tar.gz
openembedded-core-contrib-edf760682270de36850407c860bea5aea29e30bc.tar.bz2
openembedded-core-contrib-edf760682270de36850407c860bea5aea29e30bc.zip
rng-tools: fix rngd blocks system shutdown
fix-rngd-fail-to-stop.patch is added to fix rngd blocks system shutdown issue. But it causes rngd doesn't release CPU and causes 100% CPU usage, so drop it. The block shutdown issue is caused by comit [7cb64b9fe1 rng-tools: start earlier in the boot process] which updated rngd.service. Revert the modification of rngd.service. Update sed expressions in do_install as well which fails to replace second match in one line. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/rng-tools')
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch25
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/rngd.service3
-rw-r--r--meta/recipes-support/rng-tools/rng-tools_6.7.bb5
3 files changed, 2 insertions, 31 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch b/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch
deleted file mode 100644
index 58cf3f9d59..0000000000
--- a/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-It fails to stop rngd. It just shows warnings when stop rngd such as by:
-
-$ systemctl stop rngd.service
-
-but stalls shutdown untill daemon rngd is killed.
-
-Backport patch to fix the issue.
-
-Upstream-Status: Backport [https://bugzilla.redhat.com/show_bug.cgi?id=1690364#c8]
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff --git a/rngd_jitter.c b/rngd_jitter.c
-index 54070ae..7a69bf9 100644
---- a/rngd_jitter.c
-+++ b/rngd_jitter.c
-@@ -280,7 +280,7 @@ static void *thread_entropy_task(void *data)
-
- /* Write to pipe */
- written = 0;
-- while(written != me->buf_sz) {
-+ while(me->active && written != me->buf_sz) {
- message(LOG_DAEMON|LOG_DEBUG, "Writing to pipe\n");
- ret = write(me->pipe_fd, &tmpbuf[written], me->buf_sz - written);
- message(LOG_DAEMON|LOG_DEBUG, "DONE Writing to pipe with return %ld\n", ret);
diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service b/meta/recipes-support/rng-tools/rng-tools/rngd.service
index b1a78527be..49d5de294f 100644
--- a/meta/recipes-support/rng-tools/rng-tools/rngd.service
+++ b/meta/recipes-support/rng-tools/rng-tools/rngd.service
@@ -1,8 +1,5 @@
[Unit]
Description=Hardware RNG Entropy Gatherer Daemon
-DefaultDependencies=no
-After=systemd-udev-settle.service
-Before=sysinit.target
[Service]
EnvironmentFile=-@SYSCONFDIR@/default/rng-tools
diff --git a/meta/recipes-support/rng-tools/rng-tools_6.7.bb b/meta/recipes-support/rng-tools/rng-tools_6.7.bb
index aeb558b2b7..b4e453f67f 100644
--- a/meta/recipes-support/rng-tools/rng-tools_6.7.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_6.7.bb
@@ -10,7 +10,6 @@ DEPENDS = "sysfsutils"
SRC_URI = "\
git://github.com/nhorman/rng-tools.git \
- file://fix-rngd-fail-to-stop.patch \
file://init \
file://default \
file://rngd.service \
@@ -46,8 +45,8 @@ do_install_append() {
install -Dm 0644 ${WORKDIR}/rngd.service \
${D}${systemd_system_unitdir}/rngd.service
sed -i \
- -e 's,@SYSCONFDIR@,${sysconfdir},' \
- -e 's,@SBINDIR@,${sbindir},' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
${D}${sysconfdir}/init.d/rng-tools \
${D}${systemd_system_unitdir}/rngd.service
}