Mailinglist Archive: opensuse-buildservice (233 mails)

< Previous Next >
[opensuse-buildservice] Fun with source services
  • From: Greg Banks <gnb@xxxxxxxx>
  • Date: Wed, 20 Nov 2013 10:24:33 -0800
  • Message-id: <CAFLzV7yvFWQuMJQho_itLY0Gv4ff8AiPWJ8CARfJZtusqF=Okg@mail.gmail.com>
G'day,

Second attempt at sending, this time with no HTML. In the 21st century.

So I've been trying to use OBS source services for my project novaprova

https://build.opensuse.org/project/show/home:gnb:novaprova

to do a development tree (i.e. not a release) build on days when there
are checkins. What I want is a process which does

1. get the latest source from the master branch in the git repo
2. pull the RPM and DEB package control files (.spec etc) out of a
directory in there
3. figure out a version number
4. apply the version number to the .spec file
5. perform build
6. upload build results to repositories

I read this document

http://en.opensuse.org/openSUSE:Build_Service_Tips_and_Tricks#Perform_a_nightly_build_from_a_VCS_checkout

but I didn't want to do an osc commit for every build, or have a
server sitting around whose only purpose was to run a cronjob. So I
thought I could do some clever tricks with source services, resulting
a single _service file which could be used unmodified for every
nightly build. It almost worked. I found the following issues:

1. If the source service runs correctly, there is no visible log. The
build log starts after that.

2. If the source service fails, the error messages only appear in a tooltip.

3. The build log page has a bug where it will repeat large chunks of a log.

4. Source services could be better documented. A lot better. For
example I discovered @PARENT_TAG@ by reading the source.

5. The tar_scm service creates an uncompressed tarball, i.e.
foo-git.1234567.tar. My .spec file was expecting a compressed tarball
and failed.

6. The recompress service could be used to compress the tarball from
tar_scm, but it takes a fixed incoming filename, without wildcards.
This doesn't work when tar_scm is generating a tarball filename which
has a version number encoded in it, which version number is not known
at the time the _service file is written.

7. Likewise, the extract_files service could be used to extract a
spec file from inside the tarball, but it requires a fixed incoming
filename without wildcards. Given that in most projects there will be
exactly one tarball, I would have thought that extract_files could
have guessed correctly, or accepted a wildcard.

8. For the version number, I wanted to use a timestamp in ISO8601
basic format to day precision, i.e. "20131120" for 20 November 2013.
The closest I can get is to use %ci as the versionformat in the
tar_scm service, but this doesn't quite work. Git gives extended
format to second precision
withhttps://help.github.com/articles/post-receive-hooks timezone, e.g.
2013-11-20 10:06:35 -0800. The tar_scm script tries to clean this
up, but the result still has useless information I don't want and
spaces which break the other services.

Also, what's a good way to kick off an OBS build from a GitHub webhook?

https://help.github.com/articles/post-receive-hooks


--
Greg.
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >