summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2020-05-05 09:14:27 +0200
committerGitHub <noreply@github.com>2020-05-05 09:14:27 +0200
commit24a560c4285d5d5cf1ce771abe79ce718855d9f3 (patch)
treeddd9845c80f392054ff87ce0c4786b7ae1f9ebd3
parentf4d9d3ccde80395b81d2203c649faf61d9ea19b3 (diff)
parent1dbdae1f582fdb21d6ca83a292fc4f45c27f21c2 (diff)
downloadmeta-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.bb8
-rw-r--r--recipes-sota/aktualizr/files/10-resource-control.conf1
-rwxr-xr-xscripts/envsetup.sh32
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"
17PV = "1.0+git${SRCPV}" 17PV = "1.0+git${SRCPV}"
18PR = "7" 18PR = "7"
19 19
20GARAGE_SIGN_PV = "0.7.0-94-g9df6b17" 20GARAGE_SIGN_PV = "0.7.1"
21 21
22SRC_URI = " \ 22SRC_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
32SRC_URI[garagesign.md5sum] = "1b9c8191f181b2cb7be9723280878a8d" 32SRC_URI[garagesign.md5sum] = "febc186527b324b23c5be3affcf90e54"
33SRC_URI[garagesign.sha256sum] = "401b54ad640c9f54d615bcc250f8863853f2428e490019092a2c176793c8212f" 33SRC_URI[garagesign.sha256sum] = "a87c3f39d61492d6f813754159ed7ef1e59966c15726edef4cd188a63cde60d6"
34 34
35SRCREV = "20aa2e7785466c75f23e40ab2bd424a4a71ac8ec" 35SRCREV = "a6392dec3fb9dda3cb8ab8aa10a81b2c0494cb3c"
36BRANCH ?= "master" 36BRANCH ?= "master"
37 37
38S = "${WORKDIR}/git" 38S = "${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@
4MemoryAccounting=true 4MemoryAccounting=true
5MemoryHigh=@MEMORY_HIGH@ 5MemoryHigh=@MEMORY_HIGH@
6MemoryMax=@MEMORY_MAX@ 6MemoryMax=@MEMORY_MAX@
7IPAccounting=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"
6DISTRO="poky-sota-systemd" 6DISTRO="poky-sota-systemd"
7BASE_CONF="local.conf.base.append" 7BASE_CONF="local.conf.base.append"
8 8
9if [ -n "$ZSH_VERSION" ]; then
10 # be more compatible with bash
11 setopt shwordsplit
12fi
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.
11declare -A supported_distros=( 16declare -A supported_distros
12 ["poky-sota-systemd"]="local.conf.systemd.append" 17supported_distros[poky-sota-systemd]="local.conf.systemd.append"
13 ["poky-sota"]="local.conf.base.append" 18supported_distros[poky-sota]="local.conf.base.append"
14 ["poky"]="local.conf.systemd.append local.conf.nonostree.append" 19supported_distros[poky]="local.conf.systemd.append local.conf.nonostree.append"
15) 20
21usage () {
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
35METADIR=${METADIR:-${SOURCEDIR}/../..} 43METADIR=${METADIR:-${SOURCEDIR}/../..}
36 44
37if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then 45if [[ ! -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
55else 67else
56 source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" 68 source "$METADIR/poky/oe-init-build-env" "$BUILDDIR"
57fi \ No newline at end of file 69fi