Page MenuHomeFreeBSD

release: Fix NO_ROOT cross-building VM images
ClosedPublic

Authored by emaste on Thu, Oct 2, 10:09 PM.
Tags
None
Referenced Files
F132233696: D52874.id163394.diff
Wed, Oct 15, 1:17 AM
Unknown Object (File)
Fri, Oct 10, 11:47 PM
Unknown Object (File)
Fri, Oct 10, 11:47 PM
Unknown Object (File)
Fri, Oct 10, 11:47 PM
Unknown Object (File)
Fri, Oct 10, 11:47 PM
Unknown Object (File)
Fri, Oct 10, 11:47 PM
Unknown Object (File)
Fri, Oct 10, 5:24 PM
Unknown Object (File)
Fri, Oct 10, 5:24 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Hmm, in my testing pkg would infer the ABI by examining ${DESTDIR}/usr/bin/uname (where the rootdir is specified by -r). Is this change needed to address a corner case or did I miss something more basic?

release/Makefile.vm
195

It should be listed here too.

add one case noted by mark and one more pkg invocation

release/tools/vmimage.subr
97

Hmm, in my testing pkg would infer the ABI by examining ${DESTDIR}/usr/bin/uname

I guess this instance here (which I missed originally) is the issue -- when installing via pkgbase we won't have /usr/bin/uname yet here

release/tools/vmimage.subr
97

Hmm, ok. So, how does PKG_ABI get set? Looks like it's this block in release/Makefile:

197 .if !defined(NOPKGBASE) || empty(NOPKGBASE)                                                                                                                                                                                                                                                                               
198 PKGBASE_REPO_DIR= pkgbase-repo-dir                                                                                                                                                                                                                                                                                        
199 WSTAGEDIR!=     ${IMAKE} -f Makefile.inc1 -C ${WORLDDIR} -V WSTAGEDIR                                                                                                                                                                                                                                                     
200 PKG_ABI_FILE=   ${WSTAGEDIR}/usr/bin/uname                                                                                                                                                                                                                                                                                
201 PKG_ABI=        $$(${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI)                                                                                                                                                                                                                                                     
202 .endif

If I'm reading that right, it'll be set in the -z "${NOPKGBASE}" case, so this seems ok.

In release/Makefile, we use PKGBASE_INSTALL to install packages as well. Does that need the same treatment?

emaste added a reviewer: ivy.

another spot to plumb ABI through, from @markj

Works for me, please commit. If you don't mind I'd like to do the MFC of this one myself so I can fit it between doing another 16.0 snapshot run and marking the tree as ALPHA5.

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Oct 3, 12:31 AM
This revision was automatically updated to reflect the committed changes.