tools/gbs.git
11 years agoChange --spec to use only base file name
Huang Hao [Mon, 12 Nov 2012 10:05:48 +0000 (18:05 +0800)]
Change --spec to use only base file name

Detail of discussion is in #485

* --spec accept only base file name
* only check spec file in working copy if --include-all is given,
  otherwise check in commit
* if gbs want to parse spec file, it must parse the correct
  version that in --commit(default HEAD)
* unify --spec for all subcommands
  - ch: use the spec given first
  - rb: --include-all means to use work copy, otherwise checkout
    spec in some revision to parse
  - lb: check only one project is about to build and
    pass --spec directly to depanneur
* add several helper functions
  - show_file_from_rev: cat file content from given rev
  - file_exists_in_rev: check whether file exist in given rev
  - glob_in_rev: glob file pattern in given rev

Change-Id: I0621634b50ddedf65eab3c41db4d6f537194b345

11 years agoRemove pylint warnings
Huang Hao [Mon, 19 Nov 2012 07:33:17 +0000 (15:33 +0800)]
Remove pylint warnings

Change-Id: I5cafb9637fea36d9612c708fc57daba302f19648

11 years agoAdd --define option. #540
Huang Hao [Mon, 19 Nov 2012 03:54:34 +0000 (11:54 +0800)]
Add --define option. #540

Change-Id: Ic924d639908a1ce731bb525cbcaba02217930377

11 years agoshow simple progress message for long time operations #325
Zhang Qiang [Wed, 14 Nov 2012 23:10:17 +0000 (07:10 +0800)]
show simple progress message for long time operations #325

Change-Id: I1df3f74459dd92cb77f1cd7d7879d965578b8d0b

11 years agoAdd --keep-packs to keep unused packages in buildroot, #516
Zhang Qiang [Wed, 14 Nov 2012 06:52:25 +0000 (14:52 +0800)]
Add --keep-packs to keep unused packages in buildroot, #516

Change-Id: I902d98b07eaa0596849a550f7f4b97716d828468

12 years agoset TIZEN_BUILD_ROOT as abspath
Zhang Qiang [Fri, 9 Nov 2012 08:37:27 +0000 (16:37 +0800)]
set TIZEN_BUILD_ROOT as abspath

Change-Id: Ie1df08b2b62ca1b9f07e6ae5ee08567e291646ed

12 years agonoinit support
Zhang Qiang [Tue, 6 Nov 2012 00:38:15 +0000 (08:38 +0800)]
noinit support

--noinit can't be specified together with --clean or --clean-once

Change-Id: Ib3fd84ae6b53db9478b69c9daf99fe23c5f12c4e

12 years agoRemove output repo and buildroot info to depanneur, #482
Zhang Qiang [Wed, 7 Nov 2012 08:29:15 +0000 (16:29 +0800)]
Remove output repo and buildroot info to depanneur, #482

Change-Id: If885f0e62a5aa1368b33e924a4dbb6ecb845ed72

12 years agopristine-tar import support and update dependency release-0.11 0.11
Zhang Qiang [Fri, 2 Nov 2012 13:21:41 +0000 (21:21 +0800)]
pristine-tar import support and update dependency

Change-Id: I830c4ff4ff6c95d8713584c098faf77c264f6536

12 years agoSupport for configurable packaging directory
Markus Lehtonen [Fri, 17 Aug 2012 13:58:10 +0000 (16:58 +0300)]
Support for configurable packaging directory

Add config file parameter and command line option to specify the
packaging directory. Command line option takes preference over the
config file setting.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoFixed empty response crash
Ed Bartosh [Fri, 26 Oct 2012 21:52:32 +0000 (00:52 +0300)]
Fixed empty response crash

Sometimemes OBS returns empty response without raising any exceptions.
remove_files API tries to parse this response as xml and crashing if
it's empty. It happens not very often, so trying 3 times to get
something parseable should work around this OBS bug.

Fixes: #495

Change-Id: Ica6c4fc3acf01f4c698651606dd1472ef888adf7
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agoImplemented uploading only changed files to OBS
Ed Bartosh [Fri, 26 Oct 2012 21:18:00 +0000 (00:18 +0300)]
Implemented uploading only changed files to OBS

