]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
CI: fixes for when running directly on GitHub images
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Tue, 25 Oct 2022 23:01:38 +0000 (00:01 +0100)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Wed, 26 Oct 2022 15:56:03 +0000 (16:56 +0100)
.github/actions/build-freeradius/action.yml
.github/actions/ci-tests/action.yml

index 26fe89420c6198135bd97b0e41754244581e382a..6324195cb1e2506f95f03d2b03fcddc1a5ffaf5d 100644 (file)
@@ -98,7 +98,7 @@ runs:
       if: ${{ matrix.env.TEST_TYPE == 'fixtures' && matrix.os.runs_on != 'self-hosted' }}
       shell: bash
       run: |
-        apt-get install -y --no-install-recommends ruby-dev
+        sudo apt-get install -y --no-install-recommends ruby-dev
 
     - name: Install cassandra driver (not yet available on 20.04)
       if: ${{ matrix.os.code == 'ubuntu1804' }}
index 1619a65d3ec0e76dd042908db511e1be9e4f9c9a..5b1e573e53c9512c0af4144f4b64e512ff2bb547 100644 (file)
@@ -57,17 +57,18 @@ runs:
       shell: bash
       run: |
         sudo mv /usr/bin/ucf /usr/bin/ucf.disabled
-        sudo sh -c 'echo "#!/bin/sh"          >  /usr/bin/ucf'
-        sudo sh -c 'echo "shift && cp -v \$@" >> /usr/bin/ucf'
+        sudo sh -c 'echo "#!/bin/sh"                                                   >  /usr/bin/ucf'
+        sudo sh -c 'echo "while case \$1 in -*) true;; *) false;; esac do shift; done" >> /usr/bin/ucf'
+        sudo sh -c 'echo "cp -v \$@"                                                   >> /usr/bin/ucf'
         sudo chmod +x /usr/bin/ucf
 
     - name: Do not start daemons on package install
       shell: bash
       run: |
-        echo "#! /bin/sh" > /usr/sbin/policy-rc.d
-        echo "echo Skipping daemon startup" >> /usr/sbin/policy-rc.d
-        echo "exit 101" >> /usr/sbin/policy-rc.d
-        chmod 755 /usr/sbin/policy-rc.d
+        echo "#! /bin/sh" | sudo tee /usr/sbin/policy-rc.d
+        echo "echo Skipping daemon startup" | sudo tee -a /usr/sbin/policy-rc.d
+        echo "exit 101" | sudo tee -a /usr/sbin/policy-rc.d
+        sudo chmod 755 /usr/sbin/policy-rc.d
 
     - name: Set up repositories
       shell: bash
@@ -90,6 +91,7 @@ runs:
           redis-server \
           slapd
 
+        test x"$USE_DOCKER" = "xtrue" || sudo apt-get install -y --no-install-recommends apparmor-utils
         test x"$USE_DOCKER" = "xtrue" || sudo systemctl stop dovecot exim4 slapd openresty
         test x"$USE_DOCKER" = "xtrue" || sudo aa-complain /usr/sbin/slapd