Bug 1519409 - Failed get source when build in copr
Summary: Failed get source when build in copr
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Copr
Classification: Community
Component: backend
Version: unspecified
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: clime
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-30 17:20 UTC by Patsev Anton
Modified: 2017-12-04 09:49 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-04 09:01:11 UTC
Embargoed:


Attachments (Terms of Use)

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).


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