[Git][qa/jenkins.debian.net][master] reproduce.debian.net: document how to setup a rebuilderd instance on Debian

Holger Levsen (@holger) gitlab at salsa.debian.org
Wed Nov 20 18:33:00 GMT 2024



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
2cb46639 by Holger Levsen at 2024-11-20T19:32:47+01:00
reproduce.debian.net: document how to setup a rebuilderd instance on Debian

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- hosts/osuosl5-amd64/var/www/html/index.html


Changes:

=====================================
hosts/osuosl5-amd64/var/www/html/index.html
=====================================
@@ -186,6 +186,73 @@
 	    coming soon: rebuilderd packaged for Debian and instructions how to set this up.
 	    </br>
 	    <a href="/stats/">Statistics about BAD packages.</a>
+	    </br>
+	    <code>
+
+how to setup rebuilderd on and for Debian
+=========================================
+(version 0.1, based on previous notes but as such untested. feedback much welcome.)
+
+USER=rebuilderd
+REBUILDERD_HOSTNAME=rebuilderd.example.org
+
+# to get a working debrebuild (from devscripts) and sbuild with unshare backend
+sudo apt install devscripts sbuild uidmap
+# todo: check if these are really needed
+sudo apt install apt-utils dpkg-dev equivs mmdebstrap python3-pycurl libwww-perl libjson-perl wget libstring-shellquote-perl python3-requests libwww-perl libjson-perl python3-debian debian-keyring debootstrap libarchive13t64 qemu-user-static genext2fs ncompress qemu-user squashfs-tools-ng arch-test fakechroot libdistro-info-perl
+
+sudo mkdir -p /srv/rebuilderd/cache
+sudo mkdir -p /srv/rebuilderd/results
+sudo chown -R $USER:$USER /srv/rebuilderd
+
+# make sure $USER is mentioned in /etc/sub(uid|gid)
+# (this is only the case for installations done with bookworm or later)
+for i in uid git ; do
+  grep $USER /etc/sub$i || echo $USER must be added to /etc/sub$i manually
+done
+
+# install rebuilderd
+sudo apt install cargo pkg-config liblzma-dev scdoc libzstd-dev libssl-dev libsqlite3-dev jq nginx sqlite3
+cd
+git clone https://github.com/kpcyrd/rebuilderd && cd rebuilderd
+make
+sudo make DESTDIR=/opt install
+
+sudo vi /opt/etc/rebuilderd-worker.conf # add /opt to backend path
+sudo vi /opt/usr/libexec/rebuilderd/rebuilder-debian.sh
+# so it has this content:
+#!/bin/sh
+set -xe
+cd "$(dirname "$1")"
+/usr/bin/debrebuild --buildresult="${REBUILDERD_OUTDIR}" --builder=sbuild+unshare --cache=/srv/rebuilderd/cache -- "${1}"
+
+# then start rebuilderd as $USER in screen:
+/opt/usr/bin/rebuilderd -c /opt/etc/rebuilderd.conf
+# then as $USER tell it to schedule some work:
+env REBUILDERD_COOKIE_PATH=~/.local/share/rebuilderd-auth-cookie /opt/usr/bin/rebuildctl -H http://127.0.0.1:8484 pkgs sync-profile --sync-config /opt/etc/rebuilderd-sync.conf debian-main
+# then start two workers as $USER in screen:
+cd
+mkdir 1 2
+cd 1
+/opt/usr/bin/rebuilderd-worker -c /opt/etc/rebuilderd-worker.conf connect
+cd 2
+/opt/usr/bin/rebuilderd-worker -c /opt/etc/rebuilderd-worker.conf connect
+
+# setup nginx
+cd /var/www/html/
+wget https://raw.githubusercontent.com/TSELab/tsel-infrastructure/refs/heads/main/ansible/roles/purdue-rebuilderd-frontend/files/index.html
+sed -i "s#reproducible.seal.purdue.wtf#$REBUILDERD_HOSTNAME#g" index.html
+sed -i 's#https://github.com/fepitre/debrebuild#https://tracker.debian.org/pkg/devscripts#g' index.html
+sed -i 's#debrebuild.py#debrebuild#g' index.html
+sed -i 's#https://rebuilderd.com/#https://github.com/kpcyrd/rebuilderd#' index.html
+sed -i 's#Debian#Debian sid/amd64#g' index.html
+sed -i 's#sniffglue#2ping#g' index.html
+# add to /etc/nginx/sites-enabled/default
+    location /api/ {
+        proxy_pass http://127.0.0.1:8484;
+    }
+</code>
+
         </footer>
     </body>
 </html>



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/2cb46639960e411bb6282abf618a677a7265aea3

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/2cb46639960e411bb6282abf618a677a7265aea3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20241120/eb02a225/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list