public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/binhost:master commit in: builders/demeter/
@ 2023-08-07 20:49 Andreas K. Hüttel
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas K. Hüttel @ 2023-08-07 20:49 UTC (permalink / raw
  To: gentoo-commits

commit:     e0efc96938fdb5b8af7b67cac892dc630fa4d3d5
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  7 20:49:03 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Aug  7 20:49:03 2023 +0000
URL:        https://gitweb.gentoo.org/proj/binhost.git/commit/?id=e0efc969

Improve the main runner somewhat

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 builders/demeter/binhost-update | 39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)

diff --git a/builders/demeter/binhost-update b/builders/demeter/binhost-update
index b758cb5..b9c2892 100755
--- a/builders/demeter/binhost-update
+++ b/builders/demeter/binhost-update
@@ -1,12 +1,18 @@
 #!/bin/bash
 
-BINHOST_NAME=amd64-default-17.1
+BINHOST_NAME=amd64/17.1/x86-64
+_BINHOST_NAME=$(echo ${BINHOST_NAME}|sed -e 's:/:_:g')
 
-TMPFILE="/root/.tmp-binhost-${BINHOST_NAME}-update-$(date +%s)"
+TMPFILE="/root/.tmp-binhost-${_BINHOST_NAME}-update-$(date +%s)"
+LOCKFILE="/root/.tmp-binhost-${_BINHOST_NAME}-lock"
 
 EMAIL_FROM=binhost@demeter.amd64.dev.gentoo.org
 EMAIL_TO=gentoo-binhost-autobuilds@lists.gentoo.org
 