Before uploading local files to OBS remotebuild code now checks if it's
really needed. Only new and changed files are uploaded. Old files are
deleted from OBS project.

This change also reorganizes remotebuild code a bit to avoid repeated
queries to OBS.

Fixes: #474

Change-Id: Ib67e84765b6ffc39de7185c437342d7a261018de
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agobump to version gbs 0.11
Zhang Qiang [Thu, 25 Oct 2012 11:49:20 +0000 (19:49 +0800)]
bump to version gbs 0.11

Change-Id: Ib475a847d03c709d16f957184fc6d2189932abe2

12 years agoFix typos. #497
Huang Hao [Fri, 26 Oct 2012 03:06:24 +0000 (11:06 +0800)]
Fix typos. #497

Change-Id: Ifdacca345a449ffbd8ba503a0dc8d5b399ba50d1

12 years agoUpdate dependency for gbs 0.11
Zhang Qiang [Thu, 25 Oct 2012 01:53:05 +0000 (09:53 +0800)]
Update dependency for gbs 0.11

* depanneur >= 0.2
* tizen-gbp-rpm >= 2012.10.25
* osc >= 0.136.0

Change-Id: Ia3e1d947e1c5134df3cf2780d33288e13f6ac053

12 years agoChange default repo config. Fix #488
Huang Hao [Thu, 25 Oct 2012 05:55:29 +0000 (13:55 +0800)]
Change default repo config. Fix #488

* change default repo from snapshots to releases
* comment repos of base and main

Change-Id: If1c2ba3911e6301a41883335c7f1e126ea1725e3

12 years agofix backtrace while trying to remove 'None' file, #490
Zhang Qiang [Wed, 24 Oct 2012 13:03:27 +0000 (21:03 +0800)]
fix backtrace while trying to remove 'None' file, #490

Change-Id: I7d1b7c3701fb9e36006b7f88a9248feb4bcd4060

12 years agoMerge "guess_spec() should return a spec belonging to given project" into devel
Qiang Z Zhang [Wed, 24 Oct 2012 09:37:58 +0000 (02:37 -0700)]
Merge "guess_spec() should return a spec belonging to given project" into devel

12 years agodepend osc-0.136
Zhang Qiang [Mon, 22 Oct 2012 05:38:34 +0000 (13:38 +0800)]
depend osc-0.136

Change-Id: Ia0488e4fcec45a27c3c01965cfe9ea3bccced03e

12 years agoguess_spec() should return a spec belonging to given project
Huang Hao [Wed, 24 Oct 2012 07:32:45 +0000 (15:32 +0800)]
guess_spec() should return a spec belonging to given project

Fix #483

Change-Id: I29810b0ae6aa11598793cd7dc3fcf29616330a97

12 years agoAdd two more usage example for gbs build
Zhang Qiang [Wed, 24 Oct 2012 05:31:15 +0000 (13:31 +0800)]
Add two more usage example for gbs build

Change-Id: I17f1a459e65a64b36c4bcc5addd32391e8c8ffe9

12 years agoDon't show generating src rpm info if no --source-rpm
Zhang Qiang [Wed, 24 Oct 2012 05:10:38 +0000 (13:10 +0800)]
Don't show generating src rpm info if no --source-rpm

Change-Id: I0aed603c387633f2abfc7b2bf31dd95a63e35894

12 years agoRevert "Revert "Implement build --spec. Fix #386""
Zhang Qiang [Tue, 23 Oct 2012 08:05:38 +0000 (16:05 +0800)]
Revert "Revert "Implement build --spec. Fix #386""

This reverts commit e72f7f2c49239e09d98b6cea96ce9a0d84be45eb.

After more discussion, we'd prefer to keep the current implementation
just like gbs 0.9. Fix all --commit / --include-all issue in next
gbs release.

Change-Id: I0717d663975cbbc6cac3f5993c4ebda4a742946f

12 years agoMerge "Remove checking of target project, fix #475" into devel
Zhang Qiang [Tue, 23 Oct 2012 07:00:06 +0000 (00:00 -0700)]
Merge "Remove checking of target project, fix #475" into devel

