From 1d936346854a77b05c83be3d686daa31aca202ba Mon Sep 17 00:00:00 2001
From: Emanuele Aina <emanuele.aina@collabora.com>
Date: Thu, 28 Mar 2019 14:49:52 +0100
Subject: [PATCH] ospack: Ship rngd on all the images, not just minimal

With newer kernels it takes far longer in early boot to get random
numbers (as >= 4.18 kernels ensure good quality entropy is availble
before starting  providing randomness).

Commit 85cc6eba4013 took care of the minimal ospack/images introducing
rng-tools to integrate with hardware random number generators
while jitterentropy-rngd can provide randomness without.

This commit applies the same change to the target, basesdk and sdk
ospacks/images.

Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
---
 apertis-ospack-basesdk.yaml | 9 +++++++++
 apertis-ospack-sdk.yaml     | 9 +++++++++
 apertis-ospack-target.yaml  | 9 +++++++++
 3 files changed, 27 insertions(+)

diff --git a/apertis-ospack-basesdk.yaml b/apertis-ospack-basesdk.yaml
index 5f00902a..b857bc8e 100644
--- a/apertis-ospack-basesdk.yaml
+++ b/apertis-ospack-basesdk.yaml
@@ -43,6 +43,15 @@ actions:
       - initramfs-tools
       # - apertis-customizations
 
+  # Add rng-tools for devices that have a hardware number generator
+  # Add jitterentropy-rngd for those without
+  # On final production images this can be tuned based on the device
+  - action: apt
+    description: "RNG packages"
+    packages:
+      - rng-tools5
+      - jitterentropy-rngd
+
   - action: apt
     description: "Base packages"
     packages:
diff --git a/apertis-ospack-sdk.yaml b/apertis-ospack-sdk.yaml
index cda451dd..6d209636 100644
--- a/apertis-ospack-sdk.yaml
+++ b/apertis-ospack-sdk.yaml
@@ -44,6 +44,15 @@ actions:
       #- apertis-customizations
       - initramfs-tools
 
+  # Add rng-tools for devices that have a hardware number generator
+  # Add jitterentropy-rngd for those without
+  # On final production images this can be tuned based on the device
+  - action: apt
+    description: "RNG packages"
+    packages:
+      - rng-tools5
+      - jitterentropy-rngd
+
   - action: apt
     description: "Base packages"
     packages:
diff --git a/apertis-ospack-target.yaml b/apertis-ospack-target.yaml
index 468965e3..1e59b398 100644
--- a/apertis-ospack-target.yaml
+++ b/apertis-ospack-target.yaml
@@ -42,6 +42,15 @@ actions:
       # - apertis-customizations
       - initramfs-tools
 
+  # Add rng-tools for devices that have a hardware number generator
+  # Add jitterentropy-rngd for those without
+  # On final production images this can be tuned based on the device
+  - action: apt
+    description: "RNG packages"
+    packages:
+      - rng-tools5
+      - jitterentropy-rngd
+
   - action: apt
     description: "Base packages"
     packages:
-- 
GitLab