Bug 1271741 - [RFE] Add Copr support
Summary: [RFE] Add Copr support
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpkg
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-14 15:01 UTC by Vít Ondruch
Modified: 2016-02-23 08:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-23 08:39:58 UTC
Type: Bug
Embargoed:


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 10:31 UTC, Miroslav Suchý
no flags Details | Diff

Description Vít Ondruch 2015-10-14 15:01:40 UTC
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 17:15:02 UTC
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 07:11:41 UTC
(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 07:42:43 UTC
(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 08:35:08 UTC
(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 11:35:34 UTC
(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 10:31:41 UTC
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 08:07:11 UTC
(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 08:18:56 UTC
Please use https://pagure.io/fedpkg for submitting the pull requests.

Comment 9 Miroslav Suchý 2015-10-21 11:03:03 UTC
(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 11:15:43 UTC
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 11:27:20 UTC
(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/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 11:36:28 UTC
(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 13:11:59 UTC
https://pagure.io/rpkg/pull-request/25


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