[oi-dev] OI package build process

Gary Mills gary_mills at fastmail.fm
Fri Jul 22 23:52:10 UTC 2022


On Fri, Jul 22, 2022 at 03:04:50PM -0600, naj at snapcon.com wrote:
> 
> 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.

Yes, that is how it is supposed to work.  GO applications, like zrepl
are the exception.  OI has some of them already.  The GO compiler
resolves references by downloading GO modules.  In the case of zrepl,
it downloads 46 modules from a variety of Internet sites.  It does
this based on files in the zrepl source tree.  The GO compiler knows
how to parse these files, and how to do the downloads.  By default,
all of this happens during the "build" target.

My questions are two.  First of all, will this work reliably for OI?
Secondly, is there any advantage to moving the download to an earlier
target?  Regardless, 46 modules will still be downloaded, still
without any cache.


-- 
-Gary Mills-		-refurb-		-Winnipeg, Manitoba, Canada-



More information about the oi-dev mailing list