#2683 web: display VCS/DistURL rpm tags
Merged 3 years ago by tkopecek. Opened 3 years ago by tkopecek.
tkopecek/koji issue2541  into  master

@@ -50,6 +50,16 @@ 

        <th>Description</th><td class="rpmheader">$util.escapeHTML($description)</td>

      </tr>

      #end if

+     #if $vcs

+     <tr>

+         <th><label title="Package source code VCS location">VCS</label></th><td>$vcs</td>

+     </tr>

+     #end if

+     #if $disturl

+     <tr>

+         <th>DistURL</th><td>$disturl</td>

+     </tr>

+     #end if

      <tr>

        <th>Built by</th><td class="user-$build.owner_name"><a href="userinfo?userID=$build.owner_id">$build.owner_name</a></td>

      </tr>

file modified
+8 -7
@@ -1240,9 +1240,10 @@ 

  

      if 'src' in rpmsByArch:

          srpm = rpmsByArch['src'][0]

-         headers = server.getRPMHeaders(srpm['id'], headers=['summary', 'description'])

-         values['summary'] = koji.fixEncoding(headers.get('summary'))

-         values['description'] = koji.fixEncoding(headers.get('description'))

+         headers = ('summary', 'description', 'disturl', 'vcs')

+         result = server.getRPMHeaders(rpm['id'], headers=headers)

+         for header in headers:

+             values[header] = koji.fixEncoding(result.get(header))

          values['changelog'] = server.getChangelogEntries(build['id'])

  

      if build['task_id']:
@@ -1496,10 +1497,10 @@ 

          for dep_type in dep_names:

              values[dep_names[dep_type]] = [d for d in deps if d['type'] == dep_type]

              values[dep_names[dep_type]].sort(key=_sortbyname)

-         headers = server.getRPMHeaders(rpm['id'], headers=['summary', 'description', 'license'])

-         values['summary'] = koji.fixEncoding(headers.get('summary'))

-         values['description'] = koji.fixEncoding(headers.get('description'))

-         values['license'] = koji.fixEncoding(headers.get('license'))

+         headers = ('summary', 'description', 'license', 'disturl', 'vcs')

+         result = server.getRPMHeaders(rpm['id'], headers=headers)

+         for header in headers:

+             values[header] = koji.fixEncoding(result.get(header))

      buildroots = kojiweb.util.paginateMethod(server, values, 'listBuildroots',

                                               kw={'rpmID': rpm['id']},

                                               start=buildrootStart,

file modified
+10
@@ -68,6 +68,16 @@ 

      <tr>

        <th>License</th><td>$util.escapeHTML($license)</td>

      </tr>

+     #if $vcs

+     <tr>

+         <th><label title="Package source code VCS location">VCS</label></th><td>$vcs</td>

+     </tr>

+     #end if

+     #if $disturl

+     <tr>

+         <th>DistURL</th><td>$disturl</td>

+     </tr>

+     #end if

      #end if

      #if $builtInRoot

      <tr>

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

3 years ago

rebased onto b4e456855e47ea75f38f948313ad083e9aed6496

3 years ago
#if $rpm.external_repo_id and $vcs
<tr>
    <th><label title="Package source code VCS location">VCS</label></th><td>$vcs</td>
</tr>
#end if
#if $rpm.external_repo_id and $disturl
<tr>
    <th><label title="">DistURL</label></th><td>$disturl</td>
</tr>

The checks on $rpm.external_repo_id need to be flipped. We can only get this data for koji's rpms.

This is right after a #if $rpm.external_repo_id == 0 block. Perhaps just enclose this in that block by moving the #end if?

Otherwise looks fine

rebased onto 39fa07a

3 years ago

Metadata Update from @jobrauer:
- Pull-request tagged with: testing-done

3 years ago

VCS tag verified, but I wasn't able to make a build with disturl tag - build fails with 'bogus tag 1123'. Presumably (from what I found) it's not supported yet (?) - please, correct me if I'm wrong.

It is not supported in fedora's rpm directly. You can nevertheless create it even with such rpm via'%disturl https://random.dist.url' macro definition (e.g. via ~/.rpmmacros)

Commit ec3ef39 fixes this pull-request

Pull-Request has been merged by tkopecek

3 years ago

Ok, thanks for the info. I'll check it that way afterwards.