unified the default values of all config keys
authorJF Ding <jian-feng.ding@intel.com>
Sun, 3 Jun 2012 09:16:38 +0000 (17:16 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Sun, 3 Jun 2012 09:16:38 +0000 (17:16 +0800)
README.rst
gitbuildsys/cmd_build.py
gitbuildsys/conf.py

index c4d5be0..b0d4666 100644 (file)
@@ -165,13 +165,14 @@ configuration file by yourself.  Just make sure it looks like as below:
   ; settings for build subcommand
   build_server = <OBS API URL>
   user = <USER_NAME>
-  passwd  = <PASSWORD in base64 string>
-  passwdx = <PASSWORD encoded in base64 string>
+  passwd  = <PASSWORD in plaintext> (will be updated w/ base64 encoded one)
+
   [build]
   build_cmd = /usr/bin/build
   build_root= /var/tmp/build-root-gbs
-  su-wrapper= su -c
+  su_wrapper= sudo
   distconf=/usr/share/gbs/tizen-1.0.conf
+
   [import]
   commit_name= <Author Name>
   commit_email= <Author Email>
index 2e1a470..2fb061c 100644 (file)
@@ -211,7 +211,7 @@ def do(opts, args):
         cmd += ['--rsync-src=%s' % os.path.abspath(workdir)]
         cmd += ['--rsync-dest=/home/abuild/rpmbuild/BUILD/%s-%s' % (name, version)]
 
-    sucmd = configmgr.get('su-wrapper', 'build').split()
+    sucmd = configmgr.get('su_wrapper', 'build').split()
     if sucmd[0] == 'su':
         if sucmd[-1] == '-c':
             sucmd.pop()
index 794f0b7..c5af15e 100644 (file)
@@ -226,13 +226,14 @@ class ConfigMgr(object):
             },
             'build': {
                 'build_cmd':    '/usr/bin/build',
-                'build_root':   '/var/tmp/build-root-gbs',
-                'su-wrapper':   'sudo',
+                'build_root':   '/var/tmp/build-root-gbs', # TODO under $tmpdir
+                'su_wrapper':   'sudo',
                 'distconf':     '/usr/share/gbs/tizen-1.0.conf',
+
             },
             'import': {
-                'commit_name':    None,
-                'commit_email':   None,
+                'commit_name':    '',
+                'commit_email':   '',
             },
 
     }
@@ -246,22 +247,25 @@ tmpdir = $general__tmpdir
 build_server = $remotebuild__build_server
 user = $remotebuild__user
 passwdx = $remotebuild__passwdx
+
 [build]
-build_cmd = /usr/bin/build
-build_root= /var/tmp/build-root-gbs
-su-wrapper= sudo
+build_cmd = $build__build_cmd
+build_root = $build__build_root
+su_wrapper = $build__su_wrapper
+distconf = $build__distconf
+
+; optional, repos definitions
 repo1.url=
 repo1.user=
-repo1.passwd=
 repo1.passwdx=
 repo2.url=
 repo2.user=
-repo2.passwd=
 repo2.passwdx=
-distconf= /usr/share/gbs/tizen-1.0.conf
+
 [import]
-commit_name=
-commit_email=
+; optional, for git author information
+# commit_name = $import__commit_name
+# commit_email = $import__commit_email
 """
 
     # make the manager class as singleton