diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2018-05-22 10:19:33 +0200 |
---|---|---|
committer | Laurent Bonnans <laurent.bonnans@here.com> | 2018-05-22 10:19:33 +0200 |
commit | 21b3d7ceedd53f9b5eb00b777bdb1cf22183e289 (patch) | |
tree | 7b4ef4b2e4d1ec02a61a87cbd040e1eebb5112a8 /meta-sota/recipes-test | |
parent | 52e20c85e8a39f3d9bfc27448f235c34b31491e6 (diff) | |
download | meta-updater-21b3d7ceedd53f9b5eb00b777bdb1cf22183e289.tar.gz |
Start moving everything for new directory structure
Diffstat (limited to 'meta-sota/recipes-test')
10 files changed, 141 insertions, 0 deletions
diff --git a/meta-sota/recipes-test/big-update/big-update_1.0.bb b/meta-sota/recipes-test/big-update/big-update_1.0.bb new file mode 100644 index 0000000..68b9746 --- /dev/null +++ b/meta-sota/recipes-test/big-update/big-update_1.0.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | DESCRIPTION = "Example Package with 10MB of random, seeded content" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | SRC_URI = "file://rand_file.py" | ||
5 | |||
6 | FILES_${PN} = "/usr/lib/big-update" | ||
7 | |||
8 | DEPENDS = "coreutils-native" | ||
9 | |||
10 | do_install() { | ||
11 | install -d ${D}/usr/lib/big-update | ||
12 | python ${S}/../rand_file.py ${D}/usr/lib/big-update/a-big-file $(numfmt --from=iec 10M) | ||
13 | } | ||
diff --git a/meta-sota/recipes-test/big-update/big-update_2.0.bb b/meta-sota/recipes-test/big-update/big-update_2.0.bb new file mode 100644 index 0000000..20c8138 --- /dev/null +++ b/meta-sota/recipes-test/big-update/big-update_2.0.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | DESCRIPTION = "Example Package with 12MB of random, seeded content" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | SRC_URI = "file://rand_file.py" | ||
5 | |||
6 | FILES_${PN} = "/usr/lib/big-update" | ||
7 | |||
8 | DEPENDS = "coreutils-native" | ||
9 | |||
10 | do_install() { | ||
11 | install -d ${D}/usr/lib/big-update | ||
12 | python ${S}/../rand_file.py ${D}/usr/lib/big-update/a-big-file $(numfmt --from=iec 12M) | ||
13 | } | ||
diff --git a/meta-sota/recipes-test/big-update/files/rand_file.py b/meta-sota/recipes-test/big-update/files/rand_file.py new file mode 100644 index 0000000..0f4f16e --- /dev/null +++ b/meta-sota/recipes-test/big-update/files/rand_file.py | |||
@@ -0,0 +1,16 @@ | |||
1 | import sys | ||
2 | from random import seed, randint | ||
3 | |||
4 | def main(): | ||
5 | n = int(sys.argv[2]) | ||
6 | ba = bytearray(n) | ||
7 | |||
8 | seed(42) | ||
9 | for i in range(0, n): | ||
10 | ba[i] = randint(0, 255) | ||
11 | |||
12 | with open(sys.argv[1], 'wb') as f: | ||
13 | f.write(bytes(ba)) | ||
14 | |||
15 | if __name__ == "__main__": | ||
16 | main() | ||
diff --git a/meta-sota/recipes-test/demo-network-config/files/25-dhcp-server.network b/meta-sota/recipes-test/demo-network-config/files/25-dhcp-server.network new file mode 100644 index 0000000..4766f9a --- /dev/null +++ b/meta-sota/recipes-test/demo-network-config/files/25-dhcp-server.network | |||
@@ -0,0 +1,12 @@ | |||
1 | [Match] | ||
2 | Name=enp0s4 | ||
3 | |||
4 | [Network] | ||
5 | Description=Private internal network between aktualizr Primary and Secondary nodes | ||
6 | DHCPServer=yes | ||
7 | Address=10.0.3.1/24 | ||
8 | IPForward=yes | ||
9 | IPMasquerade=yes | ||
10 | |||
11 | [DHCPServer] | ||
12 | PoolOffset=10 \ No newline at end of file | ||
diff --git a/meta-sota/recipes-test/demo-network-config/files/26-dhcp-client.network b/meta-sota/recipes-test/demo-network-config/files/26-dhcp-client.network new file mode 100644 index 0000000..319664f --- /dev/null +++ b/meta-sota/recipes-test/demo-network-config/files/26-dhcp-client.network | |||
@@ -0,0 +1,6 @@ | |||
1 | [Match] | ||
2 | Name=enp0s4 | ||
3 | |||
4 | [Network] | ||
5 | Description=Private internal network between aktualizr Primary and Secondary nodes | ||
6 | DHCP=yes | ||
diff --git a/meta-sota/recipes-test/demo-network-config/files/27-dhcp-client-external.network b/meta-sota/recipes-test/demo-network-config/files/27-dhcp-client-external.network new file mode 100644 index 0000000..ba49593 --- /dev/null +++ b/meta-sota/recipes-test/demo-network-config/files/27-dhcp-client-external.network | |||
@@ -0,0 +1,6 @@ | |||
1 | [Match] | ||
2 | Name=enp0s3 | ||
3 | |||
4 | [Network] | ||
5 | Description=External network for secondary | ||
6 | DHCP=yes | ||
diff --git a/meta-sota/recipes-test/demo-network-config/primary-network-config.bb b/meta-sota/recipes-test/demo-network-config/primary-network-config.bb new file mode 100644 index 0000000..78678a2 --- /dev/null +++ b/meta-sota/recipes-test/demo-network-config/primary-network-config.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | DESCRIPTION = "Sample network configuration for an Uptane Primary" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | inherit allarch | ||
5 | |||
6 | SRC_URI = "file://25-dhcp-server.network" | ||
7 | |||
8 | |||
9 | FILES_${PN} = "/usr/lib/systemd/network" | ||
10 | |||
11 | PR = "1" | ||
12 | |||
13 | do_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/meta-sota/recipes-test/demo-network-config/secondary-network-config.bb b/meta-sota/recipes-test/demo-network-config/secondary-network-config.bb new file mode 100644 index 0000000..9091c65 --- /dev/null +++ b/meta-sota/recipes-test/demo-network-config/secondary-network-config.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | DESCRIPTION = "Sample network configuration for an Uptane Secondary" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | inherit allarch | ||
5 | |||
6 | SRC_URI = "\ | ||
7 | file://26-dhcp-client.network \ | ||
8 | file://27-dhcp-client-external.network \ | ||
9 | " | ||
10 | |||
11 | |||
12 | FILES_${PN} = "/usr/lib/systemd/network" | ||
13 | |||
14 | PR = "1" | ||
15 | |||
16 | do_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/meta-sota/recipes-test/images/primary-image.bb b/meta-sota/recipes-test/images/primary-image.bb new file mode 100644 index 0000000..6d2df94 --- /dev/null +++ b/meta-sota/recipes-test/images/primary-image.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | include recipes-core/images/core-image-minimal.bb | ||
2 | |||
3 | SUMMARY = "A minimal Uptane Primary image running aktualizr, for testing with a Linux secondary" | ||
4 | |||
5 | LICENSE = "MIT" | ||
6 | |||
7 | IMAGE_INSTALL_remove = " \ | ||
8 | " | ||
9 | |||
10 | IMAGE_INSTALL_append = " \ | ||
11 | primary-network-config \ | ||
12 | " | ||
13 | |||
14 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
diff --git a/meta-sota/recipes-test/images/secondary-image.bb b/meta-sota/recipes-test/images/secondary-image.bb new file mode 100644 index 0000000..9adbdc5 --- /dev/null +++ b/meta-sota/recipes-test/images/secondary-image.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | include recipes-core/images/core-image-minimal.bb | ||
2 | |||
3 | SUMMARY = "A minimal Uptane Secondary image running aktualizr-secondary" | ||
4 | |||
5 | LICENSE = "MIT" | ||
6 | |||
7 | |||
8 | # Remove default aktualizr primary, and the provisioning configuration (which | ||
9 | # RDEPENDS on aktualizr) | ||
10 | IMAGE_INSTALL_remove = " \ | ||
11 | aktualizr \ | ||
12 | aktualizr-auto-prov \ | ||
13 | aktualizr-ca-implicit-prov \ | ||
14 | aktualizr-hsm-prov \ | ||
15 | aktualizr-implicit-prov \ | ||
16 | connman \ | ||
17 | connman-client \ | ||
18 | " | ||
19 | |||
20 | IMAGE_INSTALL_append = " \ | ||
21 | aktualizr-secondary \ | ||
22 | secondary-network-config \ | ||
23 | " | ||
24 | |||
25 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||