12 years agoraise an ObsError if SSL verification failed
Dawei Yang [Tue, 23 Oct 2012 06:52:49 +0000 (14:52 +0800)]
raise an ObsError if SSL verification failed

12 years agoRemove checking of target project, fix #475
Zhang Qiang [Mon, 22 Oct 2012 07:35:52 +0000 (15:35 +0800)]
Remove checking of target project, fix #475

If no permission to create target project, gbs return:
error <obs>: Can't set meta for Tools:Devel1: HTTP Error 403:  Forbidden
Without this patch, gbs rb can only create target project with name start
with home, which does not make sense.

Change-Id: I7ba7f2f01b9b01a1beca920412fdc53c4641e292

12 years agoRevert "Implement build --spec. Fix #386"
Zhang Qiang [Mon, 22 Oct 2012 05:10:04 +0000 (13:10 +0800)]
Revert "Implement build --spec. Fix #386"

This reverts commit 9c3e0e1683a39752a86f34166aacec5a103bd662.

12 years agoImplement build --spec. Fix #386
Huang Hao [Tue, 16 Oct 2012 08:24:18 +0000 (16:24 +0800)]
Implement build --spec. Fix #386

Pass the spec file to depanneur, it will only build that file.

Change-Id: I9dd3aabe719d2f022e1650493bc44a27ca3b5b67

12 years agoMerge "submit: fixes to target guessing logic" into devel cats-hook
Qiang Z Zhang [Thu, 18 Oct 2012 07:10:06 +0000 (00:10 -0700)]
Merge "submit: fixes to target guessing logic" into devel

12 years agoMerge "Cleaned up runtime package dependencies" into devel
Qiang Z Zhang [Thu, 18 Oct 2012 06:01:17 +0000 (23:01 -0700)]
Merge "Cleaned up runtime package dependencies" into devel

12 years agoCleaned up runtime package dependencies
Ed Bartosh [Wed, 17 Oct 2012 11:07:49 +0000 (14:07 +0300)]
Cleaned up runtime package dependencies

Gbs doesn't depend on rpm directly since it started to use
git-buildpackage. It doesn't depend on build since it started to use
depanneur. It doesn't depend on createrepo since local build mode was
dropped in favor of using depanneur. Binfmt-support and qemu are not
used at all. Dependency to python-pycurl was missing in debian/control.
Dependency to python >= 2.5 was replaced with dependency to
python >= 2.7 as gbs now uses argparse.

Change-Id: I1d6f840ab7cefcf5d6a17db3d08e859b8afb8655
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agosubmit: fixes to target guessing logic
Markus Lehtonen [Wed, 17 Oct 2012 10:54:31 +0000 (13:54 +0300)]
submit: fixes to target guessing logic

Try to find the upstream branch of the current branch, not the target.

Also, get rid of the confusing variable name 'target_branch' as we're
not submitting to any branch - the 'target' is just one part of the tag
name.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agosubmit: fix crash in guessing remote in case upstream is not set
Markus Lehtonen [Wed, 17 Oct 2012 07:33:26 +0000 (10:33 +0300)]
submit: fix crash in guessing remote in case upstream is not set

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoRemove setup qemu env code, fix #466
Zhang Qiang [Tue, 16 Oct 2012 21:57:58 +0000 (05:57 +0800)]
Remove setup qemu env code, fix #466

this work should be done in build script.

also remove dependency of qemu-arm-static, which should depend by
build.

Change-Id: I7801938955022c3bec1e707a9bbfb9675751f794

12 years agosubmit: try to guess the remote server
Markus Lehtonen [Tue, 16 Oct 2012 08:01:07 +0000 (11:01 +0300)]
submit: try to guess the remote server

If the current branch has upstream set, use it's remote as the server to
push to. Only uses 'origin' as default if no upstream is set.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoMerge "Make build/remotebuild profile selectable from cmdline" into devel
Qiang Z Zhang [Tue, 16 Oct 2012 13:51:35 +0000 (06:51 -0700)]
Merge "Make build/remotebuild profile selectable from cmdline" into devel

