Bug 1342406 - [RFE] Use git fetch remote URL as URL field in RPM metadata
Summary: [RFE] Use git fetch remote URL as URL field in RPM metadata
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: develop
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 23.2
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-03 08:34 UTC by Miroslav Vadkerti
Modified: 2016-08-29 03:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-29 03:21:27 UTC
Embargoed:


Attachments (Terms of Use)
Patch for the RFE against master/HEAD of rhts git repository (5.13 KB, patch)
2016-06-03 08:36 UTC, Miroslav Vadkerti
no flags Details | Diff

Description Miroslav Vadkerti 2016-06-03 08:34:29 UTC
Description of problem:
As the mapping of test name (e.g. /CoreOS/openssh/Multihost/gssapi) to GIT repository is not easy to do properly (i.e. hard to guess) and this mapping does not seem to be anywhere, I am proposing to add this information to rpm metadata which can be then found easily from the test name:

# TEST="/CoreOS/openssh/Multihost/gssapi"
# repoquery --info \*${TEST//\//-} | grep URL
URL         : git://pkgs.devel.redhat.com/tests/openssh

I understand that to be able to rely on this all tests would need to be resubmitted, but anyway, even without that this makes more sense then the
current default FAKEURL value :)

I am attaching patch to make this work.

Version-Release number of selected component (if applicable):
rhts-4.70-1

Comment 1 Miroslav Vadkerti 2016-06-03 08:36:21 UTC
Created attachment 1164372 [details]
Patch for the RFE against master/HEAD of rhts git repository

Comment 2 Roman Joost 2016-06-07 05:41:47 UTC
Dear Miroslav,

does this bug need a NEEDINFO from Dan? Maybe you wanted to set the review flag?

Comment 3 Dan Callaghan 2016-06-07 06:35:58 UTC
Regardless... Yes this sounds like a great idea.

The patch looks okay, I would suggest it might be simpler to just make rhts-mk-build-package figure out the SCM URL instead of doing it in the Makefile. I will have a go at adjusting the patch and post it to Gerrit.

Comment 4 Miroslav Vadkerti 2016-06-07 09:09:55 UTC
Well, it does not, that is just my way how to get attention :) Sorry for the confusion, we do not use review flag in my team, but I will try to remember that when attaching patches next time.

(In reply to Roman Joost from comment #2)
> Dear Miroslav,
> 
> does this bug need a NEEDINFO from Dan? Maybe you wanted to set the review
> flag?

Comment 5 Miroslav Vadkerti 2016-06-07 09:22:31 UTC
(In reply to Dan Callaghan from comment #3)
> Regardless... Yes this sounds like a great idea.
> 
> The patch looks okay, I would suggest it might be simpler to just make
> rhts-mk-build-package figure out the SCM URL instead of doing it in the
> Makefile. I will have a go at adjusting the patch and post it to Gerrit.

Yes, sure, I was thinking about that too, but this seemed to me as a more generic solution. Anyway, I am ok with doing this in python right away.

And BTW, getting the URL can be done simply by:

git config --get remote.origin.url

Which works in RHEL6 and RHEL7 just fine.

Comment 6 Dan Callaghan 2016-06-08 00:54:09 UTC
I wonder if we should also include the subdirectory in the # anchor, as in:

git://git.beaker-project.org/beaker-core-tasks#virt/install

so that you can distinguish between multiple tasks living in subdirectories under a single git repository. The # anchor syntax matches what restraint accepts.

Comment 7 Dan Callaghan 2016-06-08 01:35:24 UTC
http://gerrit.beaker-project.org/4966

I added in svn and cvs support too although I think everyone is keeping their tasks in git these days.

Comment 8 Miroslav Vadkerti 2016-06-24 16:46:05 UTC
(In reply to Dan Callaghan from comment #6)
> I wonder if we should also include the subdirectory in the # anchor, as in:
> 
> git://git.beaker-project.org/beaker-core-tasks#virt/install
> 
> so that you can distinguish between multiple tasks living in subdirectories
> under a single git repository. The # anchor syntax matches what restraint
> accepts.

+1 ... that sounds like a neat idea.

Comment 9 Dan Callaghan 2016-08-04 03:38:23 UTC
Tagged as rhts 4.71.

Comment 13 Dan Callaghan 2016-08-29 03:21:27 UTC
rhts 4.71 has been released.


Note You need to log in before you can comment on or make changes to this bug.