tools/gbs.git
12 years agoLittle refactor and add test cases to conf.py
Huang Hao [Fri, 7 Sep 2012 12:06:08 +0000 (20:06 +0800)]
Little refactor and add test cases to conf.py

- change BrainConfigParser.read() to read_one() since the code only
    use this function to read one config file. It's simpler.
- remove BrainConfigParser.check_opt() since no code use it.
- remove else branch in ConfigMgr.get() since the code can still
    work if val is empty string. Also add a test case for it.
- remove ConfigMgr.set() since no code use it. passwdx set back
    in _check_passwd(), and we will not use this set() function to
    add option into config file.
- change implementation of Fixture class, it doesn't call start()
    and stop() methods which introduced by mock0.7
- add more test cases for conf.py

Change-Id: I598f8943f98f067aa584fa4be811492c70226f23

12 years agoSupport profile oriented style of config.
Huang Hao [Fri, 7 Sep 2012 07:47:18 +0000 (15:47 +0800)]
Support profile oriented style of config.

- support profile oriented style. It is compatible with subcommand
    oriented style.
- add a class Profile to store url/user/password of repos and api.
- add a class BizConfigManager extending from ConfigMgr. It
    handles profile info and does not care about multi-levels and
    passwdx issues. It returns current profile instance even
    config file has subcommand oriented style.
- make two functions decode_passwdx, encode_passwd to convert
    between passwd and passwdx.
- move get_repos_conf() from cmd_build.py to conf.py and split it
    into two parts
    _parse_build_repos() and _build_profile_by_subcommand()
- add test cases in test_profile.py

Change-Id: I81b2906456766f1061ccef9e7d51fea794c59409

12 years agoSupport ini section header like [section "name"].
Huang Hao [Fri, 7 Sep 2012 05:11:07 +0000 (13:11 +0800)]
Support ini section header like [section "name"].

Add a class SectionPattern to support section header style like
[section "name"]. It's also compatible with style like [section].

Change-Id: I6c35eb00a2f3be912cee34f421173fb0523aa191

12 years agoAdd upstream-branch and upstream-tag options
Markus Lehtonen [Fri, 17 Aug 2012 13:58:10 +0000 (16:58 +0300)]
Add upstream-branch and upstream-tag options

Add config file and command line options to specify the upstream branch
name and upstream tag format for build, export and remotebuild commands.
This is needed in order to be able to support different maintenance
models of non-native packages (with patch-generation enabled):
1. If upstream sources are imported with GBS, these options are not
   needed
2. However, if maintainer uses upstream git tree directly, he needs to
   be able to specify the tag format - otherwise gbp is unable to
   create orig source archive or generate patches

Command line option takes preference over the config file.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoEnable patch-generation
Markus Lehtonen [Fri, 17 Aug 2012 10:03:55 +0000 (13:03 +0300)]
Enable patch-generation

This commit enables the "proper" maintenance model of packages. That is,
create a real upstream source archive (matching the upstream tag) and
patches on top of that. It facilitates the patch compression support in
git-buildpackage: patches bigger that 100kB are compressed with gzip.
GBP also modifies the spec file to contain the new list of patches.

GBS enables this mode if the git tree has 'upstream' branch. It tries to
checkout the orig tarball with pristine-tar, if 'pristine-tar'
branch is found. If this fails, it tries to create the orig tarball from
a git tag corresponding the upstream version.

GBS falls back to the old method of generating one monolithic tarball if
exporting of packaging files (i.e. upstream archive and patch
generation) in this new mode fails.

NOTE: .spec file autoupdate feature is limited and might not work with
more exotic packaging. E.g. patches inside conditionals are not
supported, at the moment.

TODO: Currently, also packaging-only commits generate patches which is
only noise from source code perspective. This needs to be fixed in
git-buildpackage.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agouse iter var 'i' to replace repo, which already has been used
Zhang Qiang [Fri, 7 Sep 2012 05:49:48 +0000 (13:49 +0800)]
use iter var 'i' to replace repo, which already has been used

Change-Id: Ia7a05fade7ef7271888008f3d8c4f1357288c07f

12 years agofix undefined var backtrace issue.
Zhang Qiang [Fri, 7 Sep 2012 05:12:45 +0000 (13:12 +0800)]
fix undefined var backtrace issue.

