[gnome-build-meta/abderrahim/fdsdk-master: 111/111] fix extensions with beta branch of freedesktop-sdk



commit a17eba323e70ca23cf06adae6bdc1ff68eef7254
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Tue Jun 25 09:58:13 2019 +0100

    fix extensions with beta branch of freedesktop-sdk
    
    - build extensions in a separate element
    - use a variable for the freedesktop-sdk branch

 .gitlab-ci.yml                           | 20 +++++++++++++-------
 elements/flatpak-platform-extensions.bst | 21 +++++++++++++++++++++
 elements/flatpak-runtimes.bst            |  9 ---------
 elements/flatpak/platform.bst            | 10 +++++-----
 elements/flatpak/sdk.bst                 | 12 ++++++------
 project.conf                             |  1 +
 6 files changed, 46 insertions(+), 27 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5e22fb62..1e5a0004 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -78,7 +78,8 @@ before_script:
   stage: build
   dependencies: [track]
   script:
-    - ${BST} -o arch "${ARCH}" build core.bst flatpak-runtimes.bst platform-manifest.bst sdk-manifest.bst
+    - ${BST} -o arch "${ARCH}" build core.bst flatpak-runtimes.bst flatpak-platform-extensions.bst
+      platform-manifest.bst sdk-manifest.bst
   # Store all the downloaded git repos and tarballs in the cache.
   # This saves us fetching them on every build
   cache: &bst-cache
@@ -96,16 +97,21 @@ before_script:
   stage: flatpak
   dependencies: [track, flatpak-prepare]
   script:
+    - ostree init --repo repo/ --mode archive
+
     - ${BST} -o arch "${ARCH}" pull flatpak-runtimes.bst
     - ${BST} -o arch "${ARCH}" checkout --hardlinks flatpak-runtimes.bst checkout-repo/
+    - flatpak build-commit-from --src-repo=checkout-repo/ repo/
+    - rm -rf checkout-repo/
 
-    - ostree init --repo repo/ --mode archive
     - |
-      # remove freedesktop refs if we're pushing to flathub, push everything otherwise
-      case $FLAT_MANAGER_SERVER in *flathub*)
-        export REFS=$(ostree refs --repo checkout-repo/ | grep -v org.freedesktop.Platform)
-      esac
-    - flatpak build-commit-from --src-repo=checkout-repo/ repo/ $REFS
+      if test $FLAT_MANAGER_REPO == nightly; then
+          ${BST} -o arch "${ARCH}" pull flatpak-platform-extensions.bst
+          ${BST} -o arch "${ARCH}" checkout --hardlinks flatpak-platform-extensions.bst checkout-repo/
+          flatpak build-commit-from --src-repo=checkout-repo/ repo/
+          rm -rf checkout-repo/
+      fi
+
     - flatpak build-update-repo --generate-static-deltas repo/
 
     - flat-manager/flat-manager-client push $(cat build.txt) repo/
diff --git a/elements/flatpak-platform-extensions.bst b/elements/flatpak-platform-extensions.bst
new file mode 100644
index 00000000..b88e749c
--- /dev/null
+++ b/elements/flatpak-platform-extensions.bst
@@ -0,0 +1,21 @@
+kind: flatpak_repo
+depends:
+- filename: flatpak-images/platform-vaapi.bst
+  junction: freedesktop-sdk.bst
+  type: build
+- filename: flatpak-images/platform-ffmpeg-html5.bst
+  junction: freedesktop-sdk.bst
+  type: build
+- filename: flatpak-images/mesa.bst
+  junction: freedesktop-sdk.bst
+  type: build
+- filename: deploy-tools/flatpak.bst
+  junction: freedesktop-sdk.bst
+  type: build
+
+config:
+  environment:
+    - deploy-tools/flatpak.bst
+  arch: '%{gcc_arch}'
+  branch: '%{freedesktop-sdk-branch}'
+  repo-mode: bare-user-only
diff --git a/elements/flatpak-runtimes.bst b/elements/flatpak-runtimes.bst
index 57b3ff18..abdd9ce8 100644
--- a/elements/flatpak-runtimes.bst
+++ b/elements/flatpak-runtimes.bst
@@ -4,15 +4,6 @@ depends:
   type: build
 - filename: flatpak/platform-locale.bst
   type: build
