blob: 023ab669bb6db8a6929717cc325324e696be759e (
plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
---
include:
- https://salsa.debian.org/installer-team/branch2repo/-/raw/main/trigger_b2r.yml
variables:
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
# undo some of branch2repo's defaults, which are tuned for udebs
SALSA_CI_DISABLE_LINTIAN: 0
SALSA_CI_DISABLE_PIUPARTS: 0
# This tests running debootstrap inside an unshared user namespace.
# Inside that namespace, mknod is not available.
# In such an environment "mount -t proc proc /proc" will not work (see
# #1031222) so this also tests whether the fallback to bind-mounting
# proc works as systemd-tmpfiles will otherwise not create several files.
test-unshare:
stage: test
image: $SALSA_CI_IMAGES_BASE
needs:
- job: build
artifacts: true
variables:
DEBOOTSTRAP_SCRIPT: $CI_PROJECT_DIR/debootstrap
DEBOOTSTRAP_DIR: $CI_PROJECT_DIR
AUTOPKGTEST_TMP: /tmp
script:
- apt-get update
- apt-get install --no-install-recommends -y libdistro-info-perl libdpkg-perl libipc-run-perl perl systemd systemd-container ca-certificates mmdebstrap uidmap wget distro-info
- mmdebstrap --variant=custom --mode=unshare --setup-hook="./debian/tests/debian-testing minbase" --skip=update,setup,cleanup - "$AUTOPKGTEST_TMP/chroot.d"
test-buildd:
stage: test
image: $SALSA_CI_IMAGES_BASE
needs:
- job: build
artifacts: true
script:
- |
set -x
apt-get update
apt-get install --no-install-recommends -y wget distro-info
for SUITE in bullseye bookworm trixie; do
env DEBOOTSTRAP_DIR="$CI_PROJECT_DIR" ./debootstrap --variant=buildd "$SUITE" ./chroot
# check if chroots before trixie are unmerged and chroots of trixie
# or later are using merged-/usr
case "$SUITE" in
bullseye|bookworm)
for f in bin sbin lib; do
[ ! -d "./chroot/$f" ] && echo "E: /$f is not a directory" && exit 1
[ -L "./chroot/$f" ] && echo "E: /$f is a symlink" && exit 1
done
;;
trixie)
for f in bin sbin lib; do
[ ! -L "./chroot/$f" ] && echo "E: /$f is not a symlink" && exit 1
done
;;
esac
# check if trixie buildd chroots do not contain Priority:required
# packages like tzdata
case "$SUITE" in
bullseye|bookworm)
if [ "$(chroot ./chroot dpkg-query --no-pager --showformat '${db:Status-Status}' --show tzdata)" != "installed" ]; then
echo "E: tzdata should be installed in the buildd variant for bullseye and bookworm"
exit 1
fi
;;
trixie)
if [ "$(chroot ./chroot dpkg-query --no-pager --showformat '${db:Status-Status}' --show tzdata)" = "installed" ]; then
echo "E: tzdata should not be installed in the buildd variant for trixie"
exit 1
fi
;;
esac
rm -rf ./chroot
done
|