[OpenIndiana-discuss] The Wiki is a bit confusing as to how to build stuff

Lucas Van Tol catseyev9 at hotmail.com
Thu Mar 14 20:47:35 UTC 2013


I was poking around with something similar recently, after having gotten illumos to actually build/compile successfully on a VM (part of this was me wanting to test that).
http://wiki.illumos.org/display/illumos/How+To+Build+illumos

Maybe this will be useful to you; and I wouldn't mind corrections from anyone else if I've done something terribly wrong...

My process was to clone the newest packages from openindiana.org/dev into a 'newrepo', add the packages generated by the illumos nightly build (with higher version #/ONNV than OI, i.e. 151.1.7.1), host that repository locally/on the local network, and than use distro_const to generate a DVD based on it.  This should generate a mostly vanilla OI, with updated Illumos code and 'newrepo' as the default publisher. 


Something like:
--------------
##Create new repository
pkgrepo createrepo /newdist/repo
pkgrepo -s /newdist/repo set publisher   newrepo
##Prep 'temp' repository; should be able to dump it afterwards.  This is just to avoid clutter in newrpo
pkgrepo createrepo /temp/repo

#copy compiled Illumos packages into temp repository
for pkg in $(pkgrecv -s ~/src/illumos-gate/packages/i386/nightly/repo.redist --newest) ; do 
      pkgrecv -s ~/src/illumos-gate/packages/i386/nightly/repo.redist -d /tmp/repo  --raw $pkg
done
   
##Copy OI 'newest' distribution/packages into repository; for the rest of a functional OS.   I actually had a local mirror set up already; no idea how long this step would take.
pkgrecv -d /temp/repo --raw -s http://pkg.openindiana.org/dev '*'

##pkgmogrify everything; than send it into your new repository.   
##I can't recall where/who I got this from, I was searching for pkgmogrify with google at the time...
echo '<transform set name=pkg.fmri -> edit value pkg://[^/]+/ pkg://newrepo/>' > ~/changepublisher.mog

for pkg in  /temp/repo/*/* ; do
       pkgmogrify $pkg/manifest ~/changepublisher.mog > $pkg/manifest.new
       pkgsend -s /newdist/repo -d $pkg $pkg/manifest.newpub
done
-------------------------
After that; you should be able to point a pkg/server instance to it, and run this as a web-accessible repository.   
http://docs.oracle.com/cd/E23824_01/html/E21803/accessrepo2.html#repo_service1

Use this repository for /usr/share/distro_const/slim_cd/slim_cd_x86.xml   ; and than
distro_const build /usr/share/distro_const/slim_cd/slim_cd_x86.xml
should build a distro with newly compiled parts; and targeting your repository for updates.
It should be possible to use a different 'image creation' repo vs 'post install' repo, so you could have your version used for initial install; but looking for updates from pkg.openindiana.org/dev.
I'm not sure if/how to change the bootup/popups in distro_const though...

-Lucas Van Tol
 		 	   		  


More information about the OpenIndiana-discuss mailing list