-- filename: flatpak-images/platform-vaapi.bst
-  junction: freedesktop-sdk.bst
-  type: build
-- filename: flatpak-images/platform-ffmpeg-html5.bst
-  junction: freedesktop-sdk.bst
-  type: build
-- filename: flatpak-images/mesa.bst
-  junction: freedesktop-sdk.bst
-  type: build
 - filename: flatpak/sdk.bst
   type: build
 - filename: flatpak/sdk-debug.bst
diff --git a/elements/flatpak/platform.bst b/elements/flatpak/platform.bst
index 330d15ed..45607f68 100644
--- a/elements/flatpak/platform.bst
+++ b/elements/flatpak/platform.bst
@@ -28,7 +28,7 @@ config:
     # version to extensions that don't have a version
     Extension org.freedesktop.Platform.GL:
       # 1.4 is for Nvidia drivers
-      versions: "19.08;1.4"
+      versions: "%{freedesktop-sdk-branch};1.4"
       version: "1.4"
       directory: "%{lib}/GL"
       subdirectories: "true"
@@ -41,12 +41,12 @@ config:
 
     Extension org.freedesktop.Platform.Timezones:
       directory: share/zoneinfo
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
 
     Extension org.freedesktop.Platform.GStreamer:
       directory: lib/extensions/gstreamer-1.0
       subdirectories: 'true'
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
 
     Extension org.freedesktop.Platform.Icontheme:
       directory: share/runtime/share/icons
@@ -67,10 +67,10 @@ config:
       autodelete: 'false'
       no-autodownload: 'true'
       download-if: have-intel-gpu
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
 
     Extension org.freedesktop.Platform.ffmpeg-html5:
       directory: '%{lib}/ffmpeg'
       add-ld-path: lib
       autodelete: 'false'
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
diff --git a/elements/flatpak/sdk.bst b/elements/flatpak/sdk.bst
index 973ad52f..40189265 100644
--- a/elements/flatpak/sdk.bst
+++ b/elements/flatpak/sdk.bst
@@ -40,7 +40,7 @@ config:
     # a version.
     Extension org.freedesktop.Platform.GL:
       # 1.4 is for Nvidia drivers
-      versions: "19.08;1.4"
+      versions: "%{freedesktop-sdk-branch};1.4"
       version: "1.4"
       directory: "%{lib}/GL"
       subdirectories: "true"
@@ -53,12 +53,12 @@ config:
 
     Extension org.freedesktop.Platform.Timezones:
       directory: share/zoneinfo
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
 
     Extension org.freedesktop.Platform.GStreamer:
       directory: lib/extensions/gstreamer-1.0
       subdirectories: 'true'
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
 
     Extension org.freedesktop.Platform.Icontheme:
       directory: share/runtime/share/icons
@@ -77,18 +77,18 @@ config:
     Extension org.freedesktop.Platform.ffmpeg-html5:
       directory: '%{lib}/ffmpeg'
       add-ld-path: lib
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
 
     Extension org.freedesktop.Sdk.Extension:
       subdirectories: 'true'
       directory: lib/sdk
       no-autodownload: 'true'
       add-ld-path: lib
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
 
     Extension org.freedesktop.Platform.VAAPI.Intel:
       directory: '%{lib}/dri/intel-vaapi-driver'
       autodelete: 'false'
       no-autodownload: 'true'
       download-if: have-intel-gpu
-      version: 19.08
+      version: '%{freedesktop-sdk-branch}'
diff --git a/project.conf b/project.conf
index be235c90..a669c716 100644
--- a/project.conf
+++ b/project.conf
@@ -225,6 +225,7 @@ shell:
 
 variables:
   branch: master
+  freedesktop-sdk-branch: 19.08beta
   gcc_arch: "%{arch}"
   abi: "gnu"
   gcc_triplet: "%{gcc_arch}-linux-%{abi}"


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