+NSPAWN_NAMES="binhost-amd64-x86-64 binhost-amd64-x86-64-gnome"
+
+MAX_HARMLESS=10
+
 send_email() {
         local subject="[binhost ${BINHOST_NAME}] $1"
         local message=$2
@@ -26,15 +32,30 @@ send_email() {
 
 
 
-if
-  systemd-nspawn -M binhost-amd64-x86-64 /root/bin/run-update &> ${TMPFILE}  &&
-  systemd-nspawn -M binhost-amd64-x86-64-gnome /root/bin/run-update &>> ${TMPFILE}  ; then
+if [[ -f ${LOCKFILE} ]] ; then
+	echo "lockfile ${LOCKFILE} exists, aborting"
+	exit 111
+fi
+touch ${LOCKFILE} || exit 112
+
+
+echo Starting run at $(date -u) > ${TMPFILE}
+
+for n in ${NSPAWN_NAMES} ; do
+	echo Machine ${n} &>> ${TMPFILE}
+	echo &>> ${TMPFILE}
+	cd /var/lib/machines/${n}/root/binhost &>> ${TMPFILE}
+	git pull -q &>> ${TMPFILE}
+	cd /root &>> ${TMPFILE}
+	systemd-nspawn -M ${n} /root/bin/run-update &>> ${TMPFILE}
+done
 
-  send_email "Update succeeded" "Binhost ${BINHOST_NAME} update succeeded" ${TMPFILE}
-  rm ${TMPFILE}
 
-else
+if [[ $(wc -l ${TMPFILE} | sed -e 's: .*$::g') -gt ${MAX_HARMLESS} ]] ; then
 
-  send_email "Update failed" "Binhost ${BINHOST_NAME} update failed" ${TMPFILE}
+  send_email "Update possibly failed" "Binhost ${BINHOST_NAME} update produced long output" ${TMPFILE}
 
 fi
+
+
+rm ${LOCKFILE}


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

* [gentoo-commits] proj/binhost:master commit in: builders/demeter/
@ 2023-08-07 20:53 Andreas K. Hüttel
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas K. Hüttel @ 2023-08-07 20:53 UTC (permalink / raw
  To: gentoo-commits

commit:     72657190b2166ba49132e193d46349a31fa1f732
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  7 20:52:57 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Aug  7 20:52:57 2023 +0000
URL:        https://gitweb.gentoo.org/proj/binhost.git/commit/?id=72657190

Fix path in nspawns

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 builders/demeter/binhost-update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builders/demeter/binhost-update b/builders/demeter/binhost-update
index b9c2892..f86a189 100755
--- a/builders/demeter/binhost-update
+++ b/builders/demeter/binhost-update
@@ -44,7 +44,7 @@ echo Starting run at $(date -u) > ${TMPFILE}
 for n in ${NSPAWN_NAMES} ; do
 	echo Machine ${n} &>> ${TMPFILE}
 	echo &>> ${TMPFILE}
-	cd /var/lib/machines/${n}/root/binhost &>> ${TMPFILE}
+	cd /var/lib/machines/${n}/etc/binhost &>> ${TMPFILE}
 	git pull -q &>> ${TMPFILE}
 	cd /root &>> ${TMPFILE}
 	systemd-nspawn -M ${n} /root/bin/run-update &>> ${TMPFILE}


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

* [gentoo-commits] proj/binhost:master commit in: builders/demeter/
@ 2023-08-07 20:57 Andreas K. Hüttel
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas K. Hüttel @ 2023-08-07 20:57 UTC (permalink / raw
  To: gentoo-commits

commit:     e8f8a905b96518d0ceffb43d616a1a5dc227ed75
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  7 20:56:47 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Aug  7 20:56:47 2023 +0000
URL:        https://gitweb.gentoo.org/proj/binhost.git/commit/?id=e8f8a905

Increase MAX_HARMLESS

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 builders/demeter/binhost-update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builders/demeter/binhost-update b/builders/demeter/binhost-update
index f86a189..44c43fe 100755
--- a/builders/demeter/binhost-update
+++ b/builders/demeter/binhost-update
@@ -11,7 +11,7 @@ EMAIL_TO=gentoo-binhost-autobuilds@lists.gentoo.org
 
 NSPAWN_NAMES="binhost-amd64-x86-64 binhost-amd64-x86-64-gnome"
 
-MAX_HARMLESS=10
+MAX_HARMLESS=150
 
 send_email() {
         local subject="[binhost ${BINHOST_NAME}] $1"


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

* [gentoo-commits] proj/binhost:master commit in: builders/demeter/
@ 2023-08-07 21:21 Andreas K. Hüttel
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas K. Hüttel @ 2023-08-07 21:21 UTC (permalink / raw
  To: gentoo-commits

commit:     2efd06fc919511d47dfd87514c21495f54da6673
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  7 21:21:04 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Aug  7 21:21:04 2023 +0000
URL:        https://gitweb.gentoo.org/proj/binhost.git/commit/?id=2efd06fc

Add upsync functionality

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 builders/demeter/binhost-update | 52 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/builders/demeter/binhost-update b/builders/demeter/binhost-update
index 44c43fe..caa80e8 100755
--- a/builders/demeter/binhost-update
+++ b/builders/demeter/binhost-update
@@ -13,6 +13,10 @@ NSPAWN_NAMES="binhost-amd64-x86-64 binhost-amd64-x86-64-gnome"
 
 MAX_HARMLESS=150
 
+UPLOAD_USER=amd64
+UPLOAD_KEY=/root/.ssh/id_rsa
+
+
 send_email() {
         local subject="[binhost ${BINHOST_NAME}] $1"
         local message=$2
@@ -30,6 +34,48 @@ send_email() {
                 /usr/sbin/sendmail -f "${EMAIL_FROM}" ${EMAIL_TO//,/ }
 }
 
+upsync_binpackages() {
+	# parameter 1: a PKGDIR on the local host
+	# parameter 2: the target dir in the mirroring system, should be of the
+	#              form arch/profileversion/name (e.g., amd64/17.0/x32 )
+	echo Upsyncing binpackages from $1 to $2
+	local SSH_CMD=(
+	        ssh
+       		-i ${UPLOAD_KEY}
+                -o UserKnownHostsFile=/dev/null
+                -o VerifyHostKeyDNS=yes
+                -o StrictHostKeyChecking=no
+                -o IPQoS=cs0
+        )
+        local RSYNC_OPTS=(
+                -e "${SSH_CMD[*]}"
+                --archive
+                --delete
+                --delete-after
+                --omit-dir-times
+                --delay-updates
+                --mkpath
+        )
+        rsync "${RSYNC_OPTS[@]}" "$1"/* "${UPLOAD_USER}@releng-incoming.gentoo.org:/release/weekly/binpackages/$2/"
+}
+
+verify_dnssec() {
+        which dig >/dev/null || {
+                echo "net-dns/bind-tools is needed to verify DNSSEC is working"
+                exit 1
+        }
+
+        if ! dig +noall +comments dev.gentoo.org. IN SSHFP | egrep -q '^;; flags: [ a-z]+\<ad\>'; then
+                echo "DNSSEC does not appear to be working. Bailing out"
+                exit 1
+        fi
+
+        if ! grep -q '^options\>.*\<edns0\>' /etc/resolv.conf; then
+                echo "DNSSEC is not enabled in /etc/resolv.conf"
+                exit 1
+        fi
+}
+
 
 
 if [[ -f ${LOCKFILE} ]] ; then
@@ -38,6 +84,9 @@ if [[ -f ${LOCKFILE} ]] ; then
 fi
 touch ${LOCKFILE} || exit 112
 
+verify_dnssec
+
+
 
 echo Starting run at $(date -u) > ${TMPFILE}
 
@@ -51,6 +100,9 @@ for n in ${NSPAWN_NAMES} ; do
 done
 
 
+upsync_binpackages /var/lib/machines/binhost-amd64-x86-64/var/cache/binpkgs amd64/17.1/x86-64 &>> ${TMPFILE}
+
+
 if [[ $(wc -l ${TMPFILE} | sed -e 's: .*$::g') -gt ${MAX_HARMLESS} ]] ; then
 
   send_email "Update possibly failed" "Binhost ${BINHOST_NAME} update produced long output" ${TMPFILE}


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

* [gentoo-commits] proj/binhost:master commit in: builders/demeter/
@ 2023-08-16 18:39 Andreas K. Hüttel
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas K. Hüttel @ 2023-08-16 18:39 UTC (permalink / raw
  To: gentoo-commits

commit:     d0e70ee1cfc9eb06460f00e4c86cfae76f1a9953
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 16 18:38:40 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Aug 16 18:38:40 2023 +0000
URL:        https://gitweb.gentoo.org/proj/binhost.git/commit/?id=d0e70ee1

Enable third nspawn

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 builders/demeter/binhost-update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builders/demeter/binhost-update b/builders/demeter/binhost-update
index caa80e8..a3b0b33 100755
--- a/builders/demeter/binhost-update
+++ b/builders/demeter/binhost-update
@@ -9,7 +9,7 @@ LOCKFILE="/root/.tmp-binhost-${_BINHOST_NAME}-lock"
 EMAIL_FROM=binhost@demeter.amd64.dev.gentoo.org
 EMAIL_TO=gentoo-binhost-autobuilds@lists.gentoo.org
 
-NSPAWN_NAMES="binhost-amd64-x86-64 binhost-amd64-x86-64-gnome"
+NSPAWN_NAMES="binhost-amd64-x86-64 binhost-amd64-x86-64-gnome binhost-amd64-x86-64-server"
 
 MAX_HARMLESS=150
 


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

* [gentoo-commits] proj/binhost:master commit in: builders/demeter/
@ 2024-02-04 23:00 Andreas K. Hüttel
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas K. Hüttel @ 2024-02-04 23:00 UTC (permalink / raw
  To: gentoo-commits

commit:     b61c3058abde0be30a5215c928c3e8cebbdf7631
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  4 22:51:26 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Feb  4 22:51:26 2024 +0000
URL:        https://gitweb.gentoo.org/proj/binhost.git/commit/?id=b61c3058

Add binhost-amd64-x86-64-openrc

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 builders/demeter/binhost-update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builders/demeter/binhost-update b/builders/demeter/binhost-update
index 8b2ddf4..1e235c7 100755
--- a/builders/demeter/binhost-update
+++ b/builders/demeter/binhost-update
@@ -9,7 +9,7 @@ LOCKFILE="/root/.tmp-binhost-${_BINHOST_NAME}-lock"
 EMAIL_FROM=binhost@demeter.amd64.dev.gentoo.org
 EMAIL_TO=gentoo-binhost-autobuilds@lists.gentoo.org
 
-NSPAWN_NAMES="binhost-amd64-x86-64-kde binhost-amd64-x86-64-gnome binhost-amd64-x86-64-server binhost-amd64-x86-64-v3-kde binhost-amd64-x86-64-v3-gnome binhost-amd64-x86-64-v3-server"
+NSPAWN_NAMES="binhost-amd64-x86-64-kde binhost-amd64-x86-64-gnome binhost-amd64-x86-64-openrc binhost-amd64-x86-64-server binhost-amd64-x86-64-v3-kde binhost-amd64-x86-64-v3-gnome binhost-amd64-x86-64-v3-server"
 
 UPLOAD_USER=amd64
 UPLOAD_KEY=/root/.ssh/id_rsa


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

* [gentoo-commits] proj/binhost:master commit in: builders/demeter/
@ 2024-02-05 22:21 Andreas K. Hüttel
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas K. Hüttel @ 2024-02-05 22:21 UTC (permalink / raw
  To: gentoo-commits

commit:     a075d05b618ef68aabcf338598c8f903b78e68fd
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  5 22:21:04 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Feb  5 22:21:04 2024 +0000
URL:        https://gitweb.gentoo.org/proj/binhost.git/commit/?id=a075d05b

Enable openrc v3 builder

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 builders/demeter/binhost-update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builders/demeter/binhost-update b/builders/demeter/binhost-update
index 9d1166b..a4ff5fc 100755
--- a/builders/demeter/binhost-update
+++ b/builders/demeter/binhost-update
@@ -9,7 +9,7 @@ LOCKFILE="/root/.tmp-binhost-${_BINHOST_NAME}-lock"
 EMAIL_FROM=binhost@demeter.amd64.dev.gentoo.org
 EMAIL_TO=gentoo-binhost-autobuilds@lists.gentoo.org
 
-NSPAWN_NAMES="binhost-amd64-x86-64-kde binhost-amd64-x86-64-gnome binhost-amd64-x86-64-openrc binhost-amd64-x86-64-server binhost-amd64-x86-64-v3-kde binhost-amd64-x86-64-v3-gnome binhost-amd64-x86-64-v3-server"
+NSPAWN_NAMES="binhost-amd64-x86-64-kde binhost-amd64-x86-64-gnome binhost-amd64-x86-64-openrc binhost-amd64-x86-64-server binhost-amd64-x86-64-v3-kde binhost-amd64-x86-64-v3-gnome binhost-amd64-x86-64-v3-openrc binhost-amd64-x86-64-v3-server"
 
 UPLOAD_USER=amd64
 UPLOAD_KEY=/root/.ssh/id_rsa


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

end of thread, other threads:[~2024-02-05 22:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07 20:57 [gentoo-commits] proj/binhost:master commit in: builders/demeter/ Andreas K. Hüttel
  -- strict thread matches above, loose matches on Subject: below --
2024-02-05 22:21 Andreas K. Hüttel
2024-02-04 23:00 Andreas K. Hüttel
2023-08-16 18:39 Andreas K. Hüttel
2023-08-07 21:21 Andreas K. Hüttel
2023-08-07 20:53 Andreas K. Hüttel
2023-08-07 20:49 Andreas K. Hüttel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox