summaryrefslogtreecommitdiffstats
path: root/external/meta-updater
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-updater')
-rw-r--r--external/meta-updater/.gitlab-ci.yml4
-rw-r--r--external/meta-updater/classes/image_types_ostree.bbclass86
-rw-r--r--external/meta-updater/classes/image_types_ota.bbclass31
-rw-r--r--external/meta-updater/classes/sota.bbclass10
-rw-r--r--external/meta-updater/classes/sota_freedom-u540.bbclass12
-rw-r--r--external/meta-updater/classes/sota_m3ulcb.bbclass4
-rw-r--r--external/meta-updater/classes/sota_minnowboard.bbclass4
-rw-r--r--external/meta-updater/classes/sota_porter.bbclass4
-rw-r--r--external/meta-updater/classes/sota_qemux86-64.bbclass2
-rw-r--r--external/meta-updater/classes/sota_raspberrypi.bbclass13
-rw-r--r--external/meta-updater/classes/sota_sanity.bbclass23
-rw-r--r--external/meta-updater/conf/distro/poky-sota-systemd.conf2
-rw-r--r--external/meta-updater/conf/distro/sota.conf.inc5
-rw-r--r--external/meta-updater/conf/include/bblayers/sota.inc1
-rw-r--r--external/meta-updater/conf/include/bblayers/sota_freedom-u540.inc2
-rw-r--r--external/meta-updater/conf/include/bblayers/sota_raspberrypi2.inc1
-rw-r--r--external/meta-updater/conf/include/bblayers/sota_raspberrypi3-64.inc1
-rw-r--r--external/meta-updater/conf/include/bblayers/sota_raspberrypi3.inc1
-rw-r--r--external/meta-updater/conf/layer.conf3
-rw-r--r--external/meta-updater/conf/local.conf.nonostree.append2
-rw-r--r--external/meta-updater/lib/oeqa/selftest/cases/updater_qemux86_64.py5
-rw-r--r--external/meta-updater/lib/oeqa/selftest/cases/updater_raspberrypi.py8
-rw-r--r--external/meta-updater/recipes-connectivity/connman/connman_%.bbappend2
-rw-r--r--external/meta-updater/recipes-connectivity/connman/connman_1.35.bbappend6
-rw-r--r--external/meta-updater/recipes-connectivity/connman/files/0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch22
-rw-r--r--external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb2
-rw-r--r--external/meta-updater/recipes-core/images/initramfs-ostree-image.bb4
-rw-r--r--external/meta-updater/recipes-extended/collectd/collectd_%.bbappend5
-rw-r--r--external/meta-updater/recipes-extended/ostree/ostree_%.bbappend4
-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
-rw-r--r--external/meta-updater/recipes-support/boost/boost_1.72.0.bbappend4
-rw-r--r--external/meta-updater/recipes-support/boost/files/0001-add-typedef-executor_type.patch56
-rw-r--r--external/meta-updater/recipes-support/libp11/libp11_git.bb40
-rw-r--r--external/meta-updater/recipes-support/softhsm-testtoken/softhsm-testtoken.bb2
-rw-r--r--external/meta-updater/recipes-test/images/primary-image.bb2
-rw-r--r--external/meta-updater/recipes-test/images/secondary-image.bb2
-rwxr-xr-xexternal/meta-updater/scripts/envsetup.sh32
-rwxr-xr-xexternal/meta-updater/scripts/find_aktualizr_dependencies.sh9
47 files changed, 352 insertions, 279 deletions
diff --git a/external/meta-updater/.gitlab-ci.yml b/external/meta-updater/.gitlab-ci.yml
index f0c08db7..5f7f36fc 100644
--- a/external/meta-updater/.gitlab-ci.yml
+++ b/external/meta-updater/.gitlab-ci.yml
@@ -31,7 +31,7 @@ Checkout:
stage: checkout
variables:
- MANIFEST: thud
+ MANIFEST: dunfell
CURRENT_PROJECT: meta-updater
except:
- pushes
@@ -112,4 +112,4 @@ trigger-otf-on-pr:
- schedules
script:
- apk add --no-cache curl
- - curl -X POST -F "token=$CI_JOB_TOKEN" -F "ref=master" -F "variables[BITBAKE_JOB_ONLY]=true" -F "variables[BITBAKE_ENV]=thud" -F "variables[PROJECT_NAME]=meta-updater" -F "variables[PROJECT_SHA]=$CI_COMMIT_SHA" https://main.gitlab.in.here.com/api/v4/projects/163/trigger/pipeline
+ - curl -X POST -F "token=$CI_JOB_TOKEN" -F "ref=master" -F "variables[BITBAKE_JOB_ONLY]=true" -F "variables[BITBAKE_ENV]=dunfell" -F "variables[PROJECT_NAME]=meta-updater" -F "variables[PROJECT_SHA]=$CI_COMMIT_SHA" https://main.gitlab.in.here.com/api/v4/projects/163/trigger/pipeline
diff --git a/external/meta-updater/classes/image_types_ostree.bbclass b/external/meta-updater/classes/image_types_ostree.bbclass
index 533d338b..0b928a37 100644
--- a/external/meta-updater/classes/image_types_ostree.bbclass
+++ b/external/meta-updater/classes/image_types_ostree.bbclass
@@ -1,13 +1,13 @@
# OSTree deployment
-inherit distro_features_check
+inherit features_check
+
+REQUIRED_DISTRO_FEATURES = "usrmerge"
-OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs"
OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}"
OSTREE_COMMIT_BODY ??= ""
OSTREE_COMMIT_VERSION ??= "${DISTRO_VERSION}"
OSTREE_UPDATE_SUMMARY ??= "0"
-OSTREE_DEPLOY_DEVICETREE ??= "0"
BUILD_OSTREE_TARBALL ??= "1"
@@ -17,16 +17,25 @@ IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${TAR_IMAGE_ROOTFS} . || [ $? -eq 1 ]"
CONVERSIONTYPES_append = " tar"
-REQUIRED_DISTRO_FEATURES = "usrmerge"
TAR_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}"
+
+python prepare_ostree_rootfs() {
+ import oe.path
+ import shutil
+
+ ostree_rootfs = d.getVar("OSTREE_ROOTFS")
+ if os.path.lexists(ostree_rootfs):
+ bb.utils.remove(ostree_rootfs, True)
+
+ # Copy required as we change permissions on some files.
+ image_rootfs = d.getVar("IMAGE_ROOTFS")
+ oe.path.copyhardlinktree(image_rootfs, ostree_rootfs)
+}
+
do_image_ostree[dirs] = "${OSTREE_ROOTFS}"
-do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}"
+do_image_ostree[prefuncs] += "prepare_ostree_rootfs"
do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete"
IMAGE_CMD_ostree () {
- cp -a ${IMAGE_ROOTFS}/* ${OSTREE_ROOTFS}
- chmod a+rx ${OSTREE_ROOTFS}
- sync
-
for d in var/*; do
if [ "${d}" != "var/local" ]; then
rm -rf ${d}
@@ -37,9 +46,6 @@ IMAGE_CMD_ostree () {
mkdir sysroot
ln -sf sysroot/ostree ostree
- rm -rf tmp/*
- ln -sf sysroot/tmp tmp
-
mkdir -p usr/rootdirs
mv etc usr/
@@ -48,13 +54,11 @@ IMAGE_CMD_ostree () {
mkdir -p usr/etc/tmpfiles.d
tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf
echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf}
- echo "L /var/rootdirs/home - - - - /sysroot/home" >>${tmpfiles_conf}
else
mkdir -p usr/etc/init.d
tmpfiles_conf=usr/etc/init.d/tmpfiles.sh
echo '#!/bin/sh' > ${tmpfiles_conf}
echo "mkdir -p /var/rootdirs; chmod 755 /var/rootdirs" >> ${tmpfiles_conf}
- echo "ln -sf /sysroot/home /var/rootdirs/home" >> ${tmpfiles_conf}
ln -s ../init.d/tmpfiles.sh usr/etc/rcS.d/S20tmpfiles.sh
fi
@@ -63,13 +67,11 @@ IMAGE_CMD_ostree () {
mkdir -p usr/share/sota/
echo -n "${OSTREE_BRANCHNAME}" > usr/share/sota/branchname
- # Preserve data in /home to be later copied to /sysroot/home by sysroot
- # generating procedure
- mkdir -p usr/homedirs
- if [ -d "home" ] && [ ! -L "home" ]; then
- mv home usr/homedirs/home
- ln -sf var/rootdirs/home home
- fi
+ # home directories get copied from the OE root later to the final sysroot
+ # Create a symlink to var/rootdirs/home to make sure the OSTree deployment
+ # redirects /home to /var/rootdirs/home.
+ rm -rf home/
+ ln -sf var/rootdirs/home home
# Move persistent directories to /var
dirs="opt mnt media srv"
@@ -130,27 +132,6 @@ IMAGE_CMD_ostree () {
ln -sf ../var/usrlocal usr/local
- if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then
- # this is a hack for ostree not to override init= in kernel cmdline -
- # make it think that the initramfs is present (while it is in FIT image)
- # since initramfs is fake file, it does not need to be included in checksum
- checksum=$(sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " ")
- touch boot/initramfs-${checksum}
- else
- if [ "${OSTREE_DEPLOY_DEVICETREE}" = "1" ] && [ -n "${KERNEL_DEVICETREE}" ]; then
- checksum=$(cat ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} ${KERNEL_DEVICETREE} | sha256sum | cut -f 1 -d " ")
- for DTS_FILE in ${KERNEL_DEVICETREE}; do
- DTS_FILE_BASENAME=$(basename ${DTS_FILE})
- cp ${DEPLOY_DIR_IMAGE}/${DTS_FILE_BASENAME} boot/devicetree-${DTS_FILE_BASENAME}-${checksum}
- done
- else
- checksum=$(cat ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} | sha256sum | cut -f 1 -d " ")
- fi
- cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum}
- fi
-
- cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum}
-
# Copy image manifest
cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest
}
@@ -164,25 +145,20 @@ IMAGE_CMD_ostreecommit () {
fi
# Commit the result
- ostree --repo=${OSTREE_REPO} commit \
+ ostree_target_hash=$(ostree --repo=${OSTREE_REPO} commit \
--tree=dir=${OSTREE_ROOTFS} \
--skip-if-unchanged \
--branch=${OSTREE_BRANCHNAME} \
--subject="${OSTREE_COMMIT_SUBJECT}" \
--body="${OSTREE_COMMIT_BODY}" \
--add-metadata-string=version="${OSTREE_COMMIT_VERSION}" \
- --bind-ref="${OSTREE_BRANCHNAME}-${IMAGE_BASENAME}"
+ ${EXTRA_OSTREE_COMMIT})
- if [ "${OSTREE_UPDATE_SUMMARY}" = "1" ]; then
+ echo $ostree_target_hash > ${WORKDIR}/ostree_manifest
+
+ if [ ${@ oe.types.boolean('${OSTREE_UPDATE_SUMMARY}')} = True ]; then
ostree --repo=${OSTREE_REPO} summary -u
fi
-
- # To enable simultaneous bitbaking of two images with the same branch name,
- # create a new ref in the repo using the basename of the image. (This first
- # requires deleting it if it already exists.) Fixes OTA-2211.
- ostree --repo=${OSTREE_REPO} refs --delete ${OSTREE_BRANCHNAME}-${IMAGE_BASENAME}
- ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME})
- ostree --repo=${OSTREE_REPO} refs --create=${OSTREE_BRANCHNAME}-${IMAGE_BASENAME} ${ostree_target_hash}
}
IMAGE_TYPEDEP_ostreepush = "ostreecommit"
@@ -197,7 +173,7 @@ IMAGE_CMD_ostreepush () {
if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then
- garage-push -vv --repo=${OSTREE_REPO} \
+ garage-push --loglevel 0 --repo=${OSTREE_REPO} \
--ref=${OSTREE_BRANCHNAME} \
--credentials=${SOTA_PACKED_CREDENTIALS} \
--cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt \
@@ -232,7 +208,7 @@ IMAGE_CMD_garagesign () {
--home-dir ${GARAGE_SIGN_REPO} \
--credentials ${SOTA_PACKED_CREDENTIALS}
- ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME}-${IMAGE_BASENAME})
+ ostree_target_hash=$(cat ${WORKDIR}/ostree_manifest)
# Use OSTree target hash as version if none was provided by the user
target_version=${ostree_target_hash}
@@ -308,7 +284,7 @@ IMAGE_CMD_garagecheck () {
# if credentials are issued by a server that doesn't support offline signing, exit silently
unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec tufrepo.url 2>&1 >/dev/null || exit 0
- ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME}-${IMAGE_BASENAME})
+ ostree_target_hash=$(cat ${WORKDIR}/ostree_manifest)
garage-check --ref=${ostree_target_hash} \
--credentials=${SOTA_PACKED_CREDENTIALS} \
diff --git a/external/meta-updater/classes/image_types_ota.bbclass b/external/meta-updater/classes/image_types_ota.bbclass
index 857161af..36a6a64e 100644
--- a/external/meta-updater/classes/image_types_ota.bbclass
+++ b/external/meta-updater/classes/image_types_ota.bbclass
@@ -45,13 +45,17 @@ do_image_ota[cleandirs] = "${OTA_SYSROOT}"
do_image_ota[depends] = "${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER') == 'grub' else ''} \
${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER') == 'u-boot' else ''}"
IMAGE_CMD_ota () {
- export OSTREE_BOOT_PARTITION=${OSTREE_BOOT_PARTITION}
- ostree admin --sysroot=${OTA_SYSROOT} init-fs ${OTA_SYSROOT}
+ ostree admin --sysroot=${OTA_SYSROOT} init-fs --modern ${OTA_SYSROOT}
ostree admin --sysroot=${OTA_SYSROOT} os-init ${OSTREE_OSNAME}
+
+ # Preparation required to steer ostree bootloader detection
mkdir -p ${OTA_SYSROOT}/boot/loader.0
ln -s loader.0 ${OTA_SYSROOT}/boot/loader
if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then
+ # Used by ostree-grub-generator called by the ostree binary
+ export OSTREE_BOOT_PARTITION=${OSTREE_BOOT_PARTITION}
+
mkdir -p ${OTA_SYSROOT}/boot/grub2
ln -s ../loader/grub.cfg ${OTA_SYSROOT}/boot/grub2/grub.cfg
elif [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then
@@ -60,15 +64,25 @@ IMAGE_CMD_ota () {
bbfatal "Invalid bootloader: ${OSTREE_BOOTLOADER}"
fi
- ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME}-${IMAGE_BASENAME})
+ ostree_target_hash=$(cat ${WORKDIR}/ostree_manifest)
+ # Use OSTree hash to avoid any potential race conditions between
+ # multiple builds accessing the same ${OSTREE_REPO}.
ostree --repo=${OTA_SYSROOT}/ostree/repo pull-local --remote=${OSTREE_OSNAME} ${OSTREE_REPO} ${ostree_target_hash}
kargs_list=""
for arg in ${OSTREE_KERNEL_ARGS}; do
kargs_list="${kargs_list} --karg-append=$arg"
done
- ostree admin --sysroot=${OTA_SYSROOT} deploy ${kargs_list} --os=${OSTREE_OSNAME} ${ostree_target_hash}
+ # Create the same reference on the device we use in the archive OSTree
+ # repo in ${OSTREE_REPO}. This reference will show up when showing the
+ # deployment on the device:
+ # ostree admin status
+ # If a remote with the name ${OSTREE_OSNAME} is configured, this also
+ # will allow to use:
+ # ostree admin upgrade
+ ostree --repo=${OTA_SYSROOT}/ostree/repo refs --create=${OSTREE_OSNAME}:${OSTREE_BRANCHNAME} ${ostree_target_hash}
+ ostree admin --sysroot=${OTA_SYSROOT} deploy ${kargs_list} --os=${OSTREE_OSNAME} ${OSTREE_OSNAME}:${OSTREE_BRANCHNAME}
cp -a ${IMAGE_ROOTFS}/var/sota ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
# Create /var/sota if it doesn't exist yet
@@ -76,8 +90,11 @@ IMAGE_CMD_ota () {
# Ensure the permissions are correctly set
chmod 700 ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota
- cp -a ${OSTREE_ROOTFS}/var/local ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
- cp -a ${OSTREE_ROOTFS}/usr/homedirs/home ${OTA_SYSROOT}/ || true
+ cp -a ${IMAGE_ROOTFS}/var/local ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
+
+ mkdir -p ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/rootdirs
+ cp -a ${IMAGE_ROOTFS}/home ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/rootdirs/home || true
+
# Ensure that /var/local exists (AGL symlinks /usr/local to /var/local)
install -d ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local
# Set package version for the first deployment
@@ -111,4 +128,4 @@ IMAGE_CMD_ota-ext4 () {
mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT}
}
-do_image_wic[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '%s:do_image_ota_ext4' % d.getVar('IMAGE_BASENAME'), '', d)}"
+do_image_wic[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '%s:do_image_ota_ext4' % d.getVar('PN'), '', d)}"
diff --git a/external/meta-updater/classes/sota.bbclass b/external/meta-updater/classes/sota.bbclass
index c248cfc0..fde00cd5 100644
--- a/external/meta-updater/classes/sota.bbclass
+++ b/external/meta-updater/classes/sota.bbclass
@@ -1,12 +1,14 @@
DISTROOVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}"
-SOTA_CLIENT ??= "aktualizr"
SOTA_CLIENT_PROV ??= "aktualizr-shared-prov"
SOTA_DEPLOY_CREDENTIALS ?= "1"
SOTA_HARDWARE_ID ??= "${MACHINE}"
-IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}"
IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest"
+IMAGE_INSTALL_append_sota = " aktualizr aktualizr-info ${SOTA_CLIENT_PROV} \
+ ostree os-release ostree-kernel \
+ ${@'ostree-initramfs' if d.getVar('KERNEL_IMAGETYPE') != 'fitImage' else ''} \
+ ${@'ostree-devicetrees' if oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}') else ''}"
IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}"
IMAGE_FSTYPES += "${@bb.utils.contains('BUILD_OSTREE_TARBALL', '1', 'ostree.tar.bz2', ' ', d)}"
@@ -27,6 +29,9 @@ OSTREE_BRANCHNAME ?= "${SOTA_HARDWARE_ID}"
OSTREE_OSNAME ?= "poky"
OSTREE_BOOTLOADER ??= 'u-boot'
OSTREE_BOOT_PARTITION ??= "/boot"
+OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
+OSTREE_DEPLOY_DEVICETREE ??= "0"
+OSTREE_DEVICETREE ??= "${KERNEL_DEVICETREE}"
INITRAMFS_IMAGE ?= "initramfs-ostree-image"
@@ -46,6 +51,7 @@ SOTA_MACHINE_m3ulcb = "m3ulcb"
SOTA_MACHINE_intel-corei7-64 ?= "minnowboard"
SOTA_MACHINE_qemux86-64 ?= "qemux86-64"
SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi"
+SOTA_MACHINE_freedom-u540 ?= "freedom-u540"
SOTA_OVERRIDES_BLACKLIST = "ostree ota"
SOTA_REQUIRED_VARIABLES = "OSTREE_REPO OSTREE_BRANCHNAME OSTREE_OSNAME OSTREE_BOOTLOADER OSTREE_BOOT_PARTITION GARAGE_SIGN_REPO GARAGE_TARGET_NAME"
diff --git a/external/meta-updater/classes/sota_freedom-u540.bbclass b/external/meta-updater/classes/sota_freedom-u540.bbclass
new file mode 100644
index 00000000..c287154e
--- /dev/null
+++ b/external/meta-updater/classes/sota_freedom-u540.bbclass
@@ -0,0 +1,12 @@
+OSTREE_KERNEL = "${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}"
+
+OSTREE_BOOTLOADER ?= "u-boot"
+INITRAMFS_FSTYPES = "cpio.gz"
+PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot"
+
+IMAGE_BOOT_FILES += "uEnv.txt"
+IMAGE_BOOT_FILES_remove = "fitImage"
+
+OSTREE_KERNEL_ARGS_sota ?= "earlycon=sbi console=ttySIF0 ramdisk_size=16384 root=/dev/ram0 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/mmcblk0p3"
+
+WKS_FILE_sota = "freedom-u540-opensbi-sota.wks"
diff --git a/external/meta-updater/classes/sota_m3ulcb.bbclass b/external/meta-updater/classes/sota_m3ulcb.bbclass
index e7fa9c2f..7ea273d0 100644
--- a/external/meta-updater/classes/sota_m3ulcb.bbclass
+++ b/external/meta-updater/classes/sota_m3ulcb.bbclass
@@ -8,5 +8,5 @@ OSTREE_BOOTLOADER ?= "u-boot"
UBOOT_MACHINE_sota = "${@d.getVar('SOC_FAMILY').split(':')[1]}_ulcb_defconfig"
-PREFERRED_RPROVIDER_virtual/network-configuration ?= "connman"
-IMAGE_INSTALL_append_sota = " virtual/network-configuration "
+PREFERRED_RPROVIDER_network-configuration ?= "connman"
+IMAGE_INSTALL_append_sota = " network-configuration "
diff --git a/external/meta-updater/classes/sota_minnowboard.bbclass b/external/meta-updater/classes/sota_minnowboard.bbclass
index a907217d..31289651 100644
--- a/external/meta-updater/classes/sota_minnowboard.bbclass
+++ b/external/meta-updater/classes/sota_minnowboard.bbclass
@@ -8,5 +8,5 @@ IMAGE_FSTYPES_remove_sota = "live hddimg"
OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0"
IMAGE_INSTALL_append = " minnowboard-efi-startup"
-PREFERRED_RPROVIDER_virtual/network-configuration ?= "connman"
-IMAGE_INSTALL_append_sota = " virtual/network-configuration "
+PREFERRED_RPROVIDER_network-configuration ?= "connman"
+IMAGE_INSTALL_append_sota = " network-configuration "
diff --git a/external/meta-updater/classes/sota_porter.bbclass b/external/meta-updater/classes/sota_porter.bbclass
index 80062e1c..6c6fe70e 100644
--- a/external/meta-updater/classes/sota_porter.bbclass
+++ b/external/meta-updater/classes/sota_porter.bbclass
@@ -7,5 +7,5 @@ IMAGE_BOOT_FILES_sota += "porter-bootfiles/*"
OSTREE_BOOTLOADER ?= "u-boot"
UBOOT_MACHINE_sota = "porter_config"
-PREFERRED_RPROVIDER_virtual/network-configuration ?= "connman"
-IMAGE_INSTALL_append_sota = " virtual/network-configuration "
+PREFERRED_RPROVIDER_network-configuration ?= "connman"
+IMAGE_INSTALL_append_sota = " network-configuration "
diff --git a/external/meta-updater/classes/sota_qemux86-64.bbclass b/external/meta-updater/classes/sota_qemux86-64.bbclass
index fc4aa7cf..3dc2428b 100644
--- a/external/meta-updater/classes/sota_qemux86-64.bbclass
+++ b/external/meta-updater/classes/sota_qemux86-64.bbclass
@@ -13,4 +13,4 @@ IMAGE_ROOTFS_EXTRA_SPACE = "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '655
# fix for u-boot/swig build issue
HOSTTOOLS_NONFATAL += "x86_64-linux-gnu-gcc"
-IMAGE_INSTALL_append_sota = " virtual/network-configuration "
+IMAGE_INSTALL_append_sota = " network-configuration "
diff --git a/external/meta-updater/classes/sota_raspberrypi.bbclass b/external/meta-updater/classes/sota_raspberrypi.bbclass
index c901a70e..3935ba8c 100644
--- a/external/meta-updater/classes/sota_raspberrypi.bbclass
+++ b/external/meta-updater/classes/sota_raspberrypi.bbclass
@@ -13,7 +13,7 @@ UBOOT_DTBO_LOADADDRESS = "0x06000000"
IMAGE_INSTALL_append = " fit-conf"
DEV_MATCH_DIRECTIVE_pn-networkd-dhcp-conf = "Driver=smsc95xx lan78xx"
-IMAGE_INSTALL_append_sota = " virtual/network-configuration "
+IMAGE_INSTALL_append_sota = " network-configuration "
PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot"
UBOOT_ENTRYPOINT_sota ?= "0x00080000"
@@ -39,14 +39,15 @@ def make_dtb_boot_files(d):
return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
-IMAGE_BOOT_FILES_sota = "bcm2835-bootfiles/* \
+IMAGE_BOOT_FILES_sota = "${BOOTFILES_DIR_NAME}/* \
u-boot.bin;${SDIMG_KERNELIMAGE} \
"
-# OSTree puts its own boot.scr to bcm2835-bootfiles
-# raspberrypi4 needs dtb in /boot partition so that they can be read by the
-# firmware
-IMAGE_BOOT_FILES_append_sota_raspberrypi4 = "${@make_dtb_boot_files(d)}"
+# OSTree puts its own boot.scr in ${BOOTFILES_DIR_NAME} (historically
+# bcm2835-bootfiles, now just bootfiles).
+# rpi4 and recent rpi3 firmwares needs dtb in /boot partition
+# so that they can be read by the firmware
+IMAGE_BOOT_FILES_append_sota = "${@make_dtb_boot_files(d)}"
# Just the overlays that will be used should be listed
KERNEL_DEVICETREE_raspberrypi2_sota ?= " bcm2709-rpi-2-b.dtb "
diff --git a/external/meta-updater/classes/sota_sanity.bbclass b/external/meta-updater/classes/sota_sanity.bbclass
index 74973eb5..02ca2e71 100644
--- a/external/meta-updater/classes/sota_sanity.bbclass
+++ b/external/meta-updater/classes/sota_sanity.bbclass
@@ -1,5 +1,12 @@
# Sanity check the sota setup for common misconfigurations
+def sota_check_boolean_variable(var, d):
+ try:
+ oe.types.boolean(d.getVar(var))
+ except:
+ return False
+ return True
+
def sota_check_overrides(status, d):
for var in (d.getVar('SOTA_OVERRIDES_BLACKLIST') or "").split():
if var in d.getVar('OVERRIDES').split(':'):
@@ -47,14 +54,14 @@ def sota_check_variables_validity(status, d):
path = os.path.abspath(credentials)
if not os.path.exists(path):
status.addresult("SOTA_PACKED_CREDENTIALS is not set correctly. The zipped credentials file does not exist.\n")
- if d.getVar("OSTREE_UPDATE_SUMMARY") and d.getVar("OSTREE_UPDATE_SUMMARY") not in ("0", "1", ""):
- status.addresult("OSTREE_UPDATE_SUMMARY should be set to 0 or 1.\n")
- if d.getVar("OSTREE_DEPLOY_DEVICETREE") and d.getVar("OSTREE_DEPLOY_DEVICETREE") not in ("0", "1", ""):
- status.addresult("OSTREE_DEPLOY_DEVICETREE should be set to 0 or 1.\n")
- if d.getVar("GARAGE_SIGN_AUTOVERSION") and d.getVar("GARAGE_SIGN_AUTOVERSION") not in ("0", "1", ""):
- status.addresult("GARAGE_SIGN_AUTOVERSION should be set to 0 or 1.\n")
- if d.getVar("SOTA_DEPLOY_CREDENTIALS") and d.getVar("SOTA_DEPLOY_CREDENTIALS") not in ("0", "1", ""):
- status.addresult("SOTA_DEPLOY_CREDENTIALS should be set to 0 or 1.\n")
+ if not sota_check_boolean_variable("OSTREE_UPDATE_SUMMARY", d):
+ status.addresult("OSTREE_UPDATE_SUMMARY (=%s) should be set to yes/y/true/t/1 or no/n/false/f/0.\n" % d.getVar("OSTREE_UPDATE_SUMMARY"))
+ if not sota_check_boolean_variable("OSTREE_DEPLOY_DEVICETREE", d):
+ status.addresult("OSTREE_DEPLOY_DEVICETREE (=%s) should be set to yes/y/true/t/1 or no/n/false/f/0.\n" % d.getVar("OSTREE_DEPLOY_DEVICETREE"))
+ if not sota_check_boolean_variable("GARAGE_SIGN_AUTOVERSION", d):
+ status.addresult("GARAGE_SIGN_AUTOVERSION (=%s) should be set to yes/y/true/t/1 or no/n/false/f/0.\n" % d.getVar("GARAGE_SIGN_AUTOVERSION"))
+ if not sota_check_boolean_variable("SOTA_DEPLOY_CREDENTIALS", d):
+ status.addresult("SOTA_DEPLOY_CREDENTIALS (=%s) should be set to yes/y/true/t/1 or no/n/false/f/0.\n" % d.getVar("SOTA_DEPLOY_CREDENTIALS"))
def sota_raise_sanity_error(msg, d):
if d.getVar("SANITY_USE_EVENTS") == "1":
diff --git a/external/meta-updater/conf/distro/poky-sota-systemd.conf b/external/meta-updater/conf/distro/poky-sota-systemd.conf
index 0dc50b0e..4b7990f2 100644
--- a/external/meta-updater/conf/distro/poky-sota-systemd.conf
+++ b/external/meta-updater/conf/distro/poky-sota-systemd.conf
@@ -9,4 +9,4 @@ DISTRO_CODENAME = "sota"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
-PREFERRED_RPROVIDER_virtual/network-configuration ??= "networkd-dhcp-conf"
+PREFERRED_RPROVIDER_network-configuration ??= "networkd-dhcp-conf"
diff --git a/external/meta-updater/conf/distro/sota.conf.inc b/external/meta-updater/conf/distro/sota.conf.inc
index 1d5f8df1..9804694c 100644
--- a/external/meta-updater/conf/distro/sota.conf.inc
+++ b/external/meta-updater/conf/distro/sota.conf.inc
@@ -11,10 +11,11 @@ INHERIT += " sota"
USER_CLASSES_remove = "image-prelink"
# Enable reproducible builds. Use 0 as mtime, the same as OSTree is using.
+INHERIT_remove = "reproducible_build"
INHERIT += "reproducible_build_simple"
-export SOURCE_DATE_EPOCH ?= "0"
-REPRODUCIBLE_TIMESTAMP_ROOTFS ?= "0"
+export SOURCE_DATE_EPOCH = "0"
+REPRODUCIBLE_TIMESTAMP_ROOTFS = "0"
HOSTTOOLS += "git sync sha256sum"
HOSTTOOLS_NONFATAL += "java repo python"
diff --git a/external/meta-updater/conf/include/bblayers/sota.inc b/external/meta-updater/conf/include/bblayers/sota.inc
index 26eea228..c4ecd4ee 100644
--- a/external/meta-updater/conf/include/bblayers/sota.inc
+++ b/external/meta-updater/conf/include/bblayers/sota.inc
@@ -1,3 +1,4 @@
BBLAYERS += "${METADIR}/meta-updater"
BBLAYERS += "${METADIR}/meta-openembedded/meta-filesystems"
BBLAYERS += "${METADIR}/meta-openembedded/meta-oe"
+BBLAYERS += "${METADIR}/meta-openembedded/meta-python"
diff --git a/external/meta-updater/conf/include/bblayers/sota_freedom-u540.inc b/external/meta-updater/conf/include/bblayers/sota_freedom-u540.inc
new file mode 100644
index 00000000..977f96b2
--- /dev/null
+++ b/external/meta-updater/conf/include/bblayers/sota_freedom-u540.inc
@@ -0,0 +1,2 @@
+BBLAYERS += "${METADIR}/meta-riscv"
+BBLAYERS += "${METADIR}/meta-updater-riscv"
diff --git a/external/meta-updater/conf/include/bblayers/sota_raspberrypi2.inc b/external/meta-updater/conf/include/bblayers/sota_raspberrypi2.inc
index 03f8f44b..ea420bad 100644
--- a/external/meta-updater/conf/include/bblayers/sota_raspberrypi2.inc
+++ b/external/meta-updater/conf/include/bblayers/sota_raspberrypi2.inc
@@ -1,3 +1,2 @@
-BBLAYERS += "${METADIR}/meta-openembedded/meta-python"
BBLAYERS += "${METADIR}/meta-updater-raspberrypi"
BBLAYERS += "${METADIR}/meta-raspberrypi"
diff --git a/external/meta-updater/conf/include/bblayers/sota_raspberrypi3-64.inc b/external/meta-updater/conf/include/bblayers/sota_raspberrypi3-64.inc
index 03f8f44b..ea420bad 100644
--- a/external/meta-updater/conf/include/bblayers/sota_raspberrypi3-64.inc
+++ b/external/meta-updater/conf/include/bblayers/sota_raspberrypi3-64.inc
@@ -1,3 +1,2 @@
-BBLAYERS += "${METADIR}/meta-openembedded/meta-python"
BBLAYERS += "${METADIR}/meta-updater-raspberrypi"
BBLAYERS += "${METADIR}/meta-raspberrypi"
diff --git a/external/meta-updater/conf/include/bblayers/sota_raspberrypi3.inc b/external/meta-updater/conf/include/bblayers/sota_raspberrypi3.inc
index 42d5eb1a..7e320af2 100644
--- a/external/meta-updater/conf/include/bblayers/sota_raspberrypi3.inc
+++ b/external/meta-updater/conf/include/bblayers/sota_raspberrypi3.inc
@@ -1,4 +1,3 @@
-BBLAYERS += "${METADIR}/meta-openembedded/meta-python"
BBLAYERS += "${METADIR}/meta-updater-raspberrypi"
BBLAYERS += "${METADIR}/meta-raspberrypi"
BBLAYERS += "${METADIR}/meta-openembedded/meta-networking"
diff --git a/external/meta-updater/conf/layer.conf b/external/meta-updater/conf/layer.conf
index 39ea749f..a002e96a 100644
--- a/external/meta-updater/conf/layer.conf
+++ b/external/meta-updater/conf/layer.conf
@@ -10,8 +10,9 @@ BBFILE_PATTERN_sota = "^${LAYERDIR}/"
BBFILE_PRIORITY_sota = "7"
LAYERDEPENDS_sota = "openembedded-layer"
+LAYERDEPENDS_sota += "meta-python"
LAYERDEPENDS_sota += "filesystems-layer"
-LAYERSERIES_COMPAT_sota = "thud"
+LAYERSERIES_COMPAT_sota = "dunfell"
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
aktualizr-device-prov->aktualizr \
diff --git a/external/meta-updater/conf/local.conf.nonostree.append b/external/meta-updater/conf/local.conf.nonostree.append
index 0e63e988..ee56b69d 100644
--- a/external/meta-updater/conf/local.conf.nonostree.append
+++ b/external/meta-updater/conf/local.conf.nonostree.append
@@ -2,7 +2,7 @@
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
-PREFERRED_RPROVIDER_virtual/network-configuration ??= "networkd-dhcp-conf"
+PREFERRED_RPROVIDER_network-configuration ??= "networkd-dhcp-conf"
SOTA_DEPLOY_CREDENTIALS ?= "1"
PACKAGECONFIG_pn-aktualizr = ""
diff --git a/external/meta-updater/lib/oeqa/selftest/cases/updater_qemux86_64.py b/external/meta-updater/lib/oeqa/selftest/cases/updater_qemux86_64.py
index 08220f4e..c7d04481 100644
--- a/external/meta-updater/lib/oeqa/selftest/cases/updater_qemux86_64.py
+++ b/external/meta-updater/lib/oeqa/selftest/cases/updater_qemux86_64.py
@@ -130,11 +130,10 @@ class SharedCredProvTestsNonOSTree(SharedCredProvTests):
self.append_config('DISTRO = "poky"')
self.append_config('DISTRO_FEATURES_append = " systemd"')
self.append_config('VIRTUAL-RUNTIME_init_manager = "systemd"')
- self.append_config('PREFERRED_RPROVIDER_virtual/network-configuration ??= "networkd-dhcp-conf"')
+ self.append_config('PREFERRED_RPROVIDER_network-configuration ??= "networkd-dhcp-conf"')
self.append_config('PACKAGECONFIG_pn-aktualizr = ""')
self.append_config('SOTA_DEPLOY_CREDENTIALS = "1"')
- self.append_config('IMAGE_INSTALL_append += "aktualizr"')
- self.append_config('IMAGE_INSTALL_append += " aktualizr-shared-prov"')
+ self.append_config('IMAGE_INSTALL_append += "aktualizr aktualizr-info aktualizr-shared-prov"')
self.qemu, self.s = qemu_launch(machine='qemux86-64', uboot_enable='no')
diff --git a/external/meta-updater/lib/oeqa/selftest/cases/updater_raspberrypi.py b/external/meta-updater/lib/oeqa/selftest/cases/updater_raspberrypi.py
index 25c5f12e..fae631eb 100644
--- a/external/meta-updater/lib/oeqa/selftest/cases/updater_raspberrypi.py
+++ b/external/meta-updater/lib/oeqa/selftest/cases/updater_raspberrypi.py
@@ -15,15 +15,9 @@ class RpiTests(OESelftestTestCase):
def setUpLocal(self):
# Add layers before changing the machine type, otherwise the sanity
# checker complains loudly.
- layer_python = "meta-openembedded/meta-python"
layer_rpi = "meta-raspberrypi"
layer_upd_rpi = "meta-updater-raspberrypi"
result = runCmd('bitbake-layers show-layers')
- if re.search(layer_python, result.output) is None:
- self.meta_python = metadir() + layer_python
- runCmd('bitbake-layers add-layer "%s"' % self.meta_python)
- else:
- self.meta_python = None
if re.search(layer_rpi, result.output) is None:
self.meta_rpi = metadir() + layer_rpi
runCmd('bitbake-layers add-layer "%s"' % self.meta_rpi)
@@ -43,8 +37,6 @@ class RpiTests(OESelftestTestCase):
runCmd('bitbake-layers remove-layer "%s"' % self.meta_upd_rpi, ignore_status=True)
if self.meta_rpi:
runCmd('bitbake-layers remove-layer "%s"' % self.meta_rpi, ignore_status=True)
- if self.meta_python:
- runCmd('bitbake-layers remove-layer "%s"' % self.meta_python, ignore_status=True)
def test_build(self):
logger = logging.getLogger("selftest")
diff --git a/external/meta-updater/recipes-connectivity/connman/connman_%.bbappend b/external/meta-updater/recipes-connectivity/connman/connman_%.bbappend
index b3633cc9..cd1b95de 100644
--- a/external/meta-updater/recipes-connectivity/connman/connman_%.bbappend
+++ b/external/meta-updater/recipes-connectivity/connman/connman_%.bbappend
@@ -1 +1 @@
-RPROVIDES_${PN} += "virtual/network-configuration"
+RPROVIDES_${PN} += "network-configuration"
diff --git a/external/meta-updater/recipes-connectivity/connman/connman_1.35.bbappend b/external/meta-updater/recipes-connectivity/connman/connman_1.35.bbappend
deleted file mode 100644
index 08ec8326..00000000
--- a/external/meta-updater/recipes-connectivity/connman/connman_1.35.bbappend
+++ /dev/null
@@ -1,6 +0,0 @@
-RPROVIDES_${PN} += "virtual/network-configuration"
-
-# patch to not create the resolv.conf symlink at run-time, as it's already
-# handled in the recipe and messes up with ostree
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI += "file://0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch"
diff --git a/external/meta-updater/recipes-connectivity/connman/files/0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch b/external/meta-updater/recipes-connectivity/connman/files/0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch
deleted file mode 100644
index 9b4a78c9..00000000
--- a/external/meta-updater/recipes-connectivity/connman/files/0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 9e724a61f015304c9d72d829a66178d20e3fa980 Mon Sep 17 00:00:00 2001
-From: Laurent Bonnans <laurent.bonnans@here.com>
-Date: Wed, 31 Jul 2019 18:15:47 +0200
-Subject: [PATCH] tmpfiles script: do not create the resolv.conf symlink
-
-It's handled by yocto in our case
-
-Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
----
- scripts/connman_resolvconf.conf.in | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/scripts/connman_resolvconf.conf.in b/scripts/connman_resolvconf.conf.in
-index 2d61dfe1..8a7d3071 100644
---- a/scripts/connman_resolvconf.conf.in
-+++ b/scripts/connman_resolvconf.conf.in
-@@ -1,2 +1 @@
- d @runstatedir@/connman - - - -
--L+ /etc/resolv.conf - - - - @runstatedir@/connman/resolv.conf
---
-2.20.1
-
diff --git a/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
index 40a39582..20a1a176 100644
--- a/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
+++ b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7
inherit systemd
-RPROVIDES_${PN} = "virtual/network-configuration"
+RPROVIDES_${PN} = "network-configuration"
SRC_URI = " \
file://20-wired-dhcp.network \
diff --git a/external/meta-updater/recipes-core/images/initramfs-ostree-image.bb b/external/meta-updater/recipes-core/images/initramfs-ostree-image.bb
index 936c59a0..4af15483 100644
--- a/external/meta-updater/recipes-core/images/initramfs-ostree-image.bb
+++ b/external/meta-updater/recipes-core/images/initramfs-ostree-image.bb
@@ -13,14 +13,14 @@ IMAGE_LINGUAS = ""
LICENSE = "MIT"
-IMAGE_CLASSES_remove = "image_repo_manifest"
+IMAGE_CLASSES_remove = "image_repo_manifest qemuboot"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
# Avoid circular dependencies
EXTRA_IMAGEDEPENDS = ""
-inherit core-image
+inherit core-image nopackages
IMAGE_ROOTFS_SIZE = "8192"
diff --git a/external/meta-updater/recipes-extended/collectd/collectd_%.bbappend b/external/meta-updater/recipes-extended/collectd/collectd_%.bbappend
new file mode 100644
index 00000000..fb3e6c4b
--- /dev/null
+++ b/external/meta-updater/recipes-extended/collectd/collectd_%.bbappend
@@ -0,0 +1,5 @@
+do_install_append() {
+ printf "<Include \"${sysconfdir}/collectd.conf.d\">\nFilter \"*.conf\"\n</Include>\n" >> ${D}/${sysconfdir}/collectd.conf
+
+ install -d ${D}/${sysconfdir}/collectd.conf.d
+}
diff --git a/external/meta-updater/recipes-extended/ostree/ostree_%.bbappend b/external/meta-updater/recipes-extended/ostree/ostree_%.bbappend
new file mode 100644
index 00000000..fd1795fc
--- /dev/null
+++ b/external/meta-updater/recipes-extended/ostree/ostree_%.bbappend
@@ -0,0 +1,4 @@
+PACKAGECONFIG_append = " curl libarchive static builtin-grub2-mkconfig"
+PACKAGECONFIG_class-native_append = " curl"
+PACKAGECONFIG_remove = "soup"
+PACKAGECONFIG_class-native_remove = "soup"
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"
diff --git a/external/meta-updater/recipes-support/boost/boost_1.72.0.bbappend b/external/meta-updater/recipes-support/boost/boost_1.72.0.bbappend
new file mode 100644
index 00000000..73ee73d7
--- /dev/null
+++ b/external/meta-updater/recipes-support/boost/boost_1.72.0.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://0001-add-typedef-executor_type.patch \
+ "
diff --git a/external/meta-updater/recipes-support/boost/files/0001-add-typedef-executor_type.patch b/external/meta-updater/recipes-support/boost/files/0001-add-typedef-executor_type.patch
new file mode 100644
index 00000000..1b326a49
--- /dev/null
+++ b/external/meta-updater/recipes-support/boost/files/0001-add-typedef-executor_type.patch
@@ -0,0 +1,56 @@
+From 99ad3ebac0b7466d57c98fb9583fbe8789729691 Mon Sep 17 00:00:00 2001
+From: Patrick Vacek <patrickvacek@gmail.com>
+Date: Wed, 4 Mar 2020 12:41:02 +0000
+Subject: [PATCH] add typedef executor_type
+
+Backported from here:
+https://github.com/boostorg/process/commit/6a4d2ff72114ef47c7afaf92e1042aca3dfa41b0
+
+Suggested-by: Kostiantyn Bushko <kbushko@intellias.com>
+Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
+---
+ boost/process/async_pipe.hpp | 2 ++
+ boost/process/detail/posix/async_pipe.hpp | 1 +
+ boost/process/detail/windows/async_pipe.hpp | 1 +
+ 3 files changed, 4 insertions(+)
+
+diff --git a/boost/process/async_pipe.hpp b/boost/process/async_pipe.hpp
+index 101fe1d..a562432 100644
+--- a/boost/process/async_pipe.hpp
++++ b/boost/process/async_pipe.hpp
+@@ -47,6 +47,8 @@ public:
+ */
+ typedef platform_specific handle_type;
+
++ typedef typename handle_type::executor_type executor_type;
++
+ /** Construct a new async_pipe, does automatically open the pipe.
+ * Initializes source and sink with the same io_context.
+ * @note Windows creates a named pipe here, where the name is automatically generated.
+diff --git a/boost/process/detail/posix/async_pipe.hpp b/boost/process/detail/posix/async_pipe.hpp
+index 725a078..a82c057 100644
+--- a/boost/process/detail/posix/async_pipe.hpp
++++ b/boost/process/detail/posix/async_pipe.hpp
+@@ -23,6 +23,7 @@ class async_pipe
+ public:
+ typedef int native_handle_type;
+ typedef ::boost::asio::posix::stream_descriptor handle_type;
++ typedef typename handle_type::executor_type executor_type;
+
+ inline async_pipe(boost::asio::io_context & ios) : async_pipe(ios, ios) {}
+
+diff --git a/boost/process/detail/windows/async_pipe.hpp b/boost/process/detail/windows/async_pipe.hpp
+index 06d5f2d..0b447f9 100644
+--- a/boost/process/detail/windows/async_pipe.hpp
++++ b/boost/process/detail/windows/async_pipe.hpp
+@@ -48,6 +48,7 @@ class async_pipe
+ public:
+ typedef ::boost::winapi::HANDLE_ native_handle_type;
+ typedef ::boost::asio::windows::stream_handle handle_type;
++ typedef typename handle_type::executor_type executor_type;
+
+ async_pipe(boost::asio::io_context & ios) : async_pipe(ios, ios, make_pipe_name(), true) {}
+ async_pipe(boost::asio::io_context & ios_source, boost::asio::io_context & ios_sink)
+--
+2.11.0
+
diff --git a/external/meta-updater/recipes-support/libp11/libp11_git.bb b/external/meta-updater/recipes-support/libp11/libp11_git.bb
deleted file mode 100644
index bedcdc82..00000000
--- a/external/meta-updater/recipes-support/libp11/libp11_git.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Library for using PKCS"
-DESCRIPTION = "\
-Libp11 is a library implementing a small layer on top of PKCS \
-make using PKCS"
-HOMEPAGE = "http://www.opensc-project.org/libp11"
-SECTION = "Development/Libraries"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29"
-DEPENDS = "libtool openssl"
-RDEPENDS_${PN} += " opensc"
-
-SRC_URI = "git://github.com/OpenSC/libp11.git"
-SRCREV = "57ca68ff67efa08e3be1f26dec6d23bf5bb977f2"
-
-PV = "0.4.9+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
-
-# Currently, Makefile dependencies are incorrectly defined which causes build errors
-# if the number of jobs is high
-# See https://github.com/OpenSC/libp11/issues/94
-PARALLEL_MAKE = ""
-EXTRA_OECONF = "--disable-static"
-
-do_install_append () {
- rm -rf ${D}${libdir}/*.la
- rm -rf ${D}${docdir}/${BPN}
-}
-
-FILES_${PN} = "${libdir}/engines*/pkcs11.so \
- ${libdir}/engines*/libpkcs11${SOLIBS} \
- ${libdir}/libp11${SOLIBS}"
-
-FILES_${PN}-dev = " \
- ${libdir}/engines*/libpkcs11${SOLIBSDEV} \
- ${libdir}/libp11${SOLIBSDEV} \
- ${libdir}/pkgconfig/libp11.pc \
- /usr/include"
diff --git a/external/meta-updater/recipes-support/softhsm-testtoken/softhsm-testtoken.bb b/external/meta-updater/recipes-support/softhsm-testtoken/softhsm-testtoken.bb
index 58b521c3..68514b2b 100644
--- a/external/meta-updater/recipes-support/softhsm-testtoken/softhsm-testtoken.bb
+++ b/external/meta-updater/recipes-support/softhsm-testtoken/softhsm-testtoken.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
inherit systemd
-RDEPENDS_${PN} = "softhsm libp11 openssl-bin"
+RDEPENDS_${PN} = "softhsm libp11 opensc openssl-bin"
DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
diff --git a/external/meta-updater/recipes-test/images/primary-image.bb b/external/meta-updater/recipes-test/images/primary-image.bb
index ba1dc1fa..e6896ea5 100644
--- a/external/meta-updater/recipes-test/images/primary-image.bb
+++ b/external/meta-updater/recipes-test/images/primary-image.bb
@@ -5,7 +5,7 @@ SUMMARY = "A minimal Uptane Primary image running aktualizr, for testing with a
LICENSE = "MPL-2.0"
IMAGE_INSTALL_remove = " \
- virtual/network-configuration \
+ network-configuration \
"
IMAGE_INSTALL_append = " \
diff --git a/external/meta-updater/recipes-test/images/secondary-image.bb b/external/meta-updater/recipes-test/images/secondary-image.bb
index 7db2c684..22fb7f3d 100644
--- a/external/meta-updater/recipes-test/images/secondary-image.bb
+++ b/external/meta-updater/recipes-test/images/secondary-image.bb
@@ -16,7 +16,7 @@ IMAGE_INSTALL_remove = " \
aktualizr-device-prov \
aktualizr-device-prov-hsm \
aktualizr-uboot-env-rollback \
- virtual/network-configuration \
+ network-configuration \
"
IMAGE_INSTALL_append = " \
diff --git a/external/meta-updater/scripts/envsetup.sh b/external/meta-updater/scripts/envsetup.sh
index a7ee877d..c12f193b 100755
--- a/external/meta-updater/scripts/envsetup.sh
+++ b/external/meta-updater/scripts/envsetup.sh
@@ -6,15 +6,23 @@ BUILDDIR="build"
DISTRO="poky-sota-systemd"
BASE_CONF="local.conf.base.append"
+if [ -n "$ZSH_VERSION" ]; then
+ # be more compatible with bash
+ setopt shwordsplit
+fi
+
# A definition of a dictionary with a list of configuration files that must be appended
# to resulting conf/local.conf file for each particular distribution.
-declare -A supported_distros=(
- ["poky-sota-systemd"]="local.conf.systemd.append"
- ["poky-sota"]="local.conf.base.append"
- ["poky"]="local.conf.systemd.append local.conf.nonostree.append"
-)
+declare -A supported_distros
+supported_distros[poky-sota-systemd]="local.conf.systemd.append"
+supported_distros[poky-sota]="local.conf.base.append"
+supported_distros[poky]="local.conf.systemd.append local.conf.nonostree.append"
+
+usage () {
+ echo "Usage: ${SCRIPT} <machine> [builddir] [distro=< poky-sota-systemd | poky-sota | poky >]"
+}
-[[ "$#" -lt 1 ]] && { echo "Usage: ${SCRIPT} <machine> [builddir] [distro=< poky-sota-systemd | poky-sota | poky >]"; return 1; }
+[[ "$#" -lt 1 ]] && { usage; return 1; }
[[ "$#" -ge 2 ]] && { BUILDDIR="$2"; }
[[ "$#" -eq 3 ]] && { DISTRO="$3"; }
@@ -35,23 +43,27 @@ fi
METADIR=${METADIR:-${SOURCEDIR}/../..}
if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then
- declare -a DISTRO_CONFIGS=${supported_distros[$DISTRO]}
- [[ -n ${DISTRO_CONFIGS[@]} ]] && { echo "Using (${DISTRO_CONFIGS[*]}) for the specified distro '$DISTRO'"; } || { echo "The specified distro $DISTRO is not supported"; return 1; }
+ if [ -z "${supported_distros[$DISTRO]}" ]; then
+ echo "The specified distro $DISTRO is not supported"
+ usage
+ return 1
+ fi
source "$METADIR/poky/oe-init-build-env" "$BUILDDIR"
echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf
cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf
cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf
+
sed -e "s/##MACHINE##/$MACHINE/g" \
-e "s/##DISTRO##/$DISTRO/g" \
"${METADIR}/meta-updater/conf/$BASE_CONF" >> conf/local.conf
- for config in ${DISTRO_CONFIGS[@]}; do
+ for config in ${supported_distros[$DISTRO]}; do
if [[ "$BASE_CONF" != "$config" ]]; then
cat "${METADIR}/meta-updater/conf/$config" >> conf/local.conf
fi
done
else
source "$METADIR/poky/oe-init-build-env" "$BUILDDIR"
-fi \ No newline at end of file
+fi
diff --git a/external/meta-updater/scripts/find_aktualizr_dependencies.sh b/external/meta-updater/scripts/find_aktualizr_dependencies.sh
index fcb2f97e..604cc9ac 100755
--- a/external/meta-updater/scripts/find_aktualizr_dependencies.sh
+++ b/external/meta-updater/scripts/find_aktualizr_dependencies.sh
@@ -5,10 +5,9 @@ parentdir="$(dirname "$0")"
# Does NOT include garage-sign, anything used only for testing (i.e. strace and
# gtest), any of the git submodules, all of which are also only used for
-# testing (tuf-test-vectors, isotp-c, ostreesysroot, and HdrHistogram_c), or
-# any other third party modules included directly into the source tree
-# (jsoncpp, open62541, picojson). Also check libp11, dpkg, and systemd since
-# those are common dependencies not enabled by default.
+# testing (tuf-test-vectors, jsoncpp, and HdrHistogram_c), or any other third
+# party modules included directly into the source tree. Also check libp11 and
+# systemd since those are common dependencies not enabled by default.
${parentdir}/find_dependencies.py aktualizr
${parentdir}/find_dependencies.py aktualizr-shared-prov
${parentdir}/find_dependencies.py aktualizr-shared-prov-creds
@@ -18,7 +17,7 @@ ${parentdir}/find_dependencies.py aktualizr-auto-reboot
${parentdir}/find_dependencies.py aktualizr-disable-send-ip
${parentdir}/find_dependencies.py aktualizr-log-debug
${parentdir}/find_dependencies.py aktualizr-polling-interval
+${parentdir}/find_dependencies.py aktualizr-virtualsec
${parentdir}/find_dependencies.py libp11
-${parentdir}/find_dependencies.py dpkg
${parentdir}/find_dependencies.py systemd