]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - semaphoreci/semaphore-runner.sh
Revert "semaphore: temporarily disable the timedated test suite"
[thirdparty/systemd.git] / semaphoreci / semaphore-runner.sh
index 2bf8ce0d52eaea880c965696472f271b3b91de37..a21d5d88e0710dc1cca875c664271950470ea60a 100755 (executable)
@@ -4,8 +4,8 @@ set -eux
 
 # default to Debian testing
 DISTRO=${DISTRO:-debian}
-RELEASE=${RELEASE:-buster}
-BRANCH=${BRANCH:-debian/master}
+RELEASE=${RELEASE:-bullseye}
+BRANCH=${BRANCH:-upstream-ci}
 ARCH=${ARCH:-amd64}
 CONTAINER=${RELEASE}-${ARCH}
 CACHE_DIR=${SEMAPHORE_CACHE_DIR:=/tmp}
@@ -13,13 +13,16 @@ AUTOPKGTEST_DIR="${CACHE_DIR}/autopkgtest"
 # semaphore cannot expose these, but useful for interactive/local runs
 ARTIFACTS_DIR=/tmp/artifacts
 PHASES=(${@:-SETUP RUN})
+UBUNTU_RELEASE="$(lsb_release -cs)"
 
 create_container() {
-    # create autopkgtest LXC image; this sometimes fails with "Unable to fetch
-    # GPG key from keyserver", so retry a few times
-    for retry in $(seq 5); do
-        sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH --keyserver hkp://keyserver.ubuntu.com:80 && break
-        sleep $((retry*retry))
+    # Create autopkgtest LXC image; this sometimes fails with "Unable to fetch
+    # GPG key from keyserver", so retry a few times with different keyservers.
+    for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"; do
+        for retry in {1..5}; do
+            sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH ${keyserver:+--keyserver "$keyserver"} && break 2
+            sleep $((retry*retry))
+        done
     done
 
     # unconfine the container, otherwise some tests fail
@@ -36,7 +39,7 @@ apt-get -q --allow-releaseinfo-change update
 apt-get -y dist-upgrade
 apt-get install -y eatmydata
 # The following four are needed as long as these deps are not covered by Debian's own packaging
-apt-get install -y libfdisk-dev libp11-kit-dev libssl-dev libpwquality-dev
+apt-get install -y fdisk tree libfdisk-dev libp11-kit-dev libssl-dev libpwquality-dev
 apt-get purge --auto-remove -y unattended-upgrades
 systemctl unmask systemd-networkd
 systemctl enable systemd-networkd
@@ -51,9 +54,9 @@ for phase in "${PHASES[@]}"; do
             sudo rm -f /etc/apt/sources.list.d/*
 
             # enable backports for latest LXC
-            echo 'deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list.d/backports.list
+            echo "deb http://archive.ubuntu.com/ubuntu $UBUNTU_RELEASE-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/backports.list
             sudo apt-get -q update
-            sudo apt-get install -y -t xenial-backports lxc
+            sudo apt-get install -y -t "$UBUNTU_RELEASE-backports" lxc
             sudo apt-get install -y python3-debian git dpkg-dev fakeroot
 
             [ -d $AUTOPKGTEST_DIR ] || git clone --quiet --depth=1 https://salsa.debian.org/ci-team/autopkgtest.git "$AUTOPKGTEST_DIR"
@@ -66,9 +69,9 @@ for phase in "${PHASES[@]}"; do
             git checkout FETCH_HEAD debian
 
             # craft changelog
-            UPSTREAM_VER=$(git describe | sed 's/^v//')
+            UPSTREAM_VER=$(git describe | sed 's/^v//;s/-/./g')
             cat << EOF > debian/changelog.new
-systemd (${UPSTREAM_VER}-0) UNRELEASED; urgency=low
+systemd (${UPSTREAM_VER}.0) UNRELEASED; urgency=low
 
   * Automatic build for upstream test
 
@@ -83,7 +86,7 @@ EOF
             # disable autopkgtests which are not for upstream
             sed -i '/# NOUPSTREAM/ q' debian/tests/control
             # enable more unit tests
-            sed -i '/^CONFFLAGS =/ s/=/= --werror -Dtests=unsafe -Dsplit-usr=true -Dslow-tests=true -Dman=true /' debian/rules
+            sed -i '/^CONFFLAGS =/ s/=/= --werror -Dtests=unsafe -Dsplit-usr=true -Dslow-tests=true -Dfuzz-tests=true -Dman=true /' debian/rules
             # no orig tarball
             echo '1.0' > debian/source/format