[gnome-build-meta/valentindavid/fdsdk-21.08: 9/13] Remove openh264-extension.bst junction




commit 5f837029fd102428593518cca2ac14a767907e80
Author: Valentin David <valentin david codethink co uk>
Date:   Tue May 25 10:04:06 2021 +0200

    Remove openh264-extension.bst junction
    
    BuildStream does not allow two junctions to use the same project name.
    There is a conflict between Freedesktop SDK used by gnome-build-meta
    (20.08) and Freedesktop SDK used by openh264-extension (19.08).
    
    Using a junction for openh264-extension would rebuild it using a
    different Freedesktop SDK, which might not contain the elements it
    needs. For example it will stop building with Freedestkop SDK 21.08.
    
    So instead we need to build openh264-extension directly.

 .gitlab-ci.yml                  | 18 ++++++++++++++----
 .gitlab-ci/flat-manager.yml     | 17 +++++++++++++++--
 elements/openh264-extension.bst | 10 ----------
 junction.refs                   |  2 --
 4 files changed, 29 insertions(+), 18 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c12baf9f..58f3ec4b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,8 +4,8 @@ variables:
   GET_SOURCES_ATTEMPTS: 3
   BST_STRICT: '--no-strict'
   BST_TRACK_TAGS: 'false'
-  BST_NO_PUSH: "bst $BST_STRICT --config .gitlab-ci/buildstream-nopush.conf --log-file logs/build.log 
--colors"
-  BST: "bst $BST_STRICT --config .gitlab-ci/buildstream.conf --log-file logs/build.log --colors"
+  BST_NO_PUSH: "bst $BST_STRICT --config ${CI_PROJECT_DIR}/.gitlab-ci/buildstream-nopush.conf --log-file 
${CI_PROJECT_DIR}/logs/build.log --colors"
+  BST: "bst $BST_STRICT --config ${CI_PROJECT_DIR}/.gitlab-ci/buildstream.conf --log-file 
${CI_PROJECT_DIR}/logs/build.log --colors"
   FLATPAK_BRANCH: master
 
 stages:
@@ -24,6 +24,9 @@ default:
   - echo "$GITLAB_CAS_PUSH_CERT" > client.crt
   - echo "$GITLAB_CAS_PUSH_KEY" > client.key
 
+  - git clone https://gitlab.com/freedesktop-sdk/openh264-extension.git
+  - git -C openh264-extension checkout openh264-2.0.0-5-0-g398990ce27764214ed0e1586177f1b2114de7532
+
 #
 # Templates shared by multiple jobs
 #
@@ -36,6 +39,7 @@ default:
   interruptible: true
   script:
   - TARGETS=(core.bst flatpak-runtimes.bst flatpak-platform-extensions.bst flatpak/platform-manifest.bst 
flatpak/sdk-manifest.bst)
+  - H264_TARGETS=()
 
   - |
     case "${ARCH}" in
@@ -44,11 +48,17 @@ default:
          ;;
       x86_64)
          TARGETS+=(vm/repo.bst vm/repo-devel.bst)
-         TARGETS+=(openh264-extension.bst:flatpak-repo.bst)
+         H264_TARGETS+=(flatpak-repo.bst)
          ;;
     esac
 
   - ${BST} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build "${TARGETS[@]}"
+  - |
+    if [ "${#H264_TARGETS[@]}" -gt 0 ]; then
+      pushd openh264-extension
+      ${BST} --max-jobs $(( $(nproc) / 4 )) build "${H264_TARGETS[@]}"
+      popd
+    fi
 
   # Store artifacts so we can inspect build failures
   artifacts:
@@ -192,7 +202,7 @@ generate-deploy-config:
       FLAT_MANAGER_REPO: '$FLAT_MANAGER_REPO'
       TARGETS: flatpak-runtimes.bst
       TARGETS_nightly: flatpak-platform-extensions.bst
-      TARGETS_nightly_x86_64: openh264-extension.bst:flatpak-repo.bst
+      TARGETS_nightly_x86_64: openh264-extension+flatpak-repo.bst
       ENVIRONMENT_NAME: '$ENVIRONMENT_NAME'
 
     END
diff --git a/.gitlab-ci/flat-manager.yml b/.gitlab-ci/flat-manager.yml
index 24cc6763..97f295ee 100644
--- a/.gitlab-ci/flat-manager.yml
+++ b/.gitlab-ci/flat-manager.yml
@@ -28,10 +28,23 @@ default:
   - ostree init --repo repo/ --mode archive
 
   - |
+    REPO_PATH="${PWD}/repo/"
     for target in $TARGETS; do
-      $BST -o arch $ARCH checkout --hardlinks $target checkout-repo/
-      ostree pull-local --repo repo/ checkout-repo/
+      case "${target}" in
+        *+*)
+          dir="${target%+*}"
+          real_target="${target#*+}"
+        ;;
+        *)
+          dir=.
+          real_target="${target}"
+        ;;
+      esac
+      pushd "${dir}"
+      $BST -o arch $ARCH checkout --hardlinks "${real_target}" checkout-repo/
+      ostree pull-local --repo "${REPO_PATH}" checkout-repo/
       rm -rf checkout-repo/
+      popd
     done
 
   - ostree fsck --repo repo/ --all
diff --git a/junction.refs b/junction.refs
index 9a14d1d2..4acf2d69 100644
--- a/junction.refs
+++ b/junction.refs
@@ -2,5 +2,3 @@ projects:
   gnome:
     freedesktop-sdk.bst:
     - ref: freedesktop-sdk-20.08.14-0-g2a596987c94d848f3cf901c34f7be1a66dffaeff
-    openh264-extension.bst:
-    - ref: openh264-2.0.0-4-0-g7191bc88fbeed3ac842543706f856cb6dde99bc9


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