1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
summary: Ensure snapd builds correctly in sbuild
details: |
The Debian package of snapd is sensitive to new dependencies that are not
provided as other Debian packages. We prefer to discover build issues
during the development process, and not during the final stages of release
preparation.
This nightly test builds the Debian package, using the packaging/debian-sid
directory, in a manner that is similar to what happens in the Debian buildd
network.
Additional tooling is provided to iteratively and incrementally work on the
packaging process, so that failures are easier to investigate.
systems: [debian-sid-*]
# takes a while
priority: 500
environment:
# amd64 normal build
BUILD_MODE/normal: normal
ARCH/normal: amd64
# Only build arch:all
BUILD_MODE/all: all
ARCH/all: amd64
restore: |
rm --recursive --one-file-system /srv/chroot/"sid-$ARCH-sbuild"
rm -f /etc/schroot/chroot.d/"sid-$ARCH-sbuild-"*
debug: |
# Test that there's a log file and a symbolic link pointing to it.
# The non-symlink has a time-stamp and we can match on the "Z" timezone
# marker to find it.
test "$(find . -maxdepth 1 -name '*Z.build' | wc -l)" -ge 1 && tail -n 100 ./*Z.build
cat <<EOM
Use release-tools/debian-package-builder to interactively fix build
issues. The debug shell created there shows the true layout of the source
code as it exists during the build inside a debian system, inside the
environment created by sbuild.
In particular note that the source code exists twice in the build tree,
and only the specific copy is being used.
EOM
execute: |
echo "Create a sid sbuild env"
eatmydata sbuild-createchroot --include=eatmydata,ccache,gnupg --arch="$ARCH" sid /srv/chroot/"sid-$ARCH-sbuild" http://deb.debian.org/debian
echo "Allow test user to run sbuild"
sbuild-adduser test
BUILD_PARAM="--verbose"
if [ "$BUILD_MODE" == "all" ]; then
BUILD_PARAM="$BUILD_PARAM --arch-all --no-arch-any"
fi
echo "Build mode: $BUILD_MODE"
su -c "sbuild $BUILD_PARAM --arch=$ARCH -d sid --run-autopkgtest $SPREAD_PATH/../*.dsc" test
|