Gitfed
bastien-mrq/gitfed/ Commits/ 34a63f0

Rename the module to a real path; serve go-import for public repos

module gitfed -> module git.neuromancer.ovh/bastien-mrq/gitfed. Purely mechanical everywhere else (import paths, the -X ldflags in deploy/docker/Dockerfile, version.go's doc comment) — no behavior change on its own. What it enables: gitfed-web now answers the "?go-get=1" discovery request Go's tooling makes when resolving an unfamiliar module path, for any public repo hosted here (handlers_git_http.go's serveGoImport). Combined with the real module path, this makes `go install <domain>/<owner>/<repo>/cmd/x@ref` work directly against any public gitfed repo — no git clone needed first. Same visibility rule as the existing anonymous HTTPS clone: private/nonexistent repos 404 identically. Concretely, gitfed-renew-cert (previously: clone the whole repo just to build one client tool) is now: go install git.neuromancer.ovh/bastien-mrq/gitfed/cmd/gitfed-renew-cert@main No version tags exist yet, hence @main rather than @latest.

bastien-mrq 2026-07-29 12:09 commit 34a63f01a84503aea6290774493d9522e762f32e parent c78a9644da963c87f79c8220f47adf43f2a9f522
48 files changed +127 −99
M cmd/gitfed-server/main.go +8 −8
M cmd/gitfed-tui/actions.go +1 −1
M cmd/gitfed-tui/items.go +1 −1
M cmd/gitfed-tui/main.go +2 −2
M cmd/gitfed-tui/model.go +1 −1
M cmd/gitfed-web/handlers_admin.go +2 −2
M cmd/gitfed-web/handlers_admin_audit.go +2 −2
M cmd/gitfed-web/handlers_admin_trust.go +2 −2
M cmd/gitfed-web/handlers_admin_users.go +2 −2
M cmd/gitfed-web/handlers_auth.go +1 −1
M cmd/gitfed-web/handlers_changelog.go +2 −2
M cmd/gitfed-web/handlers_dashboard.go +2 −2
M cmd/gitfed-web/handlers_git_http.go +29 −1
M cmd/gitfed-web/handlers_home.go +2 −2
M cmd/gitfed-web/handlers_landing.go +1 −1
M cmd/gitfed-web/handlers_merge_requests.go +3 −3
M cmd/gitfed-web/handlers_notifications.go +2 −2
M cmd/gitfed-web/handlers_profile.go +2 −2
M cmd/gitfed-web/handlers_repo.go +3 −3
M cmd/gitfed-web/handlers_repo_commits.go +3 −3
M cmd/gitfed-web/handlers_search.go +2 −2
M cmd/gitfed-web/handlers_security.go +1 −1
M cmd/gitfed-web/handlers_settings.go +1 −1
M cmd/gitfed-web/lang.go +1 −1
M cmd/gitfed-web/main.go +3 −3
M cmd/gitfed-web/render.go +2 −2
M cmd/gitfed-web/session.go +1 −1
M deploy/docker/Dockerfile +1 −1
M go.mod +1 −1
M internal/acl/acl.go +1 −1
M internal/acl/acl_test.go +1 −1
M internal/admin/admin.go +5 −5
M internal/admin/admin_test.go +2 −2
M internal/admin/revocation_test.go +1 −1
M internal/adminrpc/adminrpc_test.go +4 −4
M internal/adminrpc/client.go +3 −3
M internal/adminrpc/protocol.go +2 −2
M internal/adminrpc/server.go +1 −1
M internal/config/config.go +1 −1
M internal/federation/notify.go +2 −2
M internal/federation/notify_test.go +1 −1
M internal/federation/resolver.go +1 −1
M internal/federation/resolver_test.go +1 −1
M internal/federation/wellknown.go +2 −2
M internal/opsconnect/connect.go +6 −6
M internal/ssh/server.go +4 −4
M internal/ssh/session.go +4 −4
M internal/version/version.go +1 −1
cmd/gitfed-server/main.go
diff --git a/cmd/gitfed-server/main.go b/cmd/gitfed-server/main.go index 32dd1d8..4902a68 100644 --- a/cmd/gitfed-server/main.go +++ b/cmd/gitfed-server/main.go @@ -11,14 +11,14 @@ import ( "os" "time" - "gitfed/internal/admin" - "gitfed/internal/adminrpc" - "gitfed/internal/ca" - "gitfed/internal/config" - "gitfed/internal/federation" - "gitfed/internal/ssh" - "gitfed/internal/store" - "gitfed/internal/version" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/admin" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/adminrpc" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/config" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/federation" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ssh" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/version" ) func main() {
cmd/gitfed-tui/actions.go
diff --git a/cmd/gitfed-tui/actions.go b/cmd/gitfed-tui/actions.go index a074a9c..3ddb63c 100644 --- a/cmd/gitfed-tui/actions.go +++ b/cmd/gitfed-tui/actions.go @@ -7,7 +7,7 @@ import ( "github.com/charmbracelet/bubbles/list" tea "github.com/charmbracelet/bubbletea" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) func (m *model) refreshUsers() {
cmd/gitfed-tui/items.go
diff --git a/cmd/gitfed-tui/items.go b/cmd/gitfed-tui/items.go index 0803b56..0b40be1 100644 --- a/cmd/gitfed-tui/items.go +++ b/cmd/gitfed-tui/items.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) type userItem struct{ u store.User }
cmd/gitfed-tui/main.go
diff --git a/cmd/gitfed-tui/main.go b/cmd/gitfed-tui/main.go index 895627f..93f01c1 100644 --- a/cmd/gitfed-tui/main.go +++ b/cmd/gitfed-tui/main.go @@ -15,8 +15,8 @@ import ( tea "github.com/charmbracelet/bubbletea" - "gitfed/internal/config" - "gitfed/internal/opsconnect" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/config" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/opsconnect" ) func main() {
cmd/gitfed-tui/model.go
diff --git a/cmd/gitfed-tui/model.go b/cmd/gitfed-tui/model.go index ec534f6..d55a4bf 100644 --- a/cmd/gitfed-tui/model.go +++ b/cmd/gitfed-tui/model.go @@ -5,7 +5,7 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" - "gitfed/internal/admin" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/admin" ) type view int
cmd/gitfed-web/handlers_admin.go
diff --git a/cmd/gitfed-web/handlers_admin.go b/cmd/gitfed-web/handlers_admin.go index aa8d25f..40f223e 100644 --- a/cmd/gitfed-web/handlers_admin.go +++ b/cmd/gitfed-web/handlers_admin.go @@ -5,8 +5,8 @@ import ( "html/template" "net/http" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var adminIndexTpl = newTpl("admin-index", `
cmd/gitfed-web/handlers_admin_audit.go
diff --git a/cmd/gitfed-web/handlers_admin_audit.go b/cmd/gitfed-web/handlers_admin_audit.go index 641f26c..fccb58a 100644 --- a/cmd/gitfed-web/handlers_admin_audit.go +++ b/cmd/gitfed-web/handlers_admin_audit.go @@ -5,8 +5,8 @@ import ( "html/template" "net/http" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var adminAuditTpl = newTpl("admin-audit", `
cmd/gitfed-web/handlers_admin_trust.go
diff --git a/cmd/gitfed-web/handlers_admin_trust.go b/cmd/gitfed-web/handlers_admin_trust.go index 6de956d..b49e192 100644 --- a/cmd/gitfed-web/handlers_admin_trust.go +++ b/cmd/gitfed-web/handlers_admin_trust.go @@ -5,8 +5,8 @@ import ( "html/template" "net/http" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var adminTrustTpl = newTpl("admin-trust", `
cmd/gitfed-web/handlers_admin_users.go
diff --git a/cmd/gitfed-web/handlers_admin_users.go b/cmd/gitfed-web/handlers_admin_users.go index fb184ea..7aa3f3b 100644 --- a/cmd/gitfed-web/handlers_admin_users.go +++ b/cmd/gitfed-web/handlers_admin_users.go @@ -5,8 +5,8 @@ import ( "html/template" "net/http" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var adminUsersTpl = newTpl("admin-users", `
cmd/gitfed-web/handlers_auth.go
diff --git a/cmd/gitfed-web/handlers_auth.go b/cmd/gitfed-web/handlers_auth.go index 1c5c77f..85a4282 100644 --- a/cmd/gitfed-web/handlers_auth.go +++ b/cmd/gitfed-web/handlers_auth.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" ) var loginTpl = newTpl("login", `
cmd/gitfed-web/handlers_changelog.go
diff --git a/cmd/gitfed-web/handlers_changelog.go b/cmd/gitfed-web/handlers_changelog.go index 56e6ffe..f4c9e6e 100644 --- a/cmd/gitfed-web/handlers_changelog.go +++ b/cmd/gitfed-web/handlers_changelog.go @@ -4,8 +4,8 @@ import ( "html/template" "net/http" - "gitfed" - "gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" ) func (s *server) handleChangelog(w http.ResponseWriter, r *http.Request) {
cmd/gitfed-web/handlers_dashboard.go
diff --git a/cmd/gitfed-web/handlers_dashboard.go b/cmd/gitfed-web/handlers_dashboard.go index 38fb543..a1d4c20 100644 --- a/cmd/gitfed-web/handlers_dashboard.go +++ b/cmd/gitfed-web/handlers_dashboard.go @@ -7,8 +7,8 @@ import ( "net/http" "strings" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var dashboardTpl = newTpl("dashboard", `
cmd/gitfed-web/handlers_git_http.go
diff --git a/cmd/gitfed-web/handlers_git_http.go b/cmd/gitfed-web/handlers_git_http.go index 64dce79..78900ba 100644 --- a/cmd/gitfed-web/handlers_git_http.go +++ b/cmd/gitfed-web/handlers_git_http.go @@ -4,6 +4,7 @@ import ( "bytes" "compress/gzip" "fmt" + "html/template" "io" "log" "net/http" @@ -15,7 +16,9 @@ import ( // This file implements just enough of git's "smart HTTP" transport // (https://git-scm.com/docs/http-protocol) to let anyone run // `git clone https://<domain>/<owner>/<repo>.git` against a public repo -// with no account, no SSH key, nothing. It is deliberately narrow: +// with no account, no SSH key, nothing — plus the small "?go-get=1" +// carve-out (serveGoImport, below) that lets `go install` resolve a public +// repo hosted here the same way. It is deliberately narrow: // // - Read-only. Only git-upload-pack (clone/fetch) is served; there is no // git-receive-pack over HTTP, ever. Pushing still only works over SSH, @@ -38,6 +41,10 @@ import ( // the web browser are unaffected either way. func (s *server) handleGitInfoRefs(w http.ResponseWriter, r *http.Request) { + if r.URL.Query().Get("go-get") == "1" { + s.serveGoImport(w, r) + return + } repoName, ok := gitHTTPRepoName(r.PathValue("gitpath"), "/info/refs") if !ok { http.NotFound(w, r) @@ -76,6 +83,27 @@ func (s *server) handleGitInfoRefs(w http.ResponseWriter, r *http.Request) { } } +// serveGoImport answers the discovery request Go's own tooling makes when +// resolving a module path it doesn't otherwise recognize — a plain GET +// with "?go-get=1" appended, expecting an HTML page with a go-import meta +// tag back (see https://go.dev/ref/mod#vcs-find). This is what makes +// `go install <domain>/<owner>/<repo>/cmd/x@version` work directly against +// any public repo hosted here, without a manual git clone first. Same +// visibility rule as the anonymous HTTPS clone above: a private (or +// nonexistent) repo 404s identically, never confirming which. +func (s *server) serveGoImport(w http.ResponseWriter, r *http.Request) { + repoName := strings.Trim(r.PathValue("gitpath"), "/") + repo, err := s.ops.GetRepo(repoName) + if err != nil || !repo.Public { + http.NotFound(w, r) + return + } + root := template.HTMLEscapeString(s.domain + "/" + repoName) + repoURL := template.HTMLEscapeString("https://" + s.domain + "/" + repoName + ".git") + w.Header().Set("Content-Type", "text/html; charset=utf-8") + fmt.Fprintf(w, `<!DOCTYPE html><html><head><meta name="go-import" content="%s git %s"></head></html>`, root, repoURL) +} + func (s *server) handleGitUploadPack(w http.ResponseWriter, r *http.Request) { repoName, ok := gitHTTPRepoName(r.PathValue("gitpath"), "/git-upload-pack") if !ok {
cmd/gitfed-web/handlers_home.go
diff --git a/cmd/gitfed-web/handlers_home.go b/cmd/gitfed-web/handlers_home.go index e0b600a..88fcdd7 100644 --- a/cmd/gitfed-web/handlers_home.go +++ b/cmd/gitfed-web/handlers_home.go @@ -7,8 +7,8 @@ import ( "sort" "strings" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var exploreTpl = newTpl("explore", `
cmd/gitfed-web/handlers_landing.go
diff --git a/cmd/gitfed-web/handlers_landing.go b/cmd/gitfed-web/handlers_landing.go index 0ede088..017dc35 100644 --- a/cmd/gitfed-web/handlers_landing.go +++ b/cmd/gitfed-web/handlers_landing.go @@ -5,7 +5,7 @@ import ( "html/template" "net/http" - "gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" ) // landingTpl is the philosophy/pitch page served at "/" — what gitfed is
cmd/gitfed-web/handlers_merge_requests.go
diff --git a/cmd/gitfed-web/handlers_merge_requests.go b/cmd/gitfed-web/handlers_merge_requests.go index 8b4b7de..3d0fba7 100644 --- a/cmd/gitfed-web/handlers_merge_requests.go +++ b/cmd/gitfed-web/handlers_merge_requests.go @@ -8,9 +8,9 @@ import ( "strconv" "strings" - "gitfed/internal/gitexec" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/gitexec" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // mrTitleMaxLen/mrTextMaxLen match the form's client-side maxlength
cmd/gitfed-web/handlers_notifications.go
diff --git a/cmd/gitfed-web/handlers_notifications.go b/cmd/gitfed-web/handlers_notifications.go index 675707f..8041b6d 100644 --- a/cmd/gitfed-web/handlers_notifications.go +++ b/cmd/gitfed-web/handlers_notifications.go @@ -5,8 +5,8 @@ import ( "html/template" "net/http" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var notificationsTpl = newTpl("notifications", `
cmd/gitfed-web/handlers_profile.go
diff --git a/cmd/gitfed-web/handlers_profile.go b/cmd/gitfed-web/handlers_profile.go index 6445e6c..1f9ec39 100644 --- a/cmd/gitfed-web/handlers_profile.go +++ b/cmd/gitfed-web/handlers_profile.go @@ -6,8 +6,8 @@ import ( "net/http" "sort" - "gitfed/internal/gitexec" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/gitexec" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // profileRecentCommitsPerRepo/profileRecentActivityMax bound how much work a
cmd/gitfed-web/handlers_repo.go
diff --git a/cmd/gitfed-web/handlers_repo.go b/cmd/gitfed-web/handlers_repo.go index e586a03..0bc6e0b 100644 --- a/cmd/gitfed-web/handlers_repo.go +++ b/cmd/gitfed-web/handlers_repo.go @@ -7,9 +7,9 @@ import ( "net/url" "strings" - "gitfed/internal/gitexec" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/gitexec" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // canView reports whether the current request may see repo at all: public
cmd/gitfed-web/handlers_repo_commits.go
diff --git a/cmd/gitfed-web/handlers_repo_commits.go b/cmd/gitfed-web/handlers_repo_commits.go index 4ba63de..d797240 100644 --- a/cmd/gitfed-web/handlers_repo_commits.go +++ b/cmd/gitfed-web/handlers_repo_commits.go @@ -6,9 +6,9 @@ import ( "net/http" "strings" - "gitfed/internal/gitexec" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/gitexec" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // maxCommitsShown caps how much history one page renders — plenty for
cmd/gitfed-web/handlers_search.go
diff --git a/cmd/gitfed-web/handlers_search.go b/cmd/gitfed-web/handlers_search.go index d02c554..96ce45d 100644 --- a/cmd/gitfed-web/handlers_search.go +++ b/cmd/gitfed-web/handlers_search.go @@ -6,8 +6,8 @@ import ( "net/http" "strings" - "gitfed/internal/i18n" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var searchTpl = newTpl("search", `
cmd/gitfed-web/handlers_security.go
diff --git a/cmd/gitfed-web/handlers_security.go b/cmd/gitfed-web/handlers_security.go index 4446624..f1396e2 100644 --- a/cmd/gitfed-web/handlers_security.go +++ b/cmd/gitfed-web/handlers_security.go @@ -5,7 +5,7 @@ import ( "html/template" "net/http" - "gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" ) var securityTpl = newTpl("security", `
cmd/gitfed-web/handlers_settings.go
diff --git a/cmd/gitfed-web/handlers_settings.go b/cmd/gitfed-web/handlers_settings.go index 70f73ae..fe30c69 100644 --- a/cmd/gitfed-web/handlers_settings.go +++ b/cmd/gitfed-web/handlers_settings.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" ) var settingsTpl = newTpl("settings", `
cmd/gitfed-web/lang.go
diff --git a/cmd/gitfed-web/lang.go b/cmd/gitfed-web/lang.go index 3d8fecb..9a10bad 100644 --- a/cmd/gitfed-web/lang.go +++ b/cmd/gitfed-web/lang.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" ) const langCookieName = "gitfed_lang"
cmd/gitfed-web/main.go
diff --git a/cmd/gitfed-web/main.go b/cmd/gitfed-web/main.go index 2173e1d..cf3a2e1 100644 --- a/cmd/gitfed-web/main.go +++ b/cmd/gitfed-web/main.go @@ -18,9 +18,9 @@ import ( "os" "time" - "gitfed/internal/admin" - "gitfed/internal/config" - "gitfed/internal/opsconnect" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/admin" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/config" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/opsconnect" ) type server struct {
cmd/gitfed-web/render.go
diff --git a/cmd/gitfed-web/render.go b/cmd/gitfed-web/render.go index 07a2d8f..ccd522c 100644 --- a/cmd/gitfed-web/render.go +++ b/cmd/gitfed-web/render.go @@ -14,8 +14,8 @@ import ( "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/text" - "gitfed/internal/i18n" - "gitfed/internal/version" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/i18n" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/version" ) // commonFuncs is shared by every page template so any of them can call
cmd/gitfed-web/session.go
diff --git a/cmd/gitfed-web/session.go b/cmd/gitfed-web/session.go index 8cff453..2345875 100644 --- a/cmd/gitfed-web/session.go +++ b/cmd/gitfed-web/session.go @@ -5,7 +5,7 @@ import ( "net/url" "time" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) const sessionCookieName = "gitfed_session"
deploy/docker/Dockerfile
diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index 6643b78..0e6ac7f 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -14,7 +14,7 @@ COPY go.mod go.sum ./ RUN go mod download COPY . . RUN VERSION=$(cat VERSION) && \ - LDFLAGS="-X gitfed/internal/version.Version=$VERSION" && \ + LDFLAGS="-X git.neuromancer.ovh/bastien-mrq/gitfed/internal/version.Version=$VERSION" && \ CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o /out/gitfed-server ./cmd/gitfed-server && \ CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o /out/gitfed-web ./cmd/gitfed-web && \ CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o /out/gitfed-tui ./cmd/gitfed-tui
go.mod
diff --git a/go.mod b/go.mod index 1b2d22c..58fe35b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module gitfed +module git.neuromancer.ovh/bastien-mrq/gitfed go 1.25.4
internal/acl/acl.go
diff --git a/internal/acl/acl.go b/internal/acl/acl.go index 0c2f2e8..7290b39 100644 --- a/internal/acl/acl.go +++ b/internal/acl/acl.go @@ -6,7 +6,7 @@ package acl import ( "fmt" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) var roleRank = map[store.Role]int{
internal/acl/acl_test.go
diff --git a/internal/acl/acl_test.go b/internal/acl/acl_test.go index fd6869f..4db1cc3 100644 --- a/internal/acl/acl_test.go +++ b/internal/acl/acl_test.go @@ -4,7 +4,7 @@ import ( "path/filepath" "testing" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) func newTestStore(t *testing.T) *store.Store {
internal/admin/admin.go
diff --git a/internal/admin/admin.go b/internal/admin/admin.go index 424371d..34aea70 100644 --- a/internal/admin/admin.go +++ b/internal/admin/admin.go @@ -15,11 +15,11 @@ import ( "golang.org/x/crypto/bcrypt" gossh "golang.org/x/crypto/ssh" - "gitfed/internal/acl" - "gitfed/internal/ca" - "gitfed/internal/federation" - "gitfed/internal/gitexec" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/acl" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/federation" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/gitexec" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // Ops is the set of management operations the TUI drives, satisfied both by
internal/admin/admin_test.go
diff --git a/internal/admin/admin_test.go b/internal/admin/admin_test.go index 5af14be..e10e6e1 100644 --- a/internal/admin/admin_test.go +++ b/internal/admin/admin_test.go @@ -9,8 +9,8 @@ import ( gossh "golang.org/x/crypto/ssh" - "gitfed/internal/ca" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // testCA gives each test its own throwaway CA — GrantCollaborator's
internal/admin/revocation_test.go
diff --git a/internal/admin/revocation_test.go b/internal/admin/revocation_test.go index f0b28c8..ff54305 100644 --- a/internal/admin/revocation_test.go +++ b/internal/admin/revocation_test.go @@ -9,7 +9,7 @@ import ( gossh "golang.org/x/crypto/ssh" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) func newTestKey(t *testing.T) (authorized, fingerprint string) {
internal/adminrpc/adminrpc_test.go
diff --git a/internal/adminrpc/adminrpc_test.go b/internal/adminrpc/adminrpc_test.go index b907b53..185d0cc 100644 --- a/internal/adminrpc/adminrpc_test.go +++ b/internal/adminrpc/adminrpc_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "gitfed/internal/admin" - "gitfed/internal/ca" - "gitfed/internal/federation" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/admin" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/federation" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // TestErrNotFoundSurvivesRPC reproduces a real bug: the wire only carries
internal/adminrpc/client.go
diff --git a/internal/adminrpc/client.go b/internal/adminrpc/client.go index 2943461..b254f93 100644 --- a/internal/adminrpc/client.go +++ b/internal/adminrpc/client.go @@ -6,9 +6,9 @@ import ( "net" "time" - "gitfed/internal/admin" - "gitfed/internal/gitexec" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/admin" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/gitexec" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // Client implements admin.Ops by calling a running gitfed-server's admin
internal/adminrpc/protocol.go
diff --git a/internal/adminrpc/protocol.go b/internal/adminrpc/protocol.go index 519640c..9b40b7b 100644 --- a/internal/adminrpc/protocol.go +++ b/internal/adminrpc/protocol.go @@ -8,8 +8,8 @@ package adminrpc import ( - "gitfed/internal/gitexec" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/gitexec" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // method names
internal/adminrpc/server.go
diff --git a/internal/adminrpc/server.go b/internal/adminrpc/server.go index 1e0c966..e8c280a 100644 --- a/internal/adminrpc/server.go +++ b/internal/adminrpc/server.go @@ -7,7 +7,7 @@ import ( "net" "os" - "gitfed/internal/admin" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/admin" ) type Server struct {
internal/config/config.go
diff --git a/internal/config/config.go b/internal/config/config.go index 1b00c42..5c3553b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) type Config struct {
internal/federation/notify.go
diff --git a/internal/federation/notify.go b/internal/federation/notify.go index afc0239..df00935 100644 --- a/internal/federation/notify.go +++ b/internal/federation/notify.go @@ -13,8 +13,8 @@ import ( "golang.org/x/crypto/ssh" - "gitfed/internal/ca" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // This file implements a small, deliberately non-authoritative federated
internal/federation/notify_test.go
diff --git a/internal/federation/notify_test.go b/internal/federation/notify_test.go index 9739413..b27fa5d 100644 --- a/internal/federation/notify_test.go +++ b/internal/federation/notify_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // TestNotifyHandlerRejectsUnknownRecipient reproduces the gap the audit
internal/federation/resolver.go
diff --git a/internal/federation/resolver.go b/internal/federation/resolver.go index 292fac7..c1f9417 100644 --- a/internal/federation/resolver.go +++ b/internal/federation/resolver.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // Resolver discovers and tracks trust in remote instances' CAs, per
internal/federation/resolver_test.go
diff --git a/internal/federation/resolver_test.go b/internal/federation/resolver_test.go index db8c1f9..57653cb 100644 --- a/internal/federation/resolver_test.go +++ b/internal/federation/resolver_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) func newTestStore(t *testing.T) *store.Store {
internal/federation/wellknown.go
diff --git a/internal/federation/wellknown.go b/internal/federation/wellknown.go index 5357782..ec97db7 100644 --- a/internal/federation/wellknown.go +++ b/internal/federation/wellknown.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" ) // WellKnown is the document served at /.well-known/gitfed.json. @@ -32,7 +32,7 @@ func Handler(domain, contact, softwareVersion string, localCA *ca.CA) http.Handl Version: 1, Domain: domain, CAPublicKey: localCA.PublicKeyAuthorized(), - Software: "gitfed/" + softwareVersion, + Software: "git.neuromancer.ovh/bastien-mrq/gitfed/" + softwareVersion, Contact: contact, } body, _ := json.MarshalIndent(doc, "", " ")
internal/opsconnect/connect.go
diff --git a/internal/opsconnect/connect.go b/internal/opsconnect/connect.go index 644e665..39e2493 100644 --- a/internal/opsconnect/connect.go +++ b/internal/opsconnect/connect.go @@ -8,12 +8,12 @@ package opsconnect import ( "fmt" - "gitfed/internal/admin" - "gitfed/internal/adminrpc" - "gitfed/internal/ca" - "gitfed/internal/config" - "gitfed/internal/federation" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/admin" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/adminrpc" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/config" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/federation" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) // Connect returns an admin.Ops backed by whichever mode is available, a
internal/ssh/server.go
diff --git a/internal/ssh/server.go b/internal/ssh/server.go index 1cb4e1d..bec8638 100644 --- a/internal/ssh/server.go +++ b/internal/ssh/server.go @@ -16,10 +16,10 @@ import ( gossh "golang.org/x/crypto/ssh" - "gitfed/internal/ca" - "gitfed/internal/config" - "gitfed/internal/federation" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/config" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/federation" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) type Server struct {
internal/ssh/session.go
diff --git a/internal/ssh/session.go b/internal/ssh/session.go index 3f0ea1d..6e38439 100644 --- a/internal/ssh/session.go +++ b/internal/ssh/session.go @@ -7,10 +7,10 @@ import ( gossh "golang.org/x/crypto/ssh" - "gitfed/internal/acl" - "gitfed/internal/ca" - "gitfed/internal/gitexec" - "gitfed/internal/store" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/acl" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/ca" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/gitexec" + "git.neuromancer.ovh/bastien-mrq/gitfed/internal/store" ) type execRequest struct {
internal/version/version.go
diff --git a/internal/version/version.go b/internal/version/version.go index 722d0ed..27f5f80 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -5,7 +5,7 @@ package version // Version is overridden at build time via // -// go build -ldflags "-X gitfed/internal/version.Version=X.Y.Z" +// go build -ldflags "-X git.neuromancer.ovh/bastien-mrq/gitfed/internal/version.Version=X.Y.Z" // // See deploy/docker/Dockerfile (reads VERSION at the repo root) and // deploy/update.sh (bumps VERSION). Binaries built without that flag (e.g.