12 years agoMerge "Unify color of debug message in gbs, gbp and depanneur." into devel
Qiang Z Zhang [Tue, 16 Oct 2012 10:33:15 +0000 (03:33 -0700)]
Merge "Unify color of debug message in gbs, gbp and depanneur." into devel

12 years agoMake build/remotebuild profile selectable from cmdline
Markus Lehtonen [Fri, 12 Oct 2012 05:20:08 +0000 (08:20 +0300)]
Make build/remotebuild profile selectable from cmdline

Implements a new cmdline option to select the profile to use for
building. User can give the profile name without the "profile." prefix.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoMake local buildroot configurable in config file
Markus Lehtonen [Mon, 24 Sep 2012 10:47:22 +0000 (13:47 +0300)]
Make local buildroot configurable in config file

The buildroot can be set under the 'general' section as a global setting
and/or under individual profiles as a profile-wide setting.

Setting supports string substitution for ${tmpdir} and ${profile}.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoMerge "empty commit message is not allowed for gbs submit, #468" into devel
Zhang Qiang [Fri, 12 Oct 2012 10:18:15 +0000 (03:18 -0700)]
Merge "empty commit message is not allowed for gbs submit, #468" into devel

12 years agoMerge "More correct way to parse repo url" into devel
Zhang Qiang [Fri, 12 Oct 2012 10:17:54 +0000 (03:17 -0700)]
Merge "More correct way to parse repo url" into devel

12 years agoMerge "Fixed bug in command line aliases implementation" into devel
Qiang Z Zhang [Fri, 12 Oct 2012 10:16:25 +0000 (03:16 -0700)]
Merge "Fixed bug in command line aliases implementation" into devel

12 years agoempty commit message is not allowed for gbs submit, #468
Zhang Qiang [Fri, 12 Oct 2012 02:10:15 +0000 (10:10 +0800)]
empty commit message is not allowed for gbs submit, #468

Change-Id: Ie89de3c755602ecbf0be09c4d69e9873c1b1a7ef

12 years agoUnify color of debug message in gbs, gbp and depanneur.
Huang Hao [Fri, 12 Oct 2012 09:10:49 +0000 (17:10 +0800)]
Unify color of debug message in gbs, gbp and depanneur.

Fix #450.

Change-Id: Ifdd796f6b4747e0a8903f41be24f1ee9af0cf3ed

12 years agoMore correct way to parse repo url
Zhang Qiang [Fri, 12 Oct 2012 00:46:16 +0000 (08:46 +0800)]
More correct way to parse repo url

Only continue with PageNotFound exception, other exceptions, such as
AuthFailed, TimeoutError, UrlError, raise exception and exit directly.

Change-Id: I5f98d632f3af88223c266dba1a35e253c7767b1c

12 years agoFixed bug in command line aliases implementation
Ed Bartosh [Tue, 9 Oct 2012 14:00:51 +0000 (17:00 +0300)]
Fixed bug in command line aliases implementation

If --conf global option is used its argument considered as subcommand
name. This change fixes this.

Change-Id: Idc67a5257a941d3fcc065443d2017b021b469317
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agoFixed getting workdir in remotebuild mode
Ed Bartosh [Thu, 11 Oct 2012 11:36:24 +0000 (14:36 +0300)]
Fixed getting workdir in remotebuild mode

Used the same approach as in other modules: workdir is assigned to git
topdir.

Fixes: #464

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Change-Id: Idda3abf63580669b36c7a4c4c06b94fd0357856e

12 years agoMerge "Used guess_spec in changelog mode" into devel
Qiang Z Zhang [Wed, 10 Oct 2012 08:52:13 +0000 (01:52 -0700)]
Merge "Used guess_spec in changelog mode" into devel

12 years agoUsed guess_spec in changelog mode
Ed Bartosh [Tue, 9 Oct 2012 14:24:40 +0000 (17:24 +0300)]
Used guess_spec in changelog mode

This change fixes confusing behaviour of changelog mode. When there are
more than one .spec file in packaging/ directory first one is picked up
for processing. Users were confused, because there was not way to
understand which spec will be used and there was not way to specify spec
to proceed with.

Fixes: #399

