vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Add named release channels and a generic channel file route
24019cb30892b9fc0118697e8b89cd61e9fab576 · Keenan Nemetz · 19d ago · parent 4f8a3da8
Add named release channels and a generic channel file route A channel is a mutable pointer, channels/<name>.md, to one immutable annotated release. The target tag object is recorded so a rewritten tag is detected rather than silently followed. - metadata: channel parse/render/validate, closed-layout and size checks, set/clear writers - CLI: vole release channel set|list|clear; a dangling target is reported - server: maintain/admin path gate and audit for channel.set/clear - index: release_channels table, incremental refresh, per-tag badge query - web: /channels list, /channels/<name> redirect, and /channels/<name>/<path...> serving the target release's tree with OID ETags, Range, revalidation, and octet-stream responses - tests: metadata round trips, index moves, hook role/audit, page/tree/dangling/ private, and the CLI end to end No apt, yum, or other package-manager code is involved: a package layout is a directory in the release tree. Refs: 01M7BPHANWMSW5HK2GT0PY74QZ
metadata/issues.go +7−3
| @@ -482,7 +482,7 @@ func ValidateIssues(g *git.Repo, commit string) []string { | |||
| 482 | 482 | // Refuse an oversized tree before reading any of it: a rejected push should | |
| 483 | 483 | // cost the receiver nothing either. | |
| 484 | 484 | var problems []string | |
| 485 | for _, prefix := range []string{IssuesDir, ChangesDir} { | ||
| 485 | for _, prefix := range []string{IssuesDir, ChangesDir, ChannelsDir} { | ||
| 486 | 486 | paths, shas := metadataPaths(blobs, prefix) | |
| 487 | 487 | problems = append(problems, metadataSizeProblems(paths, shas, g)...) | |
| 488 | 488 | } | |
| @@ -502,10 +502,13 @@ func ValidateIssues(g *git.Repo, commit string) []string { | |||
| 502 | 502 | // Release artifacts: their own validator runs below, and they are not | |
| 503 | 503 | // part of the entity set this function parses. | |
| 504 | 504 | continue | |
| 505 | case strings.HasPrefix(e.Name, ChannelsDir+"/"): | ||
| 506 | // Channel pointers: validated by ChannelProblems below. | ||
| 507 | continue | ||
| 505 | 508 | default: | |
| 506 | 509 | problems = append(problems, fmt.Sprintf( | |
| 507 | "%s: metadata may only contain %s/, %s/ and %s/", | ||
| 508 | e.Name, IssuesDir, ChangesDir, ReleasesDir)) | ||
| 510 | "%s: metadata may only contain %s/, %s/, %s/ and %s/", | ||
| 511 | e.Name, IssuesDir, ChangesDir, ReleasesDir, ChannelsDir)) | ||
| 509 | 512 | continue | |
| 510 | 513 | } | |
| 511 | 514 | } | |
| @@ -514,6 +517,7 @@ func ValidateIssues(g *git.Repo, commit string) []string { | |||
| 514 | 517 | return append(problems, err.Error()) | |
| 515 | 518 | } | |
| 516 | 519 | problems = append(problems, ReleaseProblems(g, commit)...) | |
| 520 | problems = append(problems, ChannelProblems(g, commit)...) | ||
| 517 | 521 | if _, err := ParseIssues(contents); err != nil { | |
| 518 | 522 | if ve, ok := err.(*ValidationError); ok { | |
| 519 | 523 | return append(problems, ve.Problems...) | |