[PC-BSD Pbi-dev] PBI for Netatalk

Ken Moore ken at pcbsd.org
Mon Nov 14 12:42:17 PST 2011

On 11/11/11 17:38, Andriy Bakay wrote:
> Hi All,
> I am trying to build PBI package for Netatalk from FreeBSD ports and have several questions. The Netatalk depends on Avahi and DBus daemons. The 'pbi_makeport' produced PBI package with all of the Avahi and DBus binaries, mans, etc. included. This is not very efficient, because Netatalk need only client libraries (etc.) to communicate to these daemons.
> How I can create PBI package from port to have only what needed? What the usual best practices for such daemons which depends on other daemons? Maybe you have some examples for such cases?
> Please advise.
> Thanks,
> Andriy
> _______________________________________________
> Pbi-dev mailing list
> Pbi-dev at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/pbi-dev

A PBI file, by definition, includes all the runtime and library
dependencies of the program in question. So it will generally be a
larger file than expected, but this does not necessarily mean that the
installed PBI will be that large. On install, the PBI system compares
the currently installed libraries/files with the ones contained within
the PBI file and only installs the ones that are not already contained
on the system. However, each PBI that is installed can only see the
files that are associated with it, and not the whole collection of
installed files, thus eliminating the dependency problems as well as
allowing the computer to share libraries between different programs.

As to only including the needed packages in the PBI file, it should
already be doing that automatically. For each port there can be build
dependencies, runtime dependencies, and required libraries (look at a
port on freshports.org to see what I mean). The PBI system (on building)
compiles all the required dependencies, and, when finished compiling,
prunes the ports that are only build dependencies before packaging the
PBI file, leaving only the runtime packages and libraries required for
the program to actually work. So if those files you referenced are still
being included in the PBI, it should be because they are necessary for
the program to run, and removing them will cause your program to fail.

If you find that a port is mislabeled and has additional packages listed
under the runtime dependencies that are not required, you should contact
the maintainer of that port and ask them to correct it within the port

This is a bit long, but I hope it answered your question!

~ Ken Moore ~

More information about the Pbi-dev mailing list