services/obs-service-gbs.git
9 years agoAdd config option for repocache git-fetch refs hack
Markus Lehtonen [Fri, 19 Sep 2014 08:14:24 +0000 (11:14 +0300)]
Add config option for repocache git-fetch refs hack

New config file option 'repo-cache-refs-hack' for enabling refs hack in
gbp-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 is
possible in 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: Ic3a1814975f3c11d6c01734416f64347b9c73986
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoDocument and release version 0.6
Markus Lehtonen [Fri, 11 Jul 2014 05:42:47 +0000 (08:42 +0300)]
Document and release version 0.6

Change-Id: I70c04eab33f9347167b768869306efa90232d2cc
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoClose the log tmpfile so that it is removed
Markus Lehtonen [Fri, 11 Jul 2014 05:34:02 +0000 (08:34 +0300)]
Close the log tmpfile so that it is removed

Fixes a problem with leftover tempfiles under /tmp. The tempfile is not
automatically deleted if the close() method of NamedTemporaryFile is not
called.

Change-Id: I30d47e9bd35d74704c448227c744ff4e766791bd
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoDocument and release version 0.5
Markus Lehtonen [Fri, 30 May 2014 12:38:15 +0000 (12:38 +0000)]
Document and release version 0.5

Change-Id: I1895fbc737b7a3c64eadbd879ffd187d64c51bf6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoAdd README file
Markus Lehtonen [Tue, 3 Jun 2014 12:54:55 +0000 (15:54 +0300)]
Add README file

Change-Id: I7750ebc06f5bc5e8b143d51484893e212710d1af
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoAdd an example configuration file
Markus Lehtonen [Tue, 3 Jun 2014 13:07:09 +0000 (16:07 +0300)]
Add an example configuration file

Change-Id: I84cf824847a88183ffff8f1b82b1fa9991290edd
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoImplement 'error-pkg' parameter
Markus Lehtonen [Mon, 2 Jun 2014 15:42:32 +0000 (18:42 +0300)]
Implement 'error-pkg' parameter

Instead of causing a service error generate a special "error package"
that shows the service error log but fails to build. The parameter value
is a comma-separated list of integers, representing the exit codes for
which the special error package is created.

This is a special hack to prevent the +creation of broken packages in
case of service failures.

Change-Id: I20b1e810b498a120245fe94276c180b458ab0b9a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: refactor, introduce check_files() method
Markus Lehtonen [Tue, 3 Jun 2014 06:49:41 +0000 (09:49 +0300)]
tests: refactor, introduce check_files() method

For checking export directory content.

Change-Id: I1b18dd35f7a7e570eb675014b47e90f5e805a06b
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoUse "const-like" variables instead of numerical exit codes
Markus Lehtonen [Mon, 2 Jun 2014 15:06:25 +0000 (18:06 +0300)]
Use "const-like" variables instead of numerical exit codes

Just a cosmetic internal refactor. Hopefully making the code easier to
understand.

Change-Id: I8ae4d01eec410abe1535794d50e1af3cbbe40884
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoNarrower scope of try-except
Markus Lehtonen [Mon, 2 Jun 2014 14:53:11 +0000 (17:53 +0300)]
Narrower scope of try-except

Move expressions that do not raise the catched exceptions out of the
try-except block.

Change-Id: I207bbe9a6717b278515acda1ba2a86c71d43faba
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoFix one help text in arg parser
Markus Lehtonen [Tue, 3 Jun 2014 13:00:27 +0000 (16:00 +0300)]
Fix one help text in arg parser

Change-Id: Ie15cf7e2a89e4c5fe1e79cae97d9d5a8d532fa8b
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoExit with 3 when GBS crashes
Markus Lehtonen [Mon, 2 Jun 2014 14:13:59 +0000 (17:13 +0300)]
Exit with 3 when GBS crashes

Add a new exit code (3) representing GBS crashes. This makes it possible
to distinguish between normal export failures and crashes also
internally.

Change-Id: Iadac18db6bbec4917ed8a1ba2c9553754cca1399
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoAdd deployment documentation
Markus Lehtonen [Fri, 30 May 2014 09:44:06 +0000 (12:44 +0300)]
Add deployment documentation

Change-Id: I2baf449b02e4a6f7deee32e1096b9f224f40724e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoAdd 'git-meta' option to the .service file
Markus Lehtonen [Fri, 30 May 2014 09:36:34 +0000 (12:36 +0300)]
Add 'git-meta' option to the .service file

Change-Id: Id56027793be5fb80e8633e23ff4836ca730d3374
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: test handling of fork_call() failures
Markus Lehtonen [Tue, 29 Apr 2014 15:09:53 +0000 (18:09 +0300)]
tests: test handling of fork_call() failures

