Bug 1376418

Summary: Import source using mock SCM will fail due invalid option through http urls
Product: [Community] Copr Reporter: Helio Chissini de Castro <helio>
Component: backendAssignee: clime
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: clime
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-15 12: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:

Description Helio Chissini de Castro 2016-09-15 11:52:13 UTC
Current mock SCm buitld option can't use http non secure urls due --depth option add in the clone url

This is an example of generated url:

[helio@trex pkg]$ git clone --branch master --depth 1 http://copr-dist-git.fedorainfracloud.org/cgit/@kdesig/qt5-next/qt5.git qt5
Cloning into 'qt5'...
fatal: dumb http transport does not support --depth

To fix, there's two possible solutions, just remove the depth option but causing a problem if an unnatended url is introduced to clone a huge tree, or explicitly advise in the page that only secure ( https/ssh ) repositories are accepted.

Comment 1 clime 2016-09-15 12:01:11 UTC
Actually, if you run:

git clone --branch master --depth 1 http://copr-dist-git.fedorainfracloud.org/git/@kdesig/qt5-next/qt5.git qt5

(There is 'git' instead of 'cgit' in the url)

then `--depth 1` works.

On that url, git-http-backend is used, not the cgit binary.

Clone urls in copr-dist-git projects are now reflecting that correctly.

Thanks for the report!