From 8ad563531fdcff036e5db700a15b49c2bcddabc4 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Thu, 2 Apr 2020 17:06:16 +0200 Subject: Fix envsetup when run in zsh Now also works with zsh < 5.5 Signed-off-by: Laurent Bonnans --- scripts/envsetup.sh | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index a7ee877..c12f193 100755 --- a/scripts/envsetup.sh +++ b/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} [builddir] [distro=< poky-sota-systemd | poky-sota | poky >]" +} -[[ "$#" -lt 1 ]] && { echo "Usage: ${SCRIPT} [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 -- cgit v1.2.3-54-g00ecf From bc15107493b84267a2623f4c46b8a7838babd35a Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 22 Apr 2020 12:29:53 +0200 Subject: aktualizr: Use systemd IP accounting. This allows you to see how much bandwidth was used with `systemd status aktualizr`. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/files/10-resource-control.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-sota/aktualizr/files/10-resource-control.conf b/recipes-sota/aktualizr/files/10-resource-control.conf index 254713c..5c5a593 100644 --- a/recipes-sota/aktualizr/files/10-resource-control.conf +++ b/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 -- cgit v1.2.3-54-g00ecf From 1dbdae1f582fdb21d6ca83a292fc4f45c27f21c2 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 30 Apr 2020 11:19:57 +0200 Subject: aktualizr: Update to 2020.6 release and garage-sign 0.7.1. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 3dafbcb..a20d46b 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -17,7 +17,7 @@ PRIVATE_LIBS_${PN}-ptest = "libaktualizr.so libaktualizr_secondary.so" PV = "1.0+git${SRCPV}" PR = "7" -GARAGE_SIGN_PV = "0.7.0-94-g9df6b17" +GARAGE_SIGN_PV = "0.7.1" SRC_URI = " \ gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ @@ -29,10 +29,10 @@ SRC_URI = " \ ${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''} \ " -SRC_URI[garagesign.md5sum] = "1b9c8191f181b2cb7be9723280878a8d" -SRC_URI[garagesign.sha256sum] = "401b54ad640c9f54d615bcc250f8863853f2428e490019092a2c176793c8212f" +SRC_URI[garagesign.md5sum] = "febc186527b324b23c5be3affcf90e54" +SRC_URI[garagesign.sha256sum] = "a87c3f39d61492d6f813754159ed7ef1e59966c15726edef4cd188a63cde60d6" -SRCREV = "20aa2e7785466c75f23e40ab2bd424a4a71ac8ec" +SRCREV = "a6392dec3fb9dda3cb8ab8aa10a81b2c0494cb3c" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf