Building Betula manually
Building is the process of turning source code into a working application. The final application is just one executable file called betula, it is the program you need. You can build Betula on any modern system.
You would have to rebuild Betula in order to update to a newer version.
Pre-requisites
Betula is mostly written in Go programming language but its database-handling part is written in C programming language. For building Betula, you would need compilers for both language.
Installing Go. Many OS offer outdated Go. If you know your distribution offers a sufficiently fresh one, go with it. Otherwise, get a copy from Go website and install it properly. See Go's installation guide. Required versions for Betula change over time. If unsure, pick the freshest Go version available.
For Ubuntu, the following sequence of commands is known to install Go 1.23.3:. Run these commands in a terminal.
-
Get a copy of Go:
curl -OL https://go.dev/dl/go1.23.3.linux-amd64.tar.gz -
Unarchive Go:
sudo tar -C /usr/local -xvf go1.23.3.linux-amd64.tar.gz -
Edit file
~/.profilewith any text editor (nanoorviare probably available on most machines) and add the following line:
sh
export PATH=$PATH:/usr/local/go/bin
-
Verify Go is installed:
go version
(pre-v1.7.0) Installing C. Before v1.7.0, the database code required CGO, and that meant you needed a C compiler. Most operating systems come with one pre-installed. We now use a WASM build of SQLite.
Compiling
git clone https://codeberg.org/bouncepaw/betula.git # Or ahttps://git.sr.ht/~bouncepaw/betula/, or download archive
cd betula
git checkout v1.7.0 # or whatever
make
./betula -version # Verify
This would produce a betula executable file for your system.
For cross-compilation, see the Makefile for inspiration.
GOPROXY caveat. Some older Betula versions will not compile without GOPROXY enabled. It's enabled in Go compiler by default. These version relied on a Mercurial package which is no longer available.