GBS user manual configuration file

Source: Internet
Author: User
Document directory
  • Configuration file used by GBS
  • Configure buildroot of GBS build
  • Specify the scenario in the command line
  • Specify the configuration file in the command line
Git build systemgbs (GIT-Build-System) is a developer-oriented command line tool that supports tizen software package development. it is used to generate a tarball Based on the GIT repository. It can also be used for local compilation and code submission to OBS (tizen's main compilation service) this part contains more detailed GBS information. we recommend that you first read the section "build a development environment.
The configuration file contains all the configurations required by GBS: for example, the build root and remote package repository URL required by GBS build; remote obs servers required for GBS remotebuild.
GBS will search for configuration files in the folders listed below. If GBS finds multiple configuration files, it will load them in this order:
  • /Etc/GBS. conf # global configuration, which is in the GBS installation package and is not recommended to be modified
  • ~ /. GBS. conf # configuration of a user
  • $ PWD/. GBS. conf # configuration of a specific project or path

The subsequent configuration options will overwrite the options set in the previous file.

The global parameter-C (-- conf) can be used to specify a configuration file. If this option is used, GBS will load this configuration file and ignore other configuration files in the default path.

GBS will ~ /. GBS. conf to generate a configuration file. If the configuration file cannot be found.

Scenario-oriented Configuration

A scenario can contain many options of GBS build and remotebuild. a configuration file can contain any number of scenarios, such as for mobile devices, for vehicles (IVI), and so on.

The default scenario is defined in the [general] section. If you modify this scenario, all GBS behaviors will change.

Mandatory rules for some names include:

  • The scenario name must start with profile.
  • Some obs names must start with OBS
  • The software package repository must start with repo.

Common authorization information can be set at the scenario level, instead of repeating the settings for each different obs and repo. if different obs and repo have different authorization information, you can set each part independently.

Example of a configuration file:

[General] # The current scenario name should match the profile = profile. tizenbuildroot = ~ of the scenario ~ /GBS-ROOT/[profile. tizen] obs = obs. tizenrepos = Repo. tizen_latest # If buildroot is not set in this scenario, use buildrootbuildroot = ~ GBS-ROOT-profile.tizen/[obs. tizen] url = https://api.tizen.orguser = xxxxpasswd = XXXX # specify the basic project for OBS # base_prj = tizen: Main # specify the default target project for OBS, the default is home: <user>: GBS: <base_prj> # target_prj = <Specify target project> [repo. tizen_latest] url = keystore is different from the username and password in the scenario. You need to set # user = # passwd =

Configure the GBS build package repository (repo)

In the repo section, configure the repository and some names must start with Repo. The repo Section supports three types of key values: URL, user, and password.

Note:: When specifying a software repository, use the release version instead of the snapshot version. the image and repo in the release version are both tested and then released by the responsible release engineer. the images and repo in the snapshot version are automatically created by the background service. the quality cannot be guaranteed.

You can specify multiple repo in one scenario. For example:

[profile.tizen]repos = repo.tizen_latest, repo.my_local[repo.tizen_latest]url = http://download.tizen.org/releases/trunk/daily/ivi/latest/user = xxxpasswd = xxx[repo.my_local]#local repo must be an absolute pathurl = /path/to/local/repo/

Note:The local repo must be an absolute path. There is no need to perform 'createrepo 'for the local Repo. It is only the path containing the RPM package.

The default gbsroot value for buildroot of GBS build is ~ /GBS-ROOT, but can be customized. GBS also supports different scenarios to configure different gbsroot, like this:
[profile.tizen]obs = obs.tizenrepos = repo.tizen_latestbuildroot = ~/GBS-ROOT/

Note:: The White-text password is automatically converted to an encrypted password, so the configuration will change to the following when running GBS. To change the password, you can delete 'Password' and set a new 'Password ':

[obs.tizen]url = https://api.tizen.orguser = xxxxpasswdx = QlpoOTFBWSZTWVyCeo8AAAKIAHJAIAAhhoGaAlNOLuSKcKEguQT1

You can configure multiple scenarios in one configuration file. For example, you can specify the default scenario in the general section for mobile devices and vehicles:

[general]profile = profile.ivi[profile.mobile]...[profile.ivi]...
Specify the scenario in the command line

In addition to specifying the default scenario in the configuration file, you can also use the -- profile/-P option in the command to specify. you can write all the scenario names, such as "profile. IVI ", or use a name other than" Profile ", such as" IVI "in the preceding example, for example:

$ GBS build -- profile = profile. Mobile-A i586 $ GBS remotebuild -- profile = Mobile-A i586 # specify the scenario name without the profile prefix

Specify the configuration file in the command line

Option -- config/-C can be a configuration file. Once the-C option is used, the default configuration file will be ignored.

For example:

gbs -C ~/gbs-my.conf build -A ...

Original article address: Configuration File

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.