From b2e1ad74a802663f6d8acb7e7d9ed48efa9eea86 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:41:44 -0500 Subject: [PATCH] [GitHub Actions] Flatpak: Use flatpak-builder from org.flatpak.Builder --- .ci/flatpak/build.sh | 2 +- .github/workflows/CI_flatpak.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.ci/flatpak/build.sh b/.ci/flatpak/build.sh index aa539a2164c..677920f301b 100755 --- a/.ci/flatpak/build.sh +++ b/.ci/flatpak/build.sh @@ -2,7 +2,7 @@ # This requires a bunch of environment variables to be set. See the CI workflow echo "::group::flatpak-builder" -flatpak-builder --repo=${WZ_FLATPAK_LOCAL_REPO_NAME} --disable-rofiles-fuse --force-clean --default-branch=${WZ_FLATPAK_BRANCH} --mirror-screenshots-url=${WZ_FLATPAK_MIRROR_SCREENSHOTS_URL} "${WZ_FLATPAK_BUILD_DIR}" ${WZ_FLATPAK_MANIFEST_PATH} +flatpak run --command=flatpak-builder org.flatpak.Builder --repo=${WZ_FLATPAK_LOCAL_REPO_NAME} --disable-rofiles-fuse --force-clean --default-branch=${WZ_FLATPAK_BRANCH} --mirror-screenshots-url=${WZ_FLATPAK_MIRROR_SCREENSHOTS_URL} "${WZ_FLATPAK_BUILD_DIR}" ${WZ_FLATPAK_MANIFEST_PATH} echo "::endgroup::" if [[ "$WZ_FLATPAK_TARGET_ARCH" != "$WZ_FLATPAK_BUILD_ARCH" ]]; then diff --git a/.github/workflows/CI_flatpak.yml b/.github/workflows/CI_flatpak.yml index 208d27ff99a..f03c0c97fcf 100644 --- a/.github/workflows/CI_flatpak.yml +++ b/.github/workflows/CI_flatpak.yml @@ -65,7 +65,7 @@ jobs: dnf update -y echo "::endgroup::" echo "::group::dnf install dependencies" - dnf install -y cmake git git-lfs dbus-daemon flatpak flatpak-builder python3-aiohttp python3-tenacity python3-gobject ccache zstd curl appstream + dnf install -y cmake git git-lfs dbus-daemon flatpak python3-aiohttp python3-tenacity python3-gobject ccache zstd curl appstream echo "::endgroup::" echo "::group::flatpak remote-add" @@ -214,6 +214,11 @@ jobs: # Builder (which includes flatpak-builder-lint) flatpak install flathub -y --noninteractive org.flatpak.Builder + + # Start a dbus session within the container to allow flatpaks to run + # See: https://discussion.fedoraproject.org/t/cannot-run-flatpaks-in-a-fedora-container/73867/2 + mkdir /run/dbus + dbus-send --system /org/freedesktop/DBus org.freedesktop.DBus || dbus-daemon --system --fork - name: Build Flatpak id: build env: @@ -231,11 +236,6 @@ jobs: env: WZ_FLATPAK_LOCAL_REPO_NAME: ${{ steps.build.outputs.WZ_FLATPAK_LOCAL_REPO_NAME }} run: | - # Start a dbus session within the container to allow flatpaks to run - # See: https://discussion.fedoraproject.org/t/cannot-run-flatpaks-in-a-fedora-container/73867/2 - mkdir /run/dbus - dbus-send --system /org/freedesktop/DBus org.freedesktop.DBus || dbus-daemon --system --fork - flatpak run --command=flatpak-builder-lint org.flatpak.Builder --exceptions repo "${WZ_FLATPAK_LOCAL_REPO_NAME}" echo "flatpak-builder-lint - OK" ###############################################################