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
It would mean actually calling fedpkg srpm copr-cli build foo/bar that.src.rpm copr-cli is just cli fronted for python-copr.
(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 ...
(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.
(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.
(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.
Created attachment 1084675 [details] Implement copr command for rpkg, note that you need to add Requires: copr-cli (or maybe Suggest:) to spec file.
(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.
Please use https://pagure.io/fedpkg for submitting the pull requests.
(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.
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.
(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.
(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.
https://pagure.io/rpkg/pull-request/25