Change-Id: I5d29c49a5f70e8fed1911992d0d4bae3095c96eb

12 years agocall build with --clean if target build root in not-ready stat.
Zhang Qiang [Fri, 7 Sep 2012 04:56:28 +0000 (12:56 +0800)]
call build with --clean if target build root in not-ready stat.

Change-Id: I693e2c42331773f445a5a173e882403f77a72f8d

12 years agofix reference undefined var backtrace issue
Zhang Qiang [Fri, 7 Sep 2012 04:40:59 +0000 (12:40 +0800)]
fix reference undefined var backtrace issue

Change-Id: I3509afc223c211449ddee62a9482d7cc955b0a34

12 years agoMove gbp argument creation into one function
Markus Lehtonen [Thu, 6 Sep 2012 10:43:37 +0000 (13:43 +0300)]
Move gbp argument creation into one function

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoMerge "Fix KeyError in ConfigMgr._get" into devel
Qiang Z Zhang [Fri, 7 Sep 2012 03:04:09 +0000 (20:04 -0700)]
Merge "Fix KeyError in ConfigMgr._get" into devel

12 years agoFix KeyError in ConfigMgr._get
Huang Hao [Fri, 7 Sep 2012 02:32:49 +0000 (10:32 +0800)]
Fix KeyError in ConfigMgr._get

In function ConfigMrg._get() if NoOptionError occurs and section
name is not in self.DEFAULTS, KeyError will be raised.

Change-Id: Iaa08c032eae45b1cc95294a4c7975d0aedb10405

12 years agoMerge "Add tests for getting config value." into devel
Qiang Z Zhang [Fri, 7 Sep 2012 02:36:33 +0000 (19:36 -0700)]
Merge "Add tests for getting config value." into devel

12 years agoAdd tests for getting config value.
Huang Hao [Thu, 6 Sep 2012 12:59:53 +0000 (20:59 +0800)]
Add tests for getting config value.

Fixture object can setup the 3 levels of different mocking config
files which locate in tests/testdata/ini/.

Change-Id: I079498ca086f3435916467adbfa94c3fa0809565

12 years agocmd_build: Implemented output repository creation.
Ed Bartosh [Mon, 3 Sep 2012 11:28:04 +0000 (14:28 +0300)]
cmd_build: Implemented output repository creation.

When -o commandline option is used packages are copied to specified
output directory and now createrepo is called to create rpm repo out
of that directory.

Fixes: #74, #201

Change-Id: Ie06536fe367509bbd38088b4d6120da5436b7542

12 years agoChange tab to spaces
Huang Hao [Thu, 6 Sep 2012 07:47:42 +0000 (15:47 +0800)]
Change tab to spaces

Change-Id: I1b939a7f2cfe1644eaa6df8b7cba860b075f154e

12 years agoCode cleanup.
Ed Bartosh [Thu, 30 Aug 2012 11:33:18 +0000 (14:33 +0300)]
Code cleanup.

A bit of pylinting. Also runner/embed function has been removed as
it's not used in gbs.

Change-Id: I25f19ccc17811759db2ebeaa29f16e0f52ffba19

12 years agoGet rid of unused build_root config parameter
Zhang Qiang [Wed, 5 Sep 2012 07:23:37 +0000 (15:23 +0800)]
Get rid of unused build_root config parameter

It's not used anywhere in the code, so let's remove it.
Fixes #293

Change-Id: I15d18f64ae6f3aef2481773acabeee50253a6323

12 years agoMerge "Introduced base_prj and target_prj config parameters." into devel
Qiang Z Zhang [Wed, 5 Sep 2012 08:19:48 +0000 (01:19 -0700)]
Merge "Introduced base_prj and target_prj config parameters." into devel

12 years agoMerge "Used username as part of temporary directory." into devel
Qiang Z Zhang [Wed, 5 Sep 2012 05:04:32 +0000 (22:04 -0700)]
Merge "Used username as part of temporary directory." into devel

12 years agoIntroduced base_prj and target_prj config parameters.
Ed Bartosh [Mon, 3 Sep 2012 13:36:48 +0000 (16:36 +0300)]
Introduced base_prj and target_prj config parameters.

Saves a lot of typing in command line.
Fixes #242

Change-Id: Ie2b057bee031d18d89816123078826b17eed71fb

