<div dir="ltr">Андрей and Andrew,<br><div><br></div><div>thank you for the tips! I think I can manage now (or will be back with the questions).</div><div><br></div><div>Cheers,</div><div><br></div><div>Rinigus</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 26, 2017 at 10:36 AM, Andrew Branson <span dir="ltr"><<a href="mailto:andrew.branson@jollamobile.com" target="_blank">andrew.branson@jollamobile.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<span class=""><br>
<br>
On 26/07/17 09:24, rinigus wrote:<br>
> Hi,<br>
><br>
> I am working on getting ported packages to OBS and facing few problems,<br>
> as probably most of the beginners do. Maybe someone here can help me out?<br>
><br>
> Problem 1: I have a bunch of packages that have external source and rpm<br>
> spec written in a small separate project. Let's take rrdtool as an<br>
> example with my github repo <a href="https://github.com/rinigus/pkg-rrdtool" rel="noreferrer" target="_blank">https://github.com/rinigus/pkg<wbr>-rrdtool</a> . Its<br>
> spec contains source as a full URL. Now, I would like to download it<br>
> from that URL by OBS either during building or as a part of its<br>
> _service. Unfortunately, unlike in several other CI servers, network<br>
> seems to be disabled. So, the snippet in RPM as<br>
><br>
> %setup -q -n %{name}-%{version}<br>
> curl -O %{REMSOURCE0}<br>
> tar zxvf rrdtool-1.5.6.tar.gz --strip-components=1<br>
><br>
> doesn't work (ifconfig returns only loopback device). We also don't have<br>
> download_files among allowed _service APIs, as returned by osc api<br>
> /service. Maybe this can be enabled on OBS? As far as I understand, it<br>
> should download all sources specified in the spec file. Personally, I<br>
> find it rather disturbing putting .tar.gz into github project and would<br>
> prefer getting the upstream package from the upstream source.<br>
<br></span>
We reference external sources as git submodules. The 'tar_git' service will clone those along with your main repo. Our basic pattern is this plus patch files in the rpm folder to apply any specific changes we need.<br>
<br>
Here's an example: <a href="https://git.merproject.org/mer-core/augeas" rel="noreferrer" target="_blank">https://git.merproject.org/mer<wbr>-core/augeas</a><br>
And the _service file:<br>
<a href="https://build.merproject.org/package/show/mer-core:devel/augeas" rel="noreferrer" target="_blank">https://build.merproject.org/p<wbr>ackage/show/mer-core:devel/aug<wbr>eas</a><span class=""><br>
<br>
> Problem 2: When creating package from github source (like for proj.4 in<br>
> my case), I get as a version of packaged RPM the version that I<br>
> specified together with (what looks like) git's latest commit signature<br>
> together with the corresponding branch name leading to package names<br>
> like<br>
> proj-4.9.3+sailfish.2017072604<wbr>2718.6.ge9a0f09-10.20.1.jolla.<wbr>armv7hl.rpm . How can I make it shorter to proj-4.9.3.armv7hl.rpm ?<br>
<br></span>
OBS takes the version string from the latest git tag. Create a tag with your desired version string, e.g. '4.9.3'. You can copy this behaviour in mb2 with the '-x' switch.<br>
<br>
Hope that helps,<br>
<br>
Andrew<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfi<wbr>shos.org</a></div></div></blockquote></div><br></div>