summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-11-02 12:09:54 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2018-11-05 11:01:14 +0100
commitc2a02943e3ee196b64c5753cdee02d3ea735001c (patch)
tree42a1f94e146557394600c425432b17591035a08e
parentc684c3474cb580a8f58b8299e9e901440ebf56d0 (diff)
downloadmeta-updater-test/enable-ptest.tar.gz
aktualizr: attempt to get ptest enabled to build test suite.test/enable-ptest
-rwxr-xr-xrecipes-sota/aktualizr/aktualizr_git.bb10
-rw-r--r--recipes-sota/aktualizr/files/0001-Use-aktualizr-repo-without-a-provided-path.patch24
2 files changed, 31 insertions, 3 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 50a9f16..002d681 100755
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3"
8DEPENDS = "boost curl openssl libarchive libsodium asn1c-native sqlite3 " 8DEPENDS = "boost curl openssl libarchive libsodium asn1c-native sqlite3 "
9DEPENDS_append_class-target = "ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} " 9DEPENDS_append_class-target = "ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} "
10DEPENDS_append_class-native = "glib-2.0-native " 10DEPENDS_append_class-native = "glib-2.0-native "
11DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native ostree-native aktualizr-native ', '', d)}"
11 12
12RDEPENDS_${PN}_class-target = "lshw " 13RDEPENDS_${PN}_class-target = "lshw "
13RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " 14RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} "
@@ -21,6 +22,7 @@ PR = "7"
21 22
22SRC_URI = " \ 23SRC_URI = " \
23 gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ 24 gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \
25 file://0001-Use-aktualizr-repo-without-a-provided-path.patch \
24 file://aktualizr.service \ 26 file://aktualizr.service \
25 file://aktualizr-secondary.service \ 27 file://aktualizr-secondary.service \
26 file://aktualizr-secondary.socket \ 28 file://aktualizr-secondary.socket \
@@ -32,9 +34,7 @@ BRANCH ?= "master"
32 34
33S = "${WORKDIR}/git" 35S = "${WORKDIR}/git"
34 36
35inherit cmake 37inherit cmake systemd ptest
36
37inherit systemd
38 38
39SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" 39SYSTEMD_PACKAGES = "${PN} ${PN}-secondary"
40SYSTEMD_SERVICE_${PN} = "aktualizr.service" 40SYSTEMD_SERVICE_${PN} = "aktualizr.service"
@@ -56,6 +56,10 @@ EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON \
56 -DGARAGE_SIGN_VERSION=${GARAGE_SIGN_VERSION} \ 56 -DGARAGE_SIGN_VERSION=${GARAGE_SIGN_VERSION} \
57 -DGARAGE_SIGN_SHA256=${GARAGE_SIGN_SHA256}" 57 -DGARAGE_SIGN_SHA256=${GARAGE_SIGN_SHA256}"
58 58
59do_compile_ptest() {
60 cmake_runcmake_build --target build_tests
61}
62
59do_install_append () { 63do_install_append () {
60 install -d ${D}${libdir}/sota 64 install -d ${D}${libdir}/sota
61 install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml 65 install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml
diff --git a/recipes-sota/aktualizr/files/0001-Use-aktualizr-repo-without-a-provided-path.patch b/recipes-sota/aktualizr/files/0001-Use-aktualizr-repo-without-a-provided-path.patch
new file mode 100644
index 0000000..29c75fc
--- /dev/null
+++ b/recipes-sota/aktualizr/files/0001-Use-aktualizr-repo-without-a-provided-path.patch
@@ -0,0 +1,24 @@
1From f5a501f842749ba31f76526a395f09cc61435ec3 Mon Sep 17 00:00:00 2001
2From: Patrick Vacek <patrickvacek@gmail.com>
3Date: Wed, 31 Oct 2018 14:55:48 +0100
4Subject: [PATCH] Use aktualizr-repo without a provided path.
5
6This is necessary for building the tests for ptest because we want to
7use the native version of aktualizr-repo (built for the host).
8---
9 tests/uptane_repo_generation/CMakeLists.txt | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/tests/uptane_repo_generation/CMakeLists.txt b/tests/uptane_repo_generation/CMakeLists.txt
13index 83c14230..6f89d6a5 100644
14--- a/tests/uptane_repo_generation/CMakeLists.txt
15+++ b/tests/uptane_repo_generation/CMakeLists.txt
16@@ -1,4 +1,4 @@
17 add_custom_target(uptane_repo_full_no_correlation_id
18 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/full_no_correlation_id.sh
19- $<TARGET_FILE:aktualizr-repo> ${PROJECT_BINARY_DIR}/uptane_repos/full_no_correlation_id)
20+ aktualizr-repo ${PROJECT_BINARY_DIR}/uptane_repos/full_no_correlation_id)
21 add_dependencies(uptane_repo_full_no_correlation_id aktualizr-repo)
22--
232.17.1
24