12 years agoUsed username as part of temporary directory.
Ed Bartosh [Thu, 30 Aug 2012 08:29:21 +0000 (11:29 +0300)]
Used username as part of temporary directory.

Temporary directory is used as a base path for buildroot, cachedir and
others temporary directories. Making it to contain username solves
conflicts when gbs is run by more than one user on the same machine at
the same time.

Fixes: #283, #278, #244

Change-Id: Iafb9f83691e945d7148ef70f059096dada2cc701

12 years agoCheck build.xml format and warn user if build.conf does not exist
Huang Hao [Wed, 29 Aug 2012 08:05:38 +0000 (16:05 +0800)]
Check build.xml format and warn user if build.conf does not exist

Fix Bug #284. Method SafeURL.urljoin is useless now, so remove it.

Change-Id: I09cb7d6046e3acd3388bb482c8aa2ddef75da0d5

12 years agoAdd class SafeURL to hide user/passwd info in url string.
Huang Hao [Mon, 27 Aug 2012 12:47:24 +0000 (20:47 +0800)]
Add class SafeURL to hide user/passwd info in url string.

Try to fix bug#233, gerrit#894 is a hotfix for this issue in v0.9.
Create SafeURL object from repoN.url/user/passwd in config file,
this safe url is a string object, can be directly print to console.
When pass to build script, use its property "full" with user/passwd
info.

Change-Id: I667989e61a26a00a54255dd7c859e46553814f8f

12 years agoMerge "Used current user's name instead of config option." into devel
Qiang Z Zhang [Thu, 30 Aug 2012 00:24:22 +0000 (17:24 -0700)]
Merge "Used current user's name instead of config option." into devel

12 years agoMerge "Used shorter import." into devel
Qiang Z Zhang [Thu, 30 Aug 2012 00:15:51 +0000 (17:15 -0700)]
Merge "Used shorter import." into devel

12 years agoUsed current user's name instead of config option.
Ed Bartosh [Tue, 28 Aug 2012 11:46:13 +0000 (14:46 +0300)]
Used current user's name instead of config option.

In cmd_build user name from [remotebuild] section of configuration file
was used as a part of temporary directory name. This approach is confusing
(why anything from remotebuild is used in build mode?) and it also caused
gbs crash when the same name is mentioned in [remotebuild] section for
different local users.

Fixes #283

Change-Id: Ie789564811aa0a9271962d7584421592c215ef7d

12 years agoMerge "Workarounded osc bug by retrying to call it 3 times." into devel
Qiang Z Zhang [Tue, 28 Aug 2012 14:30:06 +0000 (07:30 -0700)]
Merge "Workarounded osc bug by retrying to call it 3 times." into devel

12 years agoMerge "Use ctrl-c to interrupt pycurl downloading" into devel
Qiang Z Zhang [Tue, 28 Aug 2012 14:05:40 +0000 (07:05 -0700)]
Merge "Use ctrl-c to interrupt pycurl downloading" into devel

12 years agoUsed shorter import.
Ed Bartosh [Thu, 23 Aug 2012 14:48:58 +0000 (17:48 +0300)]
Used shorter import.

Using ObsError instead of using errors.ObsError. Makes lines
shorter. Eliminates several pylint complains.

Change-Id: Ib7e9e58cbfcd6553f91b147a83688666a0467003

12 years agoWorkarounded osc bug by retrying to call it 3 times.
Ed Bartosh [Thu, 23 Aug 2012 14:29:42 +0000 (17:29 +0300)]
Workarounded osc bug by retrying to call it 3 times.

Sometimes core.http_GET returns empty responce, which leeds to
core.ET.ParseError: no element found: line 1, column 0. Trying to send
request again solves the problem in most of the cases.

Fixes #252

Change-Id: I9b418393110464abf2f698136fe36e4c3dddfba3

