-
Notifications
You must be signed in to change notification settings - Fork 0
Build alpine packages
This page explains how to build or rebuild Alpine packages for your products.
This section describes the requirements for building a development computer.
- An Alpine build environment can be used but there are
Dockerscripts to simplify the process.
The Alpine environement is necessary to calculate de checksums of the sources for the packages and verify they cen be generated. The following scripts are made to helper developers achieving these tasks.
The docker scripts can be used on any computer capable of running Docker, with any processor architecture. Nevertheless the packages will be targeted to the x86_64 architecture.
The files are located in the folder setup/docker.
| File | Description |
|---|---|
| create-dev-image.sh | This shell script creates an Alpine build environment image with all the necessary to build Safecor. The image is named alpine-dev. |
| docker-cmd.sh | This shell script can be used to execute a single command in a container based on alpine-dev. The container is destroyed at the end. Usage: $ ./docker-cmd.sh 'uname -a' (don't forget the quotes). |
| docker-shell.sh | This shell script can be used to create a container based on alpine-dev and get a shell on it. The container is destroyed when the shell is quit. |
| Dockerfile | This is the recipe for the image alpine-dev. |
| repositories | This file can be used to override the default repositories located on Internet. To use it, set the environment variable OVERRIDE_REPOSITORIES=1. Example: OVERRIDE_REPOSITORIES=1 ./docker-shell.sh |
| safecor.rsa.pub | This is the Safecor repository official public key that is injected into the alpine-dev image. |
| update-all-checksums.sh | This script can be used to calculate the checksums for every APKBUILD file in the project. |
The steps for building the packages are:
-
git clonethe project. - Enter each source folder in the
setupdirectory. - Run
abuild checksum && abuild -r.
The packages will be available in the folder ~/packages/safecor/<arch>.
The docker environment can be used to calculate the checksums and build the packages for local tests.
Todo
Todo
Todo