]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
CI: update Ubuntu repositories configuration
authorIker Pedrosa <ipedrosa@redhat.com>
Mon, 14 Oct 2024 09:53:50 +0000 (11:53 +0200)
committerAlejandro Colomar <alx@kernel.org>
Tue, 15 Oct 2024 08:43:24 +0000 (10:43 +0200)
Recently Ubuntu updated its repositories configuration file from
`/etc/apt/sources.list` to `/etc/apt/sources.list.d/ubuntu.source`.
Thus, we need to update its location to be able to install all the
package dependencies.

In addition, the CI script was trying to uncomment the lines starting
with `deb-src`, but there is none in the new configuration file format.
Replace `Types: deb` by `Types: deb deb-src` at the beginning of the
line instead.

This commit merges all dependency installation scripts into a single
workflow, which will be called from all sites that have to install
dependencies.

Link: https://linuxconfig.org/ubuntus-repository-configuration-ubuntu-sources-have-moved-to-etc-apt-sources-list-d-ubuntu-sources
Closes: https://github.com/shadow-maint/shadow/issues/1088
Reported-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
.github/actions/install-dependencies/action.yml

index 59746d6c0ce4fd2b2c5708b6f0be136cb8effee8..243f0b2c98b2032507d0b37fea1f2c4dd1e4145d 100644 (file)
@@ -5,8 +5,13 @@ runs:
   steps:
   - shell: bash
     run: |
-      sudo apt-get update -y
-      sudo apt-get install -y ubuntu-dev-tools libbsd-dev
-      sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
-      sudo apt-get update -y
+      sudo cat /etc/apt/sources.list.d/ubuntu.sources
+      sudo sed -i 's/^Types: deb/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
+      export DEBIAN_PRIORITY=critical
+      export DEBIAN_FRONTEND=noninteractive
+      # let's try to work around upgrade breakage in a pkg we don't care about
+      sudo apt-mark hold grub-efi-amd64-bin grub-efi-amd64-signed
+      sudo apt-get update
+      sudo apt-get -y dist-upgrade
+      sudo apt-get -y install ubuntu-dev-tools automake autopoint xsltproc gettext expect byacc libtool libbsd-dev pkgconf
       sudo apt-get -y build-dep shadow