Persistent copy of a [git] repository

Rainer Müller raimue at
Wed Nov 4 05:38:19 PST 2015

On 2015-11-03 17:12, Mojca Miklavec wrote:
> Reposting the question ... I would be grateful for some feedback (and
> someone who could help me move the code to the core or some PortGroup
> in case that the approach sounds reasonable enough).

I think this would work, although I have not tested it. I would really
prefer to have such a functionality in base instead of implementing it
separately for every port. Even better if we could use the existing
fetch functionality instead of executing binaries with the system proc

The main target audience for this feature in this state would be port
developers. This prevents downloading each time the work directory is
cleared, which happens often during port development. However, end-users
have additional needs. They usually download the source code only once,
when installing the port. They may have restricted internet access when
behind a strict firewall or HTTP-only proxy when fetching such ports.
Also, VCS fetch.types currently can not take advantage of distfiles mirrors.

I think we could solve this for both developers and end-users in the
following way:

1) We already run a regular 'port mirror' on a server to fetch distfiles
to our mirror infrastructure. This should be extended to include VCS
fetch.types, for which this prepares a tarball and optionally, if run on
our infrastructure, signs it with a key.

2) On the client side, 'port fetch' for VCS fetch.types would try to
   - use a local tarball
   - download a tarball with a valid signature from our mirrors
   - call the functionality of 'port mirror' to prepare a tarball

3) With 1) and 2) in place, a port developer would write the Portfile
and an explicit or implicit 'port mirror' generates the tarball once,
which is then used for subsequent builds of the port.

Effectively, my proposal is to move the whole fetching from VCS such as
git/svn/hg/bzr into the mirror phase, which is called if necessary.


More information about the macports-dev mailing list