~rep/anglegrinding

3ab77c6fafea6d65e914d0397a94f522ee759025 — rep 2 months ago e6a10ba
Notes on Sourcehut
1 files changed, 69 insertions(+), 0 deletions(-)

A content/technology/sourcehut.md
A content/technology/sourcehut.md => content/technology/sourcehut.md +69 -0
@@ 0,0 1,69 @@
---
title: "Sourcehut"
---

# Sourcehut

Drew DeVault's [Sourcehut](https://sourcehut.org) is a shoestring-budget
competitor to the odious but wildly popular
[Github](https://github.com). This site is a
[Hugo](https://gohugo.io)-generated static site built from a
Sourcehut-hosted repository using Sourcehut's build system. Some notes
on the Sourcehut experience are below.

## Squiggles in URLs

Sourcehut follows very old convention in using `~` as a prefix to
indicate a username. Despite being an old and correct convention, this
runs up against widespread ignorance of what characters are actually
valid in a URL - e.g., DeVault had to get the Go language developers to
permit `~` as a valid module name character (Go module names are
repository URLs).  Mailing list names are even "worse" - they contain
`/` as well as `~`. The forthcoming organizational support will
introduce the `+` character. None of this is wrong, but users should be
prepared to encounter other services which react poorly to these
characters.

## Repository hosting

Repository hosting is straightforward and uncluttered by social
misfeatures or inaccurately-named "forks" and "pull requests".
Repositories are readable via HTTPS, and writable via SSH. The
repository view is straightforward, and instead of an ill-conceived
social-media "follow" feature, RSS feeds are generated for repository
branches (providing this site's only RSS feed).

Users are encouraged to contribute patches to open source projects via
email, as per the original design of Git (and open source practice
predating Git). The equivalent site feature to Github's "pull request"
is ultimately a patch to email gateway that is equivalent to locally
using `git send-email`.

## Build service

Sourcehut's build service takes simple YAML manifests and runs build
tasks specified therein. A variety of Linuxes and BSDs are supported as
build VMs. Sourcehut has a secret storage facility to enable the
inclusion of e.g. deployment keys in a build. The presence of a
`.build.yml` file in a pushed ref triggers the build specified therein
automatically (only for the tip of the reference, not any intermediate
commits, which is reasonable default behavior).

There does not seem to be a way to avoid triggering builds on certain
branches (short of, perhaps, checking the current branch with `git`
inside the build task in order to abort), which may be problematic if
the build manifest contains a deployment step. Manually editing
`.build.yml` within topic branches to remove deployments would work, but
is prone to human error.

## Finances

Sourcehut publishes quarterly financial reports to its mailing list.
Despite outdoing its bloated billion-dollar "unicorn" competitors,
Sourcehut is a small business with approximately $4,649 in monthly
revenue in [Q1
2020](https://sourcehut.org/blog/2020-04-13-sourcehut-q1-2020-financial-report/).
As of the same report, Sourcehut had 13,418 users, of which 1,553 were
paying users. (Payment does not yet purchase any more services than a
free account; DeVault says that the intent is for a paid account to be
required to own resources in the future.)