summaryrefslogtreecommitdiffstats
path: root/meta-agl-demo-control-panel/recipes-connectivity/kuksa-val/kuksa-certificates-agl.bb
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-07-04 14:44:46 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-07-24 09:14:03 +0000
commit94a19893064724d89893252735883cdb0415835f (patch)
tree4bff24f56fd4b235870307e7834d67576038a9e5 /meta-agl-demo-control-panel/recipes-connectivity/kuksa-val/kuksa-certificates-agl.bb
parentca836399d23e92f20d7ccc02122ab029e695cc6b (diff)
Move agl-demo-control-panel into own layer and feature during qt6 migration
This creates a temporary sublayer for the demo control panel until meta-agl-demo itself is migrated to qt6. Bug-AGL: SPEC-5195 Change-Id: I07f97385600fb695e182b11c528225d5510185d9 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30067
Diffstat (limited to 'meta-agl-demo-control-panel/recipes-connectivity/kuksa-val/kuksa-certificates-agl.bb')
-rw-r--r--meta-agl-demo-control-panel/recipes-connectivity/kuksa-val/kuksa-certificates-agl.bb61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta-agl-demo-control-panel/recipes-connectivity/kuksa-val/kuksa-certificates-agl.bb b/meta-agl-demo-control-panel/recipes-connectivity/kuksa-val/kuksa-certificates-agl.bb
new file mode 100644
index 000000000..0264ebbd7
--- /dev/null
+++ b/meta-agl-demo-control-panel/recipes-connectivity/kuksa-val/kuksa-certificates-agl.bb
@@ -0,0 +1,61 @@
+SUMMARY = "AGL certificates for KUKSA.val, the KUKSA Vehicle Abstraction Layer"
+HOMEPAGE = "https://github.com/eclipse/kuksa.val"
+BUGTRACKER = "https://github.com/eclipse/kuksa.val/issues"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://CA.pem \
+ file://Client.key \
+ file://Client.pem \
+ file://Server.key \
+ file://Server.pem \
+ file://jwt.key.pub \
+"
+
+inherit allarch useradd
+
+USERADD_PACKAGES = "${PN}-server"
+USERADDEXTENSION = "useradd-staticids"
+GROUPADD_PARAM:${PN}-server = "-g 900 kuksa ;"
+
+do_install() {
+ # Install replacement CA certificate, server key + certificate,
+ # and client key + certificate.
+ # These are AGL specific versions generated using a tweaked
+ # genCerts.sh script to have different expiry dates than the
+ # upstream defaults, and use AGL as the organization.
+ install -d ${D}${sysconfdir}/kuksa-val/
+ install -m 0644 ${WORKDIR}/CA.pem ${D}${sysconfdir}/kuksa-val/
+ install -m 0640 -g 900 ${WORKDIR}/Server.key ${D}${sysconfdir}/kuksa-val/
+ install -m 0640 -g 900 ${WORKDIR}/Server.pem ${D}${sysconfdir}/kuksa-val/
+ install -m 0644 -g 900 ${WORKDIR}/jwt.key.pub ${D}${sysconfdir}/kuksa-val/
+ install -m 0644 ${WORKDIR}/Client.key ${D}${sysconfdir}/kuksa-val/
+ install -m 0644 ${WORKDIR}/Client.pem ${D}${sysconfdir}/kuksa-val/
+}
+
+PACKAGE_BEFORE_PN += "${PN}-ca ${PN}-server ${PN}-client"
+
+FILES:${PN}-ca = " \
+ ${sysconfdir}/kuksa-val/CA.pem \
+"
+RPROVIDES:${PN}-ca += "kuksa-val-certificates-ca"
+
+FILES:${PN}-server = " \
+ ${sysconfdir}/kuksa-val/Server.key \
+ ${sysconfdir}/kuksa-val/Server.pem \
+ ${sysconfdir}/kuksa-val/jwt.key.pub \
+"
+RPROVIDES:${PN}-server += "kuksa-val-certificates-server"
+RDEPENDS:${PN}-server += "${PN}-ca"
+
+FILES:${PN}-client = " \
+ ${sysconfdir}/kuksa-val/Client.key \
+ ${sysconfdir}/kuksa-val/Client.pem \
+"
+RPROVIDES:${PN}-client += "kuksa-val-certificates-client"
+RDEPENDS:${PN}-client += "${PN}-ca"
+
+ALLOW_EMPTY:${PN} = "1"
+
+RDEPENDS:${PN} += "${PN}-ca ${PN}-server ${PN}-client"