[opensuse-buildservice] How to specify a self reference in a Dockerfile?

What is the required syntax to use binary packages from the same prj in a Dockerfile? Last time I created an image I used something like this (with expanded variables) to make the packages known at build time: RUN zypper ar -cf "http://download.opensuse.org/repositories/${prj}/${repository}" "reponame" This can not work if one branches a pkg from another prj because the binaries from the own prj are not published. And even if they are published, the URL must be adjusted prior submit request. Olaf

Am Thu, 28 May 2020 20:34:45 +0200 schrieb Olaf Hering <olaf@aepfle.de>:
RUN zypper ar -cf "http://download.opensuse.org/repositories/${prj}/${repository}" "reponame"
And in case this bug can not be fixed quickly, where are the download servers documented? For api.opensuse.org the zypper URL is apparently download.opensuse.org. What are the zypper URLs for other API servers, like api.suse.de|com? Olaf

On Fri, 2020-05-29 at 07:59 +0200, Olaf Hering wrote:
And in case this bug can not be fixed quickly, where are the download servers documented? For api.opensuse.org the zypper URL is apparently download.opensuse.org. What are the zypper URLs for other API servers, like api.suse.de|com?
$ osc [-A API] repourls $PROJECT Regards, Srinidhi. N�����r��y隊Z)z{.���Wlz��qﮞ˛���m�)z{.��+�:�{Zr�az�'z��j)h���Ǜ�)]���Ǿ� ޮ�^�ˬz��

Am Fri, 29 May 2020 06:15:18 +0000 schrieb Srinidhi B <Srinidhi.BS@microfocus.com>:
$ osc [-A API] repourls $PROJECT
Thanks for your reply, too. But the reported URLs do not work, the referenced local pkg is not found. Olaf

On Donnerstag, 28. Mai 2020, 20:34:45 CEST wrote Olaf Hering:
What is the required syntax to use binary packages from the same prj in a Dockerfile?
Last time I created an image I used something like this (with expanded variables) to make the packages known at build time:
RUN zypper ar -cf "http://download.opensuse.org/repositories/${prj}/${repository}" "reponame"
This can not work if one branches a pkg from another prj because the binaries from the own prj are not published.
It is not important that they are published, since these URLs are parsed and are mapped to the repositories inside of OBS. So it is enough when they are build (and you did not play with useforbuild flag)
And even if they are published, the URL must be adjusted prior submit request.
Olaf
-- 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 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org

Am Fri, 29 May 2020 08:06:14 +0200 schrieb Adrian Schröter <adrian@suse.de>:
On Donnerstag, 28. Mai 2020, 20:34:45 CEST wrote Olaf Hering:
What is the required syntax to use binary packages from the same prj in a Dockerfile?
It is not important that they are published, since these URLs are parsed and are mapped to the repositories inside of OBS. So it is enough when they are build (and you did not play with useforbuild flag)
Thanks for the reply. But what is the answer to the actual question? Is there no support for 'RUN zypper ar -cf same_prj/repository reponame'? Olaf

On Freitag, 29. Mai 2020, 10:01:28 CEST wrote Olaf Hering:
Am Fri, 29 May 2020 08:06:14 +0200 schrieb Adrian Schröter <adrian@suse.de>:
On Donnerstag, 28. Mai 2020, 20:34:45 CEST wrote Olaf Hering:
What is the required syntax to use binary packages from the same prj in a Dockerfile?
It is not important that they are published, since these URLs are parsed and are mapped to the repositories inside of OBS. So it is enough when they are build (and you did not play with useforbuild flag)
Thanks for the reply.
But what is the answer to the actual question? Is there no support for 'RUN zypper ar -cf same_prj/repository reponame'?
as coolo wrote, you can just reference the repo you are building inside. Assuming the path elements are okay (they are after a branch) you should be fine by just using it. The hint for OBS to do so is #!UseOBSRepositories inside of the Dockerfile -- 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 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org

Am 28.05.20 um 20:34 schrieb Olaf Hering:
What is the required syntax to use binary packages from the same prj in a Dockerfile?
Last time I created an image I used something like this (with expanded variables) to make the packages known at build time:
RUN zypper ar -cf "http://download.opensuse.org/repositories/${prj}/${repository}" "reponame"
This can not work if one branches a pkg from another prj because the binaries from the own prj are not published. And even if they are published, the URL must be adjusted prior submit request.
The easiest is to use #!UseOBSRepositories as comment Greetings, Stephan -- Lighten up, just enjoy life, smile more, laugh more, and don't get so worked up about things. Kenneth Branagh -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org

Am Fri, 29 May 2020 08:48:55 +0200 schrieb Stephan Kulow <coolo@suse.de>:
The easiest is to use #!UseOBSRepositories as comment
This is already present, see SR#219224. But the syntax of the required URL to refer to another repostiory in the same (or some other) prj is still unclear. Olaf

Am Thu, 28 May 2020 20:34:45 +0200 schrieb Olaf Hering <olaf@aepfle.de>:
What is the required syntax to use binary packages from the same prj in a Dockerfile?
In case you are desperately waiting for an answer to this question: It was required to add another <path> element to the <repository>, like this: <repository name="containers"> <path project="${prj}" repository="${other_repository_from_prj}"/> <path project="SUSE:Templates:Images:SLE-15-SP2" repository="containers"/> <arch>x86_64</arch> </repository> This is not really a self-reference, but good enough to solve the issue. Olaf
participants (4)
-
Adrian Schröter
-
Olaf Hering
-
Srinidhi B
-
Stephan Kulow