[aur-general] know what dependencies in PKGBUILD

Eli Schwartz eschwartz at archlinux.org
Thu Jul 23 13:45:46 UTC 2020


On 7/23/20 9:17 AM, alad via aur-general wrote:
> Am 23/07/2020 um 15:10 schrieb Budi via aur-general:
>> h\How to know what dependencies only need to put  (surely not all)
> 
> I proceed as follows:
> 
> 1. ignore anything in base-devel

base-devel is for makedepends only, base is for depends.

> 2. include libraries listed in ldd, if the package includes a compiled
> executable

This is wrong. If myprog links *only* to libfoo.so, and internally
libfoo.so links to libbar.so, ldd will show both libfoo.so and libbar.so

Instead use readelf -d and look for lines containing "NEEDED". Or use
lddtree (from the pax-utils package) to get a tree-based view of a
program's dependencies.

ldd is completely inaccurate and misleading for this purpose.

> 3. include external commands if they are required (and not already in
> base-devel)
> 
> The second point is not mandated (you can depend on a package fulfilling
> the needed library depends, transitively), though helpful when listing
> rebuilds. Otherwise, see the packaging guidelines on the wiki.
> 
> (inb4 10 pages of discussion after a 1-sentence question)


-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20200723/8348750f/attachment.sig>


More information about the aur-general mailing list