From: cel@kernel.org
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v1 2/4] linux-mirror: Ensure git-daemon runs as the Ansible user
Date: Mon, 10 Mar 2025 14:32:06 -0400 [thread overview]
Message-ID: <20250310183208.999430-3-cel@kernel.org> (raw)
In-Reply-To: <20250310183208.999430-1-cel@kernel.org>
From: Chuck Lever <chuck.lever@oracle.com>
In my initial installation, git-daemon emits the "safe.directory"
warning and exits; remote attempts to access the repos there fail.
git-daemon needs to run as the same user that owns the repos to
avoid this warning. linux-mirror doesn't currently have a consistent
"user" for this: the instructions say "create a /mirror directory"
but then later tasks in linux-mirror try to create /mirror owned
by root.
This patch doesn't address that larger problem, but it simply
adds a setting under the daemon's [Service] stanza to make it
run as the user that is setting up the mirror.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
playbooks/roles/linux-mirror/templates/git-daemon@.service.j2 | 1 +
1 file changed, 1 insertion(+)
diff --git a/playbooks/roles/linux-mirror/templates/git-daemon@.service.j2 b/playbooks/roles/linux-mirror/templates/git-daemon@.service.j2
index a8bf669608bc..06c08d989545 100644
--- a/playbooks/roles/linux-mirror/templates/git-daemon@.service.j2
+++ b/playbooks/roles/linux-mirror/templates/git-daemon@.service.j2
@@ -7,3 +7,4 @@ ExecStart=-/usr/bin/git daemon --verbose --init-timeout=10 --timeout=5 --inetd -
StandardInput=socket
StandardOutput=inherit
StandardError=journal
+User={{ ansible_user_id }}
--
2.48.1
next prev parent reply other threads:[~2025-03-10 18:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 18:32 [PATCH v1 0/4] Fixes for git mirroring on Fedora cel
2025-03-10 18:32 ` [PATCH v1 1/4] linux-mirror: Fix installation on Fedora systems cel
2025-03-10 18:32 ` cel [this message]
2025-03-10 18:32 ` [PATCH v1 3/4] mirror: Reduce frequency of retrieving results archive cel
2025-03-11 3:39 ` Luis Chamberlain
2025-03-11 13:38 ` Chuck Lever
2025-03-11 18:01 ` Chuck Lever
2025-03-12 5:12 ` Luis Chamberlain
2025-03-12 5:11 ` Luis Chamberlain
2025-03-10 18:32 ` [PATCH v1 4/4] linux-mirror: Add a mirror for linux-stable-rc cel
2025-03-11 3:40 ` [PATCH v1 0/4] Fixes for git mirroring on Fedora Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250310183208.999430-3-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.