Please hold this until auch itself is improved to support the changing
parts as command line options (I requested that in a separate review), then
we can avoid sed and separate copies of scripts (I would like to have only
single setup-auh and run-auh).

Alex

On Tue 10. Oct 2023 at 16.42, David Pierret <david.pier...@smile.fr> wrote:

> - Add setup and run script openembedded specific
> - Add upgrade-helper.in config template
>
> auto-upgrade-helper script accept configurations to specify the layer
> to be analysed. The .in file is modified by sed command to generate
> the .conf file that match the meta to analyze.
>
> Signed-off-by: David Pierret <david.pier...@smile.fr>
> Reviewed-by: Yoann Congal <yoann.con...@smile.fr>
> ---
>  scripts/auh-config/upgrade-helper-oe.in | 40 +++++++++++++++++++++
>  scripts/run-auh-oe                      | 46 +++++++++++++++++++++++++
>  scripts/setup-auh-oe                    | 34 ++++++++++++++++++
>  3 files changed, 120 insertions(+)
>  create mode 100644 scripts/auh-config/upgrade-helper-oe.in
>  create mode 100755 scripts/run-auh-oe
>  create mode 100755 scripts/setup-auh-oe
>
> diff --git a/scripts/auh-config/upgrade-helper-oe.in b/scripts/auh-config/
> upgrade-helper-oe.in
> new file mode 100644
> index 0000000..79467e5
> --- /dev/null
> +++ b/scripts/auh-config/upgrade-helper-oe.in
> @@ -0,0 +1,40 @@
> +[maintainer_override]
> +# mails for recipe upgrades will go to john.doe instead of jane.doe, etc
> +#ross.bur...@intel.com=anibal.li...@linux.intel.com
> +
> +[settings]
> +# recipes in blacklist will be skipped
> +blacklist=linux-libc-headers linux-yocto alsa-utils-scripts
> build-appliance-image
> +#blacklist=python python3 glibc gcc linux-libc-headers linux-yocto-rt
> linux-yocto linux-yocto-dev linux-yocto-tiny qt4-x11-free qt4-embedded
> qt4-x11-free qt4e-demo-image gnome-common gnome-desktop3
> gnome-desktop-testing adt-installer build-appliance-image
> +# only recipes belonging to maintainers in whitelist will be attempted
> +#maintainers_whitelist=anibal.li...@linux.intel.com
> +# SMTP server
> +smtp=localhost:25
> +# from whom should the mails arrive
> +from=a...@yoctoproject.org
> +# who should get the status mail with statistics, at the end
> +status_recipients=openembedded-c...@lists.openembedded.org
> +# who should be CCd with upgrade emails
> +cc_recipients=openembedded-c...@lists.openembedded.org
> +# clean sstate directory before upgrading
> +#clean_sstate=yes
> +# clean tmp directory before upgrading
> +#clean_tmp=yes
> +# machines to test build with
> +#machines=qemux86 qemux86-64 qemuarm qemumips qemuppc
> +#machines=qemux86
> +
> +buildhistory=yes
> +#testimage=yes
> +#testimage_name=core-image-minimal
> +
> +#workdir=/home/auh/work/
> +publish_work_url=https://autobuilder.yocto.io/pub/auh
> +
> +commit_revert_policy=all
> +
> +layer_mode=yes
> +layer_name={meta}
> +layer_dir={layerdir}
> +layer_machines={machine}
> +
> diff --git a/scripts/run-auh-oe b/scripts/run-auh-oe
> new file mode 100755
> index 0000000..24d3a51
> --- /dev/null
> +++ b/scripts/run-auh-oe
> @@ -0,0 +1,46 @@
> +#!/bin/bash
> +#
> +# SPDX-License-Identifier: GPL-2.0-only
> +#
> +# Run Auto Upgrade Helper in a directory set up by setup_auh.
> +#
> +# Called with $1 - the directory where the setup was created
> +
> +if [ -z $1 ]; then
> +  echo "Use: $0 auh_setup_dir [publish_dir]"
> +  exit 1
> +fi
> +
> +full_dir=$(readlink -e $1)
> +
> +auh_dir=$full_dir/auto-upgrade-helper
> +poky_dir=$full_dir/poky
> +openembedded_dir=$full_dir/meta-openembedded
> +build_dir=$full_dir/build
> +sstate_dir=$full_dir/build/sstate-cache
> +
> +meta_list="${openembedded_dir}/meta-*"
> +machine_list="qemux86 qemux86-64 qemuarm qemumips qemuppc qemux86_musl"
> +
> +pushd $openembedded_dir || exit 1
> +
> +# Base the upgrades on meta_openembedded master
> +git fetch origin
> +git checkout -B tmp-auh-upgrades origin/main
> +
> +source $poky_dir/oe-init-build-env $build_dir
> +for d in $meta_list; do
> +  meta=$(basename "$d")
> +  sed -E "s|\{meta\}|$meta| ; \
> +          s|\{layerdir\}|$openembedded_dir/$meta| ; \
> +          s|\{machine\}|$machine_list|" \
> +          $build_dir/upgrade-helper/upgrade-helper-oe.in \
> +          > $build_dir/upgrade-helper/upgrade-helper.conf
> +  $auh_dir/upgrade-helper.py -e all
> +done
> +
> +if [ -n $2 ]; then
> +  cp -rf $build_dir/upgrade-helper/* $2
> +fi
> +
> +popd
> diff --git a/scripts/setup-auh-oe b/scripts/setup-auh-oe
> new file mode 100755
> index 0000000..e5cdf9d
> --- /dev/null
> +++ b/scripts/setup-auh-oe
> @@ -0,0 +1,34 @@
> +#!/bin/bash
> +#
> +# SPDX-License-Identifier: GPL-2.0-only
> +#
> +# Initialize Auto Upgrade Helper in a directory.
> +#
> +# Called with $1 - the directory to place the setup
> +CONFIG_DIR=`dirname $0`/auh-config
> +
> +if [ -z $1 ]; then
> +  echo "Use: $0 target_dir"
> +  exit 1
> +fi
> +
> +mkdir -p $1
> +pushd $1
> +
> +git clone git://git.yoctoproject.org/poky
> +pushd poky
> +git config user.email a...@yoctoproject.org
> +git config user.name "Auto Upgrade Helper"
> +popd
> +git clone git://git.openembedded.org/meta-openembedded
> +pushd meta-openembedded
> +git config user.email a...@yoctoproject.org
> +git config user.name "Auto Upgrade Helper"
> +popd
> +git clone git://git.yoctoproject.org/auto-upgrade-helper
> +source poky/oe-init-build-env build
> +mkdir -p upgrade-helper
> +popd
> +
> +cp $CONFIG_DIR/upgrade-helper-oe.in $1/build/upgrade-helper
> +cat $CONFIG_DIR/local.conf.append >> $1/build/conf/local.conf
> --
> 2.39.2
>
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61321): https://lists.yoctoproject.org/g/yocto/message/61321
Mute This Topic: https://lists.yoctoproject.org/mt/101876421/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to