Converting old fedora-git-commit-mail-hook users to gnome mail hook on hosted

Todd Zullinger tmz at pobox.com
Mon Mar 14 20:59:35 UTC 2011


I wrote:
> Jim Meyering mentioned in #fedora-admin today that pushing to repos
> which use the fedora-git-commit-mail-hook can produce unwanted output
>
> 15:40:23 <meyering> hi guys, I've pushed two batches of c-sets, and noticed what may be a trace of a bug in a git update hook (or maybe some other):
> 15:40:23 <meyering>     $ git push
> 15:40:23 <meyering>     ...
> 15:40:27 <meyering>     Total 13 (delta 10), reused 0 (delta 0)
> 15:40:30 <meyering>     remote: git: 'refs/heads/master' is not a git command. See 'git --help'.
> 15:40:33 <meyering>     To ssh://git.fedorahosted.org/git/iwhd.git
> 15:40:36 <meyering>        b57b085..25ef441  master -> master
> 15:40:44 <meyering> Note the "remote: git: ... is not a git command." diagnostic

It turns out that I unfairly slandered the fedora-git-commit-mail-hook
(though I still think we should move away from it).  But the real
problem in this case is the post-update hook.

We mount /srv/git with noexec, and then symlink the post-update hook
to /usr/bin/git-update-server-info.  This hook is responsible for
updating info needed for http cloning/fetching to work. Since git-1.6
or so, most of the git builtin commands are hardlinks to the main git
binary.  It seems that the code in git to determine the builtin
command to run does not work properly when called via a symlink as we
do on hosted.

I need to ask the git list if this is something that can (or should)
be fixed.  Until then, a suitable work-around is to symlink the
post-update hook to the default post-update hook rather than directly
to the git-update-server-info binary.

I've updated the check-perms script to catch and fix this.  As part of
that new check, git update-server-info runs in order to get the http
clone/fetch data updated.

I also made the mail-hooks check not run by default.  We can more
leisurely look at converting repos to the newer gnome hook as needed.
See git check-perms -h for usage.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have never let my schooling interfere with my education.
    -- Mark Twain (1835-1910)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20110314/b926bddc/attachment.bin 


More information about the infrastructure mailing list