Download raw body.
Hierarchical repositories in gotsysd and gotwebd
On Fri, Nov 13, 2026 at 04:14:16PM +0100, Anton Kasimov wrote:
> Hi Stefan,
>
> I've experimented with different repository configurations and came to the
> following conclusions.
>
> For gotd, I would advocate only a virtual repository hierarchy, implemented
> through a more general "repository match" mechanism. The approach could
> follow the familiar pattern matching syntax from "httpd.conf", including
> captures and first-match-wins semantics. This would extend the existing
> repository declaration using the location concept:
>
> repository *match* "openbsd/*(.*)*" {
> path "/var/git/*%1*.git"
> permit rw :porters
> permit ro anonymous
> }
>
> The existing "repository name" syntax would remain an exact match. Captures
> could be substituted into path, allowing virtual repository names to map to
> arbitrary filesystem paths. repos_path would remain the repository root,
> analogous to root in httpd.conf.
gotd can already do this, but the config needs to be written accordingly
with an already expanded version of what you are suggesting above.
What about my earlier suggestion of generating an appropriate gotd.conf
file? I would prefer this over importing a regex engine into the code base.
> Regarding gotwebd, I'm not entirely sure I understand its intended scope.
> As I see it, it currently combines three rather different responsibilities:
>
> 1. Repository browsing — displaying repositories, commits, branches, trees,
> diffs, etc. This is the functionality I actually expected from gotwebd and
> consider essential.
> 2. Repository discovery — determining which repositories are available for
> browsing and presenting them to users. I think this could be implemented by
> an external script or application, which could also handle authentication.
> 3. Serving static websites from repositories (website directive). This
> functionality could be provided by httpd directly, by publishing repository
> contents into a directory served by httpd.
>
> Rather than having one application handle all these responsibilities, I
> would consider splitting them into separate utilities, each exposed through
> FastCGI. This would allow administrators to compose the functionality they
> need and use httpd to route requests to the appropriate handler. Repository
> browsing would remain a dedicated gotwebd component, while discovery and
> other functionality could be implemented independently.
>
> I think this would make the overall architecture more modular, without
> sacrificing any existing functionality.
I would like to extend gotsh with a 'list' command which would allow
users to discover repositories they have access to over SSH, rather
than requiring users to visit a web site to obtain this information.
My goal for the static site feature is to avoid having to manage some
kind of secondary storage location for website content, while allowing
people to host simple websites such as landing pages for their project
backed by files under version control. So this is working as intended.
Regards,
Stefan
Hierarchical repositories in gotsysd and gotwebd