Bug 1519409

Summary: Failed get source when build in copr
Product: [Community] Copr Reporter: Patsev Anton <patsev.anton>
Component: backendAssignee: clime
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: clime, praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-04 09:01:11 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 Patsev Anton 2017-11-30 17:20:42 UTC
Hello!
I try build minikube-rpm:
https://github.com/patsevanton/minikube-rpm
on Copr

When i build local then run spectool -g -R minikube.spec: minikube is work

When i build minikube.spec in copr then i cannot download complile binary minikube.
(Minikube is opensource project. I try, but i cannot build minikube because is go progect)

How correct get source when build in copr ?

github:
https://github.com/patsevanton/minikube-rpm
copr project
https://copr.fedorainfracloud.org/coprs/antonpatsev/minikube-rpm/


spec:
...
Source0: https://storage.googleapis.com/minikube/releases/latest/%{name}-linux-amd64
...
%{__install} -m 755 %{SOURCE0} %{buildroot}/%{_bindir}/%{name}
...

Comment 1 clime 2017-12-01 08:01:55 UTC
Hello,

the problem here is that COPR (rpkg more precisely) auto-creates tarball for you because there are non-ignored files present: LICENSE and build.sh and rpkg will pack those as Source0. If those files weren't present or were hidden, rpkg would do a correct thing and download the Source0 from the Internet.

You can pick make_srpm build method instead of rpkg and create .copr/Makefile in your project with the following content (haven't tested it, you might need a bit of tweaking of it).

srpm:
    dnf install -y rpmdevtools
    ./build.sh
    cp ~/rpmbuild/SRPMS/* $(outdir)/

This will use your build.sh script to generate the SRPM and you can keep your repository content as is.

Comment 2 clime 2017-12-04 09:01:11 UTC
Let me know through email (clime) or optionally in #fedora-buildsys channel at Freenode if it works for you.

Comment 3 clime 2017-12-04 09:49:41 UTC
Just a small note: I have updated https://pagure.io/rpkg-client to include LICENSE as an ignored file. It will take a bit of time till it gets into Fedora.
If you want more information about this topic, read here: https://github.com/clime/blog-tutorial-just-spec (or you can also read the whole story here: https://clime.github.io/2017/10/24/COPR-SCM.html).