Bug 200929

Summary: Implemented USE_SCMREPO: direct fetching of port source from SCM repository
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Feedback Timeout    
Severity: Affects Only Me CC: ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 198449    
Bug Blocks:    
Attachments:
Description Flags
patch none

Description Yuri Victorovich freebsd_committer freebsd_triage 2015-06-17 06:09:47 UTC
Created attachment 157825 [details]
patch

This has originally been in the other bug report:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198449

Now it is generalized and renamed into USE_SCMREPO.

As per Xin LI suggestion, I made it generic, allowing dufferent SCMs. Currently subversion and git are supported.

Pending implementation of another Xin LI suggestion to check mirror/cache site prior to SCM fetch.
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2015-06-17 08:01:36 UTC
Mmm, it seems it supports svn and git, so the first line of the comment should be amended.

${PORTNAME}-${PORTVERSION} should be changed into ${DISTNAME}.

"x${NO_CHECKSUM}" = "x" should be changed into -z "${NO_CHECKSUM}" 

${FIND} -exec should use {} +, not {} \;

Subversion has a --config-option config:miscellany:use-commit-times=yes that could be used so that all the touch'ing is restricted to git.

Then, git has git archive, which does generate a .tar.gz in a reproducible way, then the tar'ing could be restricted to the svn case, and the touch'ing removed.
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2015-06-17 11:14:52 UTC
Also, hum, it does not use the MASTER_SITE_BACKUP at all, which is not really nice.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2015-06-17 19:10:30 UTC
> git has git archive, which does generate a .tar.gz in a reproducible way

'git archive' doesn't seem to work with remote URL, it requires 'git clone' first. So for uniformity and simplicity it's better to just use the same command as for svn. Please note that subversion is also supposed to set the right times, but it has a bug that I reported to them. Better to not subject ourselves to the random bugs in rarely used commands. I believe, --config-option config:miscellany:use-commit-times=yes doesn't always work.
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2015-06-21 08:44:09 UTC
I don't really like that it doesn't respect MASTER_SITE_BACKUP or MASTER_SITE_OVERRIDE.  This means every user will try to hit the same scm repo (even if he doesn't have internet access).

Wouldn't it be better to add generic helpers to generate tarballs?  (grep show ports doing similar things .if defined(BOOTSTRAP) )
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2015-06-21 09:34:52 UTC
MASTER_SITE_BACKUP will be added, along with other things.

> grep show ports doing similar things .if defined(BOOTSTRAP)

Why are these BOOTSTRAP sections copy-pasted everywhere? Doesn't seem right.