[gnome-build-meta/abderrahim/bst2: 2/8] port to new API of the script plugin




commit 188a2afa8b268dc3e84cc82b9af4a2090d539f1f
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Mon Jan 3 22:01:07 2022 +0100

    port to new API of the script plugin

 elements/boards/pinebook-pro/image.bst      | 21 +++++++--------------
 elements/boards/raspberrypi-4/image.bst     | 27 ++++++++++-----------------
 elements/boards/raspberrypi-4/initramfs.bst | 15 +--------------
 elements/boards/raspberrypi-4/repo.bst      | 17 ++++-------------
 elements/boards/rock64/image.bst            | 21 +++++++--------------
 elements/iso/image.bst                      | 25 +++++++------------------
 elements/iso/initramfs.bst                  | 15 +--------------
 elements/iso/signed-image.bst               | 13 ++++---------
 elements/oci/debug.bst                      | 18 ++++++------------
 elements/oci/platform.bst                   | 18 ++++++------------
 elements/oci/sdk.bst                        | 18 ++++++------------
 elements/vm/image.bst                       | 18 +++---------------
 elements/vm/initramfs.bst                   | 15 +--------------
 13 files changed, 63 insertions(+), 178 deletions(-)
---
diff --git a/elements/boards/pinebook-pro/image.bst b/elements/boards/pinebook-pro/image.bst
index 46a222bd5..6257db75e 100644
--- a/elements/boards/pinebook-pro/image.bst
+++ b/elements/boards/pinebook-pro/image.bst
@@ -2,8 +2,12 @@ kind: script
 
 build-depends:
 - boards/pinebook-pro/image-deps.bst
-- vm/repo.bst
-- freedesktop-sdk.bst:components/linux.bst
+- filename: vm/repo.bst
+  config:
+    location: /source-repo
+- filename: freedesktop-sdk.bst:components/linux.bst
+  config:
+    location: /kernel
 
 variables:
   linux-root: B921B045-1DF0-41C3-AF44-4C6F280D3FAE
@@ -15,18 +19,6 @@ environment:
   OSTREE_REPO: "%{sysroot}/ostree/repo"
 
 config:
-  layout:
-  - element: ''
-    destination: '/sysroot'
-  - element: ''
-    destination: '/genimage'
-  - element: vm/repo.bst
-    destination: '/source-repo'
-  - element: boards/pinebook-pro/image-deps.bst
-    destination: '/'
-  - element: components/linux.bst
-    destination: '/kernel'
-
   commands:
   - mkdir -p "${OSTREE_REPO}"
   - ostree init --repo="${OSTREE_REPO}" --mode=bare
@@ -69,6 +61,7 @@ config:
 
   - |
     size=$(($(du -s -B 4K "%{sysroot}" | cut -f1)*4+200*1024))
