diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2017-10-25 13:57:11 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2017-10-25 17:35:25 +0200 |
commit | 86032c413ec220a77a66402aeffd627e8f68243f (patch) | |
tree | b9a05350523c043bee47caee6ffba6187d09d05e | |
parent | eceaca216c73bd188821e111a73723069668e1f3 (diff) | |
download | meta-updater-86032c413ec220a77a66402aeffd627e8f68243f.tar.gz |
Clean up recipes according to Yocto recommendations.
* Use ${libdir} and ${bindir} wherever possible.
* Use rm -f so that tasks are repeatable.
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-auto-prov.bb | 6 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-implicit-prov.bb | 8 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-native_git.bb | 6 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index 48777b2..4f9fe4f 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb | |||
@@ -39,8 +39,8 @@ do_install_append() { | |||
39 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 39 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
40 | install -d ${D}/${systemd_unitdir}/system | 40 | install -d ${D}/${systemd_unitdir}/system |
41 | install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service | 41 | install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service |
42 | install -d ${D}/usr/lib/sota | 42 | install -d ${D}${libdir}/sota |
43 | install -m "0644" ${WORKDIR}/sota_autoprov.toml ${D}/usr/lib/sota/sota.toml | 43 | install -m "0644" ${WORKDIR}/sota_autoprov.toml ${D}${libdir}/sota/sota.toml |
44 | 44 | ||
45 | # deploy SOTA credentials | 45 | # deploy SOTA credentials |
46 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then | 46 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then |
@@ -57,6 +57,6 @@ do_install_append() { | |||
57 | 57 | ||
58 | FILES_${PN} = " \ | 58 | FILES_${PN} = " \ |
59 | ${systemd_unitdir}/system/aktualizr.service \ | 59 | ${systemd_unitdir}/system/aktualizr.service \ |
60 | /usr/lib/sota/sota.toml \ | 60 | ${libdir}/sota/sota.toml \ |
61 | /var/sota/sota_provisioning_credentials.zip \ | 61 | /var/sota/sota_provisioning_credentials.zip \ |
62 | " | 62 | " |
diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb index a01ef48..21e38c9 100644 --- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb | |||
@@ -22,13 +22,13 @@ inherit systemd | |||
22 | do_install() { | 22 | do_install() { |
23 | install -d ${D}/${systemd_unitdir}/system | 23 | install -d ${D}/${systemd_unitdir}/system |
24 | install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service | 24 | install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service |
25 | install -d ${D}/usr/lib/sota | 25 | install -d ${D}${libdir}/sota |
26 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ | 26 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ |
27 | -i ${WORKDIR}/sota_implicit_prov.toml -o ${D}/usr/lib/sota/sota.toml -p ${D} | 27 | -i ${WORKDIR}/sota_implicit_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D} |
28 | } | 28 | } |
29 | 29 | ||
30 | FILES_${PN} = " \ | 30 | FILES_${PN} = " \ |
31 | ${systemd_unitdir}/system/aktualizr.service \ | 31 | ${systemd_unitdir}/system/aktualizr.service \ |
32 | /usr/lib/sota/sota.toml \ | 32 | ${libdir}/sota/sota.toml \ |
33 | /usr/lib/sota/root.crt \ | 33 | ${libdir}/sota/root.crt \ |
34 | " | 34 | " |
diff --git a/recipes-sota/aktualizr/aktualizr-native_git.bb b/recipes-sota/aktualizr/aktualizr-native_git.bb index b89e9de..70ebdf0 100644 --- a/recipes-sota/aktualizr/aktualizr-native_git.bb +++ b/recipes-sota/aktualizr/aktualizr-native_git.bb | |||
@@ -7,9 +7,9 @@ inherit native | |||
7 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF -DAKTUALIZR_VERSION=${PV}" | 7 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF -DAKTUALIZR_VERSION=${PV}" |
8 | 8 | ||
9 | do_install_append () { | 9 | do_install_append () { |
10 | rm ${D}${bindir}/aktualizr | 10 | rm -f ${D}${bindir}/aktualizr |
11 | rm ${D}${bindir}/aktualizr_cert_provider | 11 | rm -f ${D}${bindir}/aktualizr_cert_provider |
12 | rm ${D}${bindir}/garage-deploy | 12 | rm -f ${D}${bindir}/garage-deploy |
13 | } | 13 | } |
14 | 14 | ||
15 | FILES_${PN} = " \ | 15 | FILES_${PN} = " \ |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 1b3986a..7c65eb7 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -12,9 +12,9 @@ inherit systemd | |||
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}" | 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}" |
13 | 13 | ||
14 | do_install_append () { | 14 | do_install_append () { |
15 | rm ${D}${bindir}/aktualizr_cert_provider | 15 | rm -f ${D}${bindir}/aktualizr_cert_provider |
16 | rm ${D}${bindir}/aktualizr_implicit_writer | 16 | rm -f ${D}${bindir}/aktualizr_implicit_writer |
17 | rm ${D}${bindir}/garage-deploy | 17 | rm -f ${D}${bindir}/garage-deploy |
18 | } | 18 | } |
19 | 19 | ||
20 | FILES_${PN} = " \ | 20 | FILES_${PN} = " \ |