Change-Id: I65d546b1c0d2fee93bdad8ed03c39d1588edf7d8
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
12 years agocheck the existance of 'source_rpm' before using it
Zhang Qiang [Tue, 9 Oct 2012 07:47:13 +0000 (15:47 +0800)]
check the existance of 'source_rpm' before using it

Change-Id: I132dde430d123191b7ebe207eafbce8175ff079b

12 years agoImplemented command line parsing using argparse
Ed Bartosh [Tue, 25 Sep 2012 15:07:17 +0000 (18:07 +0300)]
Implemented command line parsing using argparse

Fixes: #259

Change-Id: I25c6eabfedc30f089a0c5cb4cebaac3b31b97c8c

12 years agocmd_export: use gbp to build src rpm
Markus Lehtonen [Thu, 27 Sep 2012 16:31:52 +0000 (19:31 +0300)]
cmd_export: use gbp to build src rpm

Fixes #396

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoDon't rely on absolute path of Depanneur
Markus Lehtonen [Mon, 24 Sep 2012 11:15:55 +0000 (14:15 +0300)]
Don't rely on absolute path of Depanneur

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoUse os.system to ignore INT/QUIT signal while calling depanneur
Zhang Qiang [Mon, 24 Sep 2012 06:00:44 +0000 (14:00 +0800)]
Use os.system to ignore INT/QUIT signal while calling depanneur

subprocess.call does not ignore INT/QUIT signal, which result in
gbs exit first before depanneur finished

Change-Id: I88dccad5295f29f07c9d6206287f0f2b6210e5e0

12 years agoBetter help text for --upstream-tag option
Markus Lehtonen [Fri, 21 Sep 2012 07:37:26 +0000 (10:37 +0300)]
Better help text for --upstream-tag option

See #379.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoexport: handle new gbp return value
Markus Lehtonen [Fri, 21 Sep 2012 07:29:25 +0000 (10:29 +0300)]
export: handle new gbp return value

GBP now distinguishes tarball/patch generation errors from other errors.
Fixes a problem where GBS thought that all GBP errors where related to
tarball/patch generation, and, possibly printed a misleading warning and
re-tried GBP export in vain.

See #382.

Change-Id: If2128c5dbc49bae6fb597770d9452e2f93713982
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoRepo or OBS section can inherit only user or password from profile.
Huang Hao [Fri, 21 Sep 2012 06:39:53 +0000 (14:39 +0800)]
Repo or OBS section can inherit only user or password from profile.

- Fix #387, add test cases for this.
- inline user/password have the hight priority.

Change-Id: I6a8d8f6d81d012596e7383d65279060d9cfac0c9

12 years agoCheck the format of build conf release-0.10 0.10
Zhang Qiang [Fri, 21 Sep 2012 08:13:56 +0000 (16:13 +0800)]
Check the format of build conf

build conf must end with .conf and can't contain '-'.

Change-Id: I44dc370b40844a0c1b911c50cd4f22cfe644bd5c

12 years agoFormat default config template.
Huang Hao [Fri, 21 Sep 2012 05:15:40 +0000 (13:15 +0800)]
Format default config template.

- Add more comments and two tizen url to default config template.
- Remove useless config item buildconf and build_cmd

Change-Id: I0faec1b20ad1a41044f6115770fb087371f70303

12 years agoCheck if specified build conf exists.
Zhang Qiang [Thu, 20 Sep 2012 08:32:00 +0000 (16:32 +0800)]
Check if specified build conf exists.

Change-Id: Ia2488a6e6841a7f87397c5c1f595bccc2b737e06

12 years agoUse abspath for build.conf.
Huang Hao [Thu, 20 Sep 2012 08:20:33 +0000 (16:20 +0800)]
Use abspath for build.conf.

Change-Id: Ia739ff531f8a32906ac3f4913fd753960d77ec84

12 years agoCorrect setting gbs build root order
Zhang Qiang [Thu, 20 Sep 2012 06:23:03 +0000 (14:23 +0800)]
Correct setting gbs build root order

--buildroot option first, then TIZEN_BUILD_ROOT env var, and last
choice ~/GBS-ROOT/, which is the default.

Change-Id: Ieae8c7170c0f3e58a676351d3f34ad6a4ed5a87e

