[opensuse-buildservice] Combine obs_scm service with extract_file service -> unresolvable build state
Hi, I want to use obs_scm with the extract_file service because my spec files are checked in with my sources. I used tar_scm so far and it works perfectly. So now I created a new package and added a git source to it: osc add git://url/foo.git which creates a minimal _service file. The webinterface shows me the obscpio file and obsinfo from the service but also the state is shown as "excluded" because I have no directly available spec file yet. Then I add an entry like <service name="extract_file"> <param name="archive">*.obscpio</param> <param name="files">*/*.spec</param> </service> This creates a _service:extract_file:foo.spec from the sources but then OBS is showing me an "unresolvable" build state: "nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set_version" If I change the _service file back to tar_scm and remove mode="buildtime" from everywhere, then it starts building immediately. How can I do this properly? Regards, Mark -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Dienstag, 19. Februar 2019, 13:41:24 CET Morschhäuser, Mark wrote:
Hi,
I want to use obs_scm with the extract_file service because my spec files are checked in with my sources. I used tar_scm so far and it works perfectly.
So now I created a new package and added a git source to it: osc add git://url/foo.git which creates a minimal _service file. The webinterface shows me the obscpio file and obsinfo from the service but also the state is shown as "excluded" because I have no directly available spec file yet. Then I add an entry like <service name="extract_file"> <param name="archive">*.obscpio</param> <param name="files">*/*.spec</param> </service> This creates a _service:extract_file:foo.spec from the sources but then OBS is showing me an "unresolvable" build state: "nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set_version"
If I change the _service file back to tar_scm and remove mode="buildtime" from everywhere, then it starts building immediately.
How can I do this properly?
one option would be to build the extract_file service also in your repo. However, tar_scm and obs_scm service support extracting files directly without the extra need of that service. Just use the extract parameter of them. For details look at the service parameter documentation in /usr/lib/obs//service/obs_scm.service -- Adrian Schroeter SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi, thanks for pointing out that I can use the obs_scm directly for unpacking, it works. But what I don't get is that OBS shows me the "nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set_version" message with obs_scm but works fine with tar_scm because I have everything installed on OS level: i | obs-service-obs_scm | Creates a OBS cpio from a remote SCM resource | Paket i+ | obs-service-recompress | An OBS source service: Recompress files | Paket i+ | obs-service-set_version | An OBS source service: Update spec file version | Paket i+ | obs-service-tar | Creates a tar archive from local directory | Paket i+ | obs-service-tar_scm | An OBS source service: create tar ball from svn/git/hg | Paket (and several more) The _service file looks like this now, which is as osc created it with except I added the extract param: <services> <service name="obs_scm"> <param name="url">git://url/foo.git</param> <param name="revision">develop</param> <param name="filename">foo</param> <param name="scm">git</param> <param name="extract">*.spec</param> </service> <service mode="buildtime" name="tar" /> <service mode="buildtime" name="recompress"> <param name="file">*.tar</param> <param name="compression">xz</param> </service> <service mode="buildtime" name="set_version" /> </services> Regards, Mark -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mittwoch, 20. Februar 2019, 08:55:51 CET Morschhäuser, Mark wrote:
Hi,
thanks for pointing out that I can use the obs_scm directly for unpacking, it works. But what I don't get is that OBS shows me the "nothing provides obs-service-tar, nothing provides obs-service-recompress, nothing provides obs-service-set_version" message with obs_scm but works fine with tar_scm because I have everything installed on OS level:
i | obs-service-obs_scm | Creates a OBS cpio from a remote SCM resource | Paket i+ | obs-service-recompress | An OBS source service: Recompress files | Paket i+ | obs-service-set_version | An OBS source service: Update spec file version | Paket i+ | obs-service-tar | Creates a tar archive from local directory | Paket i+ | obs-service-tar_scm | An OBS source service: create tar ball from svn/git/hg | Paket (and several more)
The _service file looks like this now, which is as osc created it with except I added the extract param:
<services> <service name="obs_scm"> <param name="url">git://url/foo.git</param> <param name="revision">develop</param> <param name="filename">foo</param> <param name="scm">git</param> <param name="extract">*.spec</param> </service> <service mode="buildtime" name="tar" /> <service mode="buildtime" name="recompress"> <param name="file">*.tar</param> <param name="compression">xz</param> </service> <service mode="buildtime" name="set_version" /> </services>
mode="buildtime" means that the services must get installed into the build environement. So you base distro or your path configuration must provide these services. -- Adrian Schroeter SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Adrian Schröter
-
Morschhäuser, Mark