make on nullfs ports collection

Hey folks,

I'm with problems to perform a make on a port on nullfs ports collection. Some LIB_DEPENDS is not built.
I explain:

I git clone ports into /usr/ports-development/ on my host.
After I zfs clone thick jail named jdevelopment.
So, I nullfs /usr/ports-development/ into /usr/local/jails/jdevelopment/usr/ports

Inside jdevelopment jail, I tried to make config on a port that LIB_DEPENDS on libargon2.
I receive the error that libargon2 is not found. Thats correct, but libargon2 is in LIB_DEPENDS (makefile), it should be builded.

# make
===> anope-devel-default-2.1.14 depends on file: /usr/local/bin/cmake - found
===> anope-devel-default-2.1.14 depends on executable: ninja - found
===> anope-devel-default-2.1.14 depends on shared library: libargon2.so - not found
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/irc/anope-devel
*** Error code 1



In another test, inside jdevelopment, I git clone entire ports on /usr/ports-test/ (without nullfs).
I copied same port, and bingo! libargon2 dependency was builded.


# make
===> anope-devel-default-2.1.14 depends on file: /usr/local/bin/cmake - found
===> anope-devel-default-2.1.14 depends on shared library: libargon2.so - not found
===> License CC0-1.0 accepted by the user
===> libargon2-20190702_1 depends on file: /usr/local/sbin/pkg - found
=> P-H-C-phc-winner-argon2-20190702_GH0.tar.gz doesn't seem to exist in /usr/ports_develop/distfiles/.
=> Attempting to fetch https://codeload.github.com/P-H-C/phc-winner-argon2/tar.gz/20190702?dummy=/P-H-C-phc-winner-argon2-20190702_GH0.tar.gz
fetch: https://codeload.github.com/P-H-C/phc-winner-argon2/tar.gz/20190702?dummy=/P-H-C-phc-winner-argon2-20190702_GH0.tar.gz: size unknown
fetch: https://codeload.github.com/P-H-C/phc-winner-argon2/tar.gz/20190702?dummy=/P-H-C-phc-winner-argon2-20190702_GH0.tar.gz: size of remote file is not known
P-H-C-phc-winner-argon2-20190702_GH0.tar.gz 1470 kB 10 MBps 00s
===> Fetching all distfiles required by libargon2-20190702_1 for building
===> Extracting for libargon2-20190702_1
.....


There are some problem to nullfs ports collection ?
 
Hey folks,

I'm with problems to perform a make on a port on nullfs ports collection. Some LIB_DEPENDS is not built.
I explain:

I git clone ports into /usr/ports-development/ on my host.
After I zfs clone thick jail named jdevelopment.
So, I nullfs /usr/ports-development/ into /usr/local/jails/jdevelopment/usr/ports

There are some problem to nullfs ports collection ?

If you had built/installed any ports on your parent host using /usr/ports-development, then nullfs mounted that same ports tree into your jail, and then tried installing anything that needed to (re)install any of those same ports into your jail, that probably would have failed unless you first ran rm -rf /usr/ports/*/*/work* in your jail before starting any builds, to clear any work sub-directories leftover from previous-builds. NOTE: Avoid any spaces in /usr/ports/*/*/work*

"The Gory Details": Whenever a make install is done for a port, there are some dot-files apparently left-behind in the port's work subdirectory that the ports build system uses to determine if an action was "already done" (e.g.: extract, patch, build, stage, install), so that the desired action is not "re-done" (which likely would cause an error). The problem is that if a ports tree is shared between the host and jail(s) (-OR- shared between multiple jails), then any of those work subdirectory dot-files would be only correct for the original host/jail where the port was originally built, probably not correct in a different host/jail.

When sharing a ports tree via nullfs, I recommend always removing any /usr/ports/*/*/work* subdirectories before doing any builds in a different host/jail environment.

This might not be the root-cause of the problem you are reporting, but I hope this helps..
 
rm -rf /usr/ports/*/*/work*
And if that command would overflow shell argument list when there are a lot of "unclean"ports, you could use find(1): find /usr/ports/ -type d -name work | xargs rm -rf.

There's also a ports(7) variable WRKDIRPREFIX that you could specify to be different on host and jails (and cleaning it is easier).
 
that mostly works but then there is this

./bsd.port.mk:_WRKDIR= work
./bsd.port.mk:_WRKDIR= work-${FLAVOR}
so you may miss some ports
 
Back
Top