12 years agoMerge "patch-generation: filter out changes to packaging dir" into release-0.10
Qiang Z Zhang [Thu, 20 Sep 2012 07:51:57 +0000 (00:51 -0700)]
Merge "patch-generation: filter out changes to packaging dir" into release-0.10

12 years agopatch-generation: filter out changes to packaging dir
Markus Lehtonen [Wed, 19 Sep 2012 05:35:33 +0000 (08:35 +0300)]
patch-generation: filter out changes to packaging dir

Utilize the ignore-path functionality of git-buildpackage to ignore
changes made to the packaging files when generating patches.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoUpdate gbs version from source
Zhang Qiang [Thu, 20 Sep 2012 04:20:49 +0000 (12:20 +0800)]
Update gbs version from source

This affect output of gbs --version

Change-Id: Ia994406218fc41e08c544c7509ffe409aca9d2cb

12 years agoUpdate gbs build help info use build instead of localbuild
Zhang Qiang [Thu, 20 Sep 2012 04:09:50 +0000 (12:09 +0800)]
Update gbs build help info use build instead of localbuild

Change-Id: I50e182dbf7d626989b51c811d891296b16210fe0

12 years agoDon't use local build conf, give error msg instead
Zhang Qiang [Thu, 20 Sep 2012 03:11:51 +0000 (11:11 +0800)]
Don't use local build conf, give error msg instead

local build conf is out of date, and should be discarded.

Change-Id: Iba23ae5cfe082b8e11aac033e0128cf047506a5b

12 years agoMerge "transfer correct gbs export options to depanneur" into release-0.10
Zhang Qiang [Thu, 20 Sep 2012 05:06:36 +0000 (22:06 -0700)]
Merge "transfer correct gbs export options to depanneur" into release-0.10

12 years agoSmall changes to usage format
Huang Hao [Thu, 20 Sep 2012 03:49:13 +0000 (11:49 +0800)]
Small changes to usage format

Change-Id: I1778037d94a9c5ef56be7352a9b9f9fda688d678

12 years agotransfer correct gbs export options to depanneur
Zhang Qiang [Wed, 19 Sep 2012 13:44:23 +0000 (21:44 +0800)]
transfer correct gbs export options to depanneur

Change-Id: If988d075a91392434d0619662e131291d0bc2123

12 years agobump to version 0.10
Zhang Qiang [Wed, 19 Sep 2012 09:15:56 +0000 (17:15 +0800)]
bump to version 0.10

This commit is for new gbs 0.10 release branch (release-0.10).

Change-Id: Ice6b60b9974a2cbaf272a3a491dab3e1b4f24a20

12 years agoUpdate chroot module
Zhang Qiang [Wed, 19 Sep 2012 09:03:53 +0000 (17:03 +0800)]
Update chroot module

As depanneur is used to create build, and multiple build root will
be created if --threads=<> specified, so we remove -A option.
The build root should be specified while using gbs chroot, just as
chroot command.

Change-Id: I014e441f2ff206002595bd3acf54ff749ffcf353

12 years agoUse build-experimental to replace build module
Zhang Qiang [Wed, 19 Sep 2012 02:19:08 +0000 (10:19 +0800)]
Use build-experimental to replace build module

We have tested new new build module 'build-experimental' for several
circles, and its compartiable with build module, no any regression
issue, so let's use this module to replace current build module.

Change-Id: I58ea77cb86f21d32a5819bb0213291e407f810e5

12 years agouse 'warning' instead of 'warn'
Zhang Qiang [Tue, 18 Sep 2012 01:41:57 +0000 (09:41 +0800)]
use 'warning' instead of 'warn'

Change-Id: I0b60aa144acffac2b2b16765a6e63a9724add6a8

12 years agoshow local repo dir with correct disto and show build root dir
Zhang Qiang [Mon, 17 Sep 2012 08:02:18 +0000 (16:02 +0800)]
show local repo dir with correct disto and show build root dir

* show correct local repo dir: for different ditros(tizen, tizen2.0,
ect) different local repos are generated.
* show build root dirs, user can see this info and chroot it easily.

Change-Id: Ib8c071da842d1194c05499a605cb76718ef894a3

