Sign inSign up

daverona/apkbuild

By daverona

Updated about 6 years ago

Alpine APKBUILD

Image
0

436

daverona/apkbuild repository overview

docker/apkbuild

pipeline status

This is a repository of Docker images for Alpine APK package building.

Quick Start

There is a set of scripts to make your life easier. First get them:

docker container run --rm daverona/apkbuild cat /abuild/scripts/keygen.sh > keygen.sh
docker container run --rm daverona/apkbuild cat /abuild/scripts/buildenv.sh > buildenv.sh
docker container run --rm daverona/apkbuild cat /abuild/scripts/plainenv.sh > plainenv.sh
chmod a+x *.sh

Intialize cache directories and generate signing and verification key pair for abuild:

ABUILD_EMAIL=abuild@localhost ./keygen.sh

Observe on the host the following directories:

  • ~/.abuild/keys: key directory -- Back them up, please
  • ~/.abuild/apk: (cache) downloaded APK files required to build yours
  • ~/.abuild/distfiles: (cache) downloaded source files required to build your packages
  • ~/.abuild/pip: (cache) downloaded and built Python modules required to build your packages
  • ~/.abuild/composer: (cache) downloaded PHP packages required to build your packages
  • ${PWD}/v3.12: generated package repository

The cache directories are to avoid repeated downloading and building dependencies.

Run a container in building environment:

./buildenv.sh

Observe in the container the following directories:

  • /abuild/.abuild — key directory
  • /main — working directory
  • /v3.12 — generated package repository

Start a new APKBUILD and build APK files:

cd /main
newapkbuild mine
cd mine

# edit APKBUILD

abuild checksum
abuild -r -K

If there's no error, APK files will be generated under /v3.12/main/<arch> directory in the container, where <arch> is your host architecture you can get with command arch.

Before distribute these APK files, run another container in non-building environment to test-drive them:

./plainenv.sh

# in the container
cd /v3.12/main/<arch>
apk add *.apk

When you distribute your APK files, you should give abuild's public key too, which is under ~/.abuild/keys/*.rsa.pub on the host. Say it is [email protected]. Then others may run these commands to install APK files:

cp [email protected] /etc/apk/keys
apk add *.apk

It's safe to remove APK files and the public key after installation.

Usage

References

Tag summary

Content type

Image

Digest

Size

91 MB

Last updated

about 6 years ago

docker pull daverona/apkbuild