[Exherbo-dev] git-annex for distfiles

Calvin Walton calvin.walton at kepstin.ca
Wed Mar 6 20:13:42 UTC 2013

On Wed, 2013-03-06 at 20:35 +0100, Kim Højgaard-Hansen wrote:
> On Wed, Feb 20, 2013 at 6:17 PM, Ali Polatel <alip at exherbo.org> wrote:
> > git-annex is a way to manage files with git without checking their
> > contents into git¹. There have been some chit-chat about using git-annex
> > for distfiles management on IRC but we never really discussed it
> > thoroughly.
> >
> > git-annex may provide several advantages to our distfiles management.
> > One of the main advantages is integrity checking of files managed by
> > git-annex². The users can use several remotes which make it a practical
> > way to handle mirrors for them³.
> >
> >  As much as I would like integrity checking, what are the other
> advantages? I think this involves a fair amount of work, and integrity
> could be solved by other means. Is the integrity checking provided by
> git-annex easier in terms of exheres dev. workflow? That has been the main
> argument against integrity checking until now.

Adding a distfile in a 'git-annex' workflow is as simple as doing:

git-annex addurl 'http://example.com/dist/somepackage.tar.xz' \
    --file somepackage.tar.xz

This command will download the file, and the SHA256 is automatically
calculated and recorded in the git index to be committed alongside your
other changes. When the file is no longer referenced by an exheres, you
can just use 'git rm somepackage.tar.xz'

An interesting question is where the distfiles should appear in the git
tree. In my experiments, I've been
using .../packages/<category>/<package>/files/<package>.tar.xz or so.

Calvin Walton <calvin.walton at kepstin.ca>

More information about the Exherbo-dev mailing list