[aur-general] know what dependencies in PKGBUILD

alad alad at archlinux.org
Thu Jul 23 20:07:05 UTC 2020


On 23/07/2020 15:45, Eli Schwartz via aur-general wrote:
> 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.
So? base-devel contains programs that can be used during runtime, like gawk.
>
>> 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.

Hmm, you're right - last I checked libraries (for neomutt), I used 
readelf -d. I guess it's been too long.

Alad

>
>> 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)
>


More information about the aur-general mailing list