Some questions about make package-recursive

I have search for an answer but didn't find it.

first, a short description: I would like to build ports in a jail. From an example and the handbook suggestion, I have mounted the ports tree (ro) into the jail and have set "WRKDIRPREFIX=/tmp" etc. ... for places that must be writable.
Result: some ports build. But some not, because they don't find there files, because of the /tmp directory.
One has advise this:
The easy answer is "Don't build ports in a Jail". Build the package on the base system, or using Poudriere. Then install the packages you built in the jail
But then I read in man ports() for make package that; quotation: "Make a binary package for the port. The port will be installed if it has not already been." And I don't want to install these package into the host, only into the jail"

Concrete: I have done in /usr/ports/lang/php81 make package-recursive because I won't that missing dependencies came from packages from outside, when install the own created package inside the jail.

Result: It has build the package for php81 and not installed it into the host. But it has also create a dependency of package 44 files like apache24 and installed apache24 on the host. ??? I have for that never done make install only make package-recursive.

I'm now confused and have 2 Questions:
(1) Is this the right way (when FreeBSD version is not different from host and jail) to build the ports on the host, make a package from it and install this inside the jail?

(2) Does make package and make package-recursive install anything also into the main host system?
When yes - how to avoid that?


07.02.2023: please ask if you can not understand something, I'm asking for!
 
Last edited:
Back
Top