[citemplates/bpiotrowski/unpriv] Configure flatpak-builder to work as unprivileged user



commit 097a9d61be473c17325ff026e772660ca8e99ace
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Mon Feb 17 11:48:05 2020 +0100

    Configure flatpak-builder to work as unprivileged user
    
    As part of [1], the base image was changed to run as non-root user. Pass
    --user and --disable-rofiles-fuse to keep pipelines working.
    
    [1] https://gitlab.gnome.org/GNOME/gnome-runtime-images/merge_requests/16

 flatpak/flatpak-ci-initiative-sdk-extensions.yml | 10 +++++-----
 flatpak/flatpak_ci_initiative.yml                |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/flatpak/flatpak-ci-initiative-sdk-extensions.yml 
b/flatpak/flatpak-ci-initiative-sdk-extensions.yml
index 117f589..450a9f0 100644
--- a/flatpak/flatpak-ci-initiative-sdk-extensions.yml
+++ b/flatpak/flatpak-ci-initiative-sdk-extensions.yml
@@ -4,16 +4,16 @@
   image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
   stage: '.pre'
   script:
-    - flatpak-builder --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
+    - flatpak-builder --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
     # Make sure to keep this in sync with the Flatpak manifest, all arguments
     # are passed except the config-args because we build it ourselves
-    - flatpak-builder --run flatpak_app ${MANIFEST_PATH} meson --prefix=/app ${MESON_ARGS} _build
-    - flatpak-builder --run flatpak_app ${MANIFEST_PATH} ninja -C _build install
-    - flatpak-builder --finish-only --repo=repo ${BRANCH:+--default-branch=$BRANCH} flatpak_app 
${MANIFEST_PATH}
+    - flatpak-builder --disable-rofiles-fuse --run flatpak_app ${MANIFEST_PATH} meson --prefix=/app 
${MESON_ARGS} _build
+    - flatpak-builder --disable-rofiles-fuse --run flatpak_app ${MANIFEST_PATH} ninja -C _build install
+    - flatpak-builder --disable-rofiles-fuse --finish-only --repo=repo ${BRANCH:+--default-branch=$BRANCH} 
flatpak_app ${MANIFEST_PATH}
     # Run automatic tests inside the Flatpak env
     - >
       xvfb-run -a -s "-screen 0 1024x768x24"
-      flatpak-builder --run
+      flatpak-builder --disable-rofiles-fuse --run
       --env=LANG=C.UTF-8
       --env=NO_AT_BRIDGE=1
       ${TEST_BUILD_ARGS}
diff --git a/flatpak/flatpak_ci_initiative.yml b/flatpak/flatpak_ci_initiative.yml
index 12205bf..988de1c 100644
--- a/flatpak/flatpak_ci_initiative.yml
+++ b/flatpak/flatpak_ci_initiative.yml
@@ -2,7 +2,7 @@
   image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
   stage: '.pre'
   script:
-    - flatpak-builder --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
+    - flatpak-builder --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
     # Make sure to keep this in sync with the Flatpak manifest, all arguments
     # are passed except the config-args because we build it ourselves
     - flatpak build flatpak_app meson --prefix=/app ${MESON_ARGS} _build
@@ -54,7 +54,7 @@
         install -m0644 -D \${src} \${dst}; \
       done"
 
-    - flatpak-builder --finish-only --repo=repo ${BRANCH:+--default-branch=$BRANCH} flatpak_app 
${MANIFEST_PATH}
+    - flatpak-builder --user --disable-rofiles-fuse --finish-only --repo=repo 
${BRANCH:+--default-branch=$BRANCH} flatpak_app ${MANIFEST_PATH}
     # Run automatic tests inside the Flatpak env
     - >
       xvfb-run -a -s "-screen 0 1024x768x24"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]