12 years agoMerge "Add a default parser in ConfigMgr" into devel
Qiang Z Zhang [Tue, 18 Sep 2012 02:30:23 +0000 (19:30 -0700)]
Merge "Add a default parser in ConfigMgr" into devel

12 years agoAdd a default parser in ConfigMgr
Huang Hao [Mon, 17 Sep 2012 07:23:12 +0000 (15:23 +0800)]
Add a default parser in ConfigMgr

- Fix bug#333.
- Change config item like %(xxx)s to ${xxx} in DEFAULTS
    dict, otherwise InterpolationError will be raised
- Transform ${upstream_tag} back to %(upstream_tag)s before
    calling gbp, which does not change functionality of gbp

Change-Id: I3ba122ef4a633c23d59e136773ae98d1e280dab3

12 years agoMerge "Display meaningful info when parsing repo urls" into devel
Qiang Z Zhang [Tue, 18 Sep 2012 02:29:40 +0000 (19:29 -0700)]
Merge "Display meaningful info when parsing repo urls" into devel

12 years agoDisplay meaningful info when parsing repo urls
Huang Hao [Mon, 17 Sep 2012 09:15:08 +0000 (17:15 +0800)]
Display meaningful info when parsing repo urls

Fix bug#340

Change-Id: I786bb6a3f622eca1e6087cab3fc0f2a3eaa214ea

12 years agoAdd more description about gbs build-experimental help info fix#350
Zhang Qiang [Mon, 17 Sep 2012 06:53:09 +0000 (14:53 +0800)]
Add more description about gbs build-experimental help info fix#350

Change-Id: I373ed324c16136e82a1c172092e3baefd2f37a87

12 years agoAdd --buildroot option for chroot to chroot specified dir
Zhang Qiang [Mon, 17 Sep 2012 02:15:16 +0000 (10:15 +0800)]
Add --buildroot option for chroot to chroot specified dir

Change-Id: I0d52fdec52a0e2e7f20207bd672d7f18400d0576

12 years agoUpdate packaging files
Zhang Qiang [Wed, 12 Sep 2012 13:53:50 +0000 (21:53 +0800)]
Update packaging files

* Update dependency:
  build 2012.09.12
  gbp:  0822
  depanneur: 0.1
* Update Makefile:
  dsc depend on tarball

Change-Id: I8ccdd2320b06699f37f705aea181b96673f88d5a

12 years agoCatch ConfigParser.Error when reading config
Huang Hao [Thu, 13 Sep 2012 08:11:11 +0000 (16:11 +0800)]
Catch ConfigParser.Error when reading config

Change-Id: I8ce04f7c9200ce02df62526144bf9a1dd9d13144

12 years agoChange error message showed to user.
Huang Hao [Thu, 13 Sep 2012 12:39:06 +0000 (20:39 +0800)]
Change error message showed to user.

- show user the correct message if section name specified by
    general.profile does not exist
- remove default value of remotebuild.build_server in code. if
    there is no [remotebuild] section in config file, gbs rb will
    do remote build with tizen.org. It's wried to user.
- complain no obs api found when running gbs rb, do not complain
    when parsing config file.

Change-Id: I7766a7ee04eec3e992e450aa26d0263ee45311fe

12 years agoconf: fix bug in config template generation
Markus Lehtonen [Thu, 13 Sep 2012 05:41:06 +0000 (08:41 +0300)]
conf: fix bug in config template generation

Use shutil.move() instead of os.rename() which fails if the template
file would be renamed over file system boundaries.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoSupport squashing patches in patch generation
Markus Lehtonen [Mon, 20 Aug 2012 14:23:26 +0000 (17:23 +0300)]
Support squashing patches in patch generation

Add new command line and config file option to squash commits in patch
generation into a one monolithic diff. One usage example could be e.g.
in linux kernel to squash commits between base version and stable branch
head into one .diff.

This patch directly facilitates git-buildpackage and just passes the new
option to it.

Command line option takes preference over the config file.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agofirst version of localbuild integrated with depanneur
Zhang Qiang [Wed, 5 Sep 2012 04:22:21 +0000 (12:22 +0800)]
first version of localbuild integrated with depanneur

