summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-06-25 17:13:17 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-06-27 09:09:40 +0200
commit85d09bc246443ea118355def26efe4fa53fb7ed0 (patch)
treee9d59b2b8eb4ad1f25a462a2a500c35a15580f7a
parentbe341d3e10b976c8a8724c4b220331fbaf1c4b35 (diff)
gitlab: fix Ubuntu 18.04 image creation
Or, well, work around a bug.
-rwxr-xr-x.gitlab-ci/debian-install.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh
index 6679005ed1..7046400e4e 100755
--- a/.gitlab-ci/debian-install.sh
+++ b/.gitlab-ci/debian-install.sh
@@ -2,8 +2,23 @@
set -ex
-IS_UBUNTU_1604=0
-grep -q '^VERSION=.16.04.[0-9]\+ LTS' /etc/os-release && IS_UBUNTU_1604=1
+grep -q '^VERSION=.16.04.[0-9]\+ LTS' /etc/os-release && IS_UBUNTU_1604=1 || IS_UBUNTU_1604=0
+grep -q '^VERSION=.\(9 (stretch)\|18.04.[0-9]\+ LTS\)' /etc/os-release && IS_DEBIAN_9=1 || IS_DEBIAN_9=0
+
+if [ $IS_DEBIAN_9 = 1 ]; then
+ # pam is hosted on this release to the point chfn doesn't work.
+ # It's okay on Ubuntu 16.04 and 20.04 though, so keep this version specific.
+ #
+ # Setting up systemd (237-3ubuntu10.53) ...
+ # ...
+ # chfn: PAM: System error
+ # adduser: `/usr/bin/chfn -f systemd Network Management systemd-network' returned error code 1. Exiting.
+ # dpkg: error processing package systemd (--configure):
+ # installed systemd package post-installation script subprocess returned error exit status 1
+ # Errors were encountered while processing:
+ # systemd
+ ln -sf /bin/true /usr/bin/chfn
+fi
DEBIAN_FRONTEND=noninteractive apt-get update
DEBIAN_FRONTEND=noninteractive NM_INSTALL="apt-get --yes install" bash -x ./contrib/debian/REQUIRED_PACKAGES