[oi-dev] OI package build process

naj at snapcon.com naj at snapcon.com
Fri Jul 22 21:04:50 UTC 2022


On 2022-07-22 12:23, Gary Mills wrote:
> I need a bit more information about the process that the OI build
> server uses.
> 
> I know, of course, that the "download" target is intended to download
> a source archive into a cache, the "unpack" target is intended to
> unpack the archive into a directory within the component directory,
> and that the "build" target is intended to compile the source files.
> 
> I'm attempting to develop a package for zrepl, another backup system
> for ZFS.  Zrepl is written in the GO language.  Like other GO
> applications, the "build" target downloads a large number of source
> files (aka GO modules) from various Internet sites before it does the
> actual compile.  This is how GO resolves references to other GO
> modules.  Is this behavior likely to be a problem for the OI build
> process?
> 
> I may be able to move GO's download to the "unpack" target.  It will
> still download many files.  There still isn't a cache.  Will this
> change offer any improvement to the OI build process?

It has been a few years since I built userland, but there were a few 
components that downloaded, unpacked and patched multiple archives prior 
to building  I know that when I was with Sun/Oracle, we discouraged 
things downloading required bits during the "build" phase.  We wanted to 
be sure that we were able to cache the source that we downloaded to have 
a copy of it for a variety of reasons.  Downloading into a cache was 
more community friendly, provided some stability that was worthwhile, 
and more.  The archive hashes also provide some guarantees.

GCC is an example of something that downloads, unpacks and patches 
multiple archives.  It downloads gcc, mpfr, mpc, and gmp prior to 
building.

"build" depends on "prep", which depends on "download", "unpack", and 
"patch". "patch" depends on "unpack". "unpack" depends on "download" and 
"download" depends on each downloaded archive.  There are intermediate 
targets and variations on this, but that is the high level.  By the time 
that you hit the "build" phase, the expectation was that you had the 
full component source and that it was ready to build.  The reality is 
that the "download" target was/is expected to download all of the source 
that you need.

I don't know if it is a goal of oi-userland, but there was a time when 
the Solaris userland build was expected to and did work disconnected 
from the internet.  I used to run "gmake download", prior to travel and 
update the cache on my laptop so that I could work disconnected on the 
plane.

At least that is what my addled brain is reminding me.

Just my $.02,
     -Norm







More information about the oi-dev mailing list