Bug 1397508

Summary: RFE: Support for a fedpkg-like workflow, i.e. via mock-scm + spectool
Product: [Community] Copr Reporter: Ben Rosser <rosser.bjr>
Component: backendAssignee: clime
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: brian, clime, kevin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-02 11:34:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ben Rosser 2016-11-22 16:36:43 UTC
It would be really nice if there was a way to maintain a package on COPR analogous to the way packages are maintained in Fedora-- i.e. I write a spec file, put it in version control, upload my sources somewhere, and fire builds when I modify the spec.

In particular, the mock-scm backend at the moment seems to assume that I'm the upstream maintainer of a project I'm packaging and that I've put a spec for Fedora in my git repository.

I'd instead like to have an option to *just* put my spec in version control and refer to an upstream project's release tarballs or git repository, in exactly the same way I would do when packaging something for Fedora.

At the moment the only way to do this is to build SRPMs on my local machine and upload them, which is somewhat suboptimal, especially since I'd like to use version control to manage my specs regardless. Having to build the SRPM locally and upload it each time seems like a potentially unnecessary step.

A possible implementation mechanism could be to add an option to the existing mock-scm backend that runs spectool -g over your spec and uploads any downloaded files to dist-git.

Comment 1 Kevin Kofler 2017-05-09 16:31:01 UTC
+1, I have been asking for this for a while (even in person at DevConf Brno).

Comment 2 Kevin Kofler 2017-05-09 16:32:40 UTC
By the way, as a workaround, you can use the client-side scripts in the root of:
https://pagure.io/copr-dnfdragora/tree/master
but indeed, I would like the SRPM to be built on the Copr end directly from git instead.

Comment 3 clime 2017-07-07 19:58:08 UTC
Building .spec files is now possible by https://pagure.io/copr/copr/c/df9d0f994b643f9437b83ae8d7dfb3afd6b7938f?branch=master. You can use URL or upload methods to submit an updated .spec file.

Comment 4 Kevin Kofler 2017-07-09 18:23:50 UTC
That is not what was requested. In particular, that approach is not workable if the dist-git-like repo contains patches.

Comment 5 clime 2017-11-02 11:34:18 UTC
Thank you for the suggestion. 

With new SCM source type, this is now possible:

Docs: https://docs.pagure.org/copr.copr/user_documentation.html#scm
Blog: https://clime.github.io/2017/10/24/COPR-SCM.html