[Nix-dev] What about official git mirrors? Proposal

Marc Weber marco-oweber at gmx.de
Tue Jun 29 17:11:41 CEST 2010


Hi list,

Because my goals may differ slightly from those of others I'm looking
for an easy way to continue sharing my work while following Nix upstream
changes. Because I already know git very well I'd like to use git doing
so.

I CC'd Yury G Kudryashov because he has been maintaining the existing
git mirror on github (which only mirrored nixos/master and
nixpkgs/{trunk,stdenv-updates} in the past)

I CC'd Eelco Dolstra because I want him to offer an SSH account so that
we can maintain this mirror as (official?) mirror and provide download
links which are hosted on www.nixos.org. If he doesn't I'll do so
myself or ask Yury G Kudryashov to do so. I didn't put my own repos
online because I don't want to split community. That's why I'm striving
for a somewhat official solution.

Note: I'm willing to discuss details. So consider this being a draft
which does'nt mean that I'm going to wait for weeks..


What does it need to create a perfect git mirror?
==============================================================

  - it should be up to date (cron-job)

  - it should be accessible by everyone (-> eg gitorious)

    Benefits: you can even comment commits online easily.

  - In order to commit to svn you have to use your own git svn clone.
    The clone you use for comitting should be the same as the one you
    fetched updates from so that you can share (more) history.
    So I'd like to make the repositories which are used to sync the
    mirror public (readonly)

  - ... (?)


Gitorious is very good match to set this up because:

  - You setup a project which can have multiple repositories (one for
    nix, nixos, ..)

  - You can create a group to administrate the project
    which allows all group members to add new repositories
    
    You can create another group for comitters only.

github could be an alternative. However gitorious is open source.

The only drawback about gitorious I found is that the landing page
doesn't make it obvious that you can access repositories and commits
without logging in.


Technical details about how to mirror a subversion repository:
==============================================================

Clone a repo:

  git svn clone --stdlayout $URL

local branches (by default master = trunk) only will be pushed.
However you can tell git to push the remote branches instead of local
branches by adding to your .git/config:

    [remote "gitorious"]
      push = refs/remotes/*:refs/heads/*

So all which is left to be done for the cron-job is:

  git svn fetch && git push gitorious && create-tar-for-users-who-want-to-commit-using-svn

SVN tags are represented by git branches by default.

As alternative to those .tar.gz files one could setup a rsync readonly
mirror.

I know that I can't expect anybody to support this idea. Nevertheless I
have to try.

Let me know how you're thinking about this.

Happy coding
Marc Weber



More information about the nix-dev mailing list