[gnome-build-meta/abderrahim/oci] WIP: generate OCI images
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/abderrahim/oci] WIP: generate OCI images
- Date: Sat, 19 Jun 2021 16:16:41 +0000 (UTC)
commit 5db31efce2eed5aa98dbf244772bcfe45852299a
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Sat Jun 19 17:16:34 2021 +0100
WIP: generate OCI images
elements/oci/bootstrap.bst | 20 +++++++++++++++++++
elements/oci/platform-init-scripts.bst | 7 +++++++
elements/oci/platform-layer.bst | 14 ++++++++++++++
elements/oci/platform.bst | 35 ++++++++++++++++++++++++++++++++++
elements/oci/umoci.bst | 17 +++++++++++++++++
5 files changed, 93 insertions(+)
---
diff --git a/elements/oci/bootstrap.bst b/elements/oci/bootstrap.bst
new file mode 100644
index 00000000..1fe4d593
--- /dev/null
+++ b/elements/oci/bootstrap.bst
@@ -0,0 +1,20 @@
+kind: script
+
+build-depends:
+- oci/umoci.bst
+- freedesktop-sdk.bst:oci/layers/bootstrap.bst
+
+config:
+ root-read-only: true
+ layout:
+ - element: oci/umoci.bst
+ destination: /
+ - element: oci/layers/bootstrap.bst
+ destination: '%{build-root}/layer'
+
+ commands:
+ - umoci init --layout %{install-root}
+ - umoci new --image %{install-root}
+ - umoci insert --image %{install-root} %{build-root}/layer /
+ #- umoci config
+
diff --git a/elements/oci/platform-init-scripts.bst b/elements/oci/platform-init-scripts.bst
new file mode 100644
index 00000000..2b9ff801
--- /dev/null
+++ b/elements/oci/platform-init-scripts.bst
@@ -0,0 +1,7 @@
+kind: collect_initial_scripts
+
+build-depends:
+- sdk-platform.bst
+
+config:
+ path: /initial_scripts
diff --git a/elements/oci/platform-layer.bst b/elements/oci/platform-layer.bst
new file mode 100644
index 00000000..38acf8f1
--- /dev/null
+++ b/elements/oci/platform-layer.bst
@@ -0,0 +1,14 @@
+kind: compose
+
+build-depends:
+- sdk-platform.bst
+- sdk/os-release.bst
+
+config:
+ exclude:
+ - debug
+ - devel
+ - doc
+ - locale
+ - extra
+ - vm-only
diff --git a/elements/oci/platform.bst b/elements/oci/platform.bst
new file mode 100644
index 00000000..a6148d81
--- /dev/null
+++ b/elements/oci/platform.bst
@@ -0,0 +1,35 @@
+kind: script
+
+build-depends:
+- oci/umoci.bst
+- oci/platform-layer.bst
+- oci/platform-init-scripts.bst
+- freedesktop-sdk.bst:oci/bootstrap-oci.bst
+#- flatpak/sdk-image.bst
+
+config:
+
+ layout:
+ - element: oci/umoci.bst
+ destination: /
+ - elemnts: oci/platform-init-scripts.bst
+ destination: /
+ - element: oci/bootstrap-oci.bst
+ destination: '%{install-root}'
+ - element: oci/platform-layer.bst
+ destination: '%{build-root}/layer'
+
+ commands:
+ - |
+ if [ -d /initial_scripts ]; then
+ for i in /initial_scripts/*; do
+ "${i}" %{build-root}/layer
+ done
+ fi
+
+ #- umoci init --layout %{install-root}/layout
+ #- umoci new --image %{install-root}/layout
+ #- umoci insert --image %{install-root}/layout %{build-root}/layer0 /
+ #- umoci insert --image %{install-root}/layout %{build-root}/layer1 /
+ - umoci insert --image %{install-root} %{build-root}/layer /
+
diff --git a/elements/oci/umoci.bst b/elements/oci/umoci.bst
new file mode 100644
index 00000000..f2fec788
--- /dev/null
+++ b/elements/oci/umoci.bst
@@ -0,0 +1,17 @@
+kind: make
+
+sources:
+- kind: tar
+ url: github_com:opencontainers/umoci/releases/download/v0.4.7/umoci.tar.xz
+
+build-depends:
+- freedesktop-sdk.bst:components/which.bst
+- freedesktop-sdk.bst:components/go.bst
+- freedesktop-sdk.bst:components/go-md2man.bst
+
+depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+
+variables:
+ optimize-debug: "false"
+ compress-debug: "false"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]