Include:Setup your system and account for building packages
The alpine-sdk is a metapackage that pulls in the most essential packages used to build new packages. Also install and configure a way to elevate privileges, such as sudo or doas, and an editor, such as vi, nano, micro.
# apk add alpine-sdk
This would be a good time to create a normal user account for you to work in. To make life easier later, it's a good idea to add this user to the wheel group; operations that require superuser privileges can now be done with sudo or doas.
The aports tree is in git so before we clone it, let's configure git.
Configure your global git config
Configure your name and email address in git. This name and email address will show up in all your commits:
$ git config --global user.name "Your Full Name" $ git config --global user.email "your@email.address"
Using git config without --global let you configure other details for a specific git repository.
Refer Development using git to grasp basics of Git operations.
Configure abuild
Abuild needs to be configured for both the system and user.
Edit the file /etc/abuild.conf as per requirements. Most of the defaults can be left alone, unless you are developing for a custom platform, in which case the comments in the file should guide you. The one field to edit is PACKAGER, so that you can get credit (or blame) for packages you create.
In order to use abuild
command The user executing abuild
must be a member of the abuild
group:
# addgroup <yourusername> abuild
For abuild a public/private rsa key pair is needed. The abuild-keygen
command from abuild package generates and configures the security keys.
$ doas abuild-keygen -a -i
abuild-keygen options
- -a Set PACKAGER_PRIVKEY=<generated key> in abuild.conf
- -i Install public key into /etc/apk/keys using sudo
- -h Show this help
- -n Non-interactive. Use defaults
- -q Quiet mode