summaryrefslogtreecommitdiffstats
path: root/recipes-sota
diff options
context:
space:
mode:
authorMike Sul <ext-mykhaylo.sul@here.com>2019-05-17 10:58:30 +0300
committerMike Sul <ext-mykhaylo.sul@here.com>2019-05-27 10:40:00 +0300
commit753f664541c84f1977f370690e38d9130bf9e2f1 (patch)
tree071fe04a18aab9cb1270779c47918d9e9ff917e8 /recipes-sota
parentee23fa2bcae2fd793d62a531cb5ae0c9272d8a97 (diff)
downloadmeta-updater-753f664541c84f1977f370690e38d9130bf9e2f1.tar.gz
OTA-2541: Remove Secondary's socket service. Use a regular systemd service to start Seconadry daemon
Signed-off-by: Mike Sul <ext-mykhaylo.sul@here.com>
Diffstat (limited to 'recipes-sota')
-rwxr-xr-xrecipes-sota/aktualizr/aktualizr_git.bb5
-rw-r--r--recipes-sota/aktualizr/files/aktualizr-secondary.service6
-rw-r--r--recipes-sota/aktualizr/files/aktualizr-secondary.socket6
3 files changed, 6 insertions, 11 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index db8cf38..d61b597 100755
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -22,7 +22,6 @@ SRC_URI = " \
22 file://run-ptest \ 22 file://run-ptest \
23 file://aktualizr.service \ 23 file://aktualizr.service \
24 file://aktualizr-secondary.service \ 24 file://aktualizr-secondary.service \
25 file://aktualizr-secondary.socket \
26 file://aktualizr-serialcan.service \ 25 file://aktualizr-serialcan.service \
27 file://10-resource-control.conf \ 26 file://10-resource-control.conf \
28 ${@ d.expand("https://ats-tuf-cli-releases.s3-eu-central-1.amazonaws.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0") if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''} \ 27 ${@ d.expand("https://ats-tuf-cli-releases.s3-eu-central-1.amazonaws.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0") if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''} \
@@ -45,7 +44,7 @@ PTEST_ENABLED = "0"
45 44
46SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" 45SYSTEMD_PACKAGES = "${PN} ${PN}-secondary"
47SYSTEMD_SERVICE_${PN} = "aktualizr.service" 46SYSTEMD_SERVICE_${PN} = "aktualizr.service"
48SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.socket" 47SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.service"
49 48
50EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} ${@bb.utils.contains('PTEST_ENABLED', '1', '-DTESTSUITE_VALGRIND=on', '', d)}" 49EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} ${@bb.utils.contains('PTEST_ENABLED', '1', '-DTESTSUITE_VALGRIND=on', '', d)}"
51 50
@@ -100,7 +99,6 @@ do_install_append () {
100 install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml 99 install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml
101 install -m 0644 ${S}/config/sota_uboot_env.toml ${D}/${libdir}/sota/sota_uboot_env.toml 100 install -m 0644 ${S}/config/sota_uboot_env.toml ${D}/${libdir}/sota/sota_uboot_env.toml
102 install -d ${D}${systemd_unitdir}/system 101 install -d ${D}${systemd_unitdir}/system
103 install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket
104 install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service 102 install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service
105 install -m 0700 -d ${D}${libdir}/sota/conf.d 103 install -m 0700 -d ${D}${libdir}/sota/conf.d
106 install -m 0700 -d ${D}${sysconfdir}/sota/conf.d 104 install -m 0700 -d ${D}${sysconfdir}/sota/conf.d
@@ -184,7 +182,6 @@ FILES_${PN}-examples = " \
184FILES_${PN}-secondary = " \ 182FILES_${PN}-secondary = " \
185 ${bindir}/aktualizr-secondary \ 183 ${bindir}/aktualizr-secondary \
186 ${libdir}/sota/sota_secondary.toml \ 184 ${libdir}/sota/sota_secondary.toml \
187 ${systemd_unitdir}/system/aktualizr-secondary.socket \
188 ${systemd_unitdir}/system/aktualizr-secondary.service \ 185 ${systemd_unitdir}/system/aktualizr-secondary.service \
189 " 186 "
190 187
diff --git a/recipes-sota/aktualizr/files/aktualizr-secondary.service b/recipes-sota/aktualizr/files/aktualizr-secondary.service
index 9628ee3..b577ae8 100644
--- a/recipes-sota/aktualizr/files/aktualizr-secondary.service
+++ b/recipes-sota/aktualizr/files/aktualizr-secondary.service
@@ -1,8 +1,12 @@
1[Unit] 1[Unit]
2Description=Aktualizr SOTA Client (UPTANE Secondary) 2Description=Aktualizr SOTA Client (UPTANE Secondary)
3After=network.target
3 4
4[Service] 5[Service]
5RestartSec=10 6RestartSec=10
6Restart=always 7Restart=always
7ExecStart=/usr/bin/aktualizr-secondary --config /usr/lib/sota/sota_secondary.toml 8ExecStart=/usr/bin/aktualizr-secondary
9
10[Install]
11WantedBy=multi-user.target
8 12
diff --git a/recipes-sota/aktualizr/files/aktualizr-secondary.socket b/recipes-sota/aktualizr/files/aktualizr-secondary.socket
deleted file mode 100644
index da0ee44..0000000
--- a/recipes-sota/aktualizr/files/aktualizr-secondary.socket
+++ /dev/null
@@ -1,6 +0,0 @@
1[Socket]
2ListenStream=9030
3ListenDatagram=9031
4
5[Install]
6WantedBy=sockets.target \ No newline at end of file