Change-Id: Ia8da919778717739ea2f45de30844b7527bcf87a
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoBetter handling of gbs export crashes
Markus Lehtonen [Tue, 29 Apr 2014 14:58:56 +0000 (17:58 +0300)]
Better handling of gbs export crashes

The fork_call function from obs_service_gbp_utils now raises and
GbpChildBTError exception if the child function crashes with an
unhandled exception. Catch this and print a traceback.

Change-Id: Id406e16d326d5c4ca4d7e7359f98092e33f4a6ec
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoConvert log string arguments to function parameters
Markus Lehtonen [Tue, 29 Apr 2014 15:15:53 +0000 (18:15 +0300)]
Convert log string arguments to function parameters

In order to make pylint happier.

Change-Id: Ia36cc68b8497536b4ec375f19d3bc17cb91ee99e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoAdapt to new fork_call API of obs_service_gbp_utils
Markus Lehtonen [Tue, 29 Apr 2014 14:25:26 +0000 (17:25 +0300)]
Adapt to new fork_call API of obs_service_gbp_utils

Now fork_call() returns a callable instead of directly calling the
function.

Change-Id: I608ecfcde3161b6ee63be597e12a618ac4681c7c
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agosetup.py: add license and url information
Markus Lehtonen [Wed, 9 Apr 2014 07:00:53 +0000 (10:00 +0300)]
setup.py: add license and url information

Change-Id: I7a40e1d3274593fc404468fe68410e2e9bd15d69
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agosetup.py: parse version and description from spec file
Markus Lehtonen [Tue, 8 Apr 2014 09:21:12 +0000 (12:21 +0300)]
setup.py: parse version and description from spec file

Want to maintain packaging meta data in one place (i.e. spec file) as
much as possible.

Change-Id: I94a6381d5675e338db0131d070ebb75cb4280164
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: start development of version 0.5
Markus Lehtonen [Tue, 8 Apr 2014 09:20:35 +0000 (12:20 +0300)]
packaging: start development of version 0.5

Change-Id: I56c6ced84262b48bc12a7bc0697b0c87aa6f092e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoRelease 0.4
Markus Lehtonen [Fri, 4 Apr 2014 12:31:17 +0000 (12:31 +0000)]
Release 0.4

Change-Id: Ic5a34d43d8956c4f998c784dfaf3e10813627a78

