Files
AlpinePackages/SetupEnv.md
2021-10-20 16:57:51 +00:00

1.0 KiB

Setting up build environment

The packages will be built with architecture of build system.

Requirements

To build a package for Alpine Linux you need an Alpine Linux installation. (For more info see: https://wiki.alpinelinux.org/wiki/Installation)

Setup

Install requirements

apk add alpine-sdk sudo git

Setup user account

This is needed since abuild refuses to run as root.

adduser <yourusername>
addgroup <yourusername> abuild

Add the following to the sudoers file /etc/sudoers using the visudo command.

<yourusername>    ALL=(ALL) ALL

Set file permissions

chgrp abuild /var/cache/distfiles
chmod g+w /var/cache/distfiles

Generating key for signing packages

Login as the newly created user, then run the following command.

abuild-keygen -a -i
  • -a Will set PACKAGER_PRIVKEY to the generated key, this is for signing the packages
  • -i Will install the key in to the apk package manager (/etc/apk/keys)

Source

https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package