Fvennetier (Talk | contribs) |
Fvennetier (Talk | contribs) |
||
| Line 19: | Line 19: | ||
</code> | </code> | ||
Tag significations: | Tag significations: | ||
| - | * '''scm''' : the type of source code management system you want to get source from. Available values are ''svn, git, hg, bzr''. | + | * '''scm''' (''required''): the type of source code management system you want to get source from. Available values are ''svn, git, hg, bzr''. |
* '''url''' (''required''): the checkout URL of your repository. | * '''url''' (''required''): the checkout URL of your repository. | ||
* '''subdir''' (''optional''): the name of the sub-directory of your repository you want to checkout. | * '''subdir''' (''optional''): the name of the sub-directory of your repository you want to checkout. | ||
| Line 29: | Line 29: | ||
== Extract build-control files == | == Extract build-control files == | ||
| - | + | After having created the archive, you may want to extract some files, for example the spec file of your package. | |
| + | Here is an example: | ||
<code> | <code> | ||
<service name="extract_file"> | <service name="extract_file"> | ||
| Line 36: | Line 37: | ||
</service> | </service> | ||
</code> | </code> | ||
| + | Tag significations: | ||
| + | * '''archive''' (''required''): name of the archive to extract files from. Bash regular expressions authorized. | ||
| + | * '''files''' (''required''): name(s) of file(s) to be extracted. | ||
| + | * '''outfilename''' (''optional''): name the extracted file will be renamed to. To be used only if you extract a single file. | ||
== Change archive compression == | == Change archive compression == | ||
| Line 44: | Line 49: | ||
</service> | </service> | ||
</code> | </code> | ||
| + | Tag significations: | ||
| + | * '''compression''' (''required''): the compression format to be used. Allowed values are ''none, gz, bz2, xz''. | ||
| + | * '''file''' (''required''): the name of the file to be recompressed. | ||
== Update build-control files == | == Update build-control files == | ||
Contents |
OBS provides source services which can download/compress/extract/verify files before actually building a package. There is only small documentation here.
You can find two interesting blog posts here and there.
A service called tar_scm is available to create a .tar archive from Subversion, Git, Mercurial and Bazaar source code management systems.
Here is a configuration example:
<service name="tar_scm"> <param name="scm">git</param> <param name="url">git://gitorious.org/meego-developer-tools/obs-light.git</param> <param name="subdir">src</param> <param name="filename">obslight</param> <param name="versionprefix">0.4.git</param> </service>
Tag significations:
After having created the archive, you may want to extract some files, for example the spec file of your package.
Here is an example:
<service name="extract_file"> <param name="archive">*.tar</param> <param name="files">*/deb/* */rpm/obslight.changes */rpm/obslight.spec */rpm/obslight.yaml</param> </service>
Tag significations:
<service name="recompress"> <param name="file">*git*.tar</param> <param name="compression">gz</param> </service>
Tag significations:
<service name="set_version"/>