10 years agoNew option for creating a git-meta file
Markus Lehtonen [Tue, 1 Apr 2014 12:14:13 +0000 (15:14 +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: Iad3321acc1f80d280dd4c1e21f9681331fa882d1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: start development cycle for 0.4
Markus Lehtonen [Tue, 1 Apr 2014 12:00:18 +0000 (15:00 +0300)]
packaging: start development cycle for 0.4

Change-Id: I7c33eccdae6b23774c2423c35eac16d86c5659fe
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoRelease 0.3
Markus Lehtonen [Fri, 7 Mar 2014 09:52:58 +0000 (09:52 +0000)]
Release 0.3

Change-Id: I30f4fb04c60ea7176ac5cb8a3a02799c4a2d9d57
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agogbp.conf: add gbp-rpm-ch settings and ignore branch
Markus Lehtonen [Fri, 7 Mar 2014 07:45:13 +0000 (09:45 +0200)]
gbp.conf: add gbp-rpm-ch settings and ignore branch

Change-Id: If7337b4af7c4f0e17cff778681f8443af3ef0687
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoAbility to run gbs under different user/group
Markus Lehtonen [Thu, 5 Dec 2013 08:55:11 +0000 (10:55 +0200)]
Ability to run gbs under different user/group

This change adds new configuration file options to set the user/group
under which gbs is run in the service. The service itself is run under
whatever user/group the source service server itself is configured to
use. The service now spawns a separate thread for gbs and sets the
uid/gid there before calling gbs - this is accomplished by utilizing
functionality from the obs-service-git-buildpackage-utils module.

Change-Id: I0c8a9c4d2349cd0ca629f816cb9011f26a42b3bb
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: utilize ok_() and eq_() from nose
Markus Lehtonen [Mon, 7 Oct 2013 11:20:02 +0000 (14:20 +0300)]
tests: utilize ok_() and eq_() from nose

For better assert messages.

Change-Id: I6c5065ffef73af5754ff64f601e4bd8b180b4048
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: remove one useless assert
Markus Lehtonen [Mon, 7 Oct 2013 11:17:21 +0000 (14:17 +0300)]
tests: remove one useless assert

Change-Id: I4a9cec5e7ba53d59be22c38ddfcdb69c4dc801b1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agotests: fix one assert message
Markus Lehtonen [Mon, 7 Oct 2013 11:15:55 +0000 (14:15 +0300)]
tests: fix one assert message

Change-Id: I806551fa2dd8f3c6ce22a69728bdc3cb5f27211e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agoFix minor typo
Markus Lehtonen [Mon, 7 Oct 2013 11:11:01 +0000 (14:11 +0300)]
Fix minor typo

Change-Id: I99bde4dc64f90755968da9d673df3f44ecef0a95
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
10 years agopackaging: start development cycle for 0.3
Markus Lehtonen [Mon, 3 Jun 2013 09:01:36 +0000 (12:01 +0300)]
packaging: start development cycle for 0.3

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

Change-Id: If9d537a63b40c7401d19d9a6ec3fac8d31c8aeef
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoDepend on the gbp-repocache package
Markus Lehtonen [Wed, 12 Jun 2013 07:13:27 +0000 (10:13 +0300)]
Depend on the gbp-repocache package

The Git repository cached was split into a separate python module and
separate RPM package in obs-service-git-buildpackage.

Change-Id: I195f1e0a5e38b50322e39fd449aa9eae71814f0d
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoSkip default config files if --config option is used
Markus Lehtonen [Mon, 3 Jun 2013 08:47:31 +0000 (11:47 +0300)]
Skip default config files if --config option is used

Don't read/parse the default config files if config file(s) is
explicitly defined by command line argument(s).

Change-Id: I949462e4880c9fa54701f090d37458478606cda0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agotest: minor pylint fix
Markus Lehtonen [Mon, 3 Jun 2013 08:22:02 +0000 (11:22 +0300)]
test: minor pylint fix

Change-Id: I4f7a9fec14e7f9c1754de9a4f7365f4ca55afc65
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoUtilize the GBS export API
Markus Lehtonen [Mon, 3 Jun 2013 08:17:20 +0000 (11:17 +0300)]
Utilize the GBS export API

Use the export API instead of calling the gbs command.

This dramatically decreases the number of (indirect) package
dependencies of obs-service-gbs as only the export functionality of GBS
is required.

Change-Id: Iad2b7bd4c7397a2145d40f98441369ea93135d57
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agopackaging: start next development cycle
Markus Lehtonen [Mon, 3 Jun 2013 09:01:36 +0000 (12:01 +0300)]
packaging: start next development cycle

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

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

Change-Id: Idddb72415bb515806b11bbcef3f6c5accb9c74ac
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoUse gbs-specific default repository cache directory
Markus Lehtonen [Fri, 3 May 2013 12:31:21 +0000 (15:31 +0300)]
Use gbs-specific default repository cache directory

Instead of sharing repo cache with the git-buildpackage service (by
default). This is probably safer for the future if we start to use
different repo layout/settings in the services - e.g. start to
support bare repos for the git-buildpackage service.

Change-Id: I6f3a81f4e3564409fb933ed30219610d7d094c88
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoSupport for config files
Markus Lehtonen [Tue, 23 Apr 2013 06:12:54 +0000 (09:12 +0300)]
Support for config files

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

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

Also, change each test case to be run in individual temp dir and have
individual repo cache.

Change-Id: I8dbc713eaa06875f1f1b1163b3962f491dbce4e6
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agopackaging: fix requirements for unit tests
Markus Lehtonen [Thu, 18 Apr 2013 11:34:24 +0000 (14:34 +0300)]
packaging: fix requirements for unit tests

Also don't force do_unittests in spec

Change-Id: Iaf7ec6a40c513e111fb0189db40d4eb1980d32f0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoRename logger to LOGGER
Markus Lehtonen [Thu, 18 Apr 2013 09:55:27 +0000 (12:55 +0300)]
Rename logger to LOGGER

Adapt to new naming in obs-service-git-buildpackage.

Change-Id: Ib9b0af38f7808666da9d060cccbfaefd31ff8616
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoUpdate .gbp.conf
Markus Lehtonen [Thu, 18 Apr 2013 09:51:51 +0000 (12:51 +0300)]
Update .gbp.conf

Change-Id: I7da978d493efaf3315f591d5335e029826a0213f
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoInitial RPM packaging
Markus Lehtonen [Thu, 4 Apr 2013 12:06:15 +0000 (15:06 +0300)]
Initial RPM packaging

Change-Id: Iac1320f4629c80cb7fbed400ceb3442de40f1971
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoInitial version
Markus Lehtonen [Thu, 4 Apr 2013 08:13:39 +0000 (11:13 +0300)]
Initial version

Change-Id: I84dc4a722cee58d97c3b2cd3c32fc8379048481d
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoInitial empty repository
Eduard Bartosh [Mon, 25 Mar 2013 14:27:15 +0000 (07:27 -0700)]
Initial empty repository