]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: Use add-apt-repository to enable sources
authorJan Janssen <medhefgo@web.de>
Tue, 5 Sep 2023 09:29:06 +0000 (11:29 +0200)
committerJan Janssen <medhefgo@web.de>
Wed, 6 Sep 2023 09:01:53 +0000 (11:01 +0200)
This should also ensure that consistent mirrors are selected.

.github/workflows/build_test.sh
.github/workflows/unit_tests.sh
test/README.testsuite

index a512e5101d298b6f2036e23352998a358dd898d0..aa4a25d7c5f7afa34b1278e4c286846615c50e9e 100755 (executable)
@@ -68,8 +68,6 @@ LINKER="${LINKER:?}"
 CRYPTOLIB="${CRYPTOLIB:?}"
 RELEASE="$(lsb_release -cs)"
 
-bash -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ $RELEASE main restricted universe multiverse' >>/etc/apt/sources.list"
-
 # Note: As we use postfixed clang/gcc binaries, we need to override $AR
 #       as well, otherwise meson falls back to ar from binutils which
 #       doesn't work with LTO
@@ -96,7 +94,7 @@ elif [[ "$COMPILER" == gcc ]]; then
     if ! apt install --dry-run "gcc-$COMPILER_VERSION" >/dev/null; then
         # Latest gcc stack deb packages provided by
         # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
-        add-apt-repository -y ppa:ubuntu-toolchain-r/test
+        add-apt-repository -y --no-update ppa:ubuntu-toolchain-r/test
     fi
 
     PACKAGES+=("gcc-$COMPILER_VERSION" "gcc-$COMPILER_VERSION-multilib")
@@ -105,7 +103,8 @@ else
 fi
 
 # PPA with some newer build dependencies (like zstd)
-add-apt-repository -y ppa:upstream-systemd-ci/systemd-ci
+add-apt-repository -y --no-update ppa:upstream-systemd-ci/systemd-ci
+add-apt-repository -y --no-update --enable-source
 apt-get -y update
 apt-get -y build-dep systemd
 apt-get -y install "${PACKAGES[@]}"
index 0985817b72e5cb047f56a22877f45854e6e40111..a5b98e089be106abe88b1341247d700e2b035fe3 100755 (executable)
@@ -3,7 +3,6 @@
 
 # shellcheck disable=SC2206
 PHASES=(${@:-SETUP RUN RUN_ASAN_UBSAN CLEANUP})
-RELEASE="$(lsb_release -cs)"
 ADDITIONAL_DEPS=(
     clang
     expect
@@ -46,9 +45,9 @@ for phase in "${PHASES[@]}"; do
     case $phase in
         SETUP)
             info "Setup phase"
-            bash -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ $RELEASE main restricted universe multiverse' >>/etc/apt/sources.list"
             # PPA with some newer build dependencies
-            add-apt-repository -y ppa:upstream-systemd-ci/systemd-ci
+            add-apt-repository -y --no-update ppa:upstream-systemd-ci/systemd-ci
+            add-apt-repository -y --no-update --enable-source
             apt-get -y update
             apt-get -y build-dep systemd
             apt-get -y install "${ADDITIONAL_DEPS[@]}"
index c0f1a2b102f2863eb5077218395a739e30f79fee..bd72f413d05c9aaab264238550ed3bba7308885c 100644 (file)
@@ -191,7 +191,7 @@ the PR (set by the $UPSTREAM_PULL_REQUEST env variable) you'd like to debug:
 Now install necessary build & test dependencies:
 
 ## PPA with some newer Ubuntu packages required by upstream systemd
-# add-apt-repository -y ppa:upstream-systemd-ci/systemd-ci
+# add-apt-repository -y --enable-source ppa:upstream-systemd-ci/systemd-ci
 # apt build-dep -y systemd
 # apt install -y autopkgtest debhelper genisoimage git qemu-system-x86