Mailinglist Archive: opensuse-buildservice (225 mails)

< Previous Next >
Re: [opensuse-buildservice] Re: using custom variables with tar_scm
  • From: Adrian Schröter <adrian@xxxxxxx>
  • Date: Wed, 14 Sep 2011 08:41:30 +0200
  • Message-id: <6106789.l32YspYKNe@scherben>
Am Dienstag, 13. September 2011, 12:58:33 schrieb Troy Telford:
On 2011-09-13 10:38:08 +0000, Togan Muftuoglu said:
Is there a way to store the output of various commands ie "hg log" "hg
parents" in a variable when using service files like tar_scm or

Writing/editing the source service scripts isn't particularly hard -
but it requires you have root access on the OBS server. (Not a
problem if you run your own OBS service like I do, but it's much more
difficult if you're using

If you do have root access, you can modify (or better copy & modify)
tar_scm so that it stores the output of your scm output ('hg log',
etc.) in a file located in ${MYOUTDIR} - then the file becomes "known"
to OBS as _service:tar_scm:somefile.txt.

Of course, this assumes you have root access to the obs server.

Or just make a patch which makes general sense and we take it for the
official obs-service packages :)

If nothting else, it may be instructive to look at the tar_scm source
code (it's just a shell script) to understand how it works. I know
with git, there is an auto versioning code path that puts the git
commit sha1 in the tarball's version string. I imagine hg has something

That is not such a good idea, because the version would not be steady
increasing anymore. That will cause problems with rpm, zypper and friends.

Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx
< Previous Next >