summaryrefslogtreecommitdiff
path: root/src/buildstream/data
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2019-04-24 22:53:19 +0100
committerChandan Singh <csingh43@bloomberg.net>2019-05-21 12:41:18 +0100
commit070d053e5cc47e572e9f9e647315082bd7a15c63 (patch)
tree7fb0fdff52f9b5f8a18ec8fe9c75b661f9e0839e /src/buildstream/data
parent6c59e7901a52be961c2a1b671cf2b30f90bc4d0a (diff)
downloadbuildstream-070d053e5cc47e572e9f9e647315082bd7a15c63.tar.gz
Move source from 'buildstream' to 'src/buildstream'
This was discussed in #1008. Fixes #1009.
Diffstat (limited to 'src/buildstream/data')
-rw-r--r--src/buildstream/data/bst21
-rw-r--r--src/buildstream/data/build-all.sh.in40
-rw-r--r--src/buildstream/data/build-module.sh.in43
-rw-r--r--src/buildstream/data/projectconfig.yaml183
-rw-r--r--src/buildstream/data/userconfig.yaml113
5 files changed, 400 insertions, 0 deletions
diff --git a/src/buildstream/data/bst b/src/buildstream/data/bst
new file mode 100644
index 000000000..e38720f77
--- /dev/null
+++ b/src/buildstream/data/bst
@@ -0,0 +1,21 @@
+# BuildStream bash completion scriptlet.
+#
+# On systems which use the bash-completion module for
+# completion discovery with bash, this can be installed at:
+#
+# pkg-config --variable=completionsdir bash-completion
+#
+# If BuildStream is not installed system wide, you can
+# simply source this script to enable completions or append
+# this script to your ~/.bash_completion file.
+#
+_bst_completion() {
+ local IFS=$'
+'
+ COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
+ COMP_CWORD=$COMP_CWORD \
+ _BST_COMPLETION=complete $1 ) )
+ return 0
+}
+
+complete -F _bst_completion -o nospace bst;
diff --git a/src/buildstream/data/build-all.sh.in b/src/buildstream/data/build-all.sh.in
new file mode 100644
index 000000000..bf5c9f880
--- /dev/null
+++ b/src/buildstream/data/build-all.sh.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# DO NOT EDIT THIS FILE
+#
+# This is a build script generated by
+# [BuildStream](https://wiki.gnome.org/Projects/BuildStream/).
+#
+# Builds all given modules using their respective scripts.
+
+set -eu
+
+echo "Buildstream native bootstrap script"
+
+export PATH='/usr/bin:/usr/sbin/:/sbin:/bin:/tools/bin:/tools/sbin'
+export SRCDIR='./source'
+
+SUCCESS=false
+CURRENT_MODULE='None'
+
+echo 'Setting up build environment...'
+
+except() {{
+ if [ "$SUCCESS" = true ]; then
+ echo "Done!"
+ else
+ echo "Error building module ${{CURRENT_MODULE}}."
+ fi
+}}
+trap "except" EXIT
+
+for module in {modules}; do
+ CURRENT_MODULE="$module"
+ "$SRCDIR/build-$module"
+
+ if [ -e /sbin/ldconfig ]; then
+ /sbin/ldconfig || true;
+ fi
+done
+
+SUCCESS=true
diff --git a/src/buildstream/data/build-module.sh.in b/src/buildstream/data/build-module.sh.in
new file mode 100644
index 000000000..6e9ea4552
--- /dev/null
+++ b/src/buildstream/data/build-module.sh.in
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# DO NOT EDIT THIS FILE
+#
+# This is a build script generated by
+# [BuildStream](https://wiki.gnome.org/Projects/BuildStream/).
+#
+# Builds the module {name}.
+
+set -e
+
+# Prepare the build environment
+echo 'Building {name}'
+
+if [ -d '{build_root}' ]; then
+ rm -rf '{build_root}'
+fi
+
+if [ -d '{install_root}' ]; then
+ rm -rf '{install_root}'
+fi
+
+mkdir -p '{build_root}'
+mkdir -p '{install_root}'
+
+if [ -d "$SRCDIR/{name}/" ]; then
+ cp -a "$SRCDIR/{name}/." '{build_root}'
+fi
+cd '{build_root}'
+
+export PREFIX='{install_root}'
+
+export {variables}
+
+# Build the module
+{commands}
+
+rm -rf '{build_root}'
+
+# Install the module
+echo 'Installing {name}'
+
+(cd '{install_root}'; find . | cpio -umdp /)
diff --git a/src/buildstream/data/projectconfig.yaml b/src/buildstream/data/projectconfig.yaml
new file mode 100644
index 000000000..ee4055cf5
--- /dev/null
+++ b/src/buildstream/data/projectconfig.yaml
@@ -0,0 +1,183 @@
+# Default BuildStream project configuration.
+
+
+# General configuration defaults
+#
+
+# Require format version 0
+format-version: 0
+
+# Elements are found at the project root
+element-path: .
+
+# Store source references in element files
+ref-storage: inline
+
+# Variable Configuration
+#
+variables:
+ # Path configuration, to be used in build instructions.
+ prefix: "/usr"
+ exec_prefix: "%{prefix}"
+ bindir: "%{exec_prefix}/bin"
+ sbindir: "%{exec_prefix}/sbin"
+ libexecdir: "%{exec_prefix}/libexec"
+ datadir: "%{prefix}/share"
+ sysconfdir: "/etc"
+ sharedstatedir: "%{prefix}/com"
+ localstatedir: "/var"
+ lib: "lib"
+ libdir: "%{prefix}/%{lib}"
+ debugdir: "%{libdir}/debug"
+ includedir: "%{prefix}/include"
+ docdir: "%{datadir}/doc"
+ infodir: "%{datadir}/info"
+ mandir: "%{datadir}/man"
+
+ # Indicates the default build directory where input is
+ # normally staged
+ build-root: /buildstream/%{project-name}/%{element-name}
+
+ # Indicates where the build system should look for configuration files
+ conf-root: .
+
+ # Indicates the build installation directory in the sandbox
+ install-root: /buildstream-install
+
+ # You need to override this with the commands specific for your system
+ strip-binaries: ""
+
+ # Generic implementation for reproducible python builds
+ fix-pyc-timestamps: |
+
+ find "%{install-root}" -name '*.pyc' -exec \
+ dd if=/dev/zero of={} bs=1 count=4 seek=4 conv=notrunc ';'
+
+# Base sandbox environment, can be overridden by plugins
+environment:
+ PATH: /usr/bin:/bin:/usr/sbin:/sbin
+ SHELL: /bin/sh
+ TERM: dumb
+ USER: tomjon
+ USERNAME: tomjon
+ LOGNAME: tomjon
+ LC_ALL: C
+ HOME: /tmp
+ TZ: UTC
+
+ # For reproducible builds we use 2011-11-11 as a constant
+ SOURCE_DATE_EPOCH: 1320937200
+
+# List of environment variables which should not be taken into
+# account when calculating a cache key for a given element.
+#
+environment-nocache: []
+
+# Configuration for the sandbox other than environment variables
+# should go in 'sandbox'. This just contains the UID and GID that
+# the user in the sandbox will have. Not all sandboxes will support
+# changing the values.
+sandbox:
+ build-uid: 0
+ build-gid: 0
+
+# Defaults for the 'split-rules' public data found on elements
+# in the 'bst' domain.
+#
+split-rules:
+
+ # The runtime domain includes whatever is needed for the
+ # built element to run, this includes stripped executables
+ # and shared libraries by default.
+ runtime:
+ - |
+ %{bindir}
+ - |
+ %{bindir}/*
+ - |
+ %{sbindir}
+ - |
+ %{sbindir}/*
+ - |
+ %{libexecdir}
+ - |
+ %{libexecdir}/*
+ - |
+ %{libdir}/lib*.so*
+
+ # The devel domain includes additional things which
+ # you may need for development.
+ #
+ # By default this includes header files, static libraries
+ # and other metadata such as pkgconfig files, m4 macros and
+ # libtool archives.
+ devel:
+ - |
+ %{includedir}
+ - |
+ %{includedir}/**
+ - |
+ %{libdir}/lib*.a
+ - |
+ %{libdir}/lib*.la
+ - |
+ %{libdir}/pkgconfig/*.pc
+ - |
+ %{datadir}/pkgconfig/*.pc
+ - |
+ %{datadir}/aclocal/*.m4
+
+ # The debug domain includes debugging information stripped
+ # away from libraries and executables
+ debug:
+ - |
+ %{debugdir}
+ - |
+ %{debugdir}/**
+
+ # The doc domain includes documentation
+ doc:
+ - |
+ %{docdir}
+ - |
+ %{docdir}/**
+ - |
+ %{infodir}
+ - |
+ %{infodir}/**
+ - |
+ %{mandir}
+ - |
+ %{mandir}/**
+
+ # The locale domain includes translations etc
+ locale:
+ - |
+ %{datadir}/locale
+ - |
+ %{datadir}/locale/**
+ - |
+ %{datadir}/i18n
+ - |
+ %{datadir}/i18n/**
+ - |
+ %{datadir}/zoneinfo
+ - |
+ %{datadir}/zoneinfo/**
+
+
+# Default behavior for `bst shell`
+#
+shell:
+
+ # Command to run when `bst shell` does not provide a command
+ #
+ command: [ 'sh', '-i' ]
+
+# Defaults for bst commands
+#
+defaults:
+
+ # Set default target elements to use when none are passed on the command line.
+ # If none are configured in the project, default to all project elements.
+ targets: []
diff --git a/src/buildstream/data/userconfig.yaml b/src/buildstream/data/userconfig.yaml
new file mode 100644
index 000000000..34fd300d1
--- /dev/null
+++ b/src/buildstream/data/userconfig.yaml
@@ -0,0 +1,113 @@
+# Default BuildStream user configuration.
+
+#
+# Work Directories
+#
+#
+# Note that BuildStream forces the XDG Base Directory names
+# into the environment if they are not already set, and allows
+# expansion of '~' and environment variables when specifying
+# paths.
+#
+
+# Location to store sources
+sourcedir: ${XDG_CACHE_HOME}/buildstream/sources
+
+# Root location for other directories in the cache
+cachedir: ${XDG_CACHE_HOME}/buildstream
+
+# Location to store build logs
+logdir: ${XDG_CACHE_HOME}/buildstream/logs
+
+# Default root location for workspaces, blank for no default set.
+workspacedir: .
+
+#
+# Cache
+#
+cache:
+ # Size of the artifact cache in bytes - BuildStream will attempt to keep the
+ # artifact cache within this size.
+ # If the value is suffixed with K, M, G or T, the specified memory size is
+ # parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base
+ # 1024), respectively.
+ # Alternatively, a percentage value may be specified, which is taken relative
+ # to the isize of the file system containing the cache.
+ quota: infinity
+
+ # Whether to pull build trees when downloading element artifacts
+ pull-buildtrees: False
+
+ # Whether to cache build trees on artifact creation:
+ #
+ # always - Always cache artifact build tree content
+ # auto - Only cache build trees when necessary, e.g., for failed builds
+ # never - Never cache artifact build tree content. This is not recommended
+ # for normal users as this breaks core functionality such as
+ # debugging failed builds and may break additional functionality
+ # in future versions.
+ #
+ cache-buildtrees: auto
+
+
+#
+# Scheduler
+#
+scheduler:
+
+ # Maximum number of simultaneous downloading tasks.
+ fetchers: 10
+
+ # Maximum number of simultaneous build tasks.
+ builders: 4
+
+ # Maximum number of simultaneous uploading tasks.
+ pushers: 4
+
+ # Maximum number of retries for network tasks.
+ network-retries: 2
+
+ # What to do when an element fails, if not running in
+ # interactive mode:
+ #
+ # continue - Continue queueing jobs as much as possible
+ # quit - Exit after all ongoing jobs complete
+ # terminate - Terminate any ongoing jobs and exit
+ #
+ on-error: quit
+
+
+#
+# Logging
+#
+logging:
+
+ # The abbreviated cache key length to display in the UI
+ key-length: 8
+
+ # Whether to show extra detailed messages
+ verbose: True
+
+ # Maximum number of lines to print from the
+ # end of a failing build log
+ error-lines: 20
+
+ # Maximum number of lines to print in a detailed
+ # message on the console or in the master log (the full
+ # messages are always recorded in the individual build
+ # logs)
+ message-lines: 20
+
+ # Whether to enable debugging messages
+ debug: False
+
+ # Format string for printing the pipeline at startup, this
+ # also determines the default display format for `bst show`
+ element-format: |
+
+ %{state: >12} %{full-key} %{name} %{workspace-dirs}
+
+ # Format string for all log messages.
+ message-format: |
+
+ [%{elapsed}][%{key}][%{element}] %{action} %{message}