+    mkdir /genimage
     cat >/genimage/genimage.cfg <<EOF
     image efi.img {
         vfat {
diff --git a/elements/boards/raspberrypi-4/image.bst b/elements/boards/raspberrypi-4/image.bst
index 16d49b1fc..638370b42 100644
--- a/elements/boards/raspberrypi-4/image.bst
+++ b/elements/boards/raspberrypi-4/image.bst
@@ -2,9 +2,15 @@ kind: script
 
 build-depends:
 - boards/raspberrypi-4/image-deps.bst
-- boards/raspberrypi-4/bsp/firmware.bst
-- boards/raspberrypi-4/repo.bst
-- boards/raspberrypi-4/bsp/linux.bst
+- filename: boards/raspberrypi-4/repo.bst
+  config:
+    location: /source-repo
+- filename: boards/raspberrypi-4/bsp/linux.bst
+  config:
+    location: /kernel
+- filename: boards/raspberrypi-4/bsp/firmware.bst
+  config:
+    location: /firmware
 
 variables:
   linux-root: B921B045-1DF0-41C3-AF44-4C6F280D3FAE
@@ -17,20 +23,6 @@ environment:
   OSTREE_REPO: "%{sysroot}/ostree/repo"
 
 config:
-  layout:
-  - element: ''
-    destination: '/sysroot'
-  - element: ''
-    destination: '/genimage'
-  - element: boards/raspberrypi-4/repo.bst
-    destination: '/source-repo'
-  - element: boards/raspberrypi-4/image-deps.bst
-    destination: '/'
-  - element: boards/raspberrypi-4/bsp/linux.bst
-    destination: '/kernel'
-  - element: boards/raspberrypi-4/bsp/firmware.bst
-    destination: '/firmware'
-
   commands:
   - mkdir -p "${OSTREE_REPO}"
   - ostree init --repo="${OSTREE_REPO}" --mode=bare
@@ -99,6 +91,7 @@ config:
 
   - |
     size=$(($(du -s -B 4K "%{sysroot}" | cut -f1)*4+200*1024))
+    mkdir /genimage
     cat >/genimage/genimage.cfg <<EOF
     image efi.img {
         vfat {
diff --git a/elements/boards/raspberrypi-4/initramfs.bst b/elements/boards/raspberrypi-4/initramfs.bst
index 1352b9ded..2b3db3f9e 100644
--- a/elements/boards/raspberrypi-4/initramfs.bst
+++ b/elements/boards/raspberrypi-4/initramfs.bst
@@ -9,21 +9,8 @@ variables:
   uuidnamespace: aea54278-2587-4075-ae67-8688ace4ce3d
 
 config:
-  layout:
-  - element: ''
-    destination: '/tmp'
-  - element: ''
-    destination: '/var/tmp'
-  - element: ''
-    destination: '/efi'
-  - element: boards/raspberrypi-4/initramfs/deps.bst
-    destination: '/'
-  - element: boards/raspberrypi-4/initramfs/initial-scripts.bst
-    destination: '/'
-  - element: vm/prepare-image.bst
-    destination: '/'
-
   commands:
+  - mkdir -p /tmp /var/tmp /efi
   - |
     prepare-image.sh \
        --seed "%{uuidnamespace}" \
diff --git a/elements/boards/raspberrypi-4/repo.bst b/elements/boards/raspberrypi-4/repo.bst
index d5812ffd4..3ba6a100b 100644
--- a/elements/boards/raspberrypi-4/repo.bst
+++ b/elements/boards/raspberrypi-4/repo.bst
@@ -4,7 +4,9 @@ build-depends:
 - freedesktop-sdk.bst:vm/prepare-image.bst
 - core-deps/libostree.bst
 - boards/raspberrypi-4/initial-scripts.bst
-- boards/raspberrypi-4/filesystem.bst
+- filename: boards/raspberrypi-4/filesystem.bst
+  config:
+    location: /sysroot
 
 variables:
   uuidnamespace: aea54278-2587-4075-ae67-8688ace4ce3d
@@ -14,19 +16,8 @@ environment:
   OSTREE_REPO: "%{install-root}"
 
 config:
-  layout:
-  - element: ''
-    destination: /tmp
-  - element: core-deps/libostree.bst
-    destination: /
-  - element: boards/raspberrypi-4/filesystem.bst
-    destination: /sysroot
-  - element: boards/raspberrypi-4/initial-scripts.bst
-    destination: /
-  - element: vm/prepare-image.bst
-    destination: /
-
   commands:
+  - mkdir /tmp
   - |
     prepare-image.sh \
        --sysroot /sysroot \
diff --git a/elements/boards/rock64/image.bst b/elements/boards/rock64/image.bst
index 41cea2433..8bba41668 100644
--- a/elements/boards/rock64/image.bst
+++ b/elements/boards/rock64/image.bst
@@ -2,8 +2,12 @@ kind: script
 
 build-depends:
 - boards/rock64/image-deps.bst
-- vm/repo.bst
-- freedesktop-sdk.bst:components/linux.bst
+- filename: vm/repo.bst
+  config:
+    location: /source-repo
+- filename: freedesktop-sdk.bst:components/linux.bst
+  config:
+    location: /kernel
 
 variables:
   linux-root: B921B045-1DF0-41C3-AF44-4C6F280D3FAE
@@ -16,18 +20,6 @@ environment:
   OSTREE_REPO: "%{sysroot}/ostree/repo"
 
 config:
-  layout:
-  - element: ''
-    destination: '/sysroot'
-  - element: ''
-    destination: '/genimage'
-  - element: vm/repo.bst
-    destination: '/source-repo'
-  - element: boards/rock64/image-deps.bst
-    destination: '/'
-  - element: components/linux.bst
-    destination: '/kernel'
-
   commands:
   - mkdir -p "${OSTREE_REPO}"
   - ostree init --repo="${OSTREE_REPO}" --mode=bare
@@ -70,6 +62,7 @@ config:
 
   - |
     size=$(($(du -s -B 4K "%{sysroot}" | cut -f1)*4+200*1024))
+    mkdir /genimage
     cat >/genimage/genimage.cfg <<EOF
     image efi.img {
         vfat {
diff --git a/elements/iso/image.bst b/elements/iso/image.bst
index 102e9a714..8319ec375 100644
--- a/elements/iso/image.bst
+++ b/elements/iso/image.bst
@@ -2,33 +2,22 @@ kind: script
 
 build-depends:
 - iso/iso-build-deps.bst
-- iso/signed-image-only.bst
-- iso/filesystem.bst
 - iso/initial-scripts.bst
 - iso/initramfs.bst
+- filename: iso/signed-image-only.bst
+  config:
+    location: /sysroot/eosimages
+- filename: iso/filesystem.bst
+  config:
+    location: /sysroot
 
 variables:
   install-root: /build/install-root
   uuidnamespace: aea54278-2587-4075-ae67-8688ace4ce3d
 
 config:
-  layout:
-  - element: ''
-    destination: /tmp
-  - element: ''
-    destination: /build
-  - element: iso/iso-build-deps.bst
-    destination: /
-  - element: iso/filesystem.bst
-    destination: /sysroot
-  - element: iso/initramfs.bst
-    destination: /sysroot/efi
-  - element: iso/initial-scripts.bst
-    destination: /
-  - element: iso/signed-image-only.bst
-    destination: /sysroot/eosimages
-
   commands:
+  - mkdir -p /tmp
   - mkdir -p /build/images
   - mkdir -p /build/install-root
   - mkdir -p /build/stage-1
diff --git a/elements/iso/initramfs.bst b/elements/iso/initramfs.bst
index f41526781..88ed5661c 100644
--- a/elements/iso/initramfs.bst
+++ b/elements/iso/initramfs.bst
@@ -17,21 +17,8 @@ variables:
       efi-arch: ia32
 
 config:
-  layout:
-  - element: ''
-    destination: '/tmp'
-  - element: ''
-    destination: '/var/tmp'
-  - element: ''
-    destination: '/boot'
-  - element: iso/initramfs/deps.bst
-    destination: '/'
-  - element: iso/initramfs/initial-scripts.bst
-    destination: '/'
-  - element: vm/prepare-image.bst
-    destination: '/'
-
   commands:
+  - mkdir -p /tmp /var/tmp /boot
   - |
     prepare-image.sh \
        --seed "%{uuidnamespace}" \
diff --git a/elements/iso/signed-image.bst b/elements/iso/signed-image.bst
index 21c561e01..57b80a02b 100644
--- a/elements/iso/signed-image.bst
+++ b/elements/iso/signed-image.bst
@@ -2,7 +2,9 @@ kind: script
 
 build-depends:
 - freedesktop-sdk.bst:components/gnupg.bst
-- vm/image.bst
+- filename: vm/image.bst
+  config:
+    location: /images
 
 variables:
   install-root: /images
@@ -13,15 +15,8 @@ environment:
   GNUPGHOME: /tmp/gpg
 
 config:
-  layout:
-  - element: components/gnupg.bst
-    destination: /
-  - element: vm/image.bst
-    destination: /images
-  - element: ''
-    destination: /tmp
-
   commands:
+  - mkdir /tmp
   - mv /images/disk.img.xz "/images/%{basename}.img.xz"
 
   - mkdir "${GNUPGHOME}"
diff --git a/elements/oci/debug.bst b/elements/oci/debug.bst
index 1304bd08a..c73b29eb8 100644
--- a/elements/oci/debug.bst
+++ b/elements/oci/debug.bst
@@ -2,21 +2,15 @@ kind: script
 
 build-depends:
 - freedesktop-sdk.bst:oci/oci-builder.bst
-- oci/sdk.bst
-- oci/layers/debug.bst
 - oci/layers/sdk-init-scripts.bst
+- filename: oci/sdk.bst
+  config:
+    location: /parent
+- filename: oci/layers/debug.bst
+  config:
+    location: /layer
 
 config:
-  layout:
-  - element: oci/oci-builder.bst
-    destination: /
-  - element: oci/layers/debug.bst
-    destination: /layer
-  - element: oci/sdk.bst
-    destination: /parent
-  - element: oci/layers/sdk-init-scripts.bst
-    destination: /
-
   commands:
   - |
     if [ -d /initial_scripts ]; then
diff --git a/elements/oci/platform.bst b/elements/oci/platform.bst
index 6a0891d7f..d7a73cb5c 100644
--- a/elements/oci/platform.bst
+++ b/elements/oci/platform.bst
@@ -2,21 +2,15 @@ kind: script
 
 build-depends:
 - freedesktop-sdk.bst:oci/oci-builder.bst
-- freedesktop-sdk.bst:oci/platform-oci.bst
-- oci/layers/platform.bst
 - oci/layers/platform-init-scripts.bst
+- filename: freedesktop-sdk.bst:oci/platform-oci.bst
+  config:
+    location: /parent
+- filename: oci/layers/platform.bst
+  config:
+    location: /layer
 
 config:
-  layout:
-  - element: oci/oci-builder.bst
-    destination: /
-  - element: oci/layers/platform.bst
-    destination: /layer
-  - element: oci/platform-oci.bst
-    destination: /parent
-  - element: oci/layers/platform-init-scripts.bst
-    destination: /
-
   commands:
   - |
     if [ -d /initial_scripts ]; then
diff --git a/elements/oci/sdk.bst b/elements/oci/sdk.bst
index 9eeecf3b7..4792a4b49 100644
--- a/elements/oci/sdk.bst
+++ b/elements/oci/sdk.bst
@@ -2,21 +2,15 @@ kind: script
 
 build-depends:
 - freedesktop-sdk.bst:oci/oci-builder.bst
-- oci/platform.bst
-- oci/layers/sdk.bst
 - oci/layers/sdk-init-scripts.bst
+- filename: oci/platform.bst
+  config:
+    location: /parent
+- filename: oci/layers/sdk.bst
+  config:
+    location: /layer
 
 config:
-  layout:
-  - element: oci/oci-builder.bst
-    destination: /
-  - element: oci/layers/sdk.bst
-    destination: /layer
-  - element: oci/platform.bst
-    destination: /parent
-  - element: oci/layers/sdk-init-scripts.bst
-    destination: /
-
   commands:
   - |
     if [ -d /initial_scripts ]; then
diff --git a/elements/vm/image.bst b/elements/vm/image.bst
index 32e73d38c..3046f8bf4 100644
--- a/elements/vm/image.bst
+++ b/elements/vm/image.bst
@@ -3,9 +3,11 @@ kind: script
 build-depends:
 - core-deps/libostree.bst
 - core-deps/qemu.bst
-- vm/repo.bst
 - freedesktop-sdk.bst:integration/mtab.bst
 - freedesktop-sdk.bst:components/genimage.bst
+- filename: vm/repo.bst
+  config:
+    location: /source-repo
 
 variables:
   (?):
@@ -30,20 +32,6 @@ environment-nocache:
 - XZFLAGS
 
 config:
-  layout:
-  - element: ''
-    destination: '/sysroot'
-  - element: vm/repo.bst
-    destination: '/source-repo'
-  - element: core-deps/libostree.bst
-    destination: '/'
-  - element: core-deps/qemu.bst
-    destination: '/'
-  - element: integration/mtab.bst
-    destination: '/'
-  - element: components/genimage.bst
-    destination: '/'
-
   commands:
   - mkdir -p "${OSTREE_REPO}"
   - ostree init --repo="${OSTREE_REPO}" --mode=bare
diff --git a/elements/vm/initramfs.bst b/elements/vm/initramfs.bst
index 440cb4318..0e2c74845 100644
--- a/elements/vm/initramfs.bst
+++ b/elements/vm/initramfs.bst
@@ -9,21 +9,8 @@ variables:
   uuidnamespace: aea54278-2587-4075-ae67-8688ace4ce3d
 
 config:
-  layout:
-  - element: ''
-    destination: '/tmp'
-  - element: ''
-    destination: '/efi'
-  - element: ''
-    destination: '/var/tmp'
-  - element: vm/initramfs/deps.bst
-    destination: '/'
-  - element: vm/initramfs/initial-scripts.bst
-    destination: '/'
-  - element: vm/prepare-image.bst
-    destination: '/'
-
   commands:
+  - mkdir -p /tmp /efi /var/tmp
   - |
     prepare-image.sh \
        --seed "%{uuidnamespace}" \


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