Update doc release-0.12
authorZhang Qiang <qiang.z.zhang@intel.com>
Thu, 13 Dec 2012 12:33:46 +0000 (20:33 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Thu, 13 Dec 2012 23:07:33 +0000 (07:07 +0800)
- remove scratch.i586.incremental related section
- add example to create build root and install extra zypper to build
  root in "GBS chroot" section

Change-Id: Ic716318d9983e38dbd928656dbecd77dfc34c938

docs/GBS.rst

index 4e0159cf7ae176fbcfb85838e16b90b5913ae970..90dbebc90ceda4ea1907b8545ca6cd450f9b234b 100644 (file)
@@ -545,15 +545,14 @@ Structure of a GBS build root directory
   |   |-- repos                    # generated local repo top directory
   |   |   |-- tizen                # distro one: tizen
   |   |   |   |-- armv7l           # store armv7l RPM packages
-  |   |   |   |-- i586             # store i586 RPM packages
+  |   |   |   |-- i686             # store x86 RPM packages
   |   |   `-- tizen2.0             # build for distro two: tizen2.0
-  |   |       `-- i586             # the same as above
+  |   |       `-- i686             # the same as above
   |   |-- scratch.armv7l.0         # first build root for arm build
-  |   |-- scratch.i586.0           # second build root for i586 build
-  |   |-- scratch.i586.1           # third build root for i586 build
-  |   |-- scratch.i586.2           # fourth build root for i586 build
-  |   |-- scratch.i586.3           # fifth build root for i586 build
-  |   |-- scratch.i586.incremental # build root for incremental build
+  |   |-- scratch.i686.0           # second build root for x86 build
+  |   |-- scratch.i686.1           # third build root for x86 build
+  |   |-- scratch.i686.2           # fourth build root for x86 build
+  |   |-- scratch.i686.3           # fifth build root for x86 build
   |   |                            # The above build root dir can be used by gbs chroot <build root dir>
   |   `-- sources                  # sources generated for build, including tarball, spec, patches, etc.
   |       |-- tizen
@@ -727,13 +726,13 @@ In this example, we use `dlog` source code. First, we need to build with --incre
   info: Prepare sources...
   info: Retrieving repo metadata...
   info: Parsing package data...
-  info: *** overwriting dlog-0.4.1-5.1 i586 ***
+  info: *** overwriting dlog-0.4.1-5.1 i686 ***
   info: Next pass:
   dlog
-  info: *** building dlog-0.4.1-5.1 i586 tizen (worker: 0) ***
+  info: *** building dlog-0.4.1-5.1 i686 tizen (worker: 0) ***
   info: Doing incremental build
   [    0s] Memory limit set to 10854336KB
-  [    0s] Using BUILD_ROOT=/home/test/GBS-ROOT/local/scratch.i586.incremental
+  [    0s] Using BUILD_ROOT=/home/test/GBS-ROOT/local/scratch.i686.0
   [    0s] Using BUILD_ARCH=i586:i686:noarch:
   [    0s] test-desktop started "build dlog.spec" at Thu Sep 13 07:36:14 UTC 2012.
   [    0s] -----------------------------------------------------------------
@@ -1010,27 +1009,44 @@ GBS would create an annotated tag named 'submit/${cur_branch_name}'/${date}.${ti
 GBS chroot
 ----------
 
-The subcommand 'chroot' allows users to chroot to the buildroot directory, which is generated by ¡®gbs build¡¯. You can the basic usage of gbs chroot using:
+The subcommand 'chroot' allows users to chroot to the buildroot directory, which is generated by `gbs build`. You can get the basic usage of gbs chroot using:
 
 ::
 
   $ gbs chroot --help
 
-Note: The default location of the build root is located at: ~/GBS-ROOT/local/scratch.{arch}.*, which will be different if the -B option is specified while running gbs build
+**Note**: The default location of the build root is located at: ~/GBS-ROOT/local/scratch.{arch}.*, which will be different if the -B option is specified while running gbs build
 
 Examples:
 
-- Chroot to i586 buildroot (the build root dir may be different in your host)
+- Create build root with more extra packages to the build root
 
 ::
 
- $ gbs chroot ~/GBS-ROOT/local/scratch.i586.0/
+  $ gbs build --extra-packs=zypper,vim -A i586 # install zypper,vim to build root
+
+For more gbs build options, please refer to gbs build page.
+
+- Chroot to buildroot, example: chroot to ~/GBS-ROOT/local/scratch.i686.0/
+
+::
+
+ $ gbs chroot ~/GBS-ROOT/local/scratch.i686.0/
 
 - Chroot as 'root' user
 
 ::
 
- $ gbs chroot -r ~/GBS-ROOT/local/scratch.i586.0/
+ $ gbs chroot -r ~/GBS-ROOT/local/scratch.i686.0/
+
+If gbs chroot failed with error:'su: user root does not exist', which is caused by tizen pacakge: `login`, which should be fixed from repository. Currently, you can add root user manually by:
+
+::
+
+  $sudo echo "root:x:0:0:root:/root:/bin/bash" >>path/to/buildroot/etc/passwd
+  $sudo echo "root:x:0:" >>path/to/buildroot/etc/group
+
+With this update, gbs chroot should work.
 
 - Chroot and install more extra packages into buildroot directory for development purposes