[crux-devel] Proposed git->rsync script updates

Tilman Sauerbeck tilman at crux.nu
Fri Oct 3 11:36:40 UTC 2008


Hi all,
some months ago, I was frustrated with our git_to_httpup script.
That script is run every 5 minutes and exports our ports repositories'
contents to ~crux/git-to-rsync-working-copy directory structure.
Which looks like this:

git-to-rsync-working-copy
|---crux-2.4
    |---core
        |--- udev
        |--- rsync
        |--- ...
    |---opt
        |--- ...
|---crux-2.5
    |---core
        |--- ...
    |---opt
        |--- ...

It annoys me that we're exporting *everything* every 5 minutes.
I'd prefer if we exported only those repositories that changed, *when*
they change, i.e. when some commit is pushed to the repository.

This means we'd have to adjust the script that does the exporting.
I suggest to make use of git's post-update hook there. That hook would
run as the user who does the push, so the httpup area has to be writable
by that user. Long story cut short, here's the new directory hierarchy:

git-to-rsync-working-copy2
|---core (owned by core)
    |---2.4
        |--- udev
        |--- rsync
        |--- ...
    |---2.5
        |--- ...
|---opt (owned by opt)
    |---2.4
        |--- ...
    |---2.5
        |--- ...

Since we'd switch from "crux-2.4/core" style directories to "core/2.4"
or something, we'd have to adjust our *.rsync files. Also we'd need to
keep the old rsync area alive for users who are still running old CRUX
systems.

Advantages: o Updated ports are rsync-able after a very short time and not
              just after up to 5 minutes.
            o No more disk thrashing just because another 5 minutes went
              by even though there was no git activity.

Disadvantages: o We'd have to adjust the *.rsync files. Would be doable
                 with the CRUX release (2.5)
               o The branches that should be exported are currently set
                 in each separate post-update hook, so once a new CRUX
                 version is released, you need to touch
                 {core,opt,contrib,xorg,xfce}.git/hooks/post-update.
               o More?

Opinions? Should we do that switch? I've already written the necessary
shell code, it just needs to be put in some separate function that can
be sourced from the various hooks.

Regards,
Tilman

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.crux.nu/pipermail/crux-devel/attachments/20081003/6a9d30e4/attachment.asc>


More information about the crux-devel mailing list