kuksa-val: split client certificates into a separate package 15/27715/1
authorScott Murray <scott.murray@konsulko.com>
Tue, 7 Jun 2022 00:05:49 +0000 (20:05 -0400)
committerScott Murray <scott.murray@konsulko.com>
Wed, 6 Jul 2022 18:00:05 +0000 (14:00 -0400)
Split the certificates required by clients (so client and CA) into
a separate kuksa-val-client-certificates package so that they can
be reused in the cluster demo image without having the full KUKSA.val
server installed.

Bug-AGL: SPEC-4405

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I6b78b212ead395c8f731eab40ef0525a515bdb7c

recipes-connectivity/kuksa-val/kuksa-val_git.bb

index 033e81e..a8e2c31 100644 (file)
@@ -40,7 +40,7 @@ EXTRA_OECMAKE = " \
 
 do_install:append() {
     # Lower the logging level used in the installed config.ini from the upstream
-    # default of "ALL", which seems to cause performance issues at the moment.
+    # default of "ALL", which spams the logs.
     sed -i 's/^log-level = .*/log-level = WARNING/' ${D}/${sysconfdir}/kuksa-val/config.ini
 
     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
@@ -58,5 +58,17 @@ do_install:append() {
     chgrp 900 ${D}${sysconfdir}/kuksa-val/Server.pem
 }
 
+# Put client certificates into their own package so we can avoid
+# duplicates of them for e.g. cluster clients.  Longer term this
+# will need to be revisited.
+PACKAGE_BEFORE_PN += "${PN}-client-certificates"
+
+FILES:${PN}-client-certificates = " \
+    ${sysconfdir}/kuksa-val/Client.key \
+    ${sysconfdir}/kuksa-val/Client.pem \
+    ${sysconfdir}/kuksa-val/CA.pem \
+"
+
 FILES:${PN} += "${systemd_system_unitdir} ${datadir}"
 
+RDEPENDS:${PN} += "${PN}-client-certificates"