Skip to contentSkip to conversation

rng-tools: Revert "rng-tools: move to meta-oe"

PATCH New [email protected] 1 participant 1 message Jan 18, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rng-tools: Revert "rng-tools: move to meta-oe"

From: Randy MacLeod <[email protected]>

This reverts commit d2b445384da3f3e6dab8577b6c56648b5244a788.

Revert this commit since:

- some systems using oe-core master may still be using kernels from before 5.6 pulled in the rng-tools algorithm, and

- some hardware platforms may not have a hardware random number generator and could therefore need to run rngd to avoid long boot-time initialization due to a depleted entropy pool.

---
 meta/conf/distro/include/maintainers.inc      |  1 +
 .../rng-tools/rng-tools/default               |  1 +
 meta/recipes-support/rng-tools/rng-tools/init | 42 +++++++++++
 .../rng-tools/rng-tools/rng-tools.service     | 32 +++++++++
 .../rng-tools/rng-tools_6.16.bb               | 69 +++++++++++++++++++
 5 files changed, 145 insertions(+)
 create mode 100644 meta/recipes-support/rng-tools/rng-tools/default
 create mode 100644 meta/recipes-support/rng-tools/rng-tools/init
 create mode 100644 meta/recipes-support/rng-tools/rng-tools/rng-tools.service
 create mode 100644 meta/recipes-support/rng-tools/rng-tools_6.16.bb
meta/conf/distro/include/maintainers.inc +1 -0
index 31023021ac..8dc63b138e 100644
@@ -739,6 +739,7 @@ RECIPE_MAINTAINER:pn-repo = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-resolvconf = "Chen Qi <[email protected]>"
 RECIPE_MAINTAINER:pn-rgb = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-rpcbind = "Hongxu Jia <[email protected]>"
+RECIPE_MAINTAINER:pn-rng-tools = "Anuj Mittal <[email protected]>"
 RECIPE_MAINTAINER:pn-rpcsvc-proto = "Khem Raj <[email protected]>"
 RECIPE_MAINTAINER:pn-rpm = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-rsync = "Yi Zhao <[email protected]>"
meta/recipes-support/rng-tools/rng-tools/default new file +1 -0
new file mode 100644
index 0000000000..b9f8e03635
@@ -0,0 +1 @@
+EXTRA_ARGS="-r /dev/hwrng"
meta/recipes-support/rng-tools/rng-tools/init new file +42 -0

42 lines not on this page · raw message

meta/recipes-support/rng-tools/rng-tools/rng-tools.service new file +32 -0
new file mode 100644
index 0000000000..5ae2fba215
@@ -0,0 +1,32 @@
+[Unit]
+Description=Hardware RNG Entropy Gatherer Daemon
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=sysinit.target shutdown.target
+ConditionVirtualization=!container
+
+[Service]
+EnvironmentFile=-@SYSCONFDIR@/default/rng-tools
+ExecStart=@SBINDIR@/rngd -f $EXTRA_ARGS
+CapabilityBoundingSet=CAP_SYS_ADMIN
+IPAddressDeny=any
+LockPersonality=yes
+MemoryDenyWriteExecute=yes
+NoNewPrivileges=yes
+PrivateTmp=yes
+ProtectControlGroups=yes
+ProtectHome=yes
+ProtectHostname=yes
+ProtectKernelModules=yes
+ProtectKernelLogs=yes
+ProtectSystem=strict
+RestrictAddressFamilies=AF_UNIX
+RestrictNamespaces=yes
+RestrictRealtime=yes
+RestrictSUIDSGID=yes
+SystemCallArchitectures=native
+SystemCallErrorNumber=EPERM
+SystemCallFilter=@system-service
+
+[Install]
+WantedBy=sysinit.target
meta/recipes-support/rng-tools/rng-tools_6.16.bb new file +69 -0

69 lines not on this page · raw message

Signature · 1 line
2.34.1