Available features:
* multiple packages build
* parallel build with multiple threads
* dependency build automaticlly
* local repo generated

Already implemented depanneur options:
* --clean, --clean-once, --overwrite
* --incremental, --keepgoing, --no-configure
* --exclude, --exclude-from-file
* --thread
* --binary-list
* --debug

Usage Example:
$ mkdir tizen-packages
$ cp package1 package2 package3 ... tizen-packages/
$ gbs localbuild -A ia32 tizen-packages # build all packages under tizen-packages
$ cd tizen-packages/
$ gbs localbuild -A ia32 # build all packages under current dir
$ gbs localbuild -A ia32 --overwrite --include-all
$ gbs localbuild -A i586 --threads=2
$ gbs localbuild -A i586 --threads=2 --exclude=dlog --exclude=eglibc
$ gbs localbuild -A i586 --threads=4 --binary-list=/path/to/pkgs.list
$ cd package1/
$ gbs localbuild -A i586 --incremental # only support build one package

Change-Id: I8e214601cc3021c33c8a95b00477bd18546e05c3

12 years agoMerge "More changes to support profile style of config." into devel
Qiang Z Zhang [Thu, 13 Sep 2012 02:39:15 +0000 (19:39 -0700)]
Merge "More changes to support profile style of config." into devel

12 years agoMore changes to support profile style of config.
Huang Hao [Tue, 11 Sep 2012 10:48:47 +0000 (18:48 +0800)]
More changes to support profile style of config.

- proflie section header should start with "proflie_", obs
    section header should start with "obs_", repo section
    header should start with "repo_".
- add base_prj and target_prj config to obs section
- generate profile style of config file in ~/.gbs.conf if no
    config file were found
- clean all parsers in function reset_from_conf()
- as described in issue#255, remove config file in cwd
- if current config is subcommand oriented style, convert it to
    profile oriented style into ~/.gbs.conf.template. Leave it
    original config file unchange.
- BrainConfigParser.set() is not compatible with super set, so
    change name to set_into_file()
- add class RepoConf and OBSConf to repo section info and obs
    section info, including section name which is useful for
    auto new style config generation.
- only update gbs.conf that we had changed and catch permission
    exception.
- add /etc/gbs.conf back.

Change-Id: I1dcee2814a7d5430ac3329a2c018e98b48734569

12 years agoHide "man" subcommand which was introduced by osc.cmdln.
Huang Hao [Wed, 12 Sep 2012 03:31:51 +0000 (11:31 +0800)]
Hide "man" subcommand which was introduced by osc.cmdln.

osc.cmdln add do_man() and hide() to cmdln.1.0.0. do_man() is a
subcommand to generate man page. hide() is a decorator to hide
subcommand in help message, but user can still use it.

Change-Id: I2f4167211397698b8f84635347cfdb2f7c4e3b3c

12 years agoUse GBS temp dir for GBP, too
Markus Lehtonen [Tue, 11 Sep 2012 08:59:23 +0000 (11:59 +0300)]
Use GBS temp dir for GBP, too

Fixes #332.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoFix typo in gbp error message
Markus Lehtonen [Tue, 11 Sep 2012 09:01:32 +0000 (12:01 +0300)]
Fix typo in gbp error message

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
12 years agoMerge "Little refactor and add test cases to conf.py" into devel experimental
Qiang Z Zhang [Mon, 10 Sep 2012 09:05:59 +0000 (02:05 -0700)]
Merge "Little refactor and add test cases to conf.py" into devel

12 years agoFix minor bugs
Huang Hao [Mon, 10 Sep 2012 08:05:35 +0000 (16:05 +0800)]
Fix minor bugs

- catch ValueError for url given by --repository
- prompt user if can't find obs api
- use empty password if no passwd item found for obs

Change-Id: I5c8942619cf11a019b1964c235c7f90edb78a8ee

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 agorename conf as correct tizen release name
Zhang Qiang [Sun, 9 Sep 2012 22:52:18 +0000 (06:52 +0800)]
rename conf as correct tizen release name

This renameing phrase is needed by depanneur

Change-Id: I9cf110fcce94911ed0de2e2bac360c0e7f80737a

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>