12 years agoEnable reading multiple config files (#27)
Markus Lehtonen [Fri, 17 Aug 2012 12:55:44 +0000 (15:55 +0300)]
Enable reading multiple config files (#27)

When updating an existing key, it is set in the config file that it was
read from.

When adding a new key, it is added to the "highest priority" config file
that has the desired section.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoUse ctrl-c to interrupt pycurl downloading
Huang Hao [Mon, 27 Aug 2012 08:28:33 +0000 (16:28 +0800)]
Use ctrl-c to interrupt pycurl downloading

pycurl.perform() blocks ctrl-c. If forget to set proxy, we have to
wait 30 seconds till connecting timeout.

Change-Id: I7f22fc110221afd08c1fe01b545a14a0d518e9d5

12 years agoconf: don't use '/etc/gbs.conf'
Markus Lehtonen [Mon, 27 Aug 2012 07:58:56 +0000 (10:58 +0300)]
conf: don't use '/etc/gbs.conf'

Drop the usage of the system level config file.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoBig overhaul of BrainConfigParser class
Markus Lehtonen [Thu, 23 Aug 2012 09:02:16 +0000 (12:02 +0300)]
Big overhaul of BrainConfigParser class

Fixes problems in setting options in the BrainConfigParser class.
Previously, linenumber pointers would get out-of-sync when
updating/inserting/replacing new options with the set() method. Now we
always parse the actual file contents when running set(), thus we never
get out-of-sync.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoMerge "Fix replacing of keys in config manager" into devel
Qiang Z Zhang [Mon, 27 Aug 2012 06:30:34 +0000 (23:30 -0700)]
Merge "Fix replacing of keys in config manager" into devel

12 years agoMerge "Fix some small problems in RepoParser" into devel
Qiang Z Zhang [Mon, 27 Aug 2012 06:11:05 +0000 (23:11 -0700)]
Merge "Fix some small problems in RepoParser" into devel

12 years agoGet rid of local copy of cmdln.py
Ed Bartosh [Wed, 1 Aug 2012 11:55:15 +0000 (14:55 +0300)]
Get rid of local copy of cmdln.py

In the current code thereis a copy of cmdln.py module, which is also
present in osc. gbs depends on osc, so it's better to just use cmldn
from there to avoid unneeded code duplication.

Change-Id: Ib3301ad1635ac681e7b7213aafa17bed0ac22c0a

12 years agoFix replacing of keys in config manager
Markus Lehtonen [Wed, 22 Aug 2012 10:07:34 +0000 (13:07 +0300)]
Fix replacing of keys in config manager

Otherwise cmd_build will crash if 'passwd' are being replaced with
'passwdx'.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoFix some small problems in RepoParser
Huang Hao [Fri, 24 Aug 2012 05:31:41 +0000 (13:31 +0800)]
Fix some small problems in RepoParser

RepoParser.parse() is a bit of hard for understanding. try to make
it more cleaner and readable.

 - remove useless self.archs
 - split local path out first, otherwise urlgrab will complain
    "<url> malformed" for local path
 - get_repos_by_arch() should return local+standard repos at least
 - check self.buildconf each time before getting repo's build.conf
 - self.repos is used only in one place in self.parse(), it can
    be a local var and passed by argument
 - build meta of one repo should not be used for another repo, so
    self.buildmeta can also be a local var in for loop
 - add a function is_standard_repo() to check repomd.xml file
 - add a function fetch() to fetch a remote file into self.cachedir

Change-Id: I1d5d8f9347a5426a323aa04e7edf8c5e75c1c65a

12 years agoMerge "Use pycurl Keep-Alive feature to save download time." into devel
Qiang Z Zhang [Thu, 23 Aug 2012 11:17:43 +0000 (04:17 -0700)]
Merge "Use pycurl Keep-Alive feature to save download time." into devel

12 years agoUse pycurl Keep-Alive feature to save download time.
Huang Hao [Mon, 20 Aug 2012 11:45:38 +0000 (19:45 +0800)]
Use pycurl Keep-Alive feature to save download time.

When GBS parse "latest" type of repo url, it tries to download
several URLs. This usually costs about 30 seconds to complete. By
using keepalive it takes about 10 seconds. pycurl print "Re-using
existing connection!" if pycurl.VERBOSE set to 1.

Change-Id: Ib78b204c26d9077c15e0ea7ff7b032ad2314546f

12 years agoMerge "Raise OSCError in oscapi.py::OSC::core_http instead of ObsError." into devel
Qiang Z Zhang [Thu, 23 Aug 2012 08:26:37 +0000 (01:26 -0700)]
Merge "Raise OSCError in oscapi.py::OSC::core_http instead of ObsError." into devel

12 years agoImplemented testcases for gbs changelog.
Ed Bartosh [Wed, 22 Aug 2012 14:58:47 +0000 (17:58 +0300)]
Implemented testcases for gbs changelog.

Change-Id: Ie2909f33a443e888ce29be5f2dfde0847b291fe2

12 years agoRenamed tests.
Ed Bartosh [Wed, 22 Aug 2012 14:51:38 +0000 (17:51 +0300)]
Renamed tests.

Removed useless numbers from the test names.

Change-Id: If9e85446958f02a4669b647c0a94902a012144cd

12 years agocmd_changelog: Removed not working check.
Ed Bartosh [Wed, 22 Aug 2012 14:12:00 +0000 (17:12 +0300)]
cmd_changelog: Removed not working check.

repo.is_clean returns tuple, so if not repo.is_clean() always False,
which makes this check useless. I prefer to remove it instead of
fixing because if I fix it it will start complaining each time git
repo has untracked files and users may not like it.

Change-Id: I5dc6a53e01d5f80aef6ab4bc5731170c9d924834

12 years agoRaise OSCError in oscapi.py::OSC::core_http instead of ObsError.
Huang Hao [Tue, 21 Aug 2012 13:11:39 +0000 (21:11 +0800)]
Raise OSCError in oscapi.py::OSC::core_http instead of ObsError.

Error message print out to console is incomplete since ObsError
can't be catched by methods in oscapi.py and throw directly to
cmd_remotebuild.py.

Change-Id: I2879ef2ab7f60f3f0caa35b081c9408ac6589527

12 years agoget specified commit info
Guan Junchun [Tue, 21 Aug 2012 09:18:51 +0000 (17:18 +0800)]
get specified commit info

1. gbs rb -c HEAD~1 should get 'HEAD~1' commit info
2. gbs rb [--include-all] get 'HEAD' commit info

12 years agoMerge "fix undefined issue introduced by merging code" into devel
Zhang Qiang [Thu, 23 Aug 2012 02:33:35 +0000 (19:33 -0700)]
Merge "fix undefined issue introduced by merging code" into devel

12 years agoFixed Ubuntu builds.
Ed Bartosh [Tue, 21 Aug 2012 11:15:11 +0000 (14:15 +0300)]
Fixed Ubuntu builds.

One more try to fix OTC Tester build.
Please, don't merge this change until there will be 'Build Successful'
message from OTC Tester for this change.

PS: We need to do something with our release process. It's already
second release, which breaks tester builds and fixing is not easy.

Change-Id: Idc4f3a1f3760b28139a7f590e495efd1ee5c26c7

12 years agofix undefined issue introduced by merging code
Zhang Qiang [Tue, 21 Aug 2012 08:42:10 +0000 (16:42 +0800)]
fix undefined issue introduced by merging code

12 years agoFixed Ubuntu builds in OTC Tools Tester - gbs.
Ed Bartosh [Tue, 21 Aug 2012 08:19:09 +0000 (11:19 +0300)]
Fixed Ubuntu builds in OTC Tools Tester - gbs.

For every gbs release gbs.spec and gbs.dsc should be updated.
Unfortunately gbs.dsc is still not used in gbs release process and
maintainer forgets to update it. This leads to the breakage of the
continuous integration tests (OTC Tools Tester - gbs job).

Change-Id: Ifccd785d0bbe2797ddd593c760b590c74e0623f8

12 years agofix merge conflict issue from release-0.9 branch to devel
Zhang Qiang [Mon, 20 Aug 2012 14:06:47 +0000 (22:06 +0800)]
fix merge conflict issue from release-0.9 branch to devel

12 years agobump to version 0.9 release-0.9 0.9
Zhang Qiang [Tue, 14 Aug 2012 22:48:59 +0000 (06:48 +0800)]
bump to version 0.9

12 years agoalways raise errors.ObsError in oscapi module instead of OSCError
Zhang Qiang [Mon, 20 Aug 2012 08:30:55 +0000 (16:30 +0800)]
always raise errors.ObsError in oscapi module instead of OSCError

OSCError can't be catched and backtrace would be printed.

12 years agoconvert config data as string while putting to OBS
Zhang Qiang [Mon, 20 Aug 2012 07:28:41 +0000 (15:28 +0800)]
convert config data as string while putting to OBS

This will cause exception/backtrace with some system. fix #240

12 years agoMerge changes I4d66326a,I0d8c7379 into devel
Qiang Z Zhang [Sun, 19 Aug 2012 01:13:48 +0000 (18:13 -0700)]
Merge changes I4d66326a,I0d8c7379 into devel

* changes:
  Fixed tests for gbs help.
  Implemented testcases for gbs import.

12 years agoFix incorrect gbp command line options in export and remotebuild
Zhang Qiang [Sat, 18 Aug 2012 23:59:40 +0000 (07:59 +0800)]
Fix incorrect gbp command line options in export and remotebuild

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoPylining
Ed Bartosh [Tue, 14 Aug 2012 10:09:40 +0000 (13:09 +0300)]
Pylining

Change-Id: Ia3d0b4f28f6863207d4de398131bde712093f8fa

12 years agounify the help info to use lower char
Zhang Qiang [Fri, 17 Aug 2012 02:29:30 +0000 (10:29 +0800)]
unify the help info to use lower char

12 years agoremove --debuginfo and --incremental
Huang Hao [Thu, 16 Aug 2012 09:37:03 +0000 (17:37 +0800)]
remove --debuginfo and --incremental

--debuginfo useless not so remove it, we will have new design version
of incremental build

12 years agoMerge "support multiple repos from gbs.conf and command line opts" into release-0.9
Zhang Qiang [Thu, 16 Aug 2012 10:31:14 +0000 (03:31 -0700)]
Merge "support multiple repos from gbs.conf and command line opts" into release-0.9

12 years agoFixed tests for gbs help.
Ed Bartosh [Wed, 15 Aug 2012 15:23:52 +0000 (18:23 +0300)]
Fixed tests for gbs help.

Tests were running gbs help with os.system, which means that in order
to pass tests gbs have to be installed. This doesn't make much sense
for developer-level tests. They should be able to run from source tree
without any preparations.

Change-Id: I4d66326ad26564f2e253d2141284b475a0d4995e

12 years agoImplemented testcases for gbs import.
Ed Bartosh [Thu, 9 Aug 2012 15:40:22 +0000 (18:40 +0300)]
Implemented testcases for gbs import.

This is a first real set of testcases for the gbs module. Testcases were
taken from gbs-auto-test project (Thanks, guys!) and integrated into
existing continuous integration infrastructure. Some new testcase have
been added to increase test coverage.

Change-Id: I0d8c7379d1d87919d1b9f2863480e1a6451793f7

12 years agoUsed absolute imports.
Ed Bartosh [Fri, 3 Aug 2012 14:39:05 +0000 (17:39 +0300)]
Used absolute imports.

PEP0008 discourages relative imports in quite strict manner:
Relative imports for intra-package imports are highly
discouraged. Always use the absolute package path for all imports.
So, let's not have them.

Change-Id: I7622060910bf0f62ebc55c2777b3b14159e8a7e7

12 years agoraise error if base obs project is not exists
Zhang Qiang [Wed, 15 Aug 2012 05:16:21 +0000 (13:16 +0800)]
raise error if base obs project is not exists

12 years agosupport multiple repos from gbs.conf and command line opts
Zhang Qiang [Wed, 15 Aug 2012 02:46:04 +0000 (10:46 +0800)]
support multiple repos from gbs.conf and command line opts

RepoParser class should parse all repos and generate standard repos
and composite repos.

12 years agoUse hostport instead of hostname.
Huang Hao [Wed, 15 Aug 2012 02:28:10 +0000 (10:28 +0800)]
Use hostport instead of hostname.

Include port in urls returns by get_repos_conf(). Fix issue#234

12 years agochange failed to get build conf msg as warning
Zhang Qiang [Tue, 14 Aug 2012 22:31:04 +0000 (06:31 +0800)]
change failed to get build conf msg as warning

12 years agoMerge branch 'release-0.9' into devel
Zhang Qiang [Tue, 14 Aug 2012 12:56:45 +0000 (20:56 +0800)]
Merge branch 'release-0.9' into devel

12 years agohotfix: add clean_repos_userinfo to hide repos useinfo
Zhang Qiang [Tue, 14 Aug 2012 12:50:17 +0000 (20:50 +0800)]
hotfix: add clean_repos_userinfo to hide repos useinfo

12 years agopackaging: require latest git-buildpackage
Markus Lehtonen [Fri, 10 Aug 2012 13:45:13 +0000 (16:45 +0300)]
packaging: require latest git-buildpackage

Requires the latest gbp in order to function correctly.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agobuild and export: conform to new API of git-buildpackage
Markus Lehtonen [Thu, 12 Jul 2012 12:48:15 +0000 (15:48 +0300)]
build and export: conform to new API of git-buildpackage

Command line option names and the SpecFile class have changed a bit.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoMerge "cmd_import: conform to new API of git-buildpackage" into devel
Eduard Bartosh [Tue, 14 Aug 2012 11:48:51 +0000 (04:48 -0700)]
Merge "cmd_import: conform to new API of git-buildpackage" into devel

12 years agoMerge "cmd_changelog: conform to new API of git-buildpackage" into devel
Eduard Bartosh [Tue, 14 Aug 2012 11:47:55 +0000 (04:47 -0700)]
Merge "cmd_changelog: conform to new API of git-buildpackage" into devel

12 years agoMerge "Removed generation of __version__.py" into devel
Qiang Z Zhang [Tue, 14 Aug 2012 08:54:42 +0000 (01:54 -0700)]
Merge "Removed generation of __version__.py" into devel

12 years agocopy build conf to $tmpdir/ for --noinit use
Zhang Qiang [Tue, 14 Aug 2012 07:41:11 +0000 (15:41 +0800)]
copy build conf to $tmpdir/ for --noinit use

12 years agorefinement about temp file/dir management
Zhang Qiang [Tue, 14 Aug 2012 06:20:19 +0000 (14:20 +0800)]
refinement about temp file/dir management

1. create temp file/dir in $tmpdir setting in gbs.conf
2. catch OSError in Temp class

12 years agoRemoved generation of __version__.py
Ed Bartosh [Fri, 10 Aug 2012 08:04:52 +0000 (11:04 +0300)]
Removed generation of __version__.py

It makes gbs fail when run from source tree, if version is not
generated yet. It also breakes tests because of the same reason.

I reimplemented it in a way that version is taken from __init__.py and
imported or parsed where version info is needed.
Note, that in setup.py and Makefile it's parsed in order to less depend
on python code. setup and Make should be able to work even if
__init__.py has syntax errors. The only requirements to get a version
from there is that it should be in parseable form.

Change-Id: I928d4c75f970345c6ccd7be2cc54e4f3d9d1df38

12 years agouse base64 to decode passwordx
Zhang Qiang [Mon, 13 Aug 2012 08:54:27 +0000 (16:54 +0800)]
use base64 to decode passwordx

if using string.decode, binascii.Error would be raised, so just use
base64i nstead just as what conf.py does.

12 years agoremove duplicated git project checking
Zhang Qiang [Mon, 13 Aug 2012 02:04:57 +0000 (10:04 +0800)]
remove duplicated git project checking

RpmGitRepository will check the git project structure, so we dont
need check once again.

12 years agoDisabled auto patch generation in export/remotebuild
Zhang Qiang [Mon, 13 Aug 2012 02:01:32 +0000 (10:01 +0800)]
Disabled auto patch generation in export/remotebuild

With --git-no-auto-patch-gen git-buildpackage would ignore all
upstream and vendor tags and create one tarball, without generating
patches.

12 years agoadd --use-system-qemu option for new version of build
Zhang Qiang [Sun, 12 Aug 2012 07:29:15 +0000 (15:29 +0800)]
add --use-system-qemu option for new version of build

12 years agouse tmpdir to store tempary gbs cache data
Zhang Qiang [Sun, 12 Aug 2012 11:15:33 +0000 (19:15 +0800)]
use tmpdir to store tempary gbs cache data

12 years agocmd_import: conform to new API of git-buildpackage
Markus Lehtonen [Wed, 11 Jul 2012 12:28:25 +0000 (15:28 +0300)]
cmd_import: conform to new API of git-buildpackage

git-import-srpm automatically detects unpacked srpms. Also, prevent it
from automatically applying patches (to match the old behaviour).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agocmd_changelog: conform to new API of git-buildpackage
Markus Lehtonen [Wed, 4 Jul 2012 09:55:13 +0000 (12:55 +0300)]
cmd_changelog: conform to new API of git-buildpackage

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoMerge "Implemented submitting to OBS without creating local copy." into devel feature-pristine-tar
Qiang Z Zhang [Fri, 10 Aug 2012 09:19:16 +0000 (02:19 -0700)]
Merge "Implemented submitting to OBS without creating local copy." into devel

12 years agoMerge "cmd_submit: Adopted to changed gbp API get_upstream_branch" into devel
Qiang Z Zhang [Thu, 9 Aug 2012 22:59:18 +0000 (15:59 -0700)]
Merge "cmd_submit: Adopted to changed gbp API get_upstream_branch" into devel

12 years agocmd_submit: Adopted to changed gbp API get_upstream_branch
Ed Bartosh [Wed, 8 Aug 2012 15:01:30 +0000 (18:01 +0300)]
cmd_submit: Adopted to changed gbp API get_upstream_branch

gbp API get_upstream_branch and set_upstream_branch were changed
according to Markus suggestions (review #799). This change adopts
gbs to new gbp API.

Change-Id: I6051b46904791fb86dd3b9e4153d60821fba91e3

12 years agodont need check local branch name in changelog module
Zhang Qiang [Tue, 7 Aug 2012 07:44:42 +0000 (15:44 +0800)]
dont need check local branch name in changelog module

gbs changelog is just used to generate changelog, so it should
work on any branch.

12 years agounify the format of changelog entry
Zhang Qiang [Tue, 7 Aug 2012 07:38:35 +0000 (15:38 +0800)]
unify the format of changelog entry

12 years agoFixed Ubuntu builds in OTC Tools Tester - gbs.
Ed Bartosh [Wed, 8 Aug 2012 14:39:18 +0000 (17:39 +0300)]
Fixed Ubuntu builds in OTC Tools Tester - gbs.

For every gbs release gbs.spec and gbs.dsc should be updated.
Unfortunately gbs.dsc is still not used in gbs release process and
maintainer forgets to update it. This leads to the breakage of the
continuous integration tests (OTC Tools Tester - gbs job).

Change-Id: I667eeb3947c6adc5f2962fa4028905e0c415f7bb

12 years agomerge changes from release-0.8.1 branches
Zhang Qiang [Wed, 8 Aug 2012 04:41:13 +0000 (12:41 +0800)]
merge changes from release-0.8.1 branches

12 years agobump to version 0.8.1 2.0alpha release-0.8.1 0.8.1 2.0_alpha
Zhang Qiang [Tue, 31 Jul 2012 05:57:05 +0000 (13:57 +0800)]
bump to version 0.8.1

12 years agoremove tracking authors info to make changelog standard
Zhang Qiang [Mon, 6 Aug 2012 14:13:23 +0000 (22:13 +0800)]
remove tracking authors info to make changelog standard

12 years agouse universal time (GMT) instead of localtime to create tag
Zhang Qiang [Mon, 6 Aug 2012 13:57:06 +0000 (21:57 +0800)]
use universal time (GMT) instead of localtime to create tag

12 years agogbs submit support
Zhang Qiang [Mon, 6 Aug 2012 12:27:04 +0000 (20:27 +0800)]
gbs submit support

workflow:
1) Check opts: -m is a must option
2) if --target specified, use specified target branch name, use
   current branch name
3) create tag on target branch and commit ID, tag format is:
   submit/${branch}/${date}.${time}
4) push tag to gerrit.

12 years agocmd_build: Fixed check for empty user and password. Fixes #217.
Zhang Qiang [Mon, 6 Aug 2012 05:18:15 +0000 (13:18 +0800)]
cmd_build: Fixed check for empty user and password. Fixes #217.

12 years agoImplemented --out commandline option. Fixes #200.
Zhang Qiang [Fri, 3 Aug 2012 06:35:34 +0000 (14:35 +0800)]
Implemented --out commandline option. Fixes #200.

--out specifies existing directory for the RPMs. gbs copies
result RPMs to it when build is finished successfully.
As build is run with root privileges we can't move RPMs because of
possible access restrictions, so we're copying them.

12 years agoconf: error handling if no no section headers
Zhang Qiang [Fri, 3 Aug 2012 05:48:48 +0000 (13:48 +0800)]
conf: error handling if no no section headers