diff options
Diffstat (limited to 'recipes-test')
6 files changed, 22 insertions, 19 deletions
diff --git a/recipes-test/demo-config/primary-config.bb b/recipes-test/demo-config/primary-config.bb index 27cb553..b1964e2 100644 --- a/recipes-test/demo-config/primary-config.bb +++ b/recipes-test/demo-config/primary-config.bb | |||
@@ -4,6 +4,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 | |||
4 | 4 | ||
5 | require shared-conf.inc | 5 | require shared-conf.inc |
6 | 6 | ||
7 | inherit allarch | ||
8 | |||
7 | PRIMARY_SECONDARIES ?= "${SECONDARY_IP}:${SECONDARY_PORT}" | 9 | PRIMARY_SECONDARIES ?= "${SECONDARY_IP}:${SECONDARY_PORT}" |
8 | 10 | ||
9 | SRC_URI = "\ | 11 | SRC_URI = "\ |
diff --git a/recipes-test/demo-config/secondary-config.bb b/recipes-test/demo-config/secondary-config.bb index 9411646..ddbed89 100644 --- a/recipes-test/demo-config/secondary-config.bb +++ b/recipes-test/demo-config/secondary-config.bb | |||
@@ -4,6 +4,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 | |||
4 | 4 | ||
5 | require shared-conf.inc | 5 | require shared-conf.inc |
6 | 6 | ||
7 | # Because of the dependency on MACHINE. | ||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | |||
7 | SECONDARY_SERIAL_ID ?= "" | 10 | SECONDARY_SERIAL_ID ?= "" |
8 | SOTA_HARDWARE_ID ?= "${MACHINE}-sndry" | 11 | SOTA_HARDWARE_ID ?= "${MACHINE}-sndry" |
9 | SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}" | 12 | SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}" |
@@ -16,18 +19,18 @@ SRC_URI = "\ | |||
16 | 19 | ||
17 | do_install () { | 20 | do_install () { |
18 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 21 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
19 | install -m 0644 ${WORKDIR}/30-fake-pacman.toml ${D}/${libdir}/sota/conf.d/30-fake-pacman.toml | 22 | install -m 0644 ${WORKDIR}/30-fake-pacman.toml ${D}${libdir}/sota/conf.d/30-fake-pacman.toml |
20 | 23 | ||
21 | install -m 0644 ${WORKDIR}/35-network-config.toml ${D}/${libdir}/sota/conf.d/35-network-config.toml | 24 | install -m 0644 ${WORKDIR}/35-network-config.toml ${D}${libdir}/sota/conf.d/35-network-config.toml |
22 | sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \ | 25 | sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \ |
23 | -e 's|@PRIMARY_IP@|${PRIMARY_IP}|g' \ | 26 | -e 's|@PRIMARY_IP@|${PRIMARY_IP}|g' \ |
24 | -e 's|@PRIMARY_PORT@|${PRIMARY_PORT}|g' \ | 27 | -e 's|@PRIMARY_PORT@|${PRIMARY_PORT}|g' \ |
25 | ${D}/${libdir}/sota/conf.d/35-network-config.toml | 28 | ${D}${libdir}/sota/conf.d/35-network-config.toml |
26 | 29 | ||
27 | install -m 0644 ${WORKDIR}/45-id-config.toml ${D}/${libdir}/sota/conf.d/45-id-config.toml | 30 | install -m 0644 ${WORKDIR}/45-id-config.toml ${D}${libdir}/sota/conf.d/45-id-config.toml |
28 | sed -i -e 's|@SERIAL@|${SECONDARY_SERIAL_ID}|g' \ | 31 | sed -i -e 's|@SERIAL@|${SECONDARY_SERIAL_ID}|g' \ |
29 | -e 's|@HWID@|${SECONDARY_HARDWARE_ID}|g' \ | 32 | -e 's|@HWID@|${SECONDARY_HARDWARE_ID}|g' \ |
30 | ${D}/${libdir}/sota/conf.d/45-id-config.toml | 33 | ${D}${libdir}/sota/conf.d/45-id-config.toml |
31 | 34 | ||
32 | } | 35 | } |
33 | 36 | ||
diff --git a/recipes-test/demo-network-config/network-config.inc b/recipes-test/demo-network-config/network-config.inc index ed623d4..b023f51 100644 --- a/recipes-test/demo-network-config/network-config.inc +++ b/recipes-test/demo-network-config/network-config.inc | |||
@@ -2,15 +2,18 @@ SRC_URI_append = "\ | |||
2 | file://26-${CONF_TYPE}-client.network \ | 2 | file://26-${CONF_TYPE}-client.network \ |
3 | " | 3 | " |
4 | 4 | ||
5 | # Because of the dependency on MACHINE. | ||
6 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
7 | |||
5 | SECONDARY_INTERFACE ?= "${@ 'eth0' if d.getVar('MACHINE') == 'raspberrypi3' else 'enp0s5'}" | 8 | SECONDARY_INTERFACE ?= "${@ 'eth0' if d.getVar('MACHINE') == 'raspberrypi3' else 'enp0s5'}" |
6 | 9 | ||
7 | do_install_append() { | 10 | do_install_append() { |
8 | bbnote "Network configuration type to be applied: ${CONF_TYPE}" | 11 | bbnote "Network configuration type to be applied: ${CONF_TYPE}" |
9 | install -d ${D}/usr/lib/systemd/network | 12 | install -d ${D}${libdir}/systemd/network |
10 | install -m 0644 ${WORKDIR}/26-${CONF_TYPE}-client.network ${D}/usr/lib/systemd/network/ | 13 | install -m 0644 ${WORKDIR}/26-${CONF_TYPE}-client.network ${D}${libdir}/systemd/network/ |
11 | sed -i -e 's|@ADDR@|${IP_ADDR}|g' \ | 14 | sed -i -e 's|@ADDR@|${IP_ADDR}|g' \ |
12 | -e 's|@IFNAME@|${SECONDARY_INTERFACE}|g' \ | 15 | -e 's|@IFNAME@|${SECONDARY_INTERFACE}|g' \ |
13 | ${D}/usr/lib/systemd/network/26-${CONF_TYPE}-client.network | 16 | ${D}${libdir}/systemd/network/26-${CONF_TYPE}-client.network |
14 | 17 | ||
15 | } | 18 | } |
16 | 19 | ||
diff --git a/recipes-test/demo-network-config/primary-network-config.bb b/recipes-test/demo-network-config/primary-network-config.bb index d840a95..544a5ec 100644 --- a/recipes-test/demo-network-config/primary-network-config.bb +++ b/recipes-test/demo-network-config/primary-network-config.bb | |||
@@ -2,19 +2,17 @@ DESCRIPTION = "Sample network configuration for an Uptane Primary" | |||
2 | LICENSE = "MPL-2.0" | 2 | LICENSE = "MPL-2.0" |
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" |
4 | 4 | ||
5 | inherit allarch | ||
6 | |||
7 | SRC_URI = "\ | 5 | SRC_URI = "\ |
8 | file://27-dhcp-client-external.network \ | 6 | file://27-dhcp-client-external.network \ |
9 | " | 7 | " |
10 | 8 | ||
11 | FILES_${PN} = "/usr/lib/systemd/network" | 9 | FILES_${PN} = "${libdir}/systemd/network" |
12 | 10 | ||
13 | PR = "1" | 11 | PR = "1" |
14 | 12 | ||
15 | do_install() { | 13 | do_install() { |
16 | install -d ${D}/usr/lib/systemd/network | 14 | install -d ${D}${libdir}/systemd/network |
17 | install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}/usr/lib/systemd/network/ | 15 | install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/ |
18 | } | 16 | } |
19 | 17 | ||
20 | PRIMARY_IP ?= "10.0.3.1" | 18 | PRIMARY_IP ?= "10.0.3.1" |
diff --git a/recipes-test/demo-network-config/secondary-network-config.bb b/recipes-test/demo-network-config/secondary-network-config.bb index b1d70f1..ca83d53 100644 --- a/recipes-test/demo-network-config/secondary-network-config.bb +++ b/recipes-test/demo-network-config/secondary-network-config.bb | |||
@@ -2,8 +2,6 @@ DESCRIPTION = "Sample network configuration for an Uptane Secondary" | |||
2 | LICENSE = "MPL-2.0" | 2 | LICENSE = "MPL-2.0" |
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" |
4 | 4 | ||
5 | inherit allarch | ||
6 | |||
7 | # TODO: It configures the 'user' interface in NAT mode and provides an access to public Inet via it | 5 | # TODO: It configures the 'user' interface in NAT mode and provides an access to public Inet via it |
8 | # which is not desired for Secondary. It cannot be just removed since we get SSH access to Secondary | 6 | # which is not desired for Secondary. It cannot be just removed since we get SSH access to Secondary |
9 | # VM via this interface. So, the task is to configure the interface in such way that it does provide access | 7 | # VM via this interface. So, the task is to configure the interface in such way that it does provide access |
@@ -12,13 +10,13 @@ SRC_URI = "\ | |||
12 | file://27-dhcp-client-external.network \ | 10 | file://27-dhcp-client-external.network \ |
13 | " | 11 | " |
14 | 12 | ||
15 | FILES_${PN} = "/usr/lib/systemd/network" | 13 | FILES_${PN} = "${libdir}/systemd/network" |
16 | 14 | ||
17 | PR = "1" | 15 | PR = "1" |
18 | 16 | ||
19 | do_install() { | 17 | do_install() { |
20 | install -d ${D}/usr/lib/systemd/network | 18 | install -d ${D}${libdir}/systemd/network |
21 | install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}/usr/lib/systemd/network/ | 19 | install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/ |
22 | } | 20 | } |
23 | 21 | ||
24 | SECONDARY_IP ?= "10.0.3.2" | 22 | SECONDARY_IP ?= "10.0.3.2" |
diff --git a/recipes-test/images/secondary-image.bb b/recipes-test/images/secondary-image.bb index 27d1e3f..7db2c68 100644 --- a/recipes-test/images/secondary-image.bb +++ b/recipes-test/images/secondary-image.bb | |||
@@ -14,7 +14,6 @@ IMAGE_INSTALL_remove = " \ | |||
14 | aktualizr-shared-prov \ | 14 | aktualizr-shared-prov \ |
15 | aktualizr-shared-prov-creds \ | 15 | aktualizr-shared-prov-creds \ |
16 | aktualizr-device-prov \ | 16 | aktualizr-device-prov \ |
17 | aktualizr-device-prov-creds \ | ||
18 | aktualizr-device-prov-hsm \ | 17 | aktualizr-device-prov-hsm \ |
19 | aktualizr-uboot-env-rollback \ | 18 | aktualizr-uboot-env-rollback \ |
20 | virtual/network-configuration \ | 19 | virtual/network-configuration \ |