Search⌘ K

Patch the Source

Understand how to identify and fix build errors in Alpine Linux packages by applying patches to source code. Learn to download patches, add them to APKBUILDs, and update checksums for secure package verification.

We'll cover the following...

Preface

In the previous lesson, we created an APKBUILD for shaer, a simple C++ project with a few dependencies. The build() and test() phases already work with the automatically generated APKBUILD from newapkbuild. However, the package() phase currently fails with the following error:

Shell
-- Install configuration: "None"
>>> shaer: Running postcheck for shaer
find: /shaer/pkg/shaer: No such file or directory
find: /shaer/pkg/shaer: No such file or directory
find: /shaer/pkg/shaer: No such file or directory
find: /shaer/pkg/shaer: No such file or directory
find: /shaer/pkg/shaer: No such file or directory
>>> shaer: Preparing package shaer...
/usr/bin/abuild: cd: line 2461: can't cd to /shaer/pkg/shaer: No such file or directory

Find the cause

In the output of abuild, we can see that multiple references to /shaer/pkg/shaer ...