You are not logged in.

#1 2014-10-25 05:45:11

firef0x
Member
From: Santos, Brazil
Registered: 2014-10-23
Posts: 4
Website

How to define these kinds of version format in OpenSUSE Build Service

I am trying OpenSUSE Build Service recently, and encounter some problems in packaging for Arch Linux. How to write the file '_service' to define these kinds of version format in OBS:

First one

The source file is a Git repo, and the $pkgver is defined as the output of

git describe --always | sed 's|-|.|g'

The example is goldendict-git , refer to https://aur.archlinux.org/packages/go/g … t/PKGBUILD

The current $pkgver is 1.5.0.RC.428.gebad891

I don't know how to write the file '_service' to auto fill the $pkgver so that OBS can update the $pkgver automatically by executing 'osc service rr'.

This is what I'm writing:

  <services>
    <service name="tar_scm">
      <param name="scm">git</param>
      <param name="url">git://github.com/goldendict/goldendict.git</param>
      <param name="versionformat">g%h</param>
      <param name="versionprefix">1.5.0.RC.428</param>
      <param name="filename">goldendict</param>
    </service>
    <service name="recompress">
      <param name="file">*.tar</param>
      <param name="compression">gz</param>
    </service>
    <service name="set_version"/>
  </services>

=============================

Second one

The source file is a Git repo, and the $pkgver is defined as the output of

printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

The example is oh-my-zsh-git, refer to https://aur.archlinux.org/packages/oh/o … t/PKGBUILD

The current $pkgver is  2774.96e4e5d

I don't know how to write the file '_service' to auto fill the $pkgver so that OBS can update the $pkgver automatically by executing 'osc service rr'.

This is what I'm writing:

<services>
  <service name="tar_scm">
    <param name="scm">git</param>
    <param name="url">git://github.com/robbyrussell/oh-my-zsh.git</param>
	<param name="versionformat">%h</param>
	<param name="versionprefix">2774</param>
    <param name="filename">oh-my-zsh</param>
  </service>
  <service name="recompress">
    <param name="file">*.tar</param>
    <param name="compression">gz</param>
  </service>
  <service name="set_version"/>
</services>

=============================

Any help is appreciated!

Yours sincerely

Last edited by firef0x (2014-10-25 16:45:26)

Offline

#2 2014-10-25 07:38:42

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How to define these kinds of version format in OpenSUSE Build Service

I don't use it myself, but I think you'd be better off asking here.

Offline

#3 2014-10-25 16:34:17

firef0x
Member
From: Santos, Brazil
Registered: 2014-10-23
Posts: 4
Website

Re: How to define these kinds of version format in OpenSUSE Build Service

tomk wrote:

I don't use it myself, but I think you'd be better off asking here.

Thx for your reply!

Of course I have. However, I think it's good to get help in more than one forum. THat's why I also post it here.

Yours sincerely

Offline

#4 2014-11-05 02:51:19

metak
Member
Registered: 2009-09-27
Posts: 199

Re: How to define these kinds of version format in OpenSUSE Build Service

Hello firef0x,

I've answered some of your questions here.

https://github.com/fasheng/arch-deepin/issues/50

Point is, yes it would be nice if you could follow arch vcs pkgbuild guidelines in OBS, but it's just not (yet) feasible if you're planning on using set_version service.
That's why I chose the format you saw in my repo. It's for my personal use and I really don't care as long as it all works for me with minimal effort to maintain it. ;-)

If you have any further questions just ask... smile

Offline

Board footer

Powered by FluxBB