yocto.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [yocto-autobuilder-helper][PATCH v2] AUH: Add Openembedded auto-update-helper with list of layer to test
@ 2023-10-20 14:05 David Pierret
  2023-10-20 14:57 ` [yocto] " Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: David Pierret @ 2023-10-20 14:05 UTC (permalink / raw)
  To: yocto; +Cc: David Pierret

- Add setup and run script openembedded specific
- Add job config

Signed-off-by: David Pierret <david.pierret@smile.fr>
---
 config.json          |  6 ++++++
 scripts/run-auh-oe   | 45 ++++++++++++++++++++++++++++++++++++++++++++
 scripts/setup-auh-oe | 34 +++++++++++++++++++++++++++++++++
 3 files changed, 85 insertions(+)
 create mode 100755 scripts/run-auh-oe
 create mode 100755 scripts/setup-auh-oe

diff --git a/config.json b/config.json
index 3acb710..bbd0aaf 100644
--- a/config.json
+++ b/config.json
@@ -1420,6 +1420,12 @@
                 "${SCRIPTSDIR}/setup-auh ${HELPERBUILDDIR}; ${SCRIPTSDIR}/run-auh ${HELPERBUILDDIR} ${WEBPUBLISH_DIR}/pub/auh/"
             ]
         },
+        "auh-openembedded" : {
+            "NEEDREPOS" : ["poky", "meta-openembedded"],
+            "EXTRAPLAINCMDS" : [
+                "${SCRIPTSDIR}/setup-auh-oe ${HELPERBUILDDIR}; ${SCRIPTSDIR}/run-auh-oe ${HELPERBUILDDIR} ${WEBPUBLISH_DIR}/pub/auh/ ${HELPERBUILDDIR}/meta-openembedded ${HELPERBUILDDIR}/meta-openembedded/meta-oe ${HELPERBUILDDIR}/meta-openembedded/meta-python ${HELPERBUILDDIR}/meta-openembedded/meta-perl ${HELPERBUILDDIR}/meta-openembedded/meta-networking ${HELPERBUILDDIR}/meta-openembedded/meta-multimedia ${HELPERBUILDDIR}/meta-openembedded/meta-gnome ${HELPERBUILDDIR}/meta-openembedded/meta-xfce ${HELPERBUILDDIR}/meta-openembedded/meta-filesystems ${HELPERBUILDDIR}/meta-openembedded/meta-initramfs ${HELPERBUILDDIR}/meta-openembedded/meta-webserver "
+            ]
+        },
         "a-quick" : {
             "TEMPLATE" : "trigger-build"
         },
diff --git a/scripts/run-auh-oe b/scripts/run-auh-oe
new file mode 100755
index 0000000..588755a
--- /dev/null
+++ b/scripts/run-auh-oe
@@ -0,0 +1,45 @@
+#!/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] [meta_dir] [meta_list]"
+  exit 1
+fi
+
+full_dir=$(readlink -e $1)
+
+auh_dir=$full_dir/auto-upgrade-helper
+poky_dir=$full_dir/poky
+
+build_dir=$full_dir/build
+sstate_dir=$full_dir/build/sstate-cache
+meta_dir=$3
+meta_list=${@:4}
+machine_list="qemux86 qemux86-64 qemuarm qemumips qemuppc qemux86_musl"
+
+pushd $meta_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
+
+# build the layer_names variable to me used in the command line
+layer_names=""
+for d in $meta_list; do
+  layer_names+=" $(basename ${d})"
+done
+
+$auh_dir/upgrade-helper.py -e --layer-dir ${meta_dir} --layer-names ${layer_names} --layer-machines ${machine_list} -- all
+
+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..ba1a7fb
--- /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 auh@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 auh@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.conf $1/build/upgrade-helper
+cat $CONFIG_DIR/local.conf.append >> $1/build/conf/local.conf
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-24  9:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 14:05 [yocto-autobuilder-helper][PATCH v2] AUH: Add Openembedded auto-update-helper with list of layer to test David Pierret
2023-10-20 14:57 ` [yocto] " Richard Purdie
2023-10-24  8:16   ` David PIERRET
2023-10-24  8:58     ` Alexander Kanavin
2023-10-24  9:25     ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).