summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2018-07-31 12:39:17 +0100
committerTiago Gomes <tiago.avv@gmail.com>2018-08-02 11:24:43 +0000
commit33292be4618b83147258e729a44caa58859e4ba2 (patch)
tree9af95e3e64eb4b6818b1b7d40f17dc94d2caaf52 /doc/examples
parente788bda4969de17178f3facc0d31b36c91121402 (diff)
downloadbuildstream-33292be4618b83147258e729a44caa58859e4ba2.tar.gz
local plugin: validate project paths
The autotools example had to be copied over inside of the junction example, as referring to a path outside of the project directory is now disallowed.
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/junctions/autotools/elements/base.bst5
-rw-r--r--doc/examples/junctions/autotools/elements/base/alpine.bst13
-rw-r--r--doc/examples/junctions/autotools/elements/hello.bst21
-rw-r--r--doc/examples/junctions/autotools/project.conf13
-rw-r--r--doc/examples/junctions/elements/hello-junction.bst6
5 files changed, 53 insertions, 5 deletions
diff --git a/doc/examples/junctions/autotools/elements/base.bst b/doc/examples/junctions/autotools/elements/base.bst
new file mode 100644
index 000000000..1b85a9e8c
--- /dev/null
+++ b/doc/examples/junctions/autotools/elements/base.bst
@@ -0,0 +1,5 @@
+kind: stack
+description: Base stack
+
+depends:
+- base/alpine.bst
diff --git a/doc/examples/junctions/autotools/elements/base/alpine.bst b/doc/examples/junctions/autotools/elements/base/alpine.bst
new file mode 100644
index 000000000..cf85df5bf
--- /dev/null
+++ b/doc/examples/junctions/autotools/elements/base/alpine.bst
@@ -0,0 +1,13 @@
+kind: import
+description: |
+
+ Alpine Linux base runtime
+
+sources:
+- kind: tar
+
+ # This is a post doctored, trimmed down system image
+ # of the Alpine linux distribution.
+ #
+ url: alpine:integration-tests-base.v1.x86_64.tar.xz
+ ref: 3eb559250ba82b64a68d86d0636a6b127aa5f6d25d3601a79f79214dc9703639
diff --git a/doc/examples/junctions/autotools/elements/hello.bst b/doc/examples/junctions/autotools/elements/hello.bst
new file mode 100644
index 000000000..510f5b975
--- /dev/null
+++ b/doc/examples/junctions/autotools/elements/hello.bst
@@ -0,0 +1,21 @@
+kind: autotools
+description: |
+
+ Hello world example from automake
+
+variables:
+
+ # The hello world example lives in the doc/amhello folder.
+ #
+ # Set the %{command-subdir} variable to that location
+ # and just have the autotools element run it's commands there.
+ #
+ command-subdir: doc/amhello
+
+sources:
+- kind: tar
+ url: gnu:automake-1.16.tar.gz
+ ref: 80da43bb5665596ee389e6d8b64b4f122ea4b92a685b1dbd813cd1f0e0c2d83f
+
+depends:
+- base.bst
diff --git a/doc/examples/junctions/autotools/project.conf b/doc/examples/junctions/autotools/project.conf
new file mode 100644
index 000000000..7ee58b589
--- /dev/null
+++ b/doc/examples/junctions/autotools/project.conf
@@ -0,0 +1,13 @@
+# Unique project name
+name: autotools
+
+# Required BuildStream format version
+format-version: 9
+
+# Subdirectory where elements are stored
+element-path: elements
+
+# Define some aliases for the tarballs we download
+aliases:
+ alpine: https://gnome7.codethink.co.uk/tarballs/
+ gnu: https://ftp.gnu.org/gnu/automake/
diff --git a/doc/examples/junctions/elements/hello-junction.bst b/doc/examples/junctions/elements/hello-junction.bst
index dda865ecf..6d01e36a1 100644
--- a/doc/examples/junctions/elements/hello-junction.bst
+++ b/doc/examples/junctions/elements/hello-junction.bst
@@ -1,8 +1,4 @@
kind: junction
-
-# Specify the source of the BuildStream project
-# We are going to use the autotools examples distributed with BuildStream in the
-# doc/examples/autotools directory
sources:
- kind: local
- path: ../autotools
+ path: autotools