Bug 1271741 - [RFE] Add Copr support
[RFE] Add Copr support
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: rpkg (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dennis Gilmore
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-14 11:01 EDT by Vít Ondruch
Modified: 2016-02-23 03:39 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-23 03:39:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Implement copr command for rpkg, note that you need to add Requires: copr-cli (or maybe Suggest:) to spec file. (3.13 KB, patch)
2015-10-20 06:31 EDT, Miroslav Suchý
no flags Details | Diff

  None (edit)
Description Vít Ondruch 2015-10-14 11:01:40 EDT
It would be nice if fedpkg could be used as simple Copr frontend. Let me use Ruby as an example.

I am maintaining .spec file for future Ruby in private branch of Fedora's dist-git [1]. It would be quite convenient, if I was able to build the package quickly in Copr, without any special setup, e.g.

$ fedpkg copr

This would create/use Copr project and build the package.


[1] http://pkgs.fedoraproject.org/cgit/ruby.git/tree/?h=private-ruby-2.3
Comment 1 Miroslav Suchý 2015-10-14 13:15:02 EDT
It would mean actually calling
  fedpkg srpm
  copr-cli build foo/bar that.src.rpm

copr-cli is just cli fronted for python-copr.
Comment 2 Vít Ondruch 2015-10-15 03:11:41 EDT
(In reply to Miroslav Suchý from comment #1)
>   copr-cli build foo/bar that.src.rpm

Will this prepare the Copr project as well? Is this possible to call without any other preparation, e.g. in Copr's Web UI? Obviously I have to have prepared Copr API token ...
Comment 3 Miroslav Suchý 2015-10-15 03:42:43 EDT
(In reply to Vít Ondruch from comment #2)

> Will this prepare the Copr project as well? Is this possible to call without

No.

> any other preparation, e.g. in Copr's Web UI? Obviously I have to have
> prepared Copr API token ...

Yes. You need to. Similary for Koji you need to have certificate too.
Comment 4 Vít Ondruch 2015-10-15 04:35:08 EDT
(In reply to Miroslav Suchý from comment #3)
> (In reply to Vít Ondruch from comment #2)
> 
> > Will this prepare the Copr project as well? Is this possible to call without
> 
> No.

Is it possible to do so via CLI/API? Otherwise it would probably missed the original point.
Comment 5 Miroslav Suchý 2015-10-15 07:35:34 EDT
(In reply to Vít Ondruch from comment #4)
> Is it possible to do so via CLI/API? Otherwise it would probably missed the
> original point.

Yes, it is possible to do that via API, but you still need api token. The same way as for koji you need certificate.
Comment 6 Miroslav Suchý 2015-10-20 06:31 EDT
Created attachment 1084675 [details]
Implement copr command for rpkg, note that you need to add Requires: copr-cli (or maybe Suggest:) to spec file.
Comment 7 Vít Ondruch 2015-10-21 04:07:11 EDT
(In reply to Miroslav Suchý from comment #6)
> Created attachment 1084675 [details]

Do I read the patch correctly that the project needs to be always explicitly specified and created beforehand? I hoped that the project name would be somehow derived from the branch name and created automatically. The only per-condition should be valid api key.
Comment 8 Pavol Babinčák 2015-10-21 04:18:56 EDT
Please use https://pagure.io/fedpkg for submitting the pull requests.
Comment 9 Miroslav Suchý 2015-10-21 07:03:03 EDT
(In reply to Vít Ondruch from comment #7)
> Do I read the patch correctly that the project needs to be always explicitly
> specified and created beforehand? 

Yes.

>I hoped that the project name would be
> somehow derived from the branch name and created automatically. The only
> per-condition should be valid api key.

Well, it must exist... Not sure if this information (name of project) can be even tracked by dist-git...
At least I hope this is step in right direction.
Comment 10 Vít Ondruch 2015-10-21 07:15:43 EDT
I can see several possible candidates for project name. For example

1) I am working on next Ruby package version in private-ruby-2.3 branch of dist git, in this case the branch name could be used as project name.

2) Or you could use something like .spec name + version from the .spec file, in my case it would result in ruby-2.3.0 project, which is nice name as well.

You could probably request additional confirmation in case such project is not yet configured in users Copr (or probably vice versa? ;) ), but requesting the project name every time is so inconvenient, that I would not use this feature probably, since it does not provide any additional utility then copr-cli.
Comment 11 Miroslav Suchý 2015-10-21 07:27:20 EDT
(In reply to Pavol Babinčák from comment #8)
> Please use https://pagure.io/fedpkg for submitting the pull requests.

I forked the project, but
git clone ssh://git@pagure.io/forks/msuchy/fedpkg.git
Cloning into 'fedpkg'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Pagure does not like me. So please kindly review the attachment.
Comment 12 Pavol Babinčák 2015-10-21 07:36:28 EDT
(In reply to Miroslav Suchý from comment #11)
> Pagure does not like me. So please kindly review the attachment.
Persuade him to like you. Either follow the documentation or file a bug on Pagure if you believe there is some issue.
Comment 13 Miroslav Suchý 2015-10-21 09:11:59 EDT
https://pagure.io/rpkg/pull-request/25

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