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
I updated the check-perms script to look for repos using the old hook, but before I run it with the --fix option to convert them to the newer hooks we borrowed from the folks at gnome.org, it seems wise to check whether anyone has reasons to avoid doing so or suggestions on how to make sure this doesn't annoy users of fedorahosted.org.
The gnome hook is what we use for the infrastructure puppet repo as well as all of the git repos for packages. The formatting should be fairly similar to what the old hook produced, and it does include similar X- headers for folks using those to filter mail.
Here's the list of repos which use the old mail hook:
[tmz@hosted1 ~ (master)]$ time ~/bin/git-check-perms /git/389/admin-console.git: uses old mail hook /git/389/admin.git: uses old mail hook /git/389/adminutil.git: uses old mail hook /git/389/console.git: uses old mail hook /git/389/ds-console.git: uses old mail hook /git/389/ds.git: uses old mail hook /git/389/dsgw.git: uses old mail hook /git/389/dsmlgw.git: uses old mail hook /git/389/winsync.git: uses old mail hook /git/CloudFS.git: uses old mail hook /git/OpenAPC.git: uses old mail hook /git/TinyEarth.git: uses old mail hook /git/anaconda-help.git: uses old mail hook /git/anaconda-images.git: uses old mail hook /git/anaconda.git: uses old mail hook /git/bharati.git: uses old mail hook /git/bluecurve-classic-metacity-theme: uses old mail hook /git/bluecurve-gdm-theme: uses old mail hook /git/bluecurve-gnome-theme: uses old mail hook /git/bluecurve-gtk-themes: uses old mail hook /git/bluecurve-icon-theme: uses old mail hook /git/bluecurve-kde-theme: uses old mail hook /git/bluecurve-kdm-theme: uses old mail hook /git/bluecurve-kwin-theme: uses old mail hook /git/bluecurve-metacity-theme: uses old mail hook /git/bluecurve-qt-engine: uses old mail hook /git/bluecurve-xmms-skin: uses old mail hook /git/bodhi.git: uses old mail hook /git/booty.git: uses old mail hook /git/cas.git: uses old mail hook /git/certmaster.git: uses old mail hook /git/cloud-kickstarts.git: uses old mail hook /git/comps.git: uses old mail hook /git/courses.git: uses old mail hook /git/d-feet.git: uses old mail hook /git/ding-libs.git: uses old mail hook /git/docbook-utils.git: uses old mail hook /git/docs/about-fedora.git: uses old mail hook /git/docs/elections-guide.git: uses old mail hook /git/docs/fedora-doc-utils.git: uses old mail hook /git/docs/homepage.git: uses old mail hook /git/docs/install-guide.git: uses old mail hook /git/docs/readme-burning-isos.git: uses old mail hook /git/docs/readme.git: uses old mail hook /git/docs/storage-administration-guide.git: uses old mail hook /git/docs/systemtap-beginners-guide.git: uses old mail hook /git/dorrie.git: uses old mail hook /git/elections.git: uses old mail hook /git/fas.git: uses old mail hook /git/fedora-gnome-theme: uses old mail hook /git/fedora-icon-theme: uses old mail hook /git/fedora-infrastructure.git: uses old mail hook /git/fedora-kontributor.git: uses old mail hook /git/fedora-packager.git: uses old mail hook /git/fedora-project-schedule.git: uses old mail hook /git/fedora-screensaver-theme: uses old mail hook /git/fedora-security.git: uses old mail hook /git/fedora-tour.git: uses old mail hook /git/fedora-trans-es.git: uses old mail hook /git/fedora-web.old.git: uses old mail hook /git/fedorabubbles-gdm-theme: uses old mail hook /git/fedoradna-gdm-theme: uses old mail hook /git/fedoradna-kdm-theme: uses old mail hook /git/fedoraflyinghigh-gdm-theme: uses old mail hook /git/fedoraflyinghigh-kdm-theme: uses old mail hook /git/fedorainfinity-gdm-theme: uses old mail hook /git/fedorainfinity-screensaver-theme: uses old mail hook /git/firstboot.git: uses old mail hook /git/fontpackages.git: uses old mail hook /git/freeipa.git: uses old mail hook /git/func.git: uses old mail hook /git/gnome-applet-vm.git: uses old mail hook /git/grid/carod.git: uses old mail hook /git/grid/caroniad.git: uses old mail hook /git/grid/configuration-tools.git: uses old mail hook /git/grid/job_hooks.git: uses old mail hook /git/grid/spqr.git: uses old mail hook /git/grid/wallaby.git: uses old mail hook /git/grid/win32-packaging.git: uses old mail hook /git/grubby.git: uses old mail hook /git/indic-typing-booster.git: uses old mail hook /git/isomd5sum.git: uses old mail hook /git/koji: uses old mail hook /git/libnmserver.git: uses old mail hook /git/livecd: uses old mail hook /git/liveusb-creator.git: uses old mail hook /git/mkinitrd: uses old mail hook /git/moksha.git: uses old mail hook /git/music-creation.git: uses old mail hook /git/newt-syrup.git: uses old mail hook /git/ogrechess.git: uses old mail hook /git/openussd.git: uses old mail hook /git/osutil.git: uses old mail hook /git/piranha.git: uses old mail hook /git/pirut.git: uses old mail hook /git/pyblock.git: uses old mail hook /git/pyjigdo.git: uses old mail hook /git/pykickstart.git: uses old mail hook /git/redhat-rpm-config: uses old mail hook /git/reflector.git: uses old mail hook /git/revisor: uses old mail hook /git/revista-fedora-latam.git: uses old mail hook /git/rhpl.git: uses old mail hook /git/rhq/rhq-config.git: uses old mail hook /git/rhq/rhq-manage-jboss.git: uses old mail hook /git/rhq/rhq-manage-os.git: uses old mail hook /git/rhq/rhq.git: uses old mail hook /git/sanlock.git: uses old mail hook /git/secstate.git: uses old mail hook /git/simon.git: uses old mail hook /git/smolt.git: uses old mail hook /git/snap.git: uses old mail hook /git/spacewalk.git: uses old mail hook /git/sssd.git: uses old mail hook /git/symbolic.git: uses old mail hook /git/system-config-kickstart.git: uses old mail hook /git/timpus-events.git: uses old mail hook /git/trustedcomputing.git: uses old mail hook /git/utrrs.git: uses old mail hook /git/virt_web.git: uses old mail hook /git/webzash.git: uses old mail hook /git/wikirename.git: uses old mail hook /git/xo.git: uses old mail hook 123 problems remain unfixed
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.
infrastructure@lists.fedoraproject.org