From 67d8ecb90c64f6de4a6fce8791a2606a57bc2634 Mon Sep 17 00:00:00 2001 From: Cedric Hombourger Date: Mon, 13 Jan 2025 21:01:25 +0100 Subject: [PATCH] fix(ci): uninstall apparmor to work-around a compatibilty issue with bitbake Signed-off-by: Cedric Hombourger --- .../apparmor-policy-bitbake/action.yml | 28 +++++++++++++++++++ .github/workflows/main.yml | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/apparmor-policy-bitbake/action.yml diff --git a/.github/workflows/apparmor-policy-bitbake/action.yml b/.github/workflows/apparmor-policy-bitbake/action.yml new file mode 100644 index 00000000..00b565eb --- /dev/null +++ b/.github/workflows/apparmor-policy-bitbake/action.yml @@ -0,0 +1,28 @@ +# +# Copyright (c) Siemens AG, 2025 +# +# This file is subject to the terms and conditions of the MIT License. +# See COPYING file in the top-level directory. +# +# SPDX-License-Identifier: MIT + +name: 'let bitbake create user namespaces' +description: 'Remove AppArmor to work-around a compatibility issue with bitbake' +runs: + using: "composite" + steps: + - name: create AppArmor policy for bitbake + run: | + sudo tee /etc/apparmor.d/bitbake > /dev/null <<-EOF + abi , + include + profile bitbake /**/bitbake/bin/bitbake flags=(unconfined) { + userns, + } + EOF + shell: bash + - name: load AppArmor policy for bitbake + run: | + cat /etc/apparmor.d/bitbake + sudo apparmor_parser -r /etc/apparmor.d/bitbake + shell: bash diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f9fb1582..b0632970 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,6 +40,8 @@ jobs: uses: actions/checkout@v4 - name: Free Disk Space uses: ./.github/workflows/free-disk-space + - name: Configure AppArmor for bitbake + uses: ./.github/workflows/apparmor-policy-bitbake - name: Cache downloads and sstate uses: actions/cache@v4 with: