[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scratch buildds



On Fri, Jun 14, 2019 at 10:51:56PM +0200, Adam Borowski wrote:
> Hi!
> Fedora has an awesome feature for packagers: scratch builds.  It would be
> great if we could steal the idea.
> 
> I find myself doing incremental uploads just to fix bugs that the previous
> upload revealed on some weird arch.  At home, I can reasonably test only
> amd64 and arm64 -- especially if valgrind is involved, qemu-user is not up
> to scratch.  There are porterboxes but using them is inconvenient and
> involved, especially when the task is "build on all archs, report failures".

for host in $(porterhost1 porterhost2 porterhost3); do
  dcmd scp foo.dsc $host:
  ssh $host <<EOF
    dpkg-source -x foo.dsc
    schroot -c chroot:sid -n test-foo -b
    dd-schroot-cmd -c test-foo apt-get update
    dd-schroot-cmd -c test-foo apt-get build-dep foo
    cd foo-*
    schroot -c test-foo -r -- dpkg-buildpackage -rfakeroot -uc -us -i # or whatever arguments you want
    if [ $? -gt 0 ]; then echo "$host failed" | mail \$LOGNAME; fi
    schroot -c test-foo -e
    rm -rf foo*
  EOF
done

Put that in a script -- parametrizing things is left as an exercise to
the reader. You're done.

You don't need scratch builds...

-- 
To the thief who stole my anti-depressants: I hope you're happy

  -- seen somewhere on the Internet on a photo of a billboard


Reply to: