From 8040fa55a1cbc34dede3205a902095ecd26c21e3 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 24 Feb 2024 12:05:44 +0000 Subject: [PATCH 1/5] install: fix compiler warning about empty directive argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On ppc64el with gcc 13.2 on Ubuntu 24.04: 3s In file included from ../src/basic/macro.h:386, 483s from ../src/basic/alloc-util.h:10, 483s from ../src/shared/install.c:12: 483s ../src/shared/install.c: In function ‘install_changes_dump’: 483s ../src/shared/install.c:432:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 483s 432 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.", 483s | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 483s ../src/shared/install.c:432:75: note: format string is defined here 483s 432 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.", --- src/shared/install.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/shared/install.c b/src/shared/install.c index fabf5db7ed..c3a94d1912 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -340,9 +340,12 @@ void install_changes_dump(int r, const char *verb, const InstallChange *changes, assert(verb || r >= 0); for (size_t i = 0; i < n_changes; i++) { - if (changes[i].type < 0) - assert(verb); assert(changes[i].path); + /* This tries to tell the compiler that it's safe to use 'verb' in a string format if there + * was an error, but the compiler doesn't care and fails anyway, so strna(verb) is used + * too. */ + assert(verb || changes[i].type >= 0); + verb = strna(verb); /* When making changes here, make sure to also change install_error() in dbus-manager.c. */ From f6387e7e3f641413f1e6cdbb72084c7c5e9935a3 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 22 Feb 2024 14:15:30 +0000 Subject: [PATCH 2/5] test/README: update ubuntu IRC channel for CI help --- test/README.testsuite | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/README.testsuite b/test/README.testsuite index 9174e1695f..5c93457c34 100644 --- a/test/README.testsuite +++ b/test/README.testsuite @@ -170,7 +170,7 @@ places: if jobs are started and running but no status is visible on the PR, then it is likely that reporting back is not working -For infrastructure help, reaching out to Canonical via the #ubuntu-devel channel +For infrastructure help, reaching out to Canonical via the #ubuntu-quality channel on libera.chat is an effective way to receive support in general. Manually running a part of the Ubuntu CI test suite From 132f78542979c412b233dd03496d277e4fffc8fa Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 22 Feb 2024 14:19:08 +0000 Subject: [PATCH 3/5] test/README: document how to add a new empty release to the PPA to migrate the CI to a new version --- test/README.testsuite | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/README.testsuite b/test/README.testsuite index 5c93457c34..48c871f5e8 100644 --- a/test/README.testsuite +++ b/test/README.testsuite @@ -170,6 +170,17 @@ places: if jobs are started and running but no status is visible on the PR, then it is likely that reporting back is not working +The CI job needs a PPA in order to be accepted, and the upstream-systemd-ci/systemd-ci +PPA is used. Note that this is necessary even when there are no packages to backport, +but by default a PPA won't have a repository for a release if there are no packages +built for it. To work around this problem, when a new empty release is needed the +mark-suite-dirty tool from the https://git.launchpad.net/ubuntu-archive-tools can +be used to force the PPA to publish an empty repository, for example: + + $ ./mark-suite-dirty -A ppa:upstream-systemd-ci/ubuntu/systemd-ci -s noble + +will create an empty 'noble' repository that can be used for 'noble' CI jobs. + For infrastructure help, reaching out to Canonical via the #ubuntu-quality channel on libera.chat is an effective way to receive support in general. From 4117a0d5e6961eeb6fc5d2e05d9a117147f63040 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 22 Feb 2024 10:18:32 +0000 Subject: [PATCH 4/5] semaphore: enable backports to get new dependencies Required due to building with debian/master branch --- .semaphore/semaphore-runner.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.semaphore/semaphore-runner.sh b/.semaphore/semaphore-runner.sh index 5219172570..6ffbf12c55 100755 --- a/.semaphore/semaphore-runner.sh +++ b/.semaphore/semaphore-runner.sh @@ -29,6 +29,7 @@ create_container() { # enable source repositories so that apt-get build-dep works sudo lxc-attach -n "$CONTAINER" -- sh -ex <>/etc/apt/sources.list.d/sources.list +echo "deb http://deb.debian.org/debian $RELEASE-backports main" >/etc/apt/sources.list.d/backports.list # We might attach the console too soon until systemctl --quiet --wait is-system-running; do sleep 1; done # Manpages database trigger takes a lot of time and is not useful in a CI @@ -44,6 +45,8 @@ 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 fdisk tree libfdisk-dev libp11-kit-dev libssl-dev libpwquality-dev rpm +# autopkgtest doesn't consider backports +apt-get install -y -t $RELEASE-backports debhelper libcurl4-openssl-dev libarchive-dev apt-get purge --auto-remove -y unattended-upgrades systemctl unmask systemd-networkd systemctl enable systemd-networkd From d6e98b3d1671c77a57c2a929fe1e6df219e142e9 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 22 Feb 2024 10:07:24 +0000 Subject: [PATCH 5/5] semaphore: set upstream build profile and set default branch to debian/master Leave TEST_UPSTREAM=1 for now in case we switch branches via the hook --- .semaphore/semaphore-runner.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.semaphore/semaphore-runner.sh b/.semaphore/semaphore-runner.sh index 6ffbf12c55..1b0b29e73e 100755 --- a/.semaphore/semaphore-runner.sh +++ b/.semaphore/semaphore-runner.sh @@ -7,7 +7,7 @@ set -o pipefail # default to Debian testing DISTRO="${DISTRO:-debian}" RELEASE="${RELEASE:-bookworm}" -BRANCH="${BRANCH:-upstream-ci}" +BRANCH="${BRANCH:-debian/master}" ARCH="${ARCH:-amd64}" CONTAINER="${RELEASE}-${ARCH}" CACHE_DIR="${SEMAPHORE_CACHE_DIR:-/tmp}" @@ -104,7 +104,9 @@ EOF rm -rf "$ARTIFACTS_DIR" # autopkgtest exits with 2 for "some tests skipped", accept that sudo "$AUTOPKGTEST_DIR/runner/autopkgtest" --env DEB_BUILD_OPTIONS=noudeb \ - --env TEST_UPSTREAM=1 ../systemd_*.dsc \ + --env DEB_BUILD_PROFILES=pkg.systemd.upstream \ + --env TEST_UPSTREAM=1 \ + ../systemd_*.dsc \ -o "$ARTIFACTS_DIR" \ -- lxc -s "$CONTAINER" \ || [ $? -eq 2 ]