services/obs-service-git-buildpackage.git
3 years agoRemove build dependence with python-support 73/245673/1 accepted/tizen_devbase_services devel-py2 master accepted/tizen/devbase/services/20201102.013858 submit/trunk/20201029.114030 submit/trunk/20201029.132130 submit/trunk/20201029.140230 submit/trunk/20201030.143530 submit/trunk/20201030.151030
jiankang.fan [Wed, 14 Oct 2020 05:40:15 +0000 (14:40 +0900)]
Remove build dependence with python-support

Change-Id: I3e276357ef3b52c27a2596704db57509016bb772
Signed-off-by: jiankang.fan <jiankang.fan@samsung.com>
3 years agoRelease and document version 0.10 83/236683/1 accepted/tizen/devbase/services/20200623.003316 submit/trunk/20200622.151812
jiankang.fan [Fri, 19 Jun 2020 08:58:21 +0000 (17:58 +0900)]
Release and document version 0.10

Change-Id: Icb1562f4b96804f74552b78c50fb0846c6c1b951
Signed-off-by: jiankang.fan <jiankang.fan@samsung.com>
4 years agouse dh_python2 instead dh_pysupport for xUbuntu_19.10 87/227287/2 accepted/tizen/devbase/services/20200423.100516 accepted/tizen/devbase/services/20200514.023522 accepted/tizen/devbase/services/20200520.012738 accepted/tizen/devbase/services/20200619.010840 submit/trunk/20200422.115210 submit/trunk/20200422.142510 submit/trunk/20200422.165210 submit/trunk/20200423.102810 submit/trunk/20200423.111223 submit/trunk/20200423.115423 submit/trunk/20200423.122334 submit/trunk/20200513.162810 submit/trunk/20200519.161030 submit/trunk/20200519.164610 submit/trunk/20200519.184310 submit/trunk/20200612.131210 submit/trunk/20200612.155520 submit/trunk/20200618.153020 submit/trunk/20200618.172010 submit/trunk/20200618.182010 submit/trunk/20200619.102030 submit/trunk/20200619.134012
yan11.meng [Wed, 11 Mar 2020 05:35:35 +0000 (14:35 +0900)]
use dh_python2 instead dh_pysupport for xUbuntu_19.10

Change-Id: I2028ae7c4ae8b5b50cff3a921a6736a56302d5eb
Signed-off-by: yan11.meng <yan11.meng@samsung.com>
7 years ago add debian package release-20161231 release-20170206 release-pylint accepted/tizen/devbase/services/20190930.043406 accepted/tizen/devbase/services/20200104.053653 accepted/tizen/devbase/services/20200106.013858 accepted/tizen/devbase/services/20200106.014006 accepted/tizen/devbase/services/20200106.014103 accepted/tizen/devbase/services/20200106.014214 accepted/tizen/devbase/services/20200109.052700 accepted/tizen/devbase/services/20200110.011129 accepted/tizen/devbase/services/20200114.020138 accepted/tizen/devbase/services/20200114.115713 accepted/tizen/devbase/services/20200115.231336 accepted/tizen/devbase/services/20200214.062227 accepted/tizen/devbase/services/20200219.094449 accepted/tizen/devbase/services/20200413.092118 accepted/tizen/devbase/services/20200415.082849 submit/devel/20190730.075437 submit/trunk/20190927.012743 submit/trunk/20190930.011717 submit/trunk/20190930.015207 submit/trunk/20191021.051025 submit/trunk/20191021.061922 submit/trunk/20191021.083710 submit/trunk/20191029.021210 submit/trunk/20200104.111333 submit/trunk/20200104.134833 submit/trunk/20200104.154833 submit/trunk/20200104.164833 submit/trunk/20200104.173833 submit/trunk/20200105.091558 submit/trunk/20200107.112802 submit/trunk/20200107.162402 submit/trunk/20200107.170902 submit/trunk/20200108.135302 submit/trunk/20200108.172202 submit/trunk/20200108.172702 submit/trunk/20200109.105802 submit/trunk/20200109.112402 submit/trunk/20200109.124502 submit/trunk/20200109.151502 submit/trunk/20200109.154402 submit/trunk/20200110.111659 submit/trunk/20200114.100000 submit/trunk/20200114.110000 submit/trunk/20200115.110101 submit/trunk/20200213.184721 submit/trunk/20200213.191021 submit/trunk/20200214.114520 submit/trunk/20200219.120523 submit/trunk/20200409.194520 submit/trunk/20200409.200220 submit/trunk/20200409.202020 submit/trunk/20200410.143020 submit/trunk/20200410.160020 submit/trunk/20200413.132320 submit/trunk/20200413.150000 submit/trunk/20200413.151000 submit/trunk/20200414.141500 submit/trunk/20200414.191000
shuai.fu [Sat, 22 Oct 2016 08:27:01 +0000 (16:27 +0800)]
 add debian package

