Code Monkey home page Code Monkey logo

Comments (6)

Firef0x avatar Firef0x commented on July 30, 2024

Hi @frispete ,

Because the features in #55 and #60 are not implemented yet. No news since then. 😢

However, you can still use some ugly hacks to adjust the package version. 😞 For example, use sed as this example. (Line 38)

Yours sincerely!

from obs-service-tar_scm.

frispete avatar frispete commented on July 30, 2024

Hi @Firef0x,

thanks for your hints. That way, I've seen a way of successfully using @PARENT_TAG@.
If somebody could point me to an example, where the changelog is updated correctly, that
would be great.

Anyway, there's something, that still nags me, as I would like to limit the checkout on released versions, which would reduce versionformat to @PARENT_TAG@, but I fear (as in expect), that this is going to just paper over the fact, that the tarball is going to contain all changesets, regardless of the name.

This is further complicated by the fact, that I would like to create rpm spec files, the won't allow for the sed trick, you're using in PKGBUILD.

I really love the build service, but it escapes me, why the simplest things aren't solved or documented..

Thank you, this is really helpful.

from obs-service-tar_scm.

frispete avatar frispete commented on July 30, 2024

Okay, here's the _service file, i'm experimenting with:

<services>
  <service name="tar_scm">
    <param name="scm">git</param>
    <param name="url">git://github.com/purplehuman/oinut</param>
    <param name="filename">oinut</param>
    <param name="versionformat">@PARENT_TAG@</param>
    <param name="revision">refs/tags/v1.2.3</param>
    <param name="changesgenerate">enable</param>
  </service>
  <service name="set_version">
    <param name="version">1.2.3</param>
  </service>
  <service name="recompress">
    <param name="file">*.tar</param>
    <param name="compression">xz</param>
  </service>
</services>

Although, I have to explicitly spell the version two times, it's is doing fine up to the point, where the local build wants to extract the tarball:

error: File /home/abuild/rpmbuild/SOURCES/oinut-1.2.3.tar.xz: No such file or directory

No wonder, since the service created these files:

_service:recompress:tar_scm:oinut-v1.2.3.tar.xz
_service:set_version:oinut.spec
_service:tar_scm:oinut.changes
_service:tar_scm:_servicedata

What's wrong?

Here's the important part of running the tar_scm service:

Run source service: /usr/lib/obs/service/tar_scm --scm git --url git://github.com/purplehuman/oinut --filename oinut --versionformat @PARENT_TAG@ --revision refs/tags/v1.2.3 --changesgenerate enable --outdir /tmp/tmpumLYdv
Cloning into '/tmp/tmpumLYdv/tmpl9gZvb/oinut'...
ERROR(1): ''
HEAD is now at 3e14bed v1.2.3
Cleaning: /tmp/tmpumLYdv/tmpl9gZvb /tmp/tmpumLYdv/oinut-v1.2.3
Run source service: /usr/lib/obs/service/set_version --version 1.2.3 --outdir /tmp/tmpne6F4M
Run source service: /usr/lib/obs/service/recompress --file *.tar --compression xz --outdir /tmp/tmp2I3inG
Compressed _service:tar_scm:oinut-v1.2.3.tar to tar_scm:oinut-v1.2.3.tar.xz

from obs-service-tar_scm.

aspiers avatar aspiers commented on July 30, 2024

If you don't mind specifying the version twice in _service, you don't actually need @PARENT_TAG@ at all to do releases. Here's one I created yesterday:

This line ensures that the tarball doesn't include all git metadata:

<param name="exclude">.git</param>

and this one automatically updates the .changes file:

<param name="changesgenerate">enable</param>

Please can you let me know if that solves your problem?

But I will gratefully accept a pull request which fixes #60, e.g. by implementing something along the lines of what I proposed.

from obs-service-tar_scm.

aspiers avatar aspiers commented on July 30, 2024

@frispete Any update on whether the approach I demonstrated above works for you?

from obs-service-tar_scm.

boombatower avatar boombatower commented on July 30, 2024

Since 960d0ce one can use something like the following:

    <param name="versionrewrite-pattern">v(.*)</param>
    <param name="revision">refs/tags/v3.16.1</param>

This will strip the silly v and wala.

from obs-service-tar_scm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.