On Mon, Apr 24, 2017 at 05:06:47PM +0200, Stanislav Ochotnicky wrote:
On Mon 24 Apr 2017 04:56:05 PM CEST Jan Kaluža
<jkaluza(a)redhat.com> wrote:
> On 04/24/2017 04:20 PM, Stanislav Ochotnicky wrote:
>> On Mon 24 Apr 2017 03:25:48 PM CEST Ralph Bean <rbean(a)redhat.com> wrote:
>>> On Mon, Apr 24, 2017 at 01:51:39PM +0200, Stanislav Ochotnicky wrote:
>>>> This is the first stab and what the mbs CG metadata output might look
like:
>>>>
https://paste.fedoraproject.org/paste/5ix-EZVVRkmqpSvCQKOw715M1UNdIGYhyRL...
>>>
>>> Just to clarify - in the "build" entry here, this is a build of
the
>>> "nginx module". The "version" (which is 1) and the
"release" (which is
>>> 2) are in koji terms, not MBS terms.
>>>
>>> The mapping between MBS and koji terms should look something like:
>>>
>>> MBS -> Koji
>>> ---------------
>>> name -> name
>>> stream -> version
>>> version -> release
>>>
>>> The only kicker I can see at the moment is the datatype of stream(MBS)
>>> versus version(Koji). The MBS stream is a string (master, or f26, or
>>> whatever). The Koji version... does it have to be an integer?
>>
>> Well the version even for rpms is a string. Usually semantic versioning
>> style thing - but not necessarily. Of course if you use something lime
>> rpmdev-vercmp on these mbs builds EVRs it might make things weird. I.e.:
>> rpmdev-vercmp master-20 version2-10
>> master-20 < version2-10
>>
>> But I think that's OK.
>>
>> One thing however - can stream contain dash? Because version string
>> cannot. I'd be tempted to just replace it with underscore hoping there
>> won't be both :-)
>
> We currently set the the dist-git branch as a stream value. From MBS
> point of view, there is no problem with dash in a stream name and I
> presume there will dashes in a stream name if we don't decide you cannot
> use dash in dist-git branch name for modules. I would not like to
> restrict that if there is no real reason to do that.
>
> How much user-visible will the content generator data be? Can for
> example user search for module in Koji by typing its
> name-stream-version? In that case, I would start thinking about
> restricting the branch so it does not contain dash, because people will
> not replace dash with underscore when searching Koji.
Well this part of content generator is very visible - it's part of the
build NVR after all. So things like API calls getBuild(nvr) would be
affected by it. And the NVR will need to be input as part of shipping
update in Bodhi for example.
I would guess people *will* use dash in the stream name unless they are
prevented from doing it?
From discussion in IRC today (paraphrasing others):
We can use a new "build type" for this ("module"). With a new build
type (btype) we can:
- store the original MBS name-stream-version in koji as extra information, preserving
dashes
- while the build has a koji-reformatted name-version-release with dashes converted to
underscores.
There is precedent for this in the way Maven GAV is mapped to NVR.
In the CG metadata provided by MBS, btype specific data goes into
extra->typeinfo->BTYPENAME for build and archive and this how koji
knows the btype. So, the MBS would need to define the mapping from NSV
to NVR (hyphens become underscores, etc.) and use the mapped NVR to
identify the build. The original, unmodified NSV would be recorded in
the "extra" field of the build.
(Archives can only have one btype. builds btypes must match their
component archives. btype info can technically be {})
Is that sufficient to solve this mapping problem? Are there any other
outstanding questions you need resolved, stano?
(Sorry for this getting splintered across multiple lists...)