-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using obs_scm and extracting files in the same source _service #223
Comments
On Montag, 19. Februar 2018, 16:53:20 CET wrote Trevor SANDY:
#### Problem
I've tried several configurations, read the online documentation and reviewed the issues and pull requests but I'm not able to extract files and use **obs_scm** in the same _service.
#### Objective
I would like to produce an `<package>.obsinfo` file in order to extract the Git sha. I use the sha as part of the application version line displayed in the application's 'about' dialogue.
#### Current configuraiton
I use the OBS Reference Server.
Currently, I use `tar_scm` and `extract_file` in source my _service. I update update my version string via the Git's pre-commit function. The version_info file is consumed during OBS compile to set the application's version displayed in the about dialogue. However, as you can imagine, the sha is always one behind as the pre-commit will use the current commit details versus the one it is about the confirm.
To build my Debian distros and AppImage, I extract the required source files using the `extract_file` source service.
#### Desired behaviour
I would like to capture the git sha without disturbing the current **obs_scm**'s version/version_format/filename parameters as my rules (Debian) and spec file build logic uses the current values and I would have to revise these components to ensure successful build.
**obs_scm** will produce the `<package>.obsinfo` file which I can use to capture the current commit sha at build time.
#### Problem
I cannot find the required configuration to use both **obs_scm** and **extract_file** in the same source _service file. I read in the online documentation that `obs_scm` has and `extract` parameter but I can't find any reference describing how to use this parameter and if it supports placing files in folders as is required for Debian builds
You don't need extract_file usually, since you can tell obs_scm already to extract via the "extract" parameter.
Have a look here for an example:
https://build.opensuse.org/package/view_file/OBS:Server:Unstable/build/_service?expand=1
Is that helpful?
…--
Adrian Schroeter
email: adrian@suse.de
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany
|
Wow! This is precisely what I was looking for. Many thanks.
Indeed, I did read in the documentation that I'll add the example you provided here so anyone looking for the same solution will have a better chance of finding it than I did.
Cheers, |
One more question...
to
Would something like |
Aside from the exceptions below, with this _service, all the images are unresolvable with either
The exceptions (successful compiles) are...
It seems like the failed images does not like the Moreover, if a source file resides in a subdirectory, for example However, using the syntax Any thoughts ? |
On Montag, 19. Februar 2018, 22:34:11 CET wrote Trevor SANDY:
Aside from the exceptions below, with this _service, all the images are **unresolvable** with either `nothing provides obs-service-tar`, `nothing provides obs-service-recompress`, or both returned messages...
buildtime services need to be available in the repository, yes.
Only newer SUSE distros have these already, but you should find packages for all
others in openSUSE:Tools project.
So instead of building eg against Fedora:20/standard, build against openSUSE:Tools/Fedora_20
…--
Adrian Schroeter
email: adrian@suse.de
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany
|
Ok - I'll give this a shot. What about resolving the debian folder - does obs_scm automatically put all extracts at the root of the source directory as there does not appear to be any With a location such as However, using the syntax |
Sorry I'm late to the party here. @trevorsandy commented on 19 Feb 2018, 19:27 GMT:
That's a noble sentiment but unfortunately burying the info in a discussion in a closed issue doesn't do much to improve its chances of being discovered; it needs to be included in documentation. Unfortunately we don't have any docs yet except the README and the |
Interesting to stumble across this issue. I was so far using the following in my RPM
|
Hi everyone, |
Problem
I've tried several configurations, read the online documentation and reviewed the issues and pull requests but I'm not able to extract files and use obs_scm in the same _service.
Objective
I would like to produce a
<package>.obsinfo
file in order to extract the Git sha. I use the sha as part of the application version line displayed in the application's 'about' dialogue.Current configuraiton
I use the OBS Reference Server.
Currently, I use
tar_scm
andextract_file
in source my _service. I update my version string via Git's pre-commit function. The version_info file is consumed during OBS' source compile to set the application's version displayed in the about dialogue. However, as you can imagine, the sha is always one behind as the pre-commit will use the current commit details versus the one it is about the confirm.To build my Debian distros and AppImage, I extract the required source files using the
extract_file
source service.Desired behaviour
I would like to capture the git sha without disturbing the current obs_scm's version/version_format/filename parameters as my rules (Debian) and spec file build logic uses the current values and I would have to revise these components to ensure successful build.
obs_scm will produce the
<package>.obsinfo
file which I can use to capture the current commit sha at build time.Problem
I cannot find the required configuration to use both obs_scm and extract_file in the same source _service file. I read in the online documentation that
obs_scm
has anextract
parameter but I can't find any reference describing how to use this parameter and if it supports placing files in folders as is required for Debian builds.Expected behaviour
I'm hopeful someone with more knowledge of OBS can help be better understand what is possible and whether my desired behavior is achievable with the configuration I have.
Here is an example of my current _service file:
The text was updated successfully, but these errors were encountered: