Thread (5 messages) flat view 5 messages, 3 authors, 2025-07-27

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

From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2025-07-27 09:14:56

On Sun, Jul 27, 2025 at 02:45:42AM -0400, Jeff King wrote:
On Sat, Jul 26, 2025 at 09:53:27AM -0400, Todd Zullinger wrote:
quoted
I was curious, so I took Peff's recipe and gave it a try. 

    sudo dnf -y install git-daemon
    sudo systemctl enable --now git.socket
    mkdir ~/public_git
    git init --bare ~/public_git/repo.git
    git -C ~/public_git/repo.git --work-tree=. commit --allow-empty -m foo
    sudo git config --system --add safe.directory ~/public_git/\*
    git ls-remote git://localhost/~test/repo.git

And that fails as it does for Russell.  I suspected SELinux,
which is enabled by default on Fedora.  With luck, you have
not already ruled that out.
Interesting. That would explain why I didn't see the problem on my
Debian system.

I am still puzzled why Russell would see the message he does, though.
From my read of the code, seeing "not in directory list" but not seeing
"...does not appear to be a git repository" implies that enter_repo()
succeeds, but ok_paths is non-empty and forbids it.
Yes, I had an override in systemd that I'd forgotten about to work
around a previous issue (because the previous version we had on the
machine required the paths on the end of the git-daemon command line.)

I wonder if there was a bug - --export-all broke, and then required the
directories to be listed, and now it's been "fixed" and now the listed
directories become a list of those to exclude?

The override.conf had something like:

ExecStart=-/usr/libexec/git-core/git-daemon --export-all \
  --user-path=public_git --inetd --log-destination=stderr --verbose \
    --interpolated-path='/var/lib/git/%%H%%D' \
    /var/lib/git/git.armlinux.org.uk \
    /home/rmk/public_git

I can't remember exactly now as I've deleted the last two paths, and
added --base-path=/var/lib/git - and now it's working.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help