diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2017-10-25 17:28:39 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2017-10-27 15:11:51 +0200 |
commit | 6e12274ad0008e13ca43e022409860aa89e061d1 (patch) | |
tree | 68817e23d862aa3c7fd275fe227261173b32df3c | |
parent | 86032c413ec220a77a66402aeffd627e8f68243f (diff) | |
download | meta-updater-6e12274ad0008e13ca43e022409860aa89e061d1.tar.gz |
Remerge aktualizr recipes.
I found the trick to allow specifiying target vs native variables and
tasks. It's a bit wordy but better than having three separate files for
the aktualizr recipe.
Oddly and annoyingly, while only "aktualizr" must be specified in
sota_bleeding.inc, both "BRANCH_pn-aktualizr" and
"BRANCH_pn-aktualizr-native" must be specified in local.conf to
correctly use a given branch.
-rw-r--r-- | classes/sota_bleeding.inc | 1 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-native_git.bb | 18 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_common.inc | 19 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 50 |
4 files changed, 40 insertions, 48 deletions
diff --git a/classes/sota_bleeding.inc b/classes/sota_bleeding.inc index 77d004b..fc5947d 100644 --- a/classes/sota_bleeding.inc +++ b/classes/sota_bleeding.inc | |||
@@ -1,2 +1 @@ | |||
1 | SRCREV_pn-aktualizr ?= "${AUTOREV}" | SRCREV_pn-aktualizr ?= "${AUTOREV}" | |
2 | SRCREV_pn-aktualizr-native ?= "${AUTOREV}" | ||
diff --git a/recipes-sota/aktualizr/aktualizr-native_git.bb b/recipes-sota/aktualizr/aktualizr-native_git.bb deleted file mode 100644 index 70ebdf0..0000000 --- a/recipes-sota/aktualizr/aktualizr-native_git.bb +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | require aktualizr_common.inc | ||
2 | |||
3 | DEPENDS = "boost-native glib-2.0-native curl-native openssl-native libarchive-native libsodium-native" | ||
4 | |||
5 | inherit native | ||
6 | |||
7 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF -DAKTUALIZR_VERSION=${PV}" | ||
8 | |||
9 | do_install_append () { | ||
10 | rm -f ${D}${bindir}/aktualizr | ||
11 | rm -f ${D}${bindir}/aktualizr_cert_provider | ||
12 | rm -f ${D}${bindir}/garage-deploy | ||
13 | } | ||
14 | |||
15 | FILES_${PN} = " \ | ||
16 | ${bindir}/aktualizr_implicit_writer \ | ||
17 | ${bindir}/garage-push \ | ||
18 | " | ||
diff --git a/recipes-sota/aktualizr/aktualizr_common.inc b/recipes-sota/aktualizr/aktualizr_common.inc deleted file mode 100644 index 79c5e37..0000000 --- a/recipes-sota/aktualizr/aktualizr_common.inc +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | SUMMARY = "Aktualizr SOTA Client" | ||
2 | DESCRIPTION = "SOTA Client application written in C++" | ||
3 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "MPL-2.0" | ||
6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | ||
7 | |||
8 | PV = "1.0+git${SRCPV}" | ||
9 | PR = "7" | ||
10 | |||
11 | SRC_URI = " \ | ||
12 | git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ | ||
13 | " | ||
14 | SRCREV = "67c4f44c4136d16871726449502e3926098e8524" | ||
15 | BRANCH ?= "master" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit cmake | ||
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 7c65eb7..470c9bf 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -1,22 +1,52 @@ | |||
1 | require aktualizr_common.inc | 1 | SUMMARY = "Aktualizr SOTA Client" |
2 | DESCRIPTION = "SOTA Client application written in C++" | ||
3 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "MPL-2.0" | ||
6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | ||
2 | 7 | ||
3 | DEPENDS = "boost curl jansson openssl libarchive libsodium ostree" | 8 | DEPENDS = "boost curl openssl libarchive libsodium " |
4 | RDEPENDS_${PN} = "lshw" | 9 | DEPENDS_append_class-target = "jansson ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} " |
10 | DEPENDS_append_class-native = "glib-2.0-native " | ||
5 | 11 | ||
6 | DEPENDS_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)}" | 12 | RDEPENDS_${PN}_class-target = "lshw " |
7 | RDEPENDS_${PN}_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' engine-pkcs11', '', d)}" | 13 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' engine-pkcs11', '', d)} " |
8 | RDEPENDS_${PN}_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm-test', ' softhsm softhsm-testtoken', '', d)}" | 14 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm-test', ' softhsm softhsm-testtoken', '', d)} " |
9 | 15 | ||
10 | inherit systemd | 16 | PV = "1.0+git${SRCPV}" |
17 | PR = "7" | ||
11 | 18 | ||
12 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_OSTREE=ON ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} -DAKTUALIZR_VERSION=${PV}" | 19 | SRC_URI = " \ |
20 | git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ | ||
21 | " | ||
22 | SRCREV = "67c4f44c4136d16871726449502e3926098e8524" | ||
23 | BRANCH ?= "master" | ||
24 | |||
25 | S = "${WORKDIR}/git" | ||
26 | |||
27 | inherit cmake | ||
28 | |||
29 | BBCLASSEXTEND =+ "native" | ||
30 | |||
31 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} " | ||
32 | EXTRA_OECMAKE_append_class-target = "-DBUILD_OSTREE=ON ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} " | ||
33 | EXTRA_OECMAKE_append_class-native = "-DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF " | ||
13 | 34 | ||
14 | do_install_append () { | 35 | do_install_append () { |
15 | rm -f ${D}${bindir}/aktualizr_cert_provider | 36 | rm -f ${D}${bindir}/aktualizr_cert_provider |
16 | rm -f ${D}${bindir}/aktualizr_implicit_writer | ||
17 | rm -f ${D}${bindir}/garage-deploy | 37 | rm -f ${D}${bindir}/garage-deploy |
18 | } | 38 | } |
39 | do_install_append_class-target () { | ||
40 | rm -f ${D}${bindir}/aktualizr_implicit_writer | ||
41 | } | ||
42 | do_install_append_class-native () { | ||
43 | rm -f ${D}${bindir}/aktualizr | ||
44 | } | ||
19 | 45 | ||
20 | FILES_${PN} = " \ | 46 | FILES_${PN}_class-target = " \ |
21 | ${bindir}/aktualizr \ | 47 | ${bindir}/aktualizr \ |
22 | " | 48 | " |
49 | FILES_${PN}_class-native = " \ | ||
50 | ${bindir}/aktualizr_implicit_writer \ | ||
51 | ${bindir}/garage-push \ | ||
52 | " | ||