View this PageEdit this PageLock this PageLinks to this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Lunar modules

You want to track my Lunar modules? Just follow the directions below.

  1. Get bootstrapped with darcs (a really cool SCM tool), here is a single darcs binary for x86-linux and a little wrapper script, just unzip and put both in your PATH:

    http://darcs.krampe.se/darcs.zip

  2. As root, go to your /var/lib/lunar/moonbase/zlocal (no worries, nothing will be overwritten) and type "darcs init". Tada! zlocal is now a darcs repository and you can see a new directory called "_darcs". But having a directory called "_darcs" in zlocal screws up the lunar tools. So we move it to /root/ldarcs/_darcs:

    mkdir /root/ldarcs
    mv _darcs /root/ldarcs/

    And then we use the "ldarcs" wrapper script instead of "darcs" - it will symlink that directory during execution, and remove it afterwards. (You can also patch the lunar tools to ignore "_darcs", and I have such patches but this is simpler and less intrusive)

  3. Okidoki, getting down to business. One of the great things with darcs is that it is so simple to use and that there is no need for a central repository. So you can trivially "pull" other people's modules into your own zlocal! So now, to get my published modules, place yourself in your /var/lib/lunar/moonbase/zlocal and do this:

    ldarcs pull -a http://darcs.krampe.se/zlocal

    This should pull all (-a) my modules without asking. If you leave "-a" out then it should go into interactive mode and you can press ? to get advice. Just pick the modules/patches you like - or all.

    And whenever in the future you want to get any new updates from me, just rerun pull as above. Then darcs will figure out what new changes I have in my repo and you can cherrypick those you want to have (new modules or upgrades of old ones).

  4. You want to track multiple other zlocals? Well, just write a bash script somewhere that simply has a bunch of lines like the above. The nice thing is that darcs can pull from various places into your zlocal and keep track of it all.

  5. You want to publish your own zlocal modules? Just learn a bit more of darcs, put your own modules under darcs control and push them out on a webserver, darcs is very easy to use. Email me for more detailed instructions. :)

  6. Say you fixed some of my modules and want to feed the changes back to me. Do something like this:

    1. cd /var/lib/lunar/moonbase/zlocal
    2. ldarcs record (then select the changes - typically all - you want to group as a darcs patch, and give it a name)
    3. ldarcs send (select the patches to send to me by email)


And right, after getting the modules you can also find the two modules ghc and darcs and lin those if you want a properly compiled darcs, but beware, compiling ghc takes about 2 hours!

regards, Göran