[alpine-devel] abuild 1.15 with improved dependency handling

Natanael Copa
Message ID
Sender timestamp
DKIM signature
Download raw message

I got the dynamic dependnencies working and its shipped with abuild 1.15
and later.

This changes the way abuild works in several ways.

First I'll explain how makedpeneds (the build time dependencies) are
handled from 1.15.

A concept of apkcache was introduced. It is basicly a temporary
repository which is available during abuild buildtime. It is by default
in ~/.cache/apks. When a package is build a symlink is created to this
dir and the APK_INDEX.gz is updated with newly built package.

abuild will also install a virtual, empty package
named .makedepends-<pkgname>. This package holds no files, it just
depends on all the makedepends for the package. This is so some other
process on same build box does not remove the makedepends until abuild
is finished with it. If forexample both package 'a' and package 'b'
have 'libfoo' in makedepends, and you build both at the same time, when
'a' is completed it will remove .makdepends-a but libfoo will be kept on
the system til 'b' is finished and will be removed together
with .makedepends-b. Basicly, we let apk-tools deal with the makedepends
rather than let abuild try do it.

This also means that you can do 'abuild installdeps' to install all
makedepends, go fix issues in src/ dir and when done: 
'abuild uninstalldeps'

Now to the runtime depends. Until now, the APKBUILD needed to list all
needed runtime dependences in 'depends'. It meaned that you needed to do
scanelf -Rn pkg and figure out what packages provided what libs and make
sure those were listed in depends.

With abuild 1.15, this is handled automatically. All .so files will be
autodetected and added automatically to depends in the resulting apk. It
means you should no longer add any depends, unless you have non so's
dependencies. This is typically script dependencies etc. So if you have
a perl script in the package you need to manually add perl to depends
like before, same with python, lua and #!/bin/bash.

Other dependencies should be autodetected. If abuilds finds out that an
autodetected package is in depends it will issue a warning telling that
you can remove that package from depends.

There might be a few bugs in there so please test how it works and give
some feedback.

Any volunteer to update the documentation?


Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org