Re: head -r355027 context, poudiere jail constructions with the likes of -a arm64.aarch64 -x : awk: can't open file /sys/param.h

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 7 Dec 2019 21:02:11 -0800
[In part this note shows that the issue is not specific to
cross builds: -a arm64.aarch64 is not essential. But it
also shows just where the /sys/param.h comes from.]

On 2019-Nov-24, at 15:22, Mark Millard <marklmi at yahoo.com> wrote:

> On 2019-Nov-24, at 15:11, Ben Woods <woodsb02 at gmail.com> wrote:
> 
>> On Sun, 24 Nov 2019 at 1:27 pm, Mark Millard <marklmi_at_yahoo.com> wrote:
>> My poudiere jail constructions with the likes of -a arm64.aarch64 -x are
>> all getting:
>> 
>> awk: can't open file /sys/param.h
>> source line number 1
>> 
>> Hi Mark,
>> 
>> I have been getting this same error on amd64 for some time when I use the command below.
>> # poudriere jail -j 13amd64 -u -m src=/usr/src
>> 
>> Any ideas what it could be?
> 
> Not so far. Good to know that cross-building is not part of the required context.
> 
> I've yet to find a place that might be involved that mixes awk use with an expression
> generating a file path that could generate /sys/param.h as the path.
> 
> If this was happening in my prior -r352341 context, I did not notice it. I jumped
> from there to -r355027 . So I can not effectively narrow the range for when it
> started based on my activity.


I've got evidence of what is reporting the /sys/param.h path:

+ [ -n '' ]
+ return 0
+ build_native_xtools
+ [ 0 -eq 1 ]
+ return 0
+ awk '/^\#define[[:blank:]]__FreeBSD_version/ {print $3}' /usr/local/poudriere/jails/testBugzilla215561/usr/include/sys/param.h
+ setvar version_extra 1300061
+ [ -r /usr/src/sys/conf/newvers.sh ]
+ update_version 1300061
+ local 'version_extra=1300061'
+ grep '^[RB][A-Z]*=' /usr/src/sys/conf/newvers.sh
+ eval 'REVISION="13.0"' 'BRANCH=${BRANCH_OVERRIDE:-CURRENT}' 'RELEASE="${REVISION}-${BRANCH}"' 'RELDATE=$(awk' $'\'/__FreeBSD_version.*propagated' to newvers/ {print $'$3}\'' '${PARAMFILE:-${SYSDIR}/sys/param.h})'
+ awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' /sys/param.h
awk: can't open file /sys/param.h
 source line number 1

So it appears that:

${PARAMFILE:-${SYSDIR}/sys/param.h}

became just:

/sys/param.h

suggesting that both PARAMFILE aned SYSDIR were empty/undefined.
But looking around shows that SYSDIR being empty/undefined can
lead to PARAMFILE being /sys/param.h directly.

A grep shows for PARAMFILE :

/usr/src/include/Makefile:      env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \
/usr/src/sys/conf/newvers.sh:RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h})

and for PARAM_H :

/usr/src/include/Makefile:PARAM_H=              ${SYSDIR}/sys/param.h
/usr/src/include/Makefile:osreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH}
/usr/src/include/Makefile:      env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \


I got the message for the above from doing:

poudriere -x jail -c -m src=/usr/src -J 32 -v head_at_355027 -j testBugzilla215561

(with an appropriate env MAKEOBJDIRPREFIX=. . . for my
environment). This was as part of seeing if an old
bugzilla report can be closed. (It can be.)

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Sun Dec 08 2019 - 04:02:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:22 UTC