Change-Id: I4577bd6fdf584e23defeb6e1c1641324a69c08e5
Signed-off-by: shuai.fu <shuai01.fu@samsung.com>
9 years agoRelease and document version 0.9 release release-0.9
Markus Lehtonen [Mon, 16 Feb 2015 15:49:02 +0000 (17:49 +0200)]
Release and document version 0.9

Change-Id: Ia36729163422172ed5a2b9bb8eea6a9d49263542
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoutils: disable one pylint warning
Markus Lehtonen [Mon, 16 Feb 2015 15:45:10 +0000 (17:45 +0200)]
utils: disable one pylint warning

In this case we really want to catch all exceptions - we don't want to
crash the service if an unhandled exception occurs in the child
function, e.g. gbp.

Change-Id: I9eeee980188adca23c5c641e7a11caf8bdffbcc6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoNew exit code (4) indicating gbp crashes
Markus Lehtonen [Mon, 16 Feb 2015 15:33:08 +0000 (17:33 +0200)]
New exit code (4) indicating gbp crashes

The service now returns 4 when gbp crashes on an unhandled exception.

Change-Id: Ic202f8bd921eea5a3b76a593fd973658d36df9bb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoRefactor error handling of gbp_export()
Markus Lehtonen [Mon, 16 Feb 2015 14:44:40 +0000 (16:44 +0200)]
Refactor error handling of gbp_export()

Change-Id: Ib3c5e64e85a2c2335918a0eeade16b5326165a67
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoSet correct ownership of the exported files
Markus Lehtonen [Mon, 16 Feb 2015 14:28:27 +0000 (16:28 +0200)]
Set correct ownership of the exported files

Change-Id: I3652dd3027576744335abcd6c4f4b0cde2b7592c
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoDon't crash if UID is not found in pw database
Markus Lehtonen [Mon, 16 Feb 2015 13:24:56 +0000 (15:24 +0200)]
Don't crash if UID is not found in pw database

We just don't set the HOME env variable in that case.

Change-Id: Ieab00d21d61e7e001dc3c04ef1d618e9d8c455d3
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoMore fine-grained exception handling when setting UID/GID
Markus Lehtonen [Mon, 16 Feb 2015 13:22:16 +0000 (15:22 +0200)]
More fine-grained exception handling when setting UID/GID

Change-Id: Iabce1dbd5b9e5f533ec454ac31a49a5c9e336dc2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoSet GID before UID
Markus Lehtonen [Mon, 16 Feb 2015 13:11:32 +0000 (15:11 +0200)]
Set GID before UID

Trying to set GID after UID has changed is (probably) fails because of
missing privileges.

Change-Id: I89d90bf1d7e0433f0c98483f1c807e9de08e026c
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agorepocache: don't set initial logging level
Markus Lehtonen [Thu, 25 Sep 2014 10:35:12 +0000 (13:35 +0300)]
repocache: don't set initial logging level

Let the ancestor logger (or the user of the module) to specify the
logging level.

Change-Id: I677dec0ecda6f03ee619eb6ccbcd698832c9cea0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoUse the standard logging module
Markus Lehtonen [Thu, 25 Sep 2014 10:04:42 +0000 (13:04 +0300)]
Use the standard logging module

Get rid of the gbp-specific logging in order to diminish dependency to
gbp specifics.

Change-Id: I39cfb5c3727b5828e63c7932f1dbc0b926d5bf99
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoUse --git-no-build argument for gbp buildpackage-rpm
Markus Lehtonen [Wed, 24 Sep 2014 11:41:48 +0000 (14:41 +0300)]
Use --git-no-build argument for gbp buildpackage-rpm

Instead of the now-deprecated --git-export-only.

Change-Id: I426285578051511a186dfa0e04acf33f1bedebae
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoChange place where default config files are defined
Markus Lehtonen [Wed, 24 Sep 2014 11:34:47 +0000 (14:34 +0300)]
Change place where default config files are defined

Just internal refactoring.

Change-Id: I785e80280d3bed018d9aedcde1c801ddccb7da09
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agopackaging: start development of version 0.9
Markus Lehtonen [Wed, 24 Sep 2014 11:45:00 +0000 (14:45 +0300)]
packaging: start development of version 0.9

Change-Id: Ia2a3e3a4900e32f8636c8acfda49b3f85acabd37
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoRelease and document version 0.8
Markus Lehtonen [Fri, 19 Sep 2014 10:20:05 +0000 (10:20 +0000)]
Release and document version 0.8

Change-Id: I4f415301a5ebf21bb9ce06ab9f19e1d1af1c3e8b
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoAdd README file test-devel
Markus Lehtonen [Thu, 18 Sep 2014 13:46:00 +0000 (16:46 +0300)]
Add README file

