Subject: [BUG?] git-daemon 2.49.0 in F40 no longer exports user directories

From: "Russell King (Oracle)" <[email-masked]>
Date: Fri, 25 Jul 2025 17:11:02 +0100

Hi,

While I've been away on holiday over the last three weeks, my co-admin
updated ZenIV to Fedora 40, and now I find that git-daemon no longer
exports my "public_git" directory. My attempts at debugging this have
failed - I tried adding strace to the git@.service but I get nothing.
This is a regression.

Having spent quite a while trying to get to the bottom of this and
failing, I'm reaching out for some help - especially given the
proximity of the kernel merge window opening this weekend.

The log indicates:

Jul 25 16:56:55 ZenIV git-daemon[4046439]: [4046439] Extended attribute "host": git.armlinux.org.uk
Jul 25 16:56:55 ZenIV git-daemon[4046439]: [4046439] Extended attribute "protocol": version=2
Jul 25 16:56:55 ZenIV git-daemon[4046439]: [4046439] Request upload-pack for '~rmk/linux-arm.git/'
Jul 25 16:56:55 ZenIV git-daemon[4046439]: [4046439] userpath <public_git>, request <~rmk/linux-arm.git/>, namlen 4, restlen 15, slash </linux-arm.git/>
Jul 25 16:56:55 ZenIV git-daemon[4046439]: [4046439] '~rmk/public_git/linux-arm.git': not in directory list

It seems to detect that it's a user path, and adds the "public_git"
--user-path to it, but it seems to fail to translate ~rmk into
/home/rmk.

/etc/gitconfig contains:

[safe]
        directory = /var/lib/git/git.armlinux.org.uk/*
        directory = /home/rmk/public_git/*

and /lib/systemd/system/git@.service contains:

[Unit]
Description=Git Repositories Server Daemon
Documentation=man:git-daemon(1)

[Service]
User=nobody
ExecStart=-/usr/libexec/git-core/git-daemon --base-path=/var/lib/git --export-all \
          --user-path=public_git --inetd --log-destination=stderr --verbose
StandardInput=socket
StandardError=journal

Any ideas what is necessary to fix it?

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!