summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Anavi <leon.anavi@konsulko.com>2019-01-25 10:07:31 +0200
committerLeon Anavi <leon.anavi@konsulko.com>2019-01-25 18:28:06 +0200
commitc7236fe0bfeab1166addca2d3dd2096936b0fb9c (patch)
tree1709cf3d5e92ca2789e668dfb6bdd70bffd4981a
parent9d4aa221c1ba359e8ebf8c5259478cb80192e11a (diff)
downloadmeta-updater-c7236fe0bfeab1166addca2d3dd2096936b0fb9c.tar.gz
Backporting supplementary recipes from Rocko
Backport additional recipes for sota, support and test from branch rocko as well as the class target_version_example. Suggested-by: Patrick Vacek <patrickvacek@gmail.com> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
-rw-r--r--classes/target_version_example.bbclass10
-rw-r--r--recipes-sota/config/aktualizr-disable-send-ip.bb22
-rw-r--r--recipes-sota/config/aktualizr-log-debug.bb22
-rw-r--r--recipes-sota/config/files/05-log-debug.toml2
-rw-r--r--recipes-sota/config/files/30-disable-send-ip.toml2
-rw-r--r--recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch42
-rw-r--r--recipes-support/libp11/libp11_0.4.9.bb39
-rw-r--r--recipes-support/slcand-start/files/slcand@.service8
-rw-r--r--recipes-support/slcand-start/slcand-start.bb21
-rw-r--r--recipes-support/softhsm-testtoken/files/createtoken.service12
-rw-r--r--recipes-support/softhsm-testtoken/files/createtoken.sh27
-rw-r--r--recipes-support/softhsm-testtoken/softhsm-testtoken.bb25
-rw-r--r--recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch86
-rw-r--r--recipes-support/softhsm/softhsm_git.bb27
-rw-r--r--recipes-test/demo-network-config/files/25-dhcp-server.network12
-rw-r--r--recipes-test/demo-network-config/files/26-dhcp-client.network6
-rw-r--r--recipes-test/demo-network-config/files/27-dhcp-client-external.network6
-rw-r--r--recipes-test/demo-network-config/primary-network-config.bb16
-rw-r--r--recipes-test/demo-network-config/secondary-network-config.bb20
-rw-r--r--recipes-test/images/primary-image.bb14
-rw-r--r--recipes-test/images/secondary-image.bb27
21 files changed, 446 insertions, 0 deletions
diff --git a/classes/target_version_example.bbclass b/classes/target_version_example.bbclass
new file mode 100644
index 0000000..ef119fb
--- /dev/null
+++ b/classes/target_version_example.bbclass
@@ -0,0 +1,10 @@
1# Writes target version to be used by garage-sign
2
3HOSTTOOLS += " git "
4
5deploy_target_version () {
6 version=$(git --git-dir=${METADIR}/.repo/manifests/.git/ rev-parse HEAD)
7 echo -n ${version} > ${STAGING_DATADIR_NATIVE}/target_version
8}
9
10IMAGE_PREPROCESS_COMMAND += "deploy_target_version;"
diff --git a/recipes-sota/config/aktualizr-disable-send-ip.bb b/recipes-sota/config/aktualizr-disable-send-ip.bb
new file mode 100644
index 0000000..8dd2647
--- /dev/null
+++ b/recipes-sota/config/aktualizr-disable-send-ip.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Disable IP reporting in Aktualizr"
2DESCRIPTION = "Configures aktualizr to disable IP reporting to the server"
3HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base"
5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
7
8SRC_URI = " \
9 file://30-disable-send-ip.toml \
10 "
11
12do_install_append () {
13 install -m 0700 -d ${D}${libdir}/sota/conf.d
14 install -m 0644 ${WORKDIR}/30-disable-send-ip.toml ${D}${libdir}/sota/conf.d/30-disable-send-ip.toml
15}
16
17FILES_${PN} = " \
18 ${libdir}/sota/conf.d/30-disable-send-ip.toml \
19 "
20
21# vim:set ts=4 sw=4 sts=4 expandtab:
22
diff --git a/recipes-sota/config/aktualizr-log-debug.bb b/recipes-sota/config/aktualizr-log-debug.bb
new file mode 100644
index 0000000..098faf4
--- /dev/null
+++ b/recipes-sota/config/aktualizr-log-debug.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Set debug logging in Aktualizr"
2DESCRIPTION = "Configures aktualizr to log at a debugging level"
3HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base"
5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
7
8SRC_URI = " \
9 file://05-log-debug.toml \
10 "
11
12do_install_append () {
13 install -m 0700 -d ${D}${libdir}/sota/conf.d
14 install -m 0644 ${WORKDIR}/05-log-debug.toml ${D}${libdir}/sota/conf.d/05-log-debug.toml
15}
16
17FILES_${PN} = " \
18 ${libdir}/sota/conf.d/05-log-debug.toml \
19 "
20
21# vim:set ts=4 sw=4 sts=4 expandtab:
22
diff --git a/recipes-sota/config/files/05-log-debug.toml b/recipes-sota/config/files/05-log-debug.toml
new file mode 100644
index 0000000..100a146
--- /dev/null
+++ b/recipes-sota/config/files/05-log-debug.toml
@@ -0,0 +1,2 @@
1[logger]
2loglevel = 0
diff --git a/recipes-sota/config/files/30-disable-send-ip.toml b/recipes-sota/config/files/30-disable-send-ip.toml
new file mode 100644
index 0000000..5cd5108
--- /dev/null
+++ b/recipes-sota/config/files/30-disable-send-ip.toml
@@ -0,0 +1,2 @@
1[telemetry]
2report_network = false
diff --git a/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch b/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch
new file mode 100644
index 0000000..902352c
--- /dev/null
+++ b/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch
@@ -0,0 +1,42 @@
1From ccab5ce63dd5d3dbb4bd02998d21d34407e550f2 Mon Sep 17 00:00:00 2001
2From: Anton Gerasimov <anton.gerasimov@here.com>
3Date: Fri, 19 Jan 2018 12:44:27 +0100
4Subject: [PATCH] Workaround for a buggy version of openssl (1.0.2m)
5
6---
7 src/p11_pkey.c | 12 +++++++++---
8 1 file changed, 9 insertions(+), 3 deletions(-)
9
10diff --git a/src/p11_pkey.c b/src/p11_pkey.c
11index 45d5ad3..75625e6 100644
12--- a/src/p11_pkey.c
13+++ b/src/p11_pkey.c
14@@ -139,8 +139,14 @@ static void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src)
15
16 #endif
17
18-#if OPENSSL_VERSION_NUMBER < 0x100020d0L || defined(LIBRESSL_VERSION_NUMBER)
19-static void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
20+#if OPENSSL_VERSION_NUMBER < 0x10002100L || defined(LIBRESSL_VERSION_NUMBER)
21+
22+# if (OPENSSL_VERSION_NUMBER & 0xFFFFFFF0) == 0x100020d0L
23+# undef EVP_PKEY_meth_get_sign
24+# undef EVP_PKEY_meth_get_decrypt
25+# endif
26+
27+void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
28 int (**psign_init) (EVP_PKEY_CTX *ctx),
29 int (**psign) (EVP_PKEY_CTX *ctx,
30 unsigned char *sig, size_t *siglen,
31@@ -152,7 +158,7 @@ static void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
32 *psign = pmeth->sign;
33 }
34
35-static void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
36+void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
37 int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
38 int (**pdecrypt) (EVP_PKEY_CTX *ctx,
39 unsigned char *out,
40--
412.15.1
42
diff --git a/recipes-support/libp11/libp11_0.4.9.bb b/recipes-support/libp11/libp11_0.4.9.bb
new file mode 100644
index 0000000..6d0165f
--- /dev/null
+++ b/recipes-support/libp11/libp11_0.4.9.bb
@@ -0,0 +1,39 @@
1SUMMARY = "Library for using PKCS"
2DESCRIPTION = "\
3Libp11 is a library implementing a small layer on top of PKCS \
4make using PKCS"
5HOMEPAGE = "http://www.opensc-project.org/libp11"
6SECTION = "Development/Libraries"
7LICENSE = "LGPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29"
9DEPENDS = "libtool openssl"
10RDEPENDS_${PN} += " opensc"
11
12SRC_URI = "git://github.com/OpenSC/libp11.git \
13 file://0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch"
14SRCREV = "e1210903291b1de9eabcad26e740a4b2fbcca692"
15
16S = "${WORKDIR}/git"
17
18inherit autotools pkgconfig
19
20# Currently, Makefile dependencies are incorrectly defined which causes build errors
21# if the number of jobs is high
22# See https://github.com/OpenSC/libp11/issues/94
23PARALLEL_MAKE = ""
24EXTRA_OECONF = "--disable-static"
25
26do_install_append () {
27 rm -rf ${D}${libdir}/*.la
28 rm -rf ${D}${docdir}/${BPN}
29}
30
31FILES_${PN} = "${libdir}/engines*/pkcs11.so \
32 ${libdir}/engines*/libpkcs11${SOLIBS} \
33 ${libdir}/libp11${SOLIBS}"
34
35FILES_${PN}-dev = " \
36 ${libdir}/engines*/libpkcs11${SOLIBSDEV} \
37 ${libdir}/libp11${SOLIBSDEV} \
38 ${libdir}/pkgconfig/libp11.pc \
39 /usr/include"
diff --git a/recipes-support/slcand-start/files/slcand@.service b/recipes-support/slcand-start/files/slcand@.service
new file mode 100644
index 0000000..c539568
--- /dev/null
+++ b/recipes-support/slcand-start/files/slcand@.service
@@ -0,0 +1,8 @@
1[Unit]
2Description=Serial CAN daemon (can-utils)
3
4[Service]
5Type=forking
6ExecStart=/usr/bin/slcand -o -c -s4 %I can0
7ExecStartPost=/bin/sh -c '/bin/sleep 3; /sbin/ip link set can0 up'
8
diff --git a/recipes-support/slcand-start/slcand-start.bb b/recipes-support/slcand-start/slcand-start.bb
new file mode 100644
index 0000000..dfefaea
--- /dev/null
+++ b/recipes-support/slcand-start/slcand-start.bb
@@ -0,0 +1,21 @@
1SUMMARY = "Mock smartcard for aktualizr"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
4 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
5
6
7inherit systemd
8
9RDEPENDS_${PN} = "can-utils"
10
11SRC_URI = "file://slcand@.service"
12
13SYSTEMD_SERVICE_${PN} = "slcand@.service"
14
15do_install() {
16 install -d ${D}${systemd_unitdir}/system
17 install -m 0644 ${WORKDIR}/slcand@.service ${D}${systemd_unitdir}/system/slcand@.service
18}
19
20FILES_${PN} = "${systemd_unitdir}/system/createtoken.service"
21
diff --git a/recipes-support/softhsm-testtoken/files/createtoken.service b/recipes-support/softhsm-testtoken/files/createtoken.service
new file mode 100644
index 0000000..23317b9
--- /dev/null
+++ b/recipes-support/softhsm-testtoken/files/createtoken.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=Create a mock smartcard for testing
3Before=aktualizr.service
4RequiredBy=aktualizr.service
5
6[Service]
7RestartSec=10
8Restart=on-failure
9ExecStart=/usr/bin/createtoken.sh
10
11[Install]
12WantedBy=aktualizr.service
diff --git a/recipes-support/softhsm-testtoken/files/createtoken.sh b/recipes-support/softhsm-testtoken/files/createtoken.sh
new file mode 100644
index 0000000..fa4569d
--- /dev/null
+++ b/recipes-support/softhsm-testtoken/files/createtoken.sh
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3if pkcs11-tool --module=/usr/lib/softhsm/libsofthsm2.so -O; then
4 # The token has already been initialized, exit
5 exit 0
6fi
7
8if ! ls /var/sota/import/pkey.pem /var/sota/import/client.pem; then
9 # Key/certificate pair is not present, repeat
10 exit 1
11fi
12
13mkdir -p /var/lib/softhsm/tokens
14softhsm2-util --init-token --slot 0 --label "Virtual token" --pin 1234 --so-pin 1234
15
16openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in /var/sota/import/pkey.pem -out /var/sota/import/pkey.p8
17softhsm2-util --import /var/sota/import/pkey.p8 --label "pkey" --id 02 --token 'Virtual token' --pin 1234
18openssl x509 -outform der -in /var/sota/import/client.pem -out /var/sota/import/client.der
19pkcs11-tool --module=/usr/lib/softhsm/libsofthsm2.so --id 1 --write-object /var/sota/import/client.der --type cert --login --pin 1234
20
21# Import UPTANE keypair if it exists
22if [ -f /var/sota/import/ecukey.pem ]; then
23 openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in /var/sota/import/ecukey.pem -out /var/sota/import/ecukey.p8
24 softhsm2-util --import /var/sota/import/ecukey.p8 --label "uptanekey" --id 03 --token 'Virtual token' --pin 1234
25fi
26
27exit 0
diff --git a/recipes-support/softhsm-testtoken/softhsm-testtoken.bb b/recipes-support/softhsm-testtoken/softhsm-testtoken.bb
new file mode 100644
index 0000000..029fe1c
--- /dev/null
+++ b/recipes-support/softhsm-testtoken/softhsm-testtoken.bb
@@ -0,0 +1,25 @@
1SUMMARY = "Mock smartcard for aktualizr"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
4
5inherit systemd
6
7RDEPENDS_${PN} = "softhsm libp11"
8DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
9
10
11SRC_URI = "file://createtoken.service \
12 file://createtoken.sh"
13
14SYSTEMD_SERVICE_${PN} = "createtoken.service"
15
16do_install() {
17 install -d ${D}${systemd_unitdir}/system
18 install -m 0644 ${WORKDIR}/createtoken.service ${D}${systemd_unitdir}/system/createtoken.service
19 install -d ${D}${bindir}
20 install -m 0744 ${WORKDIR}/createtoken.sh ${D}${bindir}/createtoken.sh
21}
22
23FILES_${PN} = "${bindir}/createtoken.sh \
24 ${systemd_unitdir}/system/createtoken.service"
25
diff --git a/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch b/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch
new file mode 100644
index 0000000..b3a7622
--- /dev/null
+++ b/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch
@@ -0,0 +1,86 @@
1From b6add28acb884b6006216e8422cc18504483c72e Mon Sep 17 00:00:00 2001
2From: Anton Gerasimov <anton@advancedtelematic.com>
3Date: Fri, 8 Sep 2017 15:08:40 +0200
4Subject: [PATCH] Cross-compilation tweaks
5
6---
7 m4/acx_openssl.m4 | 2 ++
8 m4/acx_openssl_ecc.m4 | 3 +++
9 m4/acx_openssl_fips.m4 | 2 ++
10 m4/acx_openssl_gost.m4 | 2 ++
11 4 files changed, 9 insertions(+)
12
13diff --git a/m4/acx_openssl.m4 b/m4/acx_openssl.m4
14index e90c78f..9de6055 100644
15--- a/m4/acx_openssl.m4
16+++ b/m4/acx_openssl.m4
17@@ -25,6 +25,7 @@ AC_DEFUN([ACX_OPENSSL],[
18 AC_CHECK_HEADERS([openssl/ssl.h],,[AC_MSG_ERROR([Can't find OpenSSL headers])])
19 AC_CHECK_LIB(crypto, BN_new,,[AC_MSG_ERROR([Can't find OpenSSL library])])
20
21+ if test "$cross_compiling" != yes; then
22 AC_MSG_CHECKING([for OpenSSL version])
23 CHECK_OPENSSL_VERSION=m4_format(0x%02x%02x%02x000L, $1, $2, $3)
24 AC_LANG_PUSH([C])
25@@ -51,6 +52,7 @@ AC_DEFUN([ACX_OPENSSL],[
26 AC_MSG_ERROR([OpenSSL library too old ($1.$2.$3 or later required)])
27 ],[])
28 AC_LANG_POP([C])
29+ fi
30
31 CPPFLAGS=$tmp_CPPFLAGS
32 LIBS=$tmp_LIBS
33diff --git a/m4/acx_openssl_ecc.m4 b/m4/acx_openssl_ecc.m4
34index 612c505..ba2389d 100644
35--- a/m4/acx_openssl_ecc.m4
36+++ b/m4/acx_openssl_ecc.m4
37@@ -1,4 +1,5 @@
38 AC_DEFUN([ACX_OPENSSL_ECC],[
39+ if test "$cross_compiling" != yes; then
40 AC_MSG_CHECKING(for OpenSSL ECC support)
41
42 tmp_CPPFLAGS=$CPPFLAGS
43@@ -32,6 +33,8 @@ AC_DEFUN([ACX_OPENSSL_ECC],[
44 ],[])
45 AC_LANG_POP([C])
46
47+ fi
48+
49 CPPFLAGS=$tmp_CPPFLAGS
50 LIBS=$tmp_LIBS
51 ])
52diff --git a/m4/acx_openssl_fips.m4 b/m4/acx_openssl_fips.m4
53index 0491397..896cdbf 100644
54--- a/m4/acx_openssl_fips.m4
55+++ b/m4/acx_openssl_fips.m4
56@@ -1,4 +1,5 @@
57 AC_DEFUN([ACX_OPENSSL_FIPS],[
58+ if test "$cross_compiling" != yes; then
59 AC_MSG_CHECKING(for OpenSSL FIPS capable library)
60
61 tmp_CPPFLAGS=$CPPFLAGS
62@@ -47,4 +48,5 @@ AC_DEFUN([ACX_OPENSSL_FIPS],[
63
64 CPPFLAGS=$tmp_CPPFLAGS
65 LIBS=$tmp_LIBS
66+ fi
67 ])
68diff --git a/m4/acx_openssl_gost.m4 b/m4/acx_openssl_gost.m4
69index dca489b..34c39d8 100644
70--- a/m4/acx_openssl_gost.m4
71+++ b/m4/acx_openssl_gost.m4
72@@ -1,4 +1,5 @@
73 AC_DEFUN([ACX_OPENSSL_GOST],[
74+ if test "$cross_compiling" != yes; then
75 AC_MSG_CHECKING(for OpenSSL GOST support)
76
77 tmp_CPPFLAGS=$CPPFLAGS
78@@ -62,4 +63,5 @@ AC_DEFUN([ACX_OPENSSL_GOST],[
79
80 CPPFLAGS=$tmp_CPPFLAGS
81 LIBS=$tmp_LIBS
82+ fi
83 ])
84--
852.7.4
86
diff --git a/recipes-support/softhsm/softhsm_git.bb b/recipes-support/softhsm/softhsm_git.bb
new file mode 100644
index 0000000..c26903d
--- /dev/null
+++ b/recipes-support/softhsm/softhsm_git.bb
@@ -0,0 +1,27 @@
1SUMMARY = "HSM emulator"
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=ef3f77a3507c3d91e75b9f2bdaee4210"
4
5inherit autotools-brokensep
6
7
8SRC_URI = "git://github.com/opendnssec/SoftHSMv2.git;branch=master \
9 file://0001-Cross-compilation-tweaks.patch"
10SRCREV="1f7498c0c65b1b1ad5e1bdbd87e9d4b100705745"
11
12S = "${WORKDIR}/git"
13
14DEPENDS += " openssl"
15
16EXTRA_OECONF = "--disable-gost --with-openssl=${STAGING_LIBDIR}/.."
17
18do_configure() {
19 unset docdir
20 sh ./autogen.sh
21 oe_runconf
22}
23
24FILES_${PN} = "${bindir} \
25 ${libdir}/softhsm \
26 ${sysconfdir} \
27 ${localstatedir}/lib/softhsm "
diff --git a/recipes-test/demo-network-config/files/25-dhcp-server.network b/recipes-test/demo-network-config/files/25-dhcp-server.network
new file mode 100644
index 0000000..4766f9a
--- /dev/null
+++ b/recipes-test/demo-network-config/files/25-dhcp-server.network
@@ -0,0 +1,12 @@
1[Match]
2Name=enp0s4
3
4[Network]
5Description=Private internal network between aktualizr Primary and Secondary nodes
6DHCPServer=yes
7Address=10.0.3.1/24
8IPForward=yes
9IPMasquerade=yes
10
11[DHCPServer]
12PoolOffset=10 \ No newline at end of file
diff --git a/recipes-test/demo-network-config/files/26-dhcp-client.network b/recipes-test/demo-network-config/files/26-dhcp-client.network
new file mode 100644
index 0000000..319664f
--- /dev/null
+++ b/recipes-test/demo-network-config/files/26-dhcp-client.network
@@ -0,0 +1,6 @@
1[Match]
2Name=enp0s4
3
4[Network]
5Description=Private internal network between aktualizr Primary and Secondary nodes
6DHCP=yes
diff --git a/recipes-test/demo-network-config/files/27-dhcp-client-external.network b/recipes-test/demo-network-config/files/27-dhcp-client-external.network
new file mode 100644
index 0000000..ba49593
--- /dev/null
+++ b/recipes-test/demo-network-config/files/27-dhcp-client-external.network
@@ -0,0 +1,6 @@
1[Match]
2Name=enp0s3
3
4[Network]
5Description=External network for secondary
6DHCP=yes
diff --git a/recipes-test/demo-network-config/primary-network-config.bb b/recipes-test/demo-network-config/primary-network-config.bb
new file mode 100644
index 0000000..78678a2
--- /dev/null
+++ b/recipes-test/demo-network-config/primary-network-config.bb
@@ -0,0 +1,16 @@
1DESCRIPTION = "Sample network configuration for an Uptane Primary"
2LICENSE = "CLOSED"
3
4inherit allarch
5
6SRC_URI = "file://25-dhcp-server.network"
7
8
9FILES_${PN} = "/usr/lib/systemd/network"
10
11PR = "1"
12
13do_install() {
14 install -d ${D}/usr/lib/systemd/network
15 install -m 0644 ${WORKDIR}/25-dhcp-server.network ${D}/usr/lib/systemd/network/
16}
diff --git a/recipes-test/demo-network-config/secondary-network-config.bb b/recipes-test/demo-network-config/secondary-network-config.bb
new file mode 100644
index 0000000..9091c65
--- /dev/null
+++ b/recipes-test/demo-network-config/secondary-network-config.bb
@@ -0,0 +1,20 @@
1DESCRIPTION = "Sample network configuration for an Uptane Secondary"
2LICENSE = "CLOSED"
3
4inherit allarch
5
6SRC_URI = "\
7 file://26-dhcp-client.network \
8 file://27-dhcp-client-external.network \
9 "
10
11
12FILES_${PN} = "/usr/lib/systemd/network"
13
14PR = "1"
15
16do_install() {
17 install -d ${D}/usr/lib/systemd/network
18 install -m 0644 ${WORKDIR}/26-dhcp-client.network ${D}/usr/lib/systemd/network/
19 install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}/usr/lib/systemd/network/
20}
diff --git a/recipes-test/images/primary-image.bb b/recipes-test/images/primary-image.bb
new file mode 100644
index 0000000..6d2df94
--- /dev/null
+++ b/recipes-test/images/primary-image.bb
@@ -0,0 +1,14 @@
1include recipes-core/images/core-image-minimal.bb
2
3SUMMARY = "A minimal Uptane Primary image running aktualizr, for testing with a Linux secondary"
4
5LICENSE = "MIT"
6
7IMAGE_INSTALL_remove = " \
8 "
9
10IMAGE_INSTALL_append = " \
11 primary-network-config \
12 "
13
14# vim:set ts=4 sw=4 sts=4 expandtab:
diff --git a/recipes-test/images/secondary-image.bb b/recipes-test/images/secondary-image.bb
new file mode 100644
index 0000000..1a41169
--- /dev/null
+++ b/recipes-test/images/secondary-image.bb
@@ -0,0 +1,27 @@
1include recipes-core/images/core-image-minimal.bb
2
3SUMMARY = "A minimal Uptane Secondary image running aktualizr-secondary"
4
5LICENSE = "MIT"
6
7
8# Remove default aktualizr primary, and the provisioning configuration (which
9# RDEPENDS on aktualizr)
10IMAGE_INSTALL_remove = " \
11 aktualizr \
12 aktualizr-auto-prov \
13 aktualizr-auto-prov-creds \
14 aktualizr-ca-implicit-prov \
15 aktualizr-ca-implicit-prov-creds \
16 aktualizr-hsm-prov \
17 aktualizr-uboot-env-rollback \
18 connman \
19 connman-client \
20 "
21
22IMAGE_INSTALL_append = " \
23 aktualizr-secondary \
24 secondary-network-config \
25 "
26
27# vim:set ts=4 sw=4 sts=4 expandtab: