Comments (6)
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.
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.
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.
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.
@frispete Any update on whether the approach I demonstrated above works for you?
from obs-service-tar_scm.
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)
- KeyError: 'object_kind' in TarSCM/tasks.py on Leap 15.4 HOT 2
- Support different scm repository name in case of forks HOT 1
- obs_scm seems to broken on CentOS_8 HOT 7
- make included .git reproducible
- Service broken if .lock file left over by previous versions HOT 2
- Causes "unresolvable" error for Fedora 34+ HOT 3
- 'exclude' behaviour change in obs_scm HOT 1
- test fail on Fedora 37 HOT 4
- .obscpio file format hex code means? HOT 1
- obs_gbp: dpkg-scansources also finds any .dsc in the source clone
- Use numeric owner and group to avoid privacy leaking HOT 1
- Error with Python 3.12 due to deprecated and removed 'readfp' usage HOT 2
- Error in Fedora_Rawhide: AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'? HOT 1
- project top level has a directory with the same name as the branch, the pull will fail.
- Chooses the wrong tag in case of several tags being present HOT 1
- @TAG_OFFSET@ not working without a tag in versionformat
- Please provide better documentation
- We should default to main branches too HOT 1
- package-meta HOT 1
- Enable changesgenerate to create a new top level entry per git tag encountered
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obs-service-tar_scm.