On Sun, May 04, 2014 at 03:04:46PM +0200, Ansgar Burchardt wrote:
> Hi,
> 
> Cyril Brulebois <[email protected]> writes:
> > I think I already proposed pushing d-i master to some other machine
> > with less liberal access than alioth's. Would that help? If so, which
> > machine? dillon? Would pulling from there over https help? Be
> > sufficient? Otherwise, what else?
> 
> I think the buildds building stuff for the offical archive should only
> do that. This includes not building for other archives (ports) or daily
> images for d-i (no matter the source).
> 
> Of course there needs to be a solution for the daily d-i images.
> 
> Maybe they could be built on dedicated buildds that are not building
> packages for the main archive? Though that would require more hardware.
> 
> Or run the daily d-i build as a job on the porter boxes?

If we choose this solution, here is a quick and dirty patch against
di-autobuild to do that. It's basically changing the hardcoded paths
and call to schroot. There is probably more fixes/cleanup to do, but
it's just a proof of concept to show this solution works without
additional privilege on the porterboxes. Note that I haven't tried the
upload part, but I guess it's just a matter of having the right packages
installed (if not already the case).

We probably want to have a dedicated d-i account for that on the
porterbox. Also we have only one amd64/i386 porterbox, and the current
script doesn't support that, but that should be easy to test.

If this solution is chosen, I'll be happy to continue working on this
script as time permits.

Aurelien


diff --git a/buildscript b/buildscript
index 26ba6b7..23f676b 100755
--- a/buildscript
+++ b/buildscript
@@ -8,10 +8,10 @@
 # preconditions:
 #  - a buildd with a LVM setup and hence a unstable-$ARCH-sbuild
 #    schroot environment
-#  - create /home/buildd/di
-#  - clone this script into /home/buildd/di/di-autobuild
-#    (it will auto-create a d-i checkout in /home/buildd/di/debian-installer)
-#  - cron /home/buildd/di/di-autobuild/buildscript to something 0:00-ish
+#  - create $HOME/di
+#  - clone this script into $HOME/di/di-autobuild
+#    (it will auto-create a d-i checkout in $HOME/di/debian-installer)
+#  - cron $HOME/di/di-autobuild/buildscript to something 0:00-ish
 #    as user buildd
 set -e
 
@@ -21,23 +21,23 @@ ARCH=${ARCH:-$(dpkg --print-architecture)}
 RSYNC_RETRY=5
 LVM_CHROOT=yes  # default should be yes; on ancina.d.o we set 'no'
 
-exec >> /home/buildd/logs/di-autobuild_daily-${ARCH}-$(date +%Y%m%d-%H%M) 2>&1
+exec >> $HOME/di/logs/di-autobuild_daily-${ARCH}-$(date +%Y%m%d-%H%M) 2>&1
 
 echo "INFO: Daily build started on " $(date +%Y%m%d-%H%M)
 trap cleanup ERR TERM HUP INT QUIT EXIT
 
 checkout_installer() {
-  if [ ! -d "/home/buildd/di/debian-installer" ]
+  if [ ! -d "$HOME/di/debian-installer" ]
   then
-    echo "INFO: Doing initial checkout of debian-installer into 
/home/buildd/di ..."
+    echo "INFO: Doing initial checkout of debian-installer into $HOME/di ..."
     (
-      cd /home/buildd/di
+      cd $HOME/di
       git clone https://alioth.debian.org/anonscm/git/d-i/debian-installer.git 
debian-installer
     )
   fi
   echo "INFO: Updating debian-installer checkout ..."
   (
-    cd /home/buildd/di/debian-installer
+    cd $HOME/di/debian-installer
     git pull
     git clean -dxf
     echo "INFO: debian-installer revision $(git show-ref HEAD | cut -d' ' -f1)"
@@ -45,29 +45,29 @@ checkout_installer() {
 
   unset TMPDIR
   case $LVM_CHROOT in
-    yes) INSTALLER_DIR="$(mktemp -d -p /home/buildd/build-trees 
installer-XXXXXX)" ;;
-    no) INSTALLER_DIR="$(mktemp -d -p /home/buildd/chroots/sid/build 
installer-XXXXXX)" ;;
+    yes) INSTALLER_DIR="$(mktemp -d -p $HOME/di/build installer-XXXXXX)" ;;
+    no) INSTALLER_DIR="$(mktemp -d -p $HOME/chroots/sid/build 
installer-XXXXXX)" ;;
     *) echo "ERROR: Cannot set installer build directory." ;;
   esac
   echo "INFO: Checking out debian-installer into $INSTALLER_DIR/checkout ..."
   (
     cd "${INSTALLER_DIR}"
-    git clone /home/buildd/di/debian-installer/ checkout
+    git clone $HOME/di/debian-installer/ checkout
   )
 }
 
 install_build_deps() {
   echo "INFO: installing packages ..."
-  schroot -c "$SID" -d /build -u root -r -- apt-get update
+  dd-schroot-cmd -c "$SID" apt-get update
   (
-    LANG=C schroot -q -c "$SID" -d "/build/$(basename 
"$INSTALLER_DIR")/checkout/build" -p -r -- dpkg-checkbuilddeps -B 
../debian/control 2>&1 || true
+    LANG=C schroot -q -c "$SID" -d "$HOME/di/build/$(basename 
"$INSTALLER_DIR")/checkout/build" -p -r -- dpkg-checkbuilddeps -B 
../debian/control 2>&1 || true
   ) | sed -e 's%dpkg-checkbuilddeps: Unmet build dependencies: %%' -e 's, 
*([^)]*),,g' \
-    | DEBIAN_PRIORITY=critical DEBIAN_FRONTEND=noninteractive xargs schroot -c 
"$SID" -d "/build/$(basename "$INSTALLER_DIR")/checkout/build" -u root -p -r -- 
apt-get -y --no-install-recommends install
+    | DEBIAN_PRIORITY=critical DEBIAN_FRONTEND=noninteractive xargs 
dd-schroot-cmd -c "$SID" -y apt-get install
 }
 
 build_installer() {
   echo "INFO: building the installer ..."
-  LOG_TO_STDOUT=1 schroot -c "$SID" -d "/build/$(basename 
"$INSTALLER_DIR")/checkout/build" -p -r -- daily-build build-only
+  LOG_TO_STDOUT=1 schroot -c "$SID" -d "$HOME/di/build/$(basename 
"$INSTALLER_DIR")/checkout/build" -p -r -- daily-build build-only
 }
 
 cleanup () {
@@ -89,7 +89,7 @@ cleanup () {
 
 create_session() {
   echo "INFO: creating schroot"
-  SID="$(schroot -b -c sid-${ARCH}-sbuild)"
+  SID="$(schroot -b -c chroot:sid_${ARCH}-dchroot)"
   echo "INFO: session $SID created"
 }

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                 http://www.aurel32.net


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to