Change-Id: Ic25a5d12a0555d96315d53a24f6a0aa57a3ea146
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoAdd an example config file
Markus Lehtonen [Thu, 18 Sep 2014 13:44:29 +0000 (16:44 +0300)]
Add an example config file

Change-Id: Ie621338141ae6c99f6be9c13dc9861be8ff69347
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoAdd config option for git-fetch refs hack
Markus Lehtonen [Thu, 18 Sep 2014 13:04:12 +0000 (16:04 +0300)]
Add config option for git-fetch refs hack

New config file option 'repo-cache-refs-hack' for enabling the refs hack
in repocache. The option is disabled, by default.

Enabling the hack makes it possible to fetch/clone remote repositories
that have branches (refs/heads/*) that point to tag objects. This may
encountered with Gerrit repositories - "pure" Git repositories managed
by Git tools shouldn't have such branches as Git sanity checking
prevents them (which is the reason this hack is needed).

Change-Id: I5e0203d4f0f93c18c2f70c76ef9c8b6ff536fd67
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agorepocache: implement refs hack for fetching
Markus Lehtonen [Wed, 17 Sep 2014 12:14:49 +0000 (15:14 +0300)]
repocache: implement refs hack for fetching

Allows fetching/cloning remote repositories that have refs/heads/*
pointing to tag. The hack is disabled, by default.

Gerrit allows setting refs/heads/* pointing to tag objects. However, git
prevents this causing problems for repocache. Fetch will fail with
something like:
  error: Trying to write non-commit object x to branch refs/heads/y

A hackish workaround for this is to make GIT_DIR/refs a symlink. Then,
first fetch to GIT_DIR/refs.alt/fetch/* and then symlink GIT_DIR/refs to
point to GIT_DIR/refs.alt/fetch/.

The symlink hack in filesystem is automatically removed from the cached
repository if a CachedRepository instance (using the same cached repo)
is created with the hack disabled.

Change-Id: I1addf10fa5f805ab8f2b696e8ccaad9e56967bd0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agorepocache: clean out stale submodules, too
Markus Lehtonen [Mon, 1 Sep 2014 13:02:34 +0000 (16:02 +0300)]
repocache: clean out stale submodules, too

Use "double force" when doing git-clean, in order to remove untracked
submodule directories, too. From git-clean manpage:
    -d  Remove untracked directories in addition to untracked files. If
        an untracked directory is managed by a different Git repository,
        it is not removed by default. Use -f option twice if you really
        want to remove such a directory.

Change-Id: I95235d492bdb943c26316843b7d823b7d07b427b
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agopackaging: add missing dependency
Markus Lehtonen [Mon, 1 Sep 2014 07:54:12 +0000 (10:54 +0300)]
packaging: add missing dependency

The main package requires -utils subpackage.

Change-Id: I95f3c813c4c46667094fad733b4dc423e675b1bb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agorepocache: suppress some confusing git output
Markus Lehtonen [Tue, 19 Aug 2014 15:15:47 +0000 (18:15 +0300)]
repocache: suppress some confusing git output

Suppress "fatal: ref XXXX is not a symbolic ref" lines printed into
stderr by git in get_ref(). Having a git error here is expected as we
fall back to rev-parse in this case.

Change-Id: Ieba96ee314e470fe7e5613a8a788bf40ab8b7042
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoImplement repocache-adm command line tool
Markus Lehtonen [Thu, 10 Jul 2014 09:17:33 +0000 (12:17 +0300)]
Implement repocache-adm command line tool

This command line tool is intended for managing a gbp repository cache.
It will contain functionality for e.g. checking, cleaning up and
repairing the repository cache.

The tool is supposed to be runnable on a live system.

This initial implementation only contains a rudimentary 'stat' command
for printing repocache status/statistics.

Change-Id: I8607fa2c60241e02ef7d8c04c8223f6136ac0943
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agorepocache: use standard logging module and interface
Markus Lehtonen [Thu, 10 Jul 2014 08:44:06 +0000 (11:44 +0300)]
repocache: use standard logging module and interface

Do not automatically use gbp-specific logging. Thus, let the user of
this module to setup logging.

Change-Id: I66479acefe1f6b26f75fce0288afa80132dbfbda
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agotests: some docstring fixes
Markus Lehtonen [Mon, 7 Jul 2014 13:23:10 +0000 (16:23 +0300)]
tests: some docstring fixes

Change-Id: Ic9c5a537868337d57047cef0bdecd8b53d4052c9
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agopackaging: start development of version 0.8
Markus Lehtonen [Thu, 3 Jul 2014 07:58:00 +0000 (10:58 +0300)]
packaging: start development of version 0.8

Change-Id: I6fd750e32761519d421e8c1a185a30c4418d9031
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoRelease and document version 0.7
Markus Lehtonen [Fri, 30 May 2014 09:57:42 +0000 (09:57 +0000)]
Release and document version 0.7

Change-Id: I68ac3524ff7e85f766096b39152c3915b6131a66
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoChange location of tag list in treeish meta data
Markus Lehtonen [Mon, 2 Jun 2014 12:27:08 +0000 (15:27 +0300)]
Change location of tag list in treeish meta data

Move the 'tags' array under the 'commit' key.

Also, add a similar 'tags' array to the 'tag' key - this will list all
annotated tags (if any) pointing to the tag object.

Change-Id: I34c46bc0145a1ce8bd353433367e1a90b53babfc
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoAdd deployment instructions
Markus Lehtonen [Fri, 30 May 2014 06:54:56 +0000 (09:54 +0300)]
Add deployment instructions

Change-Id: I404ea8f35b3604473c6955b08c58fb9309935684
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoCachedRepo: remove redundant initialization code
Markus Lehtonen [Fri, 30 May 2014 10:52:57 +0000 (13:52 +0300)]
CachedRepo: remove redundant initialization code

Remove the creation of repo parent directory in _init_git_repo(). The
parent directory is created in _init_cache_dir() - with proper error
handling.

Change-Id: I840b0166b6f7463e7119a43edf68507419322f89
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agotests: test case for internal service errors
Markus Lehtonen [Fri, 30 May 2014 10:36:24 +0000 (13:36 +0300)]
tests: test case for internal service errors

Change-Id: If52270d8375e3cb2fc4f4198c7a1bdab782651f4
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoMirrorGitRepository.set_ref: fix error handling
Markus Lehtonen [Fri, 30 May 2014 10:11:09 +0000 (13:11 +0300)]
MirrorGitRepository.set_ref: fix error handling

For some reason git-symbolic-ref does not have non-zero exit code in
failure cases. Thus, look at stderr instead of exit code for determining
if the command fails.

Add error handling for case where we write directly to the ref file
(i.e. non-symbolic refs).

Also, add test cases for the above failure modes.

Change-Id: I2fb185d91ac57e3757964dd3edd5d21173ca568d
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoAdd git-meta option in to the .service file
Markus Lehtonen [Fri, 30 May 2014 06:25:58 +0000 (09:25 +0300)]
Add git-meta option in to the .service file

This was accidentally missing in
e6764abc191888adf4b31c9d865958c5acba5e88 which introduced the new
option.

Change-Id: Id8a71d37be1373ad2b2af8ec863d079b7449be02
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoInclude tag list in the git treeish meta data
Markus Lehtonen [Mon, 26 May 2014 14:13:32 +0000 (17:13 +0300)]
Include tag list in the git treeish meta data

List all annotated tags pointing at the exported commit. Adds a new
'tags' key (an array) to the metadata.

Change-Id: I0271130807f3af8e3e112360842fcac095d07fd5
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoMirrorGitRepository: add list_tags() method
Markus Lehtonen [Tue, 1 Apr 2014 09:15:48 +0000 (12:15 +0300)]
MirrorGitRepository: add list_tags() method

For getting tags pointing at a certain object.

Change-Id: I5e952d912c79e0ed8ba22061e484a88866d0fc27
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoDisable git-buildpackage desktop notifications
Markus Lehtonen [Tue, 27 May 2014 12:26:21 +0000 (15:26 +0300)]
Disable git-buildpackage desktop notifications

They are not useful in the service context. And, disabling them removes
one possible point of failure.

Change-Id: I09f66439c1cd128a5f5260073919180db184231f
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoInclude tag name in the git treeish meta data
Markus Lehtonen [Mon, 26 May 2014 14:13:32 +0000 (17:13 +0300)]
Include tag name in the git treeish meta data

Add tag name to the information returned by the
MirrorGitRepository.get_tag_info() method.  This information will also
be automatically written by the write_treeish_meta() function, and thus,
available in the meta data exported when using --git-meta.

Change-Id: Ibc20ac137c1102fea15a39a222f7dd228f5f5f99
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoRemove duplicate gbp command line option
Markus Lehtonen [Tue, 20 May 2014 13:29:36 +0000 (16:29 +0300)]
Remove duplicate gbp command line option

It is already added once few lines above.

Change-Id: Ie018250edc9ef1fe69efc4919379a9003b7af18a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agopackaging: -utils subpackage depends on gbp-repocache
Markus Lehtonen [Mon, 12 May 2014 11:15:40 +0000 (14:15 +0300)]
packaging: -utils subpackage depends on gbp-repocache

Require the same version in order to avoid breakage caused by possible
API changes.

Change-Id: I1489e09833d6d8714d23b4ea1e0f190f51cfd6d0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agosetup.py: add license and url information
Markus Lehtonen [Tue, 8 Apr 2014 10:18:33 +0000 (13:18 +0300)]
setup.py: add license and url information

That are parsed from the spec file.

Change-Id: Icf91346a7d2f02c8ee751462a87c24b6ae984dbf
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agosetup.py: take summary from spec file
Markus Lehtonen [Tue, 8 Apr 2014 10:16:10 +0000 (13:16 +0300)]
setup.py: take summary from spec file

Utilize a new more generic function for parsing packaging data from the
spec file.

Change-Id: I746fd29755435d997ed2943e9a93835c447d4813
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoutils: change fork_call() to return a callable
Markus Lehtonen [Fri, 4 Apr 2014 06:00:02 +0000 (09:00 +0300)]
utils: change fork_call() to return a callable

Hopefully making its usage easier to read.

Change-Id: I7facc91ace28b4e83783453d8f72ca14316b827a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoutils: internal refactor of fork_call()
Markus Lehtonen [Fri, 4 Apr 2014 05:34:28 +0000 (08:34 +0300)]
utils: internal refactor of fork_call()

Utilize functools.partial to get rid of some function argument magic.

Change-Id: I6ed699dfa955217f51119bfc9b5b50d790a1a278
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoDon't read default config files if --config is given
Markus Lehtonen [Thu, 3 Apr 2014 16:06:11 +0000 (19:06 +0300)]
Don't read default config files if --config is given

Only read the default config files if the user does not provide any
config files via the --config command line option.

Change-Id: If816bd325ab96f9ba218bd7dbda96c2e10225e34
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoHandle gbp crashes gracefully
Markus Lehtonen [Thu, 3 Apr 2014 16:11:58 +0000 (19:11 +0300)]
Handle gbp crashes gracefully

Catch unhandled exceptions in gitbuildpackage[-rpm] in which case print
a traceback and return an error.

Change-Id: I9d3f51ee5a2f63e1656ae06c1f808a1f418829d6

10 years agoutils: handle child exceptions in fork_call() more gracefully
Markus Lehtonen [Thu, 3 Apr 2014 13:43:39 +0000 (16:43 +0300)]
utils: handle child exceptions in fork_call() more gracefully

Create a new exception type GbpChildBTError for handling exceptions that
happen in the function that is called in fork_call(). Allows us to catch
exceptions in the called "child" function and print out correct
traceback.

Change-Id: Ib99630df0fa788dc0ec86450460f9daede0a4f59
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: start development of version 0.7
Markus Lehtonen [Tue, 11 Jun 2013 11:22:26 +0000 (14:22 +0300)]
packaging: start development of version 0.7

Change-Id: I0ffc8ea5ef1d0abea64063d7f5c1942693f1eec6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoRelease version 0.6
Markus Lehtonen [Fri, 4 Apr 2014 12:26:58 +0000 (12:26 +0000)]
Release version 0.6

Change-Id: I05a9486b367cc9d5f8ff8a4bcf24073ffeff3229

10 years agotests: add one missing docstring
Markus Lehtonen [Wed, 2 Apr 2014 12:06:59 +0000 (15:06 +0300)]
tests: add one missing docstring

Change-Id: I3bee9e123c2e328bf6992c31fec849defcb6ba99
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoNew option for creating a git-meta file
Markus Lehtonen [Tue, 1 Apr 2014 11:51:58 +0000 (14:51 +0300)]
New option for creating a git-meta file

Add a new 'git-meta' option for writing metadata about the exported
treeish into a text file in json format. The argument for the option is
the filename to write into.

NOTE! Be careful with the filename: the service fails if the filename
already exists in the exported files.

Change-Id: I7e7c1ce6559ac7ef27ea5fda1619c280cdcc76f0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoutils: new method for writing git tree-ish meta informat
Markus Lehtonen [Tue, 1 Apr 2014 10:46:17 +0000 (13:46 +0300)]
utils: new method for writing git tree-ish meta informat

Implement a new write_treeish_meta() function that writes meta
information about a git tree-ish into a file in json format.

Change-Id: I7f7b265be335fc2670c66d25f6c97516cae74e12
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoMirrorGitRepository: add get_tag_info() method
Markus Lehtonen [Tue, 1 Apr 2014 09:15:48 +0000 (12:15 +0300)]
MirrorGitRepository: add get_tag_info() method

For getting data about a tag - similar to get_commit_info().

Change-Id: I158b9fffd831842253147bec8d88ecee511ee0c1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: start development cycle for 0.6
Markus Lehtonen [Tue, 11 Jun 2013 11:22:26 +0000 (14:22 +0300)]
packaging: start development cycle for 0.6

Change-Id: Ib629104a3a74af43e6de762357a390a1dc9b5962
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoRelease 0.5
Markus Lehtonen [Wed, 5 Mar 2014 15:51:12 +0000 (15:51 +0000)]
Release 0.5

Change-Id: I989f52447e465ebb28ccdc4f448016fe44fd583c

10 years agogbp.conf: add gbp-rpm-ch settings and ignore branch
Markus Lehtonen [Wed, 5 Mar 2014 13:42:39 +0000 (15:42 +0200)]
gbp.conf: add gbp-rpm-ch settings and ignore branch

Change-Id: I85e9dd99862fcfd0cdc7a711612d22de505b26e6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoMirrorGitRepository: fix git-fetch failure when local HEAD is invalid
Markus Lehtonen [Wed, 5 Mar 2014 12:04:57 +0000 (14:04 +0200)]
MirrorGitRepository: fix git-fetch failure when local HEAD is invalid

Git fetch fails if local HEAD is a non-symbolic ref and points to a
non-existent object.

We get into this state in CachedRepo if the remote HEAD is invalid (e.g.
points to a non-existent branch) as we forcefully invalidate local HEAD
in this case, too.

Change-Id: I68dff3b4692bef0c3b5399f06c7097af1cf104b3
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoMirrorGitRepository: methods for setting/getting ref
Markus Lehtonen [Wed, 5 Mar 2014 11:48:39 +0000 (13:48 +0200)]
MirrorGitRepository: methods for setting/getting ref

Implement methods for setting and getting refs.  These handle symbolic
and non-symbolic refs automatically.

Change-Id: Idc3dcc389722c569ddc725097115408455de498a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCachedRepo: trivial typo fixes in some code comments
Markus Lehtonen [Wed, 5 Mar 2014 09:56:29 +0000 (11:56 +0200)]
CachedRepo: trivial typo fixes in some code comments

Change-Id: If22edde90b45bf5a48b71cdfe741b27b1409f9e5
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCachedRepo: implement close() method
Markus Lehtonen [Tue, 4 Mar 2014 13:45:47 +0000 (15:45 +0200)]
CachedRepo: implement close() method

For invalidating the object without the need of deleting it.

Change-Id: I6e5210c06f7eb559609d956456be958a8a4232c2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCachedRepo: make attribute variables private
Markus Lehtonen [Tue, 4 Mar 2014 13:40:12 +0000 (15:40 +0200)]
CachedRepo: make attribute variables private

Change-Id: Ia0b31f32203d5cac7a3360f69557bcb62f270b6e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoCachedRepo: close the lock file when unlocking
Markus Lehtonen [Tue, 4 Mar 2014 12:54:53 +0000 (14:54 +0200)]
CachedRepo: close the lock file when unlocking

Change-Id: I8bf56bff0ca63ed4b6c0fef8b28ab36a7d4f7668
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: add %defattr to all %files sections
Markus Lehtonen [Wed, 15 Jan 2014 13:18:10 +0000 (15:18 +0200)]
packaging: add %defattr to all %files sections

Change-Id: I6de131d173fc990bb0b95341440fb934b3a05576
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agocosmetic: give log string arguments as function parameters
Markus Lehtonen [Thu, 5 Dec 2013 13:51:35 +0000 (15:51 +0200)]
cosmetic: give log string arguments as function parameters

Change-Id: Ib4975532931850964804e2763f945b8ca3ae110e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoRemove one unneeded/broken debug output
Markus Lehtonen [Thu, 5 Dec 2013 13:11:15 +0000 (15:11 +0200)]
Remove one unneeded/broken debug output

Change-Id: I5042a61a12c859818557d7d58acf8b49bb648904
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoConfig file option for gbp tmp directory
Markus Lehtonen [Thu, 5 Dec 2013 09:53:02 +0000 (11:53 +0200)]
Config file option for gbp tmp directory

Add a new config file option for configuring the temporary directory
that git-buildpackage uses when it is run.

Change-Id: I6d52c522b217ee1473931b1011fe7e679048903e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: utilize ok_() and eq_() from nose tools
Markus Lehtonen [Thu, 5 Dec 2013 08:19:34 +0000 (10:19 +0200)]
tests: utilize ok_() and eq_() from nose tools

In order to getter better assert messages.

Change-Id: Ibb57a3d2f71884e63e0f9294f26eb1b38e32d962
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoConfig option to set user/group for running GBP
Markus Lehtonen [Thu, 5 Dec 2013 07:55:59 +0000 (09:55 +0200)]
Config option to set user/group for running GBP

Add new options to the configuration file to be able to set the
user/group under which git-buildpackage(-rpm) is being run.

Change-Id: Ife74047c08ca02177ce23ea4a3bbaf4d1b08c767
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorefactor: move gbp export into a separate function
Markus Lehtonen [Thu, 5 Dec 2013 13:30:32 +0000 (15:30 +0200)]
refactor: move gbp export into a separate function

Change-Id: I51b0ed18e20558e29a9e362aa0f741052864c944
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoRun GBP in a separate thread
Markus Lehtonen [Thu, 5 Dec 2013 07:25:49 +0000 (09:25 +0200)]
Run GBP in a separate thread

Change-Id: I26e2d194fd3243b703ff741f3d0a12c6a5770cba
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoutils: set $HOME when doing fork_call()
Markus Lehtonen [Thu, 5 Dec 2013 09:29:43 +0000 (11:29 +0200)]
utils: set $HOME when doing fork_call()

Change-Id: I9d8bf770536e34c8a9d6495aa39327cc7a6bd6c2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoSupport function calls with demoted privileges
Markus Lehtonen [Wed, 4 Dec 2013 08:00:11 +0000 (10:00 +0200)]
Support function calls with demoted privileges

Implement base functionality to do function calls with different
UID/GID. This is done by spawning a child process, then changing UID/GID
and doing the function call there.

The functionality is added in a new python module, in a new RPM
subpackage - in order to be easily utilize this in the GBS source
service, too.

Change-Id: I1ac345501d692fa11fdb83d3d8ea563780bafcbb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: start development cycle for 0.5
Markus Lehtonen [Tue, 11 Jun 2013 11:22:26 +0000 (14:22 +0300)]
packaging: start development cycle for 0.5

Change-Id: Ib3d363b876b8a0f57d3fd837f5b5a8127e75d82c
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoRelease 0.4
Markus Lehtonen [Tue, 15 Oct 2013 11:31:18 +0000 (14:31 +0300)]
Release 0.4

Change-Id: Ic98410fa2d33b013d4907f65feb6bf07fa8f2761
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorepocache: change cached repo dir name
Markus Lehtonen [Wed, 9 Oct 2013 09:38:51 +0000 (12:38 +0300)]
repocache: change cached repo dir name

Change the cached repo directory from "<base>/<reponame>_<hash>" to
"<base>/<hash>/<reponame>". That is, add another directory level to the
cache. This change makes gbp (and gbs) see the same project directory
name as the developers in their normal workflow, making spec file
guessing work identically for developers and the source service, for
example.

NOTE! Repository cache should be manually cleaned after this commit, in
order to get rid of the stale, unused caches.

Change-Id: I2ba4000928f5a645d76f69e7b02c619d09757d67
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: make sure to restore dir permissions
Markus Lehtonen [Wed, 9 Oct 2013 11:38:52 +0000 (14:38 +0300)]
tests: make sure to restore dir permissions

So that tests don't leave stale temporary directories in case of tests
fail.

Change-Id: I06aa23b2ec6805b18a3c597101ab186b8aa24abc
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agorepocache: more verbose debug messages
Markus Lehtonen [Tue, 8 Oct 2013 10:20:20 +0000 (13:20 +0300)]
repocache: more verbose debug messages

Change-Id: I3c47b97b1e67066d13176c36a340d2d6a8625cd6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: start development cycle for 0.4
Markus Lehtonen [Tue, 11 Jun 2013 11:22:26 +0000 (14:22 +0300)]
packaging: start development cycle for 0.4

Change-Id: Ibd3956a60ca1f9fcf60c158fe903541ffbda4a41
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoRelease 0.3
Markus Lehtonen [Thu, 8 Aug 2013 08:42:13 +0000 (11:42 +0300)]
Release 0.3

Change-Id: I7347563e29d0f8b5121d58c635975ab0a54a622e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: split repocache tests into separate file
Markus Lehtonen [Wed, 12 Jun 2013 06:26:53 +0000 (09:26 +0300)]
tests: split repocache tests into separate file

Change-Id: I973a0decab628804c899f97e2b4804fae984b215
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoMove the Git repository cache in separate subpackage
Markus Lehtonen [Tue, 11 Jun 2013 14:19:52 +0000 (17:19 +0300)]
Move the Git repository cache in separate subpackage

Move the Git repository cache implementation/API into a separate python
module and into a separate RPM subpackage. Makes it easier for other
packages to depend on the repository cache API.

Change-Id: Ic234921241ea154c051cdd308a15a65706e4bd9c
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoAdd .gitignore
Markus Lehtonen [Tue, 11 Jun 2013 11:25:15 +0000 (14:25 +0300)]
Add .gitignore

Change-Id: I4fed7de8b67aee3267ea947325bce7fd071da677
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: start next development cycle
Markus Lehtonen [Tue, 11 Jun 2013 11:22:26 +0000 (14:22 +0300)]
packaging: start next development cycle

Change spec file so that pre-releases are easily done.

Change-Id: I040b693a27f2dc3461293fd88ca2c1479ffb345a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoRelease 0.2
Markus Lehtonen [Fri, 3 May 2013 12:18:40 +0000 (15:18 +0300)]
Release 0.2

Change-Id: Ide0dacea0fc1c8cd93e940776d571b69ae094e58
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agogbp.conf: set tag format
Markus Lehtonen [Fri, 3 May 2013 12:22:05 +0000 (15:22 +0300)]
gbp.conf: set tag format

Change-Id: I6ca24baa1cc253072b891777c34ce80df21ac12a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoFix gbp arguments
Markus Lehtonen [Fri, 26 Apr 2013 14:40:38 +0000 (17:40 +0300)]
Fix gbp arguments

Replace argv0 stub with the real program name so that gbp correctly
parses its config files.

Change-Id: I00ea542bee1b96603f30e128ef5ad95c2da1933e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoAdd support for Deb packages and selective building
Markus Lehtonen [Mon, 22 Apr 2013 14:02:40 +0000 (17:02 +0300)]
Add support for Deb packages and selective building

Add support for generating (exporting) Debian source package with
git-buildpackage.

Also, adds new options 'rpm' and 'deb' for selecting whether to generate
rpm and/or deb packaging sources. These options are tri-state with
'auto' trying to determine if the corresponding packaging is available.

Change-Id: Ie3dda1f471a64665009fb9557ed62c1d2d0f3610
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoSupport for config files
Markus Lehtonen [Fri, 19 Apr 2013 13:44:52 +0000 (16:44 +0300)]
Support for config files

Initial support for reading service configuration from a file. For now,
there is only one configuration setting, i.e. 'repo-cache-dir'.
All configuration settings can be overridden with environment variables,
if needed.

By default, the service tries to read
'/etc/obs/services/git-buildpackage' and '~/.obs/git-buildpackage'.
Other file(s) can be defined with the --config cmdline option.

Change-Id: I65d5ee26b3798646e49615d98019673ce5606d5d
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agotests: more isolation for test cases
Markus Lehtonen [Fri, 19 Apr 2013 13:30:04 +0000 (16:30 +0300)]
tests: more isolation for test cases

Run every test case in its own temp directory. Similarly, use test case
specific cache directory that lies outside the temp directory.

Also, create the test case specific orig repo by copying rather than
cloning in order to get an identical copy with all refs.

Change-Id: I42e1ae889118924b4d4482b3780efd13632e6567
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agopackaging: refine unit tests
Markus Lehtonen [Thu, 18 Apr 2013 11:35:17 +0000 (14:35 +0300)]
packaging: refine unit tests

Don't force do_unittests in spec. Also, fake username and email in
'%check' section to work around unconfigured git.

Change-Id: Ibb0da9d8a40eb15e517c293c225577f5c28f3c54
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agopylint fix: rename global variable logger to LOGGER
Markus Lehtonen [Wed, 17 Apr 2013 12:35:50 +0000 (15:35 +0300)]
pylint fix: rename global variable logger to LOGGER

Change-Id: I745c10f9b8fd84da0fad788af3bf81864c9755a4
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoCachedRepo: do force clean when updating working copy
Markus Lehtonen [Wed, 17 Apr 2013 11:50:41 +0000 (14:50 +0300)]
CachedRepo: do force clean when updating working copy

Just in case - this should be never ever really be necessary unless
somebody manually hacks the cached repositorys introducing local
changes.

Change-Id: I5fe76ffcfb63d750bf3ec4bd85ead9ba0c5c0064
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoCachedRepo: do force checkout when updating working copy
Markus Lehtonen [Wed, 17 Apr 2013 11:50:41 +0000 (14:50 +0300)]
CachedRepo: do force checkout when updating working copy

The index of cached repo may be out-of-sync with FETCH_HEAD. In this
case normal checkout fails.

Change-Id: Id2ec2a41bccde49bc4a2622d771517ab95ba7254
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agotests: run every testcase with clean orig repo
Markus Lehtonen [Wed, 17 Apr 2013 11:33:10 +0000 (14:33 +0300)]
tests: run every testcase with clean orig repo

This way "upstream changes" made inside test cases don't affect other
tests.

Change-Id: I297afde17d9835992a0635be59799ff1c1904165
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoRelease 0.1
Markus Lehtonen [Thu, 4 Apr 2013 07:25:12 +0000 (10:25 +0300)]
Release 0.1

Change-Id: If1415ece9c525fc7357813f41248d0f92d83f8e4
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agosetup.py: parse version from spec
Markus Lehtonen [Fri, 5 Apr 2013 06:41:02 +0000 (09:41 +0300)]
setup.py: parse version from spec

Change-Id: I337d3d65a81e082382149fb98ec386c4bcd60f28
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agotests: enable xml nose report in config
Markus Lehtonen [Fri, 5 Apr 2013 06:41:37 +0000 (09:41 +0300)]
tests: enable xml nose report in config

Change-Id: Idd6d1420f374e7d57815af67edd5963a6349a5e5
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoCachedRepository: option to not update submodules
Markus Lehtonen [Thu, 4 Apr 2013 08:40:22 +0000 (11:40 +0300)]
CachedRepository: option to not update submodules

Change-Id: Ifbc603e1355da46a2eb1c0e21e5db1ac0897d885
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>