GSOC Application

Rainer Müller raimue at macports.org
Thu Mar 30 19:32:51 UTC 2017


Hello,

On 03/30/2017 04:04 PM, Chinmaya Bhat wrote:
> I am Chinmaya, a third-year Computer Science student at BMSIT, Bangalore. I am
> new to MacPorts. I can code in C and Python and am going through the Tcl
> tutorial on the GSOC wiki. 
> I have installed MacPorts and am reading the documentation provided.

Thank you for your interest in MacPorts! That already seems like a good start.

> I'm interested in implementing the task "Improve fetching from version control"
> and I have read through the trac ticket <https://trac.macports.org/ticket/16373>
> provided with it.

As noted in the Trac ticket, I implemented parts of this last year during the
MacPorts meeting together with Mojca.

This can be found on the vcs-fetch branch of macports-base:
https://github.com/macports/macports-base/compare/vcs-fetch

The implementation already works for git and creates reproducible tarballs with
its internal 'git archive' command. However, nothing has yet been done for other
version control systems. I think it would be preferable that all fetch.types for
VCS work the same, therefore I did not merge it yet.

The idea is that for the fetch.types for VCS, port automatically generates a
tarball in the fetch phase. It also sets the distfiles option such that
subsequent checksum and extract phases work like for every other port. Such a
Portfile will then always require checksums. Therefore, the generated tarball
has to be reproducible, which means the process in the fetch phase will have to
always generate the exact same byte-to-byte identical tarball.

> However, I dont understand how to implement it. 
> Where are the distfiles and work dir located? 

Ports that use a fetch.type for a VCS do not have any explicit distfiles, but
the filename of the tarball is implicitly taken from its name and VCS
tag/revision. The work dir is created when building a port locally.

Read through the explanations of the different phases to understand how a port
is built:
https://guide.macports.org/#reference.phases

> Do I need to edit the Portfile of every application individually to check for
> the latest working copy?

The Portfiles will need additional checksums for the generated tarballs, but
everything else should still work as it is now.

> Also, do I need to know cvs/svn/hg/bzr ? I know git and nothing about the rest.

Knowledge about these tools can be acquired during the task. There is no
requirement of knowing them before starting with this. Mainly you will only have
to know about how to clone or checkout a working copy, for which the commands
are already in the base code.

As a second step in this project, we will also want to provide these generated
VCS tarballs on our mirrors. The port command should first try to fetch a
generated tarball from our mirrors before attempting to generate a tarball
locally (reducing dependencies, avoiding firewalls for git:// protocol, etc).

Rainer


More information about the macports-dev mailing list