Date: Wed, 07 Dec 2022 22:18:54 +0000 From: Jonathan Vasquez <jon@xyinn.org> To: "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org> Subject: PORTSDIR not being read from /etc/make.conf when build /usr/src Message-ID: <XXuxLARxjwZNxjbQnIKFDB85ApcIy_dz2FL23q-7pE1hDjwlty9p6-x6w-TlaW05uHZ4ZlqamQn26vrmKZUCjXMWT2DuRg6v_ldWogRVdLQ=@xyinn.org>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hey all,
I'm currently trying to centralize my poudriere ports directory and my normal /usr/ports dir so that I can reduce the load on the central freebsd servers, and also to clean it up on my end.
Since I have PORTS_MODULES defined in my /etc/make.conf, building my kernel will properly automatically rebuild the modules listed properly. This requires your ports directory to exist and working (obviously). Since my ports dir was in the default location: /usr/ports, it was working properly. At the moment I have my poudriere ports directory and distfiles defined at:
/usr/local/poudriere/ports/default (The standard path for poudriere).
/usr/local/poudriere/distfiles
I went ahead and added the following to /etc/make.conf:
PORTSDIR=/usr/local/poudriere/ports/default
DISTDIR=/usr/local/poudriere/distfiles
However, when running a "make -j32 buildkernel", the PORTSDIR variable doesn't get read in properly and will default to /usr/ports. I tried placing in another variable (that I saw in the module rebuilding phase of buildkernel) in /etc/make.conf to see if that was working properly, I picked SRC_BASE as an example (I also wanted to test if variable substitution was working properly as well):
/etc/make.conf:
_TEST="/omega"
SRC_BASE="${_TEST}/lol"
Running make -j32 buildkernel again properly displayed the "/omega/lol" path for SRC_BASE, but the PORTSDIR still was ignored. I then tried inlining the variable to see if that worked:
make -j32 buildkernel PORTSDIR="/some/path"
and that worked. There was one or two times that I was able to non-deterministically get the PORTSDIR to be read in from /etc/make.conf, but for the most part, it was ignored 99% of the time. Running "make buildkernel" without any parallelization didn't help either.
So ultimately the question is, is it intended behavior for PORTSDIR to be ignored by the make for buildkernel when it's defined in /etc/make.conf? From what man ports says, /etc/make.conf is suppose to be used for all aspects of building doc, src, and ports.. or is this a bug?
If it helps, I'm running on stable/13-n253245-209ebfa26ec4/GENERIC amd64)
Thank you,
Jonathan Vasquez
PGP: 34DA 858C 1447 509E C77A D49F FB85 90B7 C4CA 5279
Sent with ProtonMail Secure Email
[-- Attachment #2 --]
<div style="font-family: Arial; font-size: 14px;">Hey all,</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">I'm currently trying to centralize my poudriere ports directory and my normal /usr/ports dir so that I can reduce the load on the central freebsd servers, and also to clean it up on my end.</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">Since I have PORTS_MODULES defined in my /etc/make.conf, building my kernel will properly automatically rebuild the modules listed properly. This requires your ports directory to exist and working (obviously). Since my ports dir was in the default location: /usr/ports, it was working properly. At the moment I have my poudriere ports directory and distfiles defined at:</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">/usr/local/poudriere/ports/default (The standard path for poudriere). <br></div><div style="font-family: Arial; font-size: 14px;">/usr/local/poudriere/distfiles<br></div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">I went ahead and added the following to /etc/make.conf:</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">PORTSDIR=/usr/local/poudriere/ports/default</div><div style="font-family: Arial; font-size: 14px;">DISTDIR=/usr/local/poudriere/distfiles</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">However, when running a "make -j32 buildkernel", the PORTSDIR variable doesn't get read in properly and will default to /usr/ports. I tried placing in another variable (that I saw in the module rebuilding phase of buildkernel) in /etc/make.conf to see if that was working properly, I picked SRC_BASE as an example (I also wanted to test if variable substitution was working properly as well):</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">/etc/make.conf:</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">_TEST="/omega"</div><div style="font-family: Arial; font-size: 14px;">SRC_BASE="${_TEST}/lol"</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">Running make -j32 buildkernel again properly displayed the "/omega/lol" path for SRC_BASE, but the PORTSDIR still was ignored. I then tried inlining the variable to see if that worked:</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">make -j32 buildkernel PORTSDIR="/some/path"</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">and that worked. There was one or two times that I was able to non-deterministically get the PORTSDIR to be read in from /etc/make.conf, but for the most part, it was ignored 99% of the time. Running "make buildkernel" without any parallelization didn't help either.</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">So ultimately the question is, is it intended behavior for PORTSDIR to be ignored by the make for buildkernel when it's defined in /etc/make.conf? From what man ports says, /etc/make.conf is suppose to be used for all aspects of building doc, src, and ports.. or is this a bug?</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">If it helps, I'm running on<span> stable/13-n253245-209ebfa26ec4/GENERIC amd64)</span></div><div style="font-family: Arial; font-size: 14px;"><span><br></span></div><div style="font-family: Arial; font-size: 14px;"><span>Thank you,<br></span></div><div style="font-family: Arial; font-size: 14px;"><br></div>
<div class="protonmail_signature_block" style="font-family: Arial; font-size: 14px;">
<div class="protonmail_signature_block-user">
<div>Jonathan Vasquez<br></div><div>PGP: 34DA 858C 1447 509E C77A D49F FB85 90B7 C4CA 5279<br></div><div>Sent with ProtonMail Secure Email<br></div><div><br></div>
</div>
<div class="protonmail_signature_block-proton protonmail_signature_block-empty">
</div>
</div>
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XXuxLARxjwZNxjbQnIKFDB85ApcIy_dz2FL23q-7pE1hDjwlty9p6-x6w-TlaW05uHZ4ZlqamQn26vrmKZUCjXMWT2DuRg6v_ldWogRVdLQ=>
