diff options
| author | Patrick Vacek <patrickvacek@gmail.com> | 2020-05-05 09:14:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-05 09:14:27 +0200 |
| commit | 24a560c4285d5d5cf1ce771abe79ce718855d9f3 (patch) | |
| tree | ddd9845c80f392054ff87ce0c4786b7ae1f9ebd3 | |
| parent | f4d9d3ccde80395b81d2203c649faf61d9ea19b3 (diff) | |
| parent | 1dbdae1f582fdb21d6ca83a292fc4f45c27f21c2 (diff) | |
| download | meta-updater-24a560c4285d5d5cf1ce771abe79ce718855d9f3.tar.gz | |
Merge pull request #721 from advancedtelematic/feat/thud/2020.6
Feat/thud/2020.6
| -rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 8 | ||||
| -rw-r--r-- | recipes-sota/aktualizr/files/10-resource-control.conf | 1 | ||||
| -rwxr-xr-x | scripts/envsetup.sh | 32 |
3 files changed, 27 insertions, 14 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" | |||
| 17 | PV = "1.0+git${SRCPV}" | 17 | PV = "1.0+git${SRCPV}" |
| 18 | PR = "7" | 18 | PR = "7" |
| 19 | 19 | ||
| 20 | GARAGE_SIGN_PV = "0.7.0-94-g9df6b17" | 20 | GARAGE_SIGN_PV = "0.7.1" |
| 21 | 21 | ||
| 22 | SRC_URI = " \ | 22 | SRC_URI = " \ |
| 23 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ | 23 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ |
| @@ -29,10 +29,10 @@ SRC_URI = " \ | |||
| 29 | ${@ 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 ''} \ | 29 | ${@ 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 ''} \ |
| 30 | " | 30 | " |
| 31 | 31 | ||
| 32 | SRC_URI[garagesign.md5sum] = "1b9c8191f181b2cb7be9723280878a8d" | 32 | SRC_URI[garagesign.md5sum] = "febc186527b324b23c5be3affcf90e54" |
| 33 | SRC_URI[garagesign.sha256sum] = "401b54ad640c9f54d615bcc250f8863853f2428e490019092a2c176793c8212f" | 33 | SRC_URI[garagesign.sha256sum] = "a87c3f39d61492d6f813754159ed7ef1e59966c15726edef4cd188a63cde60d6" |
| 34 | 34 | ||
| 35 | SRCREV = "20aa2e7785466c75f23e40ab2bd424a4a71ac8ec" | 35 | SRCREV = "a6392dec3fb9dda3cb8ab8aa10a81b2c0494cb3c" |
| 36 | BRANCH ?= "master" | 36 | BRANCH ?= "master" |
| 37 | 37 | ||
| 38 | S = "${WORKDIR}/git" | 38 | S = "${WORKDIR}/git" |
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@ | |||
| 4 | MemoryAccounting=true | 4 | MemoryAccounting=true |
| 5 | MemoryHigh=@MEMORY_HIGH@ | 5 | MemoryHigh=@MEMORY_HIGH@ |
| 6 | MemoryMax=@MEMORY_MAX@ | 6 | MemoryMax=@MEMORY_MAX@ |
| 7 | IPAccounting=true | ||
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" | |||
| 6 | DISTRO="poky-sota-systemd" | 6 | DISTRO="poky-sota-systemd" |
| 7 | BASE_CONF="local.conf.base.append" | 7 | BASE_CONF="local.conf.base.append" |
| 8 | 8 | ||
| 9 | if [ -n "$ZSH_VERSION" ]; then | ||
| 10 | # be more compatible with bash | ||
| 11 | setopt shwordsplit | ||
| 12 | fi | ||
| 13 | |||
| 9 | # A definition of a dictionary with a list of configuration files that must be appended | 14 | # A definition of a dictionary with a list of configuration files that must be appended |
| 10 | # to resulting conf/local.conf file for each particular distribution. | 15 | # to resulting conf/local.conf file for each particular distribution. |
| 11 | declare -A supported_distros=( | 16 | declare -A supported_distros |
| 12 | ["poky-sota-systemd"]="local.conf.systemd.append" | 17 | supported_distros[poky-sota-systemd]="local.conf.systemd.append" |
| 13 | ["poky-sota"]="local.conf.base.append" | 18 | supported_distros[poky-sota]="local.conf.base.append" |
| 14 | ["poky"]="local.conf.systemd.append local.conf.nonostree.append" | 19 | supported_distros[poky]="local.conf.systemd.append local.conf.nonostree.append" |
| 15 | ) | 20 | |
| 21 | usage () { | ||
| 22 | echo "Usage: ${SCRIPT} <machine> [builddir] [distro=< poky-sota-systemd | poky-sota | poky >]" | ||
| 23 | } | ||
| 16 | 24 | ||
| 17 | [[ "$#" -lt 1 ]] && { echo "Usage: ${SCRIPT} <machine> [builddir] [distro=< poky-sota-systemd | poky-sota | poky >]"; return 1; } | 25 | [[ "$#" -lt 1 ]] && { usage; return 1; } |
| 18 | [[ "$#" -ge 2 ]] && { BUILDDIR="$2"; } | 26 | [[ "$#" -ge 2 ]] && { BUILDDIR="$2"; } |
| 19 | [[ "$#" -eq 3 ]] && { DISTRO="$3"; } | 27 | [[ "$#" -eq 3 ]] && { DISTRO="$3"; } |
| 20 | 28 | ||
| @@ -35,23 +43,27 @@ fi | |||
| 35 | METADIR=${METADIR:-${SOURCEDIR}/../..} | 43 | METADIR=${METADIR:-${SOURCEDIR}/../..} |
| 36 | 44 | ||
| 37 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then | 45 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then |
| 38 | declare -a DISTRO_CONFIGS=${supported_distros[$DISTRO]} | 46 | if [ -z "${supported_distros[$DISTRO]}" ]; then |
| 39 | [[ -n ${DISTRO_CONFIGS[@]} ]] && { echo "Using (${DISTRO_CONFIGS[*]}) for the specified distro '$DISTRO'"; } || { echo "The specified distro $DISTRO is not supported"; return 1; } | 47 | echo "The specified distro $DISTRO is not supported" |
| 48 | usage | ||
| 49 | return 1 | ||
| 50 | fi | ||
| 40 | 51 | ||
| 41 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 52 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" |
| 42 | 53 | ||
| 43 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf | 54 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf |
| 44 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf | 55 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf |
| 45 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf | 56 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf |
| 57 | |||
| 46 | sed -e "s/##MACHINE##/$MACHINE/g" \ | 58 | sed -e "s/##MACHINE##/$MACHINE/g" \ |
| 47 | -e "s/##DISTRO##/$DISTRO/g" \ | 59 | -e "s/##DISTRO##/$DISTRO/g" \ |
| 48 | "${METADIR}/meta-updater/conf/$BASE_CONF" >> conf/local.conf | 60 | "${METADIR}/meta-updater/conf/$BASE_CONF" >> conf/local.conf |
| 49 | 61 | ||
| 50 | for config in ${DISTRO_CONFIGS[@]}; do | 62 | for config in ${supported_distros[$DISTRO]}; do |
| 51 | if [[ "$BASE_CONF" != "$config" ]]; then | 63 | if [[ "$BASE_CONF" != "$config" ]]; then |
| 52 | cat "${METADIR}/meta-updater/conf/$config" >> conf/local.conf | 64 | cat "${METADIR}/meta-updater/conf/$config" >> conf/local.conf |
| 53 | fi | 65 | fi |
| 54 | done | 66 | done |
| 55 | else | 67 | else |
| 56 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 68 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" |
| 57 | fi \ No newline at end of file | 69 | fi |
