Gbs build using local repo

I describe below the procedure to setup and build from a local repository.

The git build system resolves dependencies, if any, for a package by
downloading dependent package libraries from the repositories specified in
the ~/.gbs.conf file. In order to speed up a build, local repositories can
be setup.  A local repository is a mirror of repository hosted at, for
example, releases repository. In order to setup a local repository, execute
the following commands:

 $ pwd
 /home/vijaykz
 $ mkdir local-repo
 $ cd local-repo
 $ wget -r -nH -nd -x -c
http://download.tizen.org/releases/daily/2.0alpha/common/latest/


The wget command will download the files and create a directory structure
as in the URL. Once repository is downloaded, update the ~/.gbs.conf file
to point to the folder (example, local-repo):


[general]
#Current profile name which should match a profile section name
profile = profile.tizen
[profile.tizen]
#Common authentication info for whole profile
#user =
#CAUTION: please use the key name "passwd" to reset plaintext password
#passwd =
obs = obs.tizen
#Comma separated list of repositories
repos = repo.tizen_latest
[obs.tizen]
#OBS API URL pointing to a remote OBS.
url = https://api.tizen.org
#Optional user and password, set if differ from profile's user and password
#user =
#passwd =
[repo.tizen_latest]
#Build against repo's URL
url = /home/vijaykz/local-repo/releases/daily/2.0alpha/common/latest
[repo.tizen_base]
url =
/home/vijaykz/local-repo/releases/daily/2.0alpha/common/latest/repos/tizen-base/armv7l/packages/
[repo.tizen_main]
url =
/home/vijaykz/local-repo/releases/daily/2.0alpha/common/latest/repos/tizen-main/armv7l/packages/


If a local repository is being used for the first time, it requires
additional configurations. GBS requires build configuration data, which it
downloads and saves it as /var/tmp/test-gbs/tizen.conf. Since we now use
local repository, we need to manually input the build configuration file.
But prior to that, copy the build.conf to your home directory for easy
usage:

 $ pwd
 /home/vijaykz/local-repo/releases/daily/2.0alpha/common/latest/builddata
 $ cp
a300db37ca06dc0948bf006eaf2a15fa0481ac5ef64e1a71695bd6b84901f667-build.conf
~/build.conf

*Note*: The alphanumerical string appearing before "-build.conf" is random
and could be different for you than what is shown.


To build now, specify the build configuration file using the -D option:

$ gbs build -A armv7l -D ~/build.conf

These instructions will help you to setup a local repository and build
packages locally.  However, further configurations are still required if
you want MIC to be able to use the local repository.  For that, I provide
the steps to carry out below:

The kickstart file specifies the location of repositories to be used. If
you have setup a local repository, then you would probably want to source
package binaries from the local, instead of remote, repositories. In order
to do that, follow the steps:

Add the following line in the kickstart file to specify the repository:

repo --name=Tizen-base
--baseurl=file:/home/vijaykz/Z/custom-repo/releases/daily/2.0alpha/common/latest/repos/tizen-base/armv7l/packages/
repo --name=Tizen-main
--baseurl=file:/home/vijaykz/Z/custom-repo/releases/daily/2.0alpha/common/latest/repos/tizen-main/armv7l/packages/

Note that you will have to update the path that is specific to your machine.


Next step is to configure the bootstrap section of the /etc/mic/mic.conf to
point to the local version.

First, download the micbootstrap folder:

 $ pwd
 /home/vijaykz/mic
 $ wget -r -nH -nd -x -c http://download.tizen.org/tools/micbootstrap/

Next, update the /etc/mic/mic.conf as follows:

[bootstrap1]
name=micbootstrap
bootstrap=file:/home/vijaykz/mic/tools/micbootstrap/
#bootstrap=http://download.tizen.org/tools/micbootstrap/

Now, you are ready to create a file system image from a repository set
locally on your machine!

https://lists.tizen.org/pipermail/general/2013-January/001521.html

posted on 2013-05-01 18:00  androidme  阅读(584)  评论(0编辑  收藏  举报

导航