diff options
Diffstat (limited to 'poky/bitbake/lib/toaster/orm/fixtures')
-rw-r--r-- | poky/bitbake/lib/toaster/orm/fixtures/README | 30 | ||||
-rwxr-xr-x | poky/bitbake/lib/toaster/orm/fixtures/custom_toaster_append.sh_sample | 49 | ||||
-rw-r--r-- | poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml | 97 | ||||
-rw-r--r-- | poky/bitbake/lib/toaster/orm/fixtures/poky.xml | 234 | ||||
-rw-r--r-- | poky/bitbake/lib/toaster/orm/fixtures/settings.xml | 33 |
5 files changed, 443 insertions, 0 deletions
diff --git a/poky/bitbake/lib/toaster/orm/fixtures/README b/poky/bitbake/lib/toaster/orm/fixtures/README new file mode 100644 index 000000000..1b1c660aa --- /dev/null +++ b/poky/bitbake/lib/toaster/orm/fixtures/README @@ -0,0 +1,30 @@ +# Fixtures directory + +Fixtures are data dumps that can be loaded into Toaster's database to provide +configuration and data. + +In this directory we have the fixtures which are loaded the first time you start Toaster. +This is to provide useful default values and metadata to Toaster. + + - settings.xml This Contains Toaster wide settings, such as the default values for + certain bitbake variables. + + - poky.xml This is the default release data for supported poky based setup + + - oe-core.xml This is the default release data for supported oe-core based setups + +# Custom data/configuration + + - custom.xml + +To add custom initial data/configuration to Toaster place a file called +"custom.xml" in this directory. If present it will be loaded into the database. +We suggest that this is used to overlay any configuration already done. +All objects loaded with the same primary keys overwrite the existing data. +Data can be provided in XML, JSON and if installed YAML formats. + +# To load data at any point in time + +Use the django management command manage.py loaddata <your fixture file> +For further information see the Django command documentation at: +https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-loaddata diff --git a/poky/bitbake/lib/toaster/orm/fixtures/custom_toaster_append.sh_sample b/poky/bitbake/lib/toaster/orm/fixtures/custom_toaster_append.sh_sample new file mode 100755 index 000000000..8c4e16316 --- /dev/null +++ b/poky/bitbake/lib/toaster/orm/fixtures/custom_toaster_append.sh_sample @@ -0,0 +1,49 @@ +#!/bin/bash + +# Copyright (C) 2017 Intel Corp. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# This is sample software. Rename it to 'custom_toaster_append.sh' and +# enable the respective custom sections. + +verbose=0 +if [ $verbose -ne 0 ] ; then + echo "custom_toaster_append.sh:$*" +fi + +if [ "toaster_prepend" = "$1" ] ; then + echo "Add custom actions here when Toaster script is started" +fi + +if [ "web_start_postpend" = "$1" ] ; then + echo "Add custom actions here after Toaster web service is started" +fi + +if [ "web_stop_postpend" = "$1" ] ; then + echo "Add custom actions here after Toaster web service is stopped" +fi + +if [ "noweb_start_postpend" = "$1" ] ; then + echo "Add custom actions here after Toaster (no web) service is started" +fi + +if [ "noweb_stop_postpend" = "$1" ] ; then + echo "Add custom actions here after Toaster (no web) service is stopped" +fi + +if [ "toaster_postpend" = "$1" ] ; then + echo "Add custom actions here after Toaster script is done" +fi + diff --git a/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml b/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml new file mode 100644 index 000000000..d7ea78dc2 --- /dev/null +++ b/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8"?> +<django-objects version="1.0"> + <!-- Set the project default value for DISTRO --> + <object model="orm.toastersetting" pk="1"> + <field type="CharField" name="name">DEFCONF_DISTRO</field> + <field type="CharField" name="value">nodistro</field> + </object> + + <!-- Bitbake versions which correspond to the metadata release --> + <object model="orm.bitbakeversion" pk="1"> + <field type="CharField" name="name">sumo</field> + <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field> + <field type="CharField" name="branch">1.38</field> + </object> + <object model="orm.bitbakeversion" pk="2"> + <field type="CharField" name="name">HEAD</field> + <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field> + <field type="CharField" name="branch">HEAD</field> + </object> + <object model="orm.bitbakeversion" pk="3"> + <field type="CharField" name="name">master</field> + <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field> + <field type="CharField" name="branch">master</field> + </object> + <object model="orm.bitbakeversion" pk="4"> + <field type="CharField" name="name">rocko</field> + <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field> + <field type="CharField" name="branch">1.36</field> + </object> + + <!-- Releases available --> + <object model="orm.release" pk="1"> + <field type="CharField" name="name">rocko</field> + <field type="CharField" name="description">Openembedded Sumo</field> + <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field> + <field type="CharField" name="branch_name">sumo</field> + <field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=sumo\">OpenEmbedded Sumo</a> branch.</field> + </object> + <object model="orm.release" pk="2"> + <field type="CharField" name="name">local</field> + <field type="CharField" name="description">Local Openembedded</field> + <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">2</field> + <field type="CharField" name="branch_name">HEAD</field> + <field type="TextField" name="helptext">Toaster will run your builds with the version of OpenEmbedded that you have cloned or downloaded to your computer.</field> + </object> + <object model="orm.release" pk="3"> + <field type="CharField" name="name">master</field> + <field type="CharField" name="description">OpenEmbedded core master</field> + <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">3</field> + <field type="CharField" name="branch_name">master</field> + <field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/\">OpenEmbedded master</a> branch.</field> + </object> + <object model="orm.release" pk="4"> + <field type="CharField" name="name">rocko</field> + <field type="CharField" name="description">Openembedded Rocko</field> + <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field> + <field type="CharField" name="branch_name">rocko</field> + <field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=rocko\">OpenEmbedded Rocko</a> branch.</field> + </object> + + <!-- Default layers for each release --> + <object model="orm.releasedefaultlayer" pk="1"> + <field rel="ManyToOneRel" to="orm.release" name="release">1</field> + <field type="CharField" name="layer_name">openembedded-core</field> + </object> + <object model="orm.releasedefaultlayer" pk="2"> + <field rel="ManyToOneRel" to="orm.release" name="release">2</field> + <field type="CharField" name="layer_name">openembedded-core</field> + </object> + <object model="orm.releasedefaultlayer" pk="3"> + <field rel="ManyToOneRel" to="orm.release" name="release">3</field> + <field type="CharField" name="layer_name">openembedded-core</field> + </object> + <object model="orm.releasedefaultlayer" pk="4"> + <field rel="ManyToOneRel" to="orm.release" name="release">4</field> + <field type="CharField" name="layer_name">openembedded-core</field> + </object> + + + <!-- Layer for the Local release --> + <object model="orm.layer" pk="1"> + <field type="CharField" name="name">openembedded-core</field> + <field type="CharField" name="vcs_url">git://git.openembedded.org/openembedded-core</field> + <field type="CharField" name="vcs_web_url">http://cgit.openembedded.org/openembedded-core</field> + <field type="CharField" name="vcs_web_tree_base_url">http://cgit.openembedded.org/openembedded-core/tree/%path%?h=%branch%</field> + <field type="CharField" name="vcs_web_file_base_url">http://cgit.openembedded.org/openembedded-core/tree/%path%?h=%branch%</field> + </object> + <object model="orm.layer_version" pk="1"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> + <field rel="ManyToOneRel" to="orm.release" name="release">2</field> + <field type="CharField" name="local_path">OE-CORE-LAYER-DIR</field> + <field type="CharField" name="branch">HEAD</field> + <field type="CharField" name="dirpath">meta</field> + <field type="IntegerField" name="layer_source">0</field> + </object> + +</django-objects> diff --git a/poky/bitbake/lib/toaster/orm/fixtures/poky.xml b/poky/bitbake/lib/toaster/orm/fixtures/poky.xml new file mode 100644 index 000000000..6c966da4a --- /dev/null +++ b/poky/bitbake/lib/toaster/orm/fixtures/poky.xml @@ -0,0 +1,234 @@ +<?xml version="1.0" encoding="utf-8"?> +<django-objects version="1.0"> + <!-- Set the project default value for DISTRO --> + <object model="orm.toastersetting" pk="1"> + <field type="CharField" name="name">DEFCONF_DISTRO</field> + <field type="CharField" name="value">poky</field> + </object> + + <!-- Bitbake versions which correspond to the metadata release --> + <object model="orm.bitbakeversion" pk="1"> + <field type="CharField" name="name">sumo</field> + <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field> + <field type="CharField" name="branch">sumo</field> + <field type="CharField" name="dirpath">bitbake</field> + </object> + <object model="orm.bitbakeversion" pk="2"> + <field type="CharField" name="name">HEAD</field> + <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field> + <field type="CharField" name="branch">HEAD</field> + <field type="CharField" name="dirpath">bitbake</field> + </object> + <object model="orm.bitbakeversion" pk="3"> + <field type="CharField" name="name">master</field> + <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field> + <field type="CharField" name="branch">master</field> + <field type="CharField" name="dirpath">bitbake</field> + </object> + <object model="orm.bitbakeversion" pk="4"> + <field type="CharField" name="name">rocko</field> + <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field> + <field type="CharField" name="branch">rocko</field> + <field type="CharField" name="dirpath">bitbake</field> + </object> + + + <!-- Releases available --> + <object model="orm.release" pk="1"> + <field type="CharField" name="name">sumo</field> + <field type="CharField" name="description">Yocto Project 2.5 "Sumo"</field> + <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field> + <field type="CharField" name="branch_name">sumo</field> + <field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=sumo">Yocto Project Sumo branch</a>.</field> + </object> + <object model="orm.release" pk="2"> + <field type="CharField" name="name">local</field> + <field type="CharField" name="description">Local Yocto Project</field> + <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">2</field> + <field type="CharField" name="branch_name">HEAD</field> + <field type="TextField" name="helptext">Toaster will run your builds with the version of the Yocto Project you have cloned or downloaded to your computer.</field> + </object> + <object model="orm.release" pk="3"> + <field type="CharField" name="name">master</field> + <field type="CharField" name="description">Yocto Project master</field> + <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">3</field> + <field type="CharField" name="branch_name">master</field> + <field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/">Yocto Project Master branch</a>.</field> + </object> + <object model="orm.release" pk="4"> + <field type="CharField" name="name">rocko</field> + <field type="CharField" name="description">Yocto Project 2.4 "Rocko"</field> + <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field> + <field type="CharField" name="branch_name">rocko</field> + <field type="TextField" name="helptext">Toaster will run your builds using the tip of the <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=rocko">Yocto Project Rocko branch</a>.</field> + </object> + + <!-- Default project layers for each release --> + <object model="orm.releasedefaultlayer" pk="1"> + <field rel="ManyToOneRel" to="orm.release" name="release">1</field> + <field type="CharField" name="layer_name">openembedded-core</field> + </object> + <object model="orm.releasedefaultlayer" pk="2"> + <field rel="ManyToOneRel" to="orm.release" name="release">1</field> + <field type="CharField" name="layer_name">meta-poky</field> + </object> + <object model="orm.releasedefaultlayer" pk="3"> + <field rel="ManyToOneRel" to="orm.release" name="release">1</field> + <field type="CharField" name="layer_name">meta-yocto-bsp</field> + </object> + <object model="orm.releasedefaultlayer" pk="4"> + <field rel="ManyToOneRel" to="orm.release" name="release">2</field> + <field type="CharField" name="layer_name">openembedded-core</field> + </object> + <object model="orm.releasedefaultlayer" pk="5"> + <field rel="ManyToOneRel" to="orm.release" name="release">2</field> + <field type="CharField" name="layer_name">meta-poky</field> + </object> + <object model="orm.releasedefaultlayer" pk="6"> + <field rel="ManyToOneRel" to="orm.release" name="release">2</field> + <field type="CharField" name="layer_name">meta-yocto-bsp</field> + </object> + <object model="orm.releasedefaultlayer" pk="7"> + <field rel="ManyToOneRel" to="orm.release" name="release">3</field> + <field type="CharField" name="layer_name">openembedded-core</field> + </object> + <object model="orm.releasedefaultlayer" pk="8"> + <field rel="ManyToOneRel" to="orm.release" name="release">3</field> + <field type="CharField" name="layer_name">meta-poky</field> + </object> + <object model="orm.releasedefaultlayer" pk="9"> + <field rel="ManyToOneRel" to="orm.release" name="release">3</field> + <field type="CharField" name="layer_name">meta-yocto-bsp</field> + </object> + <object model="orm.releasedefaultlayer" pk="10"> + <field rel="ManyToOneRel" to="orm.release" name="release">4</field> + <field type="CharField" name="layer_name">openembedded-core</field> + </object> + <object model="orm.releasedefaultlayer" pk="11"> + <field rel="ManyToOneRel" to="orm.release" name="release">4</field> + <field type="CharField" name="layer_name">meta-poky</field> + </object> + <object model="orm.releasedefaultlayer" pk="12"> + <field rel="ManyToOneRel" to="orm.release" name="release">4</field> + <field type="CharField" name="layer_name">meta-yocto-bsp</field> + </object> + + <!-- Default layers provided by poky + openembedded-core + meta-poky + meta-yocto-bsp + --> + <object model="orm.layer" pk="1"> + <field type="CharField" name="name">openembedded-core</field> + <field type="CharField" name="layer_index_url"></field> + <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field> + <field type="CharField" name="vcs_web_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky</field> + <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> + <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> + </object> + <object model="orm.layer_version" pk="1"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">1</field> + <field type="CharField" name="branch">sumo</field> + <field type="CharField" name="dirpath">meta</field> + </object> + <object model="orm.layer_version" pk="2"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">2</field> + <field type="CharField" name="branch">HEAD</field> + <field type="CharField" name="commit">HEAD</field> + <field type="CharField" name="dirpath">meta</field> + </object> + <object model="orm.layer_version" pk="3"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">3</field> + <field type="CharField" name="branch">master</field> + <field type="CharField" name="dirpath">meta</field> + </object> + <object model="orm.layer_version" pk="4"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">4</field> + <field type="CharField" name="branch">rocko</field> + <field type="CharField" name="dirpath">meta</field> + </object> + + <object model="orm.layer" pk="2"> + <field type="CharField" name="name">meta-poky</field> + <field type="CharField" name="layer_index_url"></field> + <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field> + <field type="CharField" name="vcs_web_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky</field> + <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> + <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> + </object> + <object model="orm.layer_version" pk="5"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">1</field> + <field type="CharField" name="branch">sumo</field> + <field type="CharField" name="dirpath">meta-poky</field> + </object> + <object model="orm.layer_version" pk="6"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">2</field> + <field type="CharField" name="branch">HEAD</field> + <field type="CharField" name="commit">HEAD</field> + <field type="CharField" name="dirpath">meta-poky</field> + </object> + <object model="orm.layer_version" pk="7"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">3</field> + <field type="CharField" name="branch">master</field> + <field type="CharField" name="dirpath">meta-poky</field> + </object> + <object model="orm.layer_version" pk="8"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">4</field> + <field type="CharField" name="branch">rocko</field> + <field type="CharField" name="dirpath">meta-poky</field> + </object> + + <object model="orm.layer" pk="3"> + <field type="CharField" name="name">meta-yocto-bsp</field> + <field type="CharField" name="layer_index_url"></field> + <field type="CharField" name="vcs_url">git://git.yoctoproject.org/poky</field> + <field type="CharField" name="vcs_web_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky</field> + <field type="CharField" name="vcs_web_tree_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> + <field type="CharField" name="vcs_web_file_base_url">http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field> + </object> + <object model="orm.layer_version" pk="9"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">1</field> + <field type="CharField" name="branch">sumo</field> + <field type="CharField" name="dirpath">meta-yocto-bsp</field> + </object> + <object model="orm.layer_version" pk="10"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">2</field> + <field type="CharField" name="branch">HEAD</field> + <field type="CharField" name="commit">HEAD</field> + <field type="CharField" name="dirpath">meta-yocto-bsp</field> + </object> + <object model="orm.layer_version" pk="11"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">3</field> + <field type="CharField" name="branch">master</field> + <field type="CharField" name="dirpath">meta-yocto-bsp</field> + </object> + <object model="orm.layer_version" pk="12"> + <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field> + <field type="IntegerField" name="layer_source">0</field> + <field rel="ManyToOneRel" to="orm.release" name="release">4</field> + <field type="CharField" name="branch">rocko</field> + <field type="CharField" name="dirpath">meta-yocto-bsp</field> + </object> +</django-objects> diff --git a/poky/bitbake/lib/toaster/orm/fixtures/settings.xml b/poky/bitbake/lib/toaster/orm/fixtures/settings.xml new file mode 100644 index 000000000..78c0fdca7 --- /dev/null +++ b/poky/bitbake/lib/toaster/orm/fixtures/settings.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<django-objects version="1.0"> + <!-- Default project settings --> + <!-- pk=1 is DISTRO --> + <object model="orm.toastersetting" pk="2"> + <field type="CharField" name="name">DEFAULT_RELEASE</field> + <field type="CharField" name="value">master</field> + </object> + <object model="orm.toastersetting" pk="3"> + <field type="CharField" name="name">DEFCONF_PACKAGE_CLASSES</field> + <field type="CharField" name="value">package_rpm</field> + </object> + <object model="orm.toastersetting" pk="4"> + <field type="CharField" name="name">DEFCONF_MACHINE</field> + <field type="CharField" name="value">qemux86</field> + </object> + <object model="orm.toastersetting" pk="5"> + <field type="CharField" name="name">DEFCONF_SSTATE_DIR</field> + <field type="CharField" name="value">${TOPDIR}/../sstate-cache</field> + </object> + <object model="orm.toastersetting" pk="6"> + <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field> + <field type="CharField" name="value"></field> + </object> + <object model="orm.toastersetting" pk="7"> + <field type="CharField" name="name">DEFCONF_IMAGE_FSTYPES</field> + <field type="CharField" name="value">ext3 jffs2 tar.bz2</field> + </object> + <object model="orm.toastersetting" pk="8"> + <field type="CharField" name="name">DEFCONF_DL_DIR</field> + <field type="CharField" name="value">${TOPDIR}/../downloads</field> + </object> +</django-objects> |