-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create tedge-service as standalone recipe in tedge-common for r…
…ust and precompiled version Signed-off-by: Krzysztof Piotrowski <[email protected]>
- Loading branch information
Showing
24 changed files
with
91 additions
and
212 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
meta-tedge-bin/recipes-tedge/tedge-bin/init-managers/tedge-openrc.inc
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
meta-tedge-bin/recipes-tedge/tedge-bin/init-managers/tedge-systemd.inc
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
meta-tedge-bin/recipes-tedge/tedge-bin/init-managers/tedge-sysvinit.inc
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
meta-tedge-common/recipes-tedge/tedge-service/tedge-service_git.bb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
SRC_URI += "git://[email protected]/thin-edge/tedge-services.git;protocol=https;branch=main" | ||
SRCREV= "${AUTOREV}" | ||
S = "${WORKDIR}/git" | ||
|
||
PV = "0.1.0+git${SRCPV}" | ||
|
||
LICENSE = "Apache-2.0" | ||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" | ||
|
||
inherit allarch | ||
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} | ||
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'update-rc.d', '', d)} | ||
|
||
TEDGE_CONFIG_DIR ?= "/etc/tedge" | ||
|
||
do_install () { | ||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
install -d ${D}${systemd_system_unitdir} | ||
for service in ${S}/services/systemd/system/*; do | ||
install -m 0644 $service ${D}${systemd_system_unitdir} | ||
done | ||
elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
install -d ${D}${sysconfdir}/init.d | ||
for service in ${S}/services/sysvinit-yocto/init.d/*; do | ||
install -m 0755 $service ${D}${sysconfdir}/init.d | ||
done | ||
fi | ||
|
||
# Install for every init manager but systemd as it is natively supported by thin-edge | ||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then | ||
install -m 0644 ${S}/services/system.toml ${D}${TEDGE_CONFIG_DIR} | ||
|
||
install -d ${D}${sysconfdir}/tedgectl | ||
install -m 0644 ${S}/services/tedgectl_env ${D}${sysconfdir}/tedgectl/env | ||
|
||
install -d ${D}${bindir} | ||
install -m 0755 ${S}/services/tedgectl ${D}${bindir} | ||
fi | ||
|
||
# Remove c8y-firmware-plugin as this is deprecated | ||
rm -f ${D}${systemd_system_unitdir}/c8y-firmware-plugin.service | ||
rm -f ${D}${sysconfdir}/init.d/c8y-firmware-plugin | ||
} | ||
|
||
PACKAGES += "tedge-agent tedge-mapper-c8y tedge-mapper-aws tedge-mapper-az tedge-mapper-collectd" | ||
|
||
FILES:${PN} += "\ | ||
${sysconfdir}/init.d/* \ | ||
${TEDGE_CONFIG_DIR}/system.toml \ | ||
${sysconfdir}/tedgectl/env \ | ||
${bindir}/tedgectl \ | ||
" | ||
|
||
FILES:tedge-agent += "\ | ||
${systemd_system_unitdir}/tedge-agent.service \ | ||
" | ||
FILES:tedge-mapper-c8y += "\ | ||
${systemd_system_unitdir}/tedge-mapper-c8y.service \ | ||
${systemd_system_unitdir}/[email protected] \ | ||
${systemd_system_unitdir}/c8y-remote-access-plugin.socket \ | ||
" | ||
FILES:tedge-mapper-aws += "\ | ||
${systemd_system_unitdir}/tedge-mapper-aws.service \ | ||
" | ||
FILES:tedge-mapper-az += "\ | ||
${systemd_system_unitdir}/tedge-mapper-az.service \ | ||
" | ||
FILES:tedge-mapper-collectd += "\ | ||
${systemd_system_unitdir}/tedge-mapper-collectd.service \ | ||
" | ||
|
||
SYSTEMD_PACKAGES = "tedge-agent tedge-mapper-c8y tedge-mapper-aws tedge-mapper-az tedge-mapper-collectd" | ||
SYSTEMD_SERVICE:tedge-agent = "tedge-agent.service" | ||
SYSTEMD_SERVICE:tedge-mapper-c8y = "tedge-mapper-c8y.service [email protected] c8y-remote-access-plugin.socket" | ||
SYSTEMD_SERVICE:tedge-mapper-aws = "tedge-mapper-aws.service" | ||
SYSTEMD_SERVICE:tedge-mapper-az = "tedge-mapper-az.service" | ||
SYSTEMD_SERVICE:tedge-mapper-collectd = "tedge-mapper-collectd.service" | ||
|
||
ALLOW_EMPTY:${PN} = "1" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
SRC_URI += "git://[email protected]/thin-edge/thin-edge.io.git;protocol=https;branch=main;name=tedge" | ||
SRC_URI += "git://[email protected]/thin-edge/thin-edge.io.git;protocol=https;branch=main" | ||
|
||
SRC_URI += " \ | ||
file://operations/c8y/c8y_RemoteAccessConnect \ | ||
|
@@ -15,7 +15,7 @@ LICENSE = "Apache-2.0" | |
|
||
inherit cargo-tedge useradd | ||
|
||
RDEPENDS:${PN} = "${PN}-agent ${PN}-mapper-c8y ${PN}-mapper-aws ${PN}-mapper-az ${PN}-mapper-collectd mosquitto ca-certificates libgcc glibc-utils libxcrypt sudo collectd" | ||
RDEPENDS:${PN} = "${PN}-agent ${PN}-mapper-c8y ${PN}-mapper-aws ${PN}-mapper-az ${PN}-mapper-collectd tedge-service mosquitto ca-certificates libgcc glibc-utils libxcrypt sudo collectd" | ||
|
||
USERADD_PACKAGES = "${PN}" | ||
GROUPADD_PARAM:${PN} = "--system --gid 950 tedge" | ||
|
@@ -84,5 +84,3 @@ FILES:${PN} = "\ | |
${TEDGE_CONFIG_DIR}/contrib/collectd \ | ||
${TEDGE_CONFIG_DIR}/sm-plugins/apt \ | ||
" | ||
|
||
require tedge-services.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.