From 49726aa0610764e32bb5eafda2ef3bc672b412ec Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com> Date: Fri, 14 Jan 2022 11:25:22 +0000 Subject: [PATCH] sysota: update to v0.1.0 This version of SysOTA is capable of network updates and rollbacks and seems feature complete. It has some missing tests and validation of non-essential properties. The package is now both stateful and configurable. Configuration is persisted in /etc/sysota. This allows a device to remember the location and settings of the update server. The new sysotactl executable allows configuring the update service and performing updates. The executable is a symbolic link to sysota-mux. The sysotad executable is also converted to a symbolic link to the mux binary. The default configuration files name the device and model as Oniro Project Reference Device. Raspberry Pi is named more precisely. Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com> --- .../sysota/files/raspberrypi4/sysotad.conf | 7 +++++++ .../recipes-core/sysota/files/sysotad.conf | 4 ++++ .../recipes-core/sysota/sysota_git.bb | 18 +++++++++++------- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/meta-oniro-core/recipes-core/sysota/files/raspberrypi4/sysotad.conf b/meta-oniro-core/recipes-core/sysota/files/raspberrypi4/sysotad.conf index 1bb43031..f9a81bc9 100644 --- a/meta-oniro-core/recipes-core/sysota/files/raspberrypi4/sysotad.conf +++ b/meta-oniro-core/recipes-core/sysota/files/raspberrypi4/sysotad.conf @@ -5,3 +5,10 @@ [OTA] BootLoaderType=pi-boot BootPartitionMountDir=/run/mount/boot + +[Device] +Maker=Oniro Project +Model=Raspberry Pi 4B + +[Compatible] +Machine=raspberrypi4-64 diff --git a/meta-oniro-core/recipes-core/sysota/files/sysotad.conf b/meta-oniro-core/recipes-core/sysota/files/sysotad.conf index e76921bb..ca1a87de 100644 --- a/meta-oniro-core/recipes-core/sysota/files/sysotad.conf +++ b/meta-oniro-core/recipes-core/sysota/files/sysotad.conf @@ -4,3 +4,7 @@ [OTA] BootLoaderType=inert + +[Device] +Maker=Oniro Project +Model=Reference Device diff --git a/meta-oniro-core/recipes-core/sysota/sysota_git.bb b/meta-oniro-core/recipes-core/sysota/sysota_git.bb index b0bfb59a..d78167a2 100644 --- a/meta-oniro-core/recipes-core/sysota/sysota_git.bb +++ b/meta-oniro-core/recipes-core/sysota/sysota_git.bb @@ -6,10 +6,10 @@ DESCRIPTION = "Robust, unattended update system for Linux gateways" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSES/Apache-2.0.txt;md5=c846ebb396f8b174b10ded4771514fcc" -SRC_URI = "git://booting.oniroproject.org/distro/components/sysota.git;protocol=https;branch=main \ +SRC_URI = "git://gitlab.com/zygoon/sysota.git;protocol=https;branch=main \ file://sysotad.conf \ " -SRCREV = "3cb40a1392fd2b849db711c6a9a050d00bad8c93" +SRCREV = "6aec6e345e7c7f6d94932acbebeada32fde33162" S = "${WORKDIR}/git" # This package is built with go-mod as well as with make. @@ -62,6 +62,7 @@ do_configure:append() { # systemd units. cd ${B}/make-build/ && ${S}/src/${GO_IMPORT}/configure \ --prefix=${prefix} \ + --bindir=${bindir} \ --libexecdir=${libexecdir} \ --sysconfdir=${sysconfdir} } @@ -69,8 +70,8 @@ do_configure:append() { do_compile:append() { # See the "trick" paragraph above. If additional binaries are added to the # package, they should be moved as well. - mkdir -p ${B}/make-build/cmd/sysotad - mv ${B}/${GO_BUILD_BINDIR}/sysotad ${B}/make-build/cmd/sysotad + mkdir -p ${B}/make-build/cmd/sysota-mux + mv ${B}/${GO_BUILD_BINDIR}/sysota-mux ${B}/make-build/cmd/sysota-mux # Run the upstream build system which prepares systemd units and manual pages. oe_runmake -C ${B}/make-build --warn-undefined-variables Go.Cmd=/bin/false @@ -114,6 +115,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" # Persist SystemOTA state directory. inherit writables -WRITABLE_TYPE[sysota] = "persistent" -WRITABLES = "sysota" -WRITABLE_PATH[sysota] = "/var/lib/sysota" +WRITABLES = "sysota-lib sysota-cfg" +WRITABLE_TYPE[sysota-lib] = "persistent" +WRITABLE_PATH[sysota-lib] = "/var/lib/sysota" + +WRITABLE_TYPE[sysota-cfg] = "persistent" +WRITABLE_PATH[sysota-cfg] = "/etc/sysota" -- GitLab