From c6b8602075156e9997d0504fc861f11cd60ab613 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 12 Sep 2024 07:53:18 +0200 Subject: initial revision, checking out states and repos --- bin/check | 38 ++++ bin/setup | 36 +++ bin/update | 46 ++++ conf/default.conf | 12 + conf/local.conf | 0 doc/LINKS | 4 + doc/TODOS | 10 + html/.gitkeep | 0 templates/main.m4 | 659 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 805 insertions(+) create mode 100755 bin/check create mode 100755 bin/setup create mode 100755 bin/update create mode 100644 conf/default.conf create mode 100644 conf/local.conf create mode 100644 doc/LINKS create mode 100644 doc/TODOS create mode 100644 html/.gitkeep create mode 100644 templates/main.m4 diff --git a/bin/check b/bin/check new file mode 100755 index 0000000..43a047c --- /dev/null +++ b/bin/check @@ -0,0 +1,38 @@ +#!/bin/oksh + +BASE="${0%/*}/.." +. "${BASE}/conf/default.conf" + +if test ! -d "${state_dir}"; then + echo "no upstream git state repo of packages.. exiting.." + exit 1 +fi + +if test ! -d "${packages_dir}"; then + echo "no directory for uptream package descriptions.. exiting.." + exit 1 +fi + +find "${state_dir}"/{core,extra}-{any,x86_64} -type f > /tmp/update_packages.$$ +nof_packages=`cat /tmp/update_packages.$$ | wc -l` + +nof_checked_out_packages=`find "${packages_dir}" -type f -name PKGBUILD | wc -l` + +echo "${nof_packages} packages in state repo" +echo "${nof_checked_out_packages} packages are checked out" + +exit 0 + +# find duplicate entries in state repo +for duplicate in `find "${state_dir}"/{core,extra}-{any,x86_64} -type f | \ + rev | cut -f 1 -d / | rev | sort | uniq -D | uniq`; do + for packages in `ls ${state_dir}/{core,extra}-{any,x86_64}/$duplicate 2>/dev/null`; do + for instance in `echo $packages | rev | cut -f 1,2 -d / | rev`; do + echo -n "${instance} " + cat "${state_dir}/$instance" + done + done +done + +# TODO: update all single package directories +# TODO: update all AUR package directories diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000..f1e252c --- /dev/null +++ b/bin/setup @@ -0,0 +1,36 @@ +#!/bin/oksh + +BASE="${0%/*}/.." +. "${BASE}/conf/default.conf" + +echo "base dir: ${base_dir}" +echo "script dir: ${script_dir}" +echo "state dir: ${state_dir}" +echo "packages dir: ${packages_dir}" + +if test ! -d "${state_dir}"; then + echo "no upstream git state repo of packages.. cloning.." + git clone https://gitlab.archlinux.org/archlinux/packaging/state.git "${state_dir}" +else + echo "upstream git state repo exists.." +fi + +if test ! -d "${packages_dir}"; then + echo "creating directory for uptream package description.." + mkdir -p "${packages_dir}" +else + echo "package directory exists" +fi + +for repo in core extra; do + for arch in any x86_64; do + if test ! -d "${packages_dir}/${repo}-${arch}"; then + echo "package directory ${packages_dir}/${repo}-${arch} doesn't exist, creating it.." + mkdir "${packages_dir}/${repo}-${arch}" + else + echo "package directory ${packages_dir}/${repo}-${arch} exists" + fi + done +done + +# TODO: AUR directory diff --git a/bin/update b/bin/update new file mode 100755 index 0000000..31333dc --- /dev/null +++ b/bin/update @@ -0,0 +1,46 @@ +#!/bin/oksh + +BASE="${0%/*}/.." +. "${BASE}/conf/default.conf" + +if test ! -d "${state_dir}"; then + echo "no upstream git state repo of packages.. exiting.." + exit 1 +fi + +if test ! -d "${packages_dir}"; then + echo "no directory for uptream package descriptions.. exiting.." + exit 1 +fi + +git -C "${state_dir}" pull + +find "${state_dir}"/{core,extra}-{any,x86_64} -type f > /tmp/update_packages.$$ +nof_packages=`cat /tmp/update_packages.$$ | wc -l` + +nof_checked_out_packages=`find "${packages_dir}" -type f -name PKGBUILD | wc -l` + +echo "${nof_packages} packages in state repo" +echo "${nof_checked_out_packages} packages are checked out" + +sleep 10 + +for pkgfile in `cat /tmp/update_packages.$$`; do + repo=`echo "${pkgfile}" | rev | cut -f 2 -d / | rev` + OLDIFS="$IFS" + IFS=" " + while read pkgname pkgver tag revision; do + echo "${repo} ${pkgname}" + if test ! -d "${packages_dir}/${repo}/${pkgname}"; then + cd "${packages_dir}/${repo}" || exit 1 + pkgctl repo clone --protocol=https "${pkgname}" + sleep 10 + else + true +# git -C "${packages_dir}/${repo}/${pkgname}" pull + fi + done < $pkgfile + IFS="$OLDIFS" +done +# TODO: update all single package directories +# TODO: update all AUR package directories diff --git a/conf/default.conf b/conf/default.conf new file mode 100644 index 0000000..bd1be9b --- /dev/null +++ b/conf/default.conf @@ -0,0 +1,12 @@ +script_name=`readlink -f "$0"` +script_dir=`dirname ${script_name}` +base_dir_rel=`printf '%s/..' "${script_dir}"` +base_dir=`realpath ${base_dir_rel}` + +if test -r "${base_dir}/conf/local.conf"; then + . "${base_dir}/conf/local.conf" +fi + +script_dir="${base_dir}/scripts" +state_dir="${base_dir}/state" +packages_dir="${base_dir}/packages" diff --git a/conf/local.conf b/conf/local.conf new file mode 100644 index 0000000..e69de29 diff --git a/doc/LINKS b/doc/LINKS new file mode 100644 index 0000000..f09fa6e --- /dev/null +++ b/doc/LINKS @@ -0,0 +1,4 @@ +- Archlinux + - devtools +- HTML with m4 + - https://www.linuxjournal.com/article/2393 diff --git a/doc/TODOS b/doc/TODOS new file mode 100644 index 0000000..3f9f630 --- /dev/null +++ b/doc/TODOS @@ -0,0 +1,10 @@ +- check if gitrevision is part of the packages_dir checkout, if not, and only then, + do a git pull. +- consistency checks + - check for more than one pkgname over multiple repos/archs, use vercmp + to find the newer version + - provide a report and a code snippet for arch32 builder to ignore all + but the newest version + - check for gitrevision from state to appear in packages for every package + - check for all tags if they appear in the packages for every package + diff --git a/html/.gitkeep b/html/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/main.m4 b/templates/main.m4 new file mode 100644 index 0000000..604a8da --- /dev/null +++ b/templates/main.m4 @@ -0,0 +1,659 @@ + + + + + Arch Linux 32 - List of Build Slaves + + + + + + +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + name + + + + operator + + + + currently building + + + + last connection + + + + building since + + + + trials + + + + logged lines + + + + last action + +
+ build-tasossah-1 + + KitsuWhooa + + pentium4/ot-urchin + + 2024-09-10 19:11:29 + + 2024-09-10 19:09:18 + + 2 + + 601 + + checking-source +
+ euronuc + + abaumann + + i686/guile2.2 + + 2024-09-10 19:11:26 + + 2024-09-09 23:12:01 + + 3 + + 12036 + + building +
+ build-tasossah-2 + + KitsuWhooa + + i686/sniffnet + + 2024-09-10 19:11:07 + + 2024-09-10 15:24:15 + + 5 + + 6954 + + building +
+ build-tasossah-fx + + KitsuWhooa + + pentium4/vlc + + 2024-09-10 19:11:01 + + 2024-09-09 08:13:36 + + 1 + + 1479 + + building +
+ euronuc-i486 + + abaumann + + i486/rocm-llvm + + 2024-09-10 19:11:00 + + 2024-09-09 21:48:35 + + 4 + + 42243 + + building +
+ build-tasossah-3 + + KitsuWhooa + + i686/ot-urchin + + 2024-09-10 19:10:47 + + 2024-09-10 19:01:21 + + 5 + + 3056 + + building +
+ eurobuild6-6 + + abaumann + +   + + 2024-09-10 17:30:12 + + 2024-09-10 16:27:25 + +   + +   + +   +
+ eurobuild6-4 + + abaumann + +   + + 2024-09-10 17:27:58 + + 2024-09-10 15:45:32 + +   + +   + +   +
+ eurobuild6-1 + + abaumann + +   + + 2024-09-10 17:23:10 + + 2024-09-10 16:55:10 + +   + +   + +   +
+ eurobuild6-5 + + abaumann + +   + + 2024-09-10 17:20:00 + + 2024-09-10 16:42:52 + +   + +   + +   +
+ eurobuild6-8-i486 + + abaumann + +   + + 2024-09-10 17:14:43 + + 2024-09-10 16:51:28 + +   + +   + +   +
+ eurobuild6-7-i486 + + abaumann + +   + + 2024-09-10 17:10:43 + + 2024-09-10 16:54:44 + +   + +   + +   +
+ eurobuild6-3 + + abaumann + +   + + 2024-09-10 17:10:31 + + 2024-09-10 16:41:49 + +   + +   + +   +
+ eurobuild6-2 + + abaumann + +   + + 2024-09-10 17:04:09 + + 2024-09-10 16:36:53 + +   + +   + +   +
+ build-tasossah-c2d + + KitsuWhooa + +   + + 2024-09-09 15:20:04 + + 2024-09-09 15:01:04 + +   + +   + +   +
+ eurobuild3-i486 + + abaumann + +   + + 2024-09-08 11:55:16 + + 2024-09-08 11:34:55 + +   + +   + +   +
+ eurobuild3 + + abaumann + +   + + 2024-09-08 11:49:22 + + 2024-09-08 11:34:13 + +   + +   + +   +
+ streusel-1 + + deep42thought + +   + +   + +   + +   + +   + +   +
+ streusel-2 + + deep42thought + +   + +   + +   + +   + +   + +   +
+ streusel-3 + + deep42thought + +   + +   + +   + +   + +   + +   +
+ thuringiabuild1 + + deep42thought + +   + +   + +   + +   + +   + +   +
+
+
+ + + +
+
+ +
+ +
+ + + -- cgit v1.2.3-70-g09d2