mirror of
https://github.com/hanzoai/forge.git
synced 2026-10-30 15:00:39 +00:00
The binary rename to gitd was already done in the Makefile, the Go source (delegateHookName), and the docker wrapper. Two leaks were left in the parts a user or operator actually sees. /app/gitd/gitd -> /app/git/gitd The directory is the product and the binary is the daemon; the old path stuttered. Changed in Dockerfile, Dockerfile.rootless, and both wrapper scripts, which is every place the path is written. In-image only, so no migration: nothing under a volume moves. "AUTO GENERATED BY GITEA" -> "AUTO GENERATED BY HANZO GIT" This string is not a source comment. It is written into the hook scripts of every repository on disk, so it was the most widely deployed gitea mention we had — one copy per repo, visible to anyone who opened a hook. Seven occurrences. Existing hooks keep the old text until they are regenerated. That regeneration is already wired safely: SyncRepositoryHooks re-runs over every repository on the first boot after setting.AppPath moves, before the web listener opens, and legacyDelegateHookNames removes the delegates the old name left behind. The comment in modules/gitrepo/hooks.go spells out why renaming the delegate is only safe in a release that also moves AppPath — that invariant is untouched here. NOT changed, deliberately: /data/gitea (root image) and /var/lib/gitea, /etc/gitea (rootless). Those are volume paths, not image paths. Renaming them relocates live data and needs a migration step, which is its own change with its own rollback. They are the last gitea leak and they are a data move, not a rename.
19 lines
890 B
Bash
19 lines
890 B
Bash
#!/bin/bash
|
|
|
|
##############################################################
|
|
# This script sets defaults for gitd to run in the container #
|
|
##############################################################
|
|
|
|
# It is installed as gitd in /usr/local/bin; the real binary lives in /app/git.
|
|
# `exec -a "$0"` makes the daemon see /usr/local/bin/gitd as its argv[0], which
|
|
# is what setting.AppPath resolves to — and AppPath is written into every
|
|
# repository's hooks/<hook>.d/gitd delegate. Moving this path is therefore a
|
|
# migration, not a rename: the server rewrites every repo's hooks on the first
|
|
# boot after it changes (routers.syncAppConfForGit) before the listener opens.
|
|
GITD="/app/git/gitd"
|
|
WORK_DIR="/data/gitea"
|
|
CUSTOM_PATH="/data/gitea"
|
|
|
|
# Provide docker defaults
|
|
GIT_WORK_DIR="${GIT_WORK_DIR:-$WORK_DIR}" GIT_CUSTOM="${GIT_CUSTOM:-$CUSTOM_PATH}" exec -a "$0" "$GITD" $CONF_ARG "$@"
|