summaryrefslogtreecommitdiffstats
path: root/external/meta-updater/recipes-sota
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-updater/recipes-sota')
-rw-r--r--external/meta-updater/recipes-sota/aktualizr/aktualizr-collectd.bb21
-rw-r--r--external/meta-updater/recipes-sota/aktualizr/aktualizr-shared-prov.bb2
-rw-r--r--external/meta-updater/recipes-sota/aktualizr/aktualizr_git.bb26
-rw-r--r--external/meta-updater/recipes-sota/aktualizr/files/10-resource-control.conf1
-rw-r--r--external/meta-updater/recipes-sota/aktualizr/files/aktualizr-collectd.conf9
-rw-r--r--external/meta-updater/recipes-sota/aktualizr/files/aktualizr.service3
-rw-r--r--external/meta-updater/recipes-sota/config/aktualizr-binary-pacman.bb21
-rw-r--r--external/meta-updater/recipes-sota/config/files/10-pacman.toml2
-rw-r--r--external/meta-updater/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb61
-rw-r--r--external/meta-updater/recipes-sota/ostree/ostree_git.bb69
10 files changed, 132 insertions, 83 deletions
diff --git a/external/meta-updater/recipes-sota/aktualizr/aktualizr-collectd.bb b/external/meta-updater/recipes-sota/aktualizr/aktualizr-collectd.bb
new file mode 100644
index 00000000..c1fc717a
--- /dev/null
+++ b/external/meta-updater/recipes-sota/aktualizr/aktualizr-collectd.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Aktualizr metric collection"
+HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
+SECTION = "base"
+LICENSE = "MPL-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
+
+RDEPENDS_${PN} = "collectd"
+
+SRC_URI = " file://aktualizr-collectd.conf"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${sysconfdir}/collectd.conf.d
+ install -m 0644 ${WORKDIR}/aktualizr-collectd.conf ${D}${sysconfdir}/collectd.conf.d/aktualizr.conf
+}
+
+FILES_${PN} = " \
+ ${sysconfdir}/collectd.conf.d \
+ ${sysconfdir}/collectd.conf.d/aktualizr.conf \
+ "
diff --git a/external/meta-updater/recipes-sota/aktualizr/aktualizr-shared-prov.bb b/external/meta-updater/recipes-sota/aktualizr/aktualizr-shared-prov.bb
index 2ee47a16..0f712df4 100644
--- a/external/meta-updater/recipes-sota/aktualizr/aktualizr-shared-prov.bb
+++ b/external/meta-updater/recipes-sota/aktualizr/aktualizr-shared-prov.bb
@@ -10,7 +10,7 @@ inherit allarch
# We need to get the config files from the aktualizr-host-tools package built by
# the aktualizr (target) recipe.
DEPENDS = "aktualizr"
-RDEPENDS_${PN}_append = "${@' aktualizr-shared-prov-creds' if d.getVar('SOTA_DEPLOY_CREDENTIALS') == '1' else ''}"
+RDEPENDS_${PN}_append = "${@' aktualizr-shared-prov-creds' if oe.types.boolean(d.getVar('SOTA_DEPLOY_CREDENTIALS')) else ''}"
# If the config file from aktualizr used here is changed, you will need to bump
# the version here because of SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS!
diff --git a/external/meta-updater/recipes-sota/aktualizr/aktualizr_git.bb b/external/meta-updater/recipes-sota/aktualizr/aktualizr_git.bb
index 20dd4237..d9b464f6 100644
--- a/external/meta-updater/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/external/meta-updater/recipes-sota/aktualizr/aktualizr_git.bb
@@ -10,14 +10,14 @@ DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native
RDEPENDS_${PN}_class-target = "${PN}-configs ${PN}-hwid lshw"
RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}"
-RDEPENDS_${PN}-ptest += "bash cmake curl python3-misc python3-modules openssl-bin sqlite3 valgrind"
+RDEPENDS_${PN}-ptest += "bash cmake curl net-tools python3-core python3-misc python3-modules openssl-bin sqlite3 valgrind"
PRIVATE_LIBS_${PN}-ptest = "libaktualizr.so libaktualizr_secondary.so"
PV = "1.0+git${SRCPV}"
PR = "7"
-GARAGE_SIGN_PV = "0.7.0-87-g905dc3c"
+GARAGE_SIGN_PV = "0.7.1-10-ga0a099a"
SRC_URI = " \
gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \
@@ -26,13 +26,13 @@ SRC_URI = " \
file://aktualizr-secondary.service \
file://aktualizr-serialcan.service \
file://10-resource-control.conf \
- ${@ d.expand("https://ats-tuf-cli-releases.s3-eu-central-1.amazonaws.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''} \
+ ${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''} \
"
-SRC_URI[garagesign.md5sum] = "064b408c60676dcf282aa9209bff7dac"
-SRC_URI[garagesign.sha256sum] = "75c9b3cf24eb31dacb127d3b3d073359082e2b4ee4eeb27d75e792664800ba82"
+SRC_URI[garagesign.md5sum] = "e2354fb75ae56c2d253be26617b2bd10"
+SRC_URI[garagesign.sha256sum] = "2ddb26b19090a42d7aeeda287ed40123ffa3ab55b5dcc4ea4c9320d0a0fd59a0"
-SRCREV = "f90e8996e826d130976a7b7f1835947b7e631025"
+SRCREV = "4169157a1874fca3fb55571c60507c1aefd4e1e5"
BRANCH ?= "master"
S = "${WORKDIR}/git"
@@ -49,7 +49,7 @@ SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.service"
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release ${@bb.utils.contains('PTEST_ENABLED', '1', '-DTESTSUITE_VALGRIND=on', '', d)}"
-GARAGE_SIGN_OPS = "${@ d.expand('-DGARAGE_SIGN_ARCHIVE=${WORKDIR}/cli-${GARAGE_SIGN_PV}.tgz') if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''}"
+GARAGE_SIGN_OPS = "${@ d.expand('-DGARAGE_SIGN_ARCHIVE=${WORKDIR}/cli-${GARAGE_SIGN_PV}.tgz') if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''}"
PKCS11_ENGINE_PATH = "${libdir}/engines-1.1/pkcs11.so"
PACKAGECONFIG ?= "ostree ${@bb.utils.filter('SOTA_CLIENT_FEATURES', 'hsm serialcan ubootenv', d)}"
@@ -132,23 +132,25 @@ PACKAGESPLITFUNCS_prepend = "split_hosttools_packages "
python split_hosttools_packages () {
bindir = d.getVar('bindir')
- # Split all binaries to their own packages except aktualizr-info,
- # aktualizr-info should stay in main package aktualizr.
- do_split_packages(d, bindir, r'^((?!(aktualizr-info)).*)$', '%s', 'Aktualizr tool - %s', extra_depends='aktualizr-configs', prepend=False)
+ # Split all binaries to their own packages.
+ do_split_packages(d, bindir, '^(.*)$', '%s', 'Aktualizr tool - %s', extra_depends='aktualizr-configs', prepend=False)
}
PACKAGES_DYNAMIC = "^aktualizr-.* ^garage-.*"
-PACKAGES =+ "${PN}-host-tools ${PN}-lib ${PN}-resource-control ${PN}-configs ${PN}-secondary ${PN}-secondary-lib ${PN}-sotatools-lib"
+PACKAGES =+ "${PN}-host-tools ${PN}-info ${PN}-lib ${PN}-resource-control ${PN}-configs ${PN}-secondary ${PN}-secondary-lib ${PN}-sotatools-lib"
ALLOW_EMPTY_${PN}-host-tools = "1"
FILES_${PN} = " \
${bindir}/aktualizr \
- ${bindir}/aktualizr-info \
${systemd_unitdir}/system/aktualizr.service \
"
+FILES_${PN}-info = " \
+ ${bindir}/aktualizr-info \
+ "
+
FILES_${PN}-lib = " \
${libdir}/libaktualizr.so \
"
diff --git a/external/meta-updater/recipes-sota/aktualizr/files/10-resource-control.conf b/external/meta-updater/recipes-sota/aktualizr/files/10-resource-control.conf
index 254713c4..5c5a593e 100644
--- a/external/meta-updater/recipes-sota/aktualizr/files/10-resource-control.conf
+++ b/external/meta-updater/recipes-sota/aktualizr/files/10-resource-control.conf
@@ -4,3 +4,4 @@ CPUWeight=@CPU_WEIGHT@
MemoryAccounting=true
MemoryHigh=@MEMORY_HIGH@
MemoryMax=@MEMORY_MAX@
+IPAccounting=true
diff --git a/external/meta-updater/recipes-sota/aktualizr/files/aktualizr-collectd.conf b/external/meta-updater/recipes-sota/aktualizr/files/aktualizr-collectd.conf
new file mode 100644
index 00000000..35a1f61e
--- /dev/null
+++ b/external/meta-updater/recipes-sota/aktualizr/files/aktualizr-collectd.conf
@@ -0,0 +1,9 @@
+<LoadPlugin processes>
+ Interval 1
+</LoadPlugin>
+<Plugin processes>
+ CollectFileDescriptor true
+ CollectContextSwitch true
+ CollectMemoryMaps true
+ Process "aktualizr"
+</Plugin>
diff --git a/external/meta-updater/recipes-sota/aktualizr/files/aktualizr.service b/external/meta-updater/recipes-sota/aktualizr/files/aktualizr.service
index 3d807a1f..ae5d23a5 100644
--- a/external/meta-updater/recipes-sota/aktualizr/files/aktualizr.service
+++ b/external/meta-updater/recipes-sota/aktualizr/files/aktualizr.service
@@ -1,6 +1,7 @@
[Unit]
Description=Aktualizr SOTA Client
-After=network-online.target nss-lookup.target
+After=network-online.target nss-lookup.target boot-complete.target
+Requires=boot-complete.target
Wants=network-online.target
[Service]
diff --git a/external/meta-updater/recipes-sota/config/aktualizr-binary-pacman.bb b/external/meta-updater/recipes-sota/config/aktualizr-binary-pacman.bb
new file mode 100644
index 00000000..36bafb3c
--- /dev/null
+++ b/external/meta-updater/recipes-sota/config/aktualizr-binary-pacman.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Configure aktualizr with a binary package manager"
+LICENSE = "MPL-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
+
+inherit allarch
+
+SRC_URI = "\
+ file://10-pacman.toml \
+ "
+
+FILES_${PN} = " \
+ ${libdir}/sota/conf.d \
+ ${libdir}/sota/conf.d/10-pacman.toml \
+ "
+
+PR = "1"
+
+do_install() {
+ install -m 0700 -d ${D}${libdir}/sota/conf.d
+ install -m 0644 ${WORKDIR}/10-pacman.toml ${D}${libdir}/sota/conf.d/10-pacman.toml
+}
diff --git a/external/meta-updater/recipes-sota/config/files/10-pacman.toml b/external/meta-updater/recipes-sota/config/files/10-pacman.toml
new file mode 100644
index 00000000..a24fd39b
--- /dev/null
+++ b/external/meta-updater/recipes-sota/config/files/10-pacman.toml
@@ -0,0 +1,2 @@
+[pacman]
+type = "none"
diff --git a/external/meta-updater/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb b/external/meta-updater/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb
new file mode 100644
index 00000000..136bb22d
--- /dev/null
+++ b/external/meta-updater/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb
@@ -0,0 +1,61 @@
+SUMMARY = "Ostree linux kernel, devicetrees and initramfs packager"
+DESCRIPTION = "Ostree linux kernel, devicetrees and initramfs packager"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+# Whilst not a module, this ensures we don't get multilib extended (which would make no sense)
+inherit module-base kernel-artifact-names
+
+PACKAGES = "ostree-kernel ostree-initramfs ostree-devicetrees"
+
+ALLOW_EMPTY_ostree-initramfs = "1"
+ALLOW_EMPTY_ostree-devicetrees = "1"
+
+FILES_ostree-kernel = "${nonarch_base_libdir}/modules/*/vmlinuz"
+FILES_ostree-initramfs = "${nonarch_base_libdir}/modules/*/initramfs.img"
+FILES_ostree-devicetrees = "${nonarch_base_libdir}/modules/*/dtb/* \
+ ${nonarch_base_libdir}/modules/*/devicetree \
+"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+KERNEL_BUILD_ROOT = "${nonarch_base_libdir}/modules/"
+
+# There's nothing to do here, except install the artifacts where we can package them
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+deltask do_populate_sysroot
+
+do_install() {
+ kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
+ install -d $kerneldir
+
+ cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} $kerneldir/vmlinuz
+
+ if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then
+ if [ -n "${INITRAMFS_IMAGE}" ]; then
+ cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} $kerneldir/initramfs.img
+ fi
+
+ if [ ${@ oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}')} = True ] && [ -n "${OSTREE_DEVICETREE}" ]; then
+ mkdir -p $kerneldir/dtb
+ for dts_file in ${OSTREE_DEVICETREE}; do
+ dts_file_basename=$(basename $dts_file)
+ cp ${DEPLOY_DIR_IMAGE}/$dts_file_basename $kerneldir/dtb/$dts_file_basename
+ done
+ cp $kerneldir/dtb/$(basename $(echo ${OSTREE_DEVICETREE} | awk '{print $1}')) $kerneldir/devicetree
+ fi
+ fi
+}
+do_install[vardepsexclude] = "KERNEL_VERSION"
+INITRAMFS_IMAGE ?= ""
+do_install[depends] = "virtual/kernel:do_deploy ${@['${INITRAMFS_IMAGE}:do_image_complete', ''][d.getVar('INITRAMFS_IMAGE') == '']}"
+
+python() {
+ if not d.getVar('OSTREE_KERNEL'):
+ raise bb.parse.SkipRecipe('OSTREE_KERNEL is not defined, maybe your MACHINE config does not inherit sota.bbclass?')
+}
diff --git a/external/meta-updater/recipes-sota/ostree/ostree_git.bb b/external/meta-updater/recipes-sota/ostree/ostree_git.bb
deleted file mode 100644
index 93ae6e74..00000000
--- a/external/meta-updater/recipes-sota/ostree/ostree_git.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-SUMMARY = "Tool for managing bootable, immutable, versioned filesystem trees"
-HOMEPAGE = "https://ostree.readthedocs.io/en/latest/"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-inherit autotools pkgconfig systemd bash-completion gobject-introspection
-
-SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master"
-
-SRCREV = "f3eba6bcec39c163eb831c02c148ffa483292906"
-
-PV = "v2018.9"
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native"
-
-DEPENDS += "attr bison-native libarchive libcap glib-2.0 gpgme fuse e2fsprogs curl xz"
-DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-RDEPENDS_${PN}-dracut = "bash"
-
-CFLAGS_append = " -Wno-error=missing-prototypes"
-EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup"
-EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
-
-# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
-# do_configure stage so we do depend on it
-SYSROOT_DIR = "${STAGING_DIR_TARGET}"
-SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
-do_configure[vardeps] += "SYSROOT_DIR"
-
-SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service ostree-finalize-staged.service"
-
-export BUILD_SYS
-export HOST_SYS
-export STAGING_INCDIR
-export STAGING_LIBDIR
-
-do_configure_prepend() {
- unset docdir
- NOCONFIGURE=1 "${S}/autogen.sh"
-}
-
-do_install_append_class-native() {
- create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
-}
-
-PACKAGES += " \
- ${PN}-switchroot \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \
-"
-
-FILES_${PN} = "${bindir} \
- ${sysconfdir}/ostree \
- ${datadir}/ostree \
- ${libdir}/*.so.* \
- ${libdir}/ostree/ostree-grub-generator \
- ${libdir}/ostree/ostree-remount \
- ${libdir}/girepository-1.0/* \
- ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system/*.path', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \
-"
-FILES_${PN}-dev += " ${datadir}/gir-1.0"
-FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut"
-FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root"