Prerequisites
To set up a AerynOS system to be able to build package recipes, a few prerequisites need to be installed, and a new directory for storing local build artifacts needs to be set up.
Installing the build-essential package
We maintain a build-essential metapackage that should contain the basics for getting started
with packaging on AerynOS.
sudo moss sync -usudo moss it build-essentialActivating the AerynOS helper scripts
The easiest way to create a local repository is to use the helper script distributed with the
AerynOS recipe repository in the tools/ directory.
Start by cloning the recipes/ git repository:
mkdir -pv repos/aerynos/pushd repos/aerynosgit clone https://github.com/AerynOS/recipesAfter the recipes/ git repository has been cloned, symlink helpers.bash into ~/.bashrcd.d/:
popdmkdir -pv ~/.bashrc.d/ln -sv ~/repos/aerynos/recipes/tools/helpers.bash ~/.bashrc.d/90-aerynos-helpers.bashFinally, execute the following in a new terminal tab:
cd ~gotoaosrepoIf the helpers script has been correctly loaded, the gotoaosrepo command should switch to
the directory containing the recipes/ git repository clone.
Setting up git hooks and linters
The just command runner should have been installed as part of build-essential.
Run the following:
gotoaosrepojust initThis will setup git hooks that will lint for the most common packaging errors upon git commit, as well as fill out commit message templates for you to edit as appropriate.
Setting up git diff auto-conversion of manifest.*.bin files
This will make it so you can view git diff output for binary manifest.*.bin files in both git diff and git log -p . invocations.
Edit the recipe repo .git/config file to contain the following below the [core] section:
[diff "moss"]    textconv = moss inspect    binary = trueThe recipe repo already contains the .gitattributes file that sets up the moss diff filter referenced here.
Setting up the git gone alias
This will make it so that executing git gone will remove any local branches that no longer exist upstream.
Edit your ~/.gitconfig file to contain the following:
[alias]    gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D; }; f"Adding /etc/subuid and /etc/subgid entries
Since boulder uses user-namespaces to set up isolated build roots, it is necessary to set up
a subuid and a subgid file for the relevant users first:
sudo touch /etc/sub{uid,gid}sudo usermod --add-subuids 1000000-1065535 --add-subgids 1000000-1065535 rootsudo usermod --add-subuids 1065536-1131071 --add-subgids 1065536-1131071 "$USER"If /etc/subuid and /etc/subgid already exist, adapt the above as appropriate.