Bug 200929 - Implemented USE_SCMREPO: direct fetching of port source from SCM repository
Summary: Implemented USE_SCMREPO: direct fetching of port source from SCM repository
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on: 198449
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-17 06:09 UTC by Yuri Victorovich
Modified: 2016-04-13 11:32 UTC (History)
1 user (show)

See Also:


Attachments
patch (2.56 KB, patch)
2015-06-17 06:09 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 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 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 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 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 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 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.