Hi All:

Just to follow up.  Here's what I've done and it *seems* to work (and I'm this 
close --->][<--- to reproducing accessible install using the new distro 
constructor):

0) ZFS must be used since this relies upon checkpoints (hooray for 
checkpoints!).

1) Set up a local IPS repository that holds only the stuff I want to add or 
replace on the distro.  It is served via http://localhost and I use 
gate/src/util/distro-import/solaris.py to push things to it.  In my case, these 
things are extra speech packages as well as a rebuilt SUNWslim-utils.  When 
using solaris.py, I just take care to bump the revision numbers up higher and 
higher each time (i.e., the "-b x.y" parameter passed to solaris.py).  (I wish 
I 
knew the magic to remove things from my local IPS.)

2) Created a simple executable 'foo' shell script (attached) that adds my local 
IPS as an authority to the package image area, uninstalls the package(s) I want 
to remove, installs the new package(s) from my local IPS, and then resets the 
authority.  I put the executable 'foo' script in the same directory where I run 
distro_const and make sure "." is in my PATH.  NOTE: the 'foo' script is pretty 
brute force.  It could be cleaned up a little and perhaps modified to allow you 
to express a list of packages to add/remove/replace.

3) Added 'foo' as the first finalizer in slim_cd.xml.

4) "pfexec /usr/bin/distro_const build -r 1 slim_cd.xml" to resume at 
checkpoint 
#1, which is the first finalizer ("foo").  With the changes Jean is making, I'm 
guessing this will become "pfexec /usr/bin/distro_const build -r foo 
slim_cd.xml".

Seems to work very nicely and reduces the turnaround time a whole bunch since I 
don't need to download every single package off of the network each time I want 
to try something out.  Plus, it guarantees that I'm working with actual 
packages 
so I kind of 'get it right' sooner.

Thanks everyone for your help on IRC and in e-mail.  Someday, I'll meet more of 
you face-to-face,

Will

PS - I put my additional 'speech' packages in the <packages> section of 
slim_cd.xml and set my local IPS as the pkg_repo_default_authority and moved 
the 
existing default authority to pkg_repo_addl_authority.  For the sake of playing 
and experimenting, especially if I want to update/test packages a lot, I 
suppose 
I could have just stayed with the existing default authority and just moved 
these packages into the 'foo' script as well.

PPS - The uninstall/re-install thing will only work nicely if you are lucky and 
don't have packages that are dependencies of other packages.  I've been looking 
for the magic to tell pkg "yes, I really want to remove this package and I 
don't 
care who depends upon it -- I *promise* I'll put a new one in place very soon 
to 
alleviate your fears and make your life whole again."  Does this magic exist?

Jean McCormack wrote:
> Willie Walker wrote:
>> Karen Tung wrote:
>>  
>>> What Jack described is probably the easiest thing for you to do right 
>>> now.
>>> If you want to "automate" it and utilize the checkpointing feature, 
>>> you can
>>> write a little finalizer script yourself that does the copying of 
>>> your modified
>>> files to the pkg_image area.  Then, put this finalizer script as the 
>>> first one
>>> in the finalizer script list.
>>>     
>>
>> Awesome.  Makes perfect sense.  At this point, my finalizer script can 
>> also use the pkg command to remove/replace/add packages, right?  It 
>> *seems* like everything is in place at that point and that the distro 
>> constructor already has some python tools I could use to accomplish this.
>>   
> Yes. But be careful about the repository it pulls from. At the end of 
> the population
> of the pkg_image area, we set the default authority to the standard 
> opensolaris one.
> You'll want to make sure you override this.
> 
> Jean
>> If this can be done, the distro constructor should just about have 
>> what I need, I think, and no enhancement requests would be needed.  :-)
>>
>> Thanks!
>>
>> Will
>>
>>  
>>> In order to do the way of adding packages you mentioned below, we 
>>> probably
>>> need 2 package lists, and check pointing between each adding each list.
>>> It could be a useful feature, but we definitely won't have time for this
>>> for the Nov release.  Please file an enhancement request in bugzilla so
>>> we can keep track of it, and if we found that a lot of people want to 
>>> do it,
>>> we can implement it in the future.
>>>
>>> Thanks,
>>>
>>> --Karen
>>>
>>>
>>>
>>> Jack Schwartz wrote:
>>>    
>>>> Hi Will.
>>>>
>>>> Here's the easiest way: If you to change a file delivered by a 
>>>> package, just add the changed file directly to the pkg_image area, 
>>>> then run steps 2+.  Once you get things the way you like them, move 
>>>> the stuff you changed to where you build your package.  Then rebuild 
>>>> the package, add to your repo, and do one (hopefully) final complete 
>>>> run including the IPS bringover from your repo.
>>>>
>>>>     Hope that helps,
>>>>     Jack
>>>>
>>>> Willie Walker wrote:
>>>>  
>>>>      
>>>>> Hi All:
>>>>>
>>>>> Sorry...one more question.  :-)  I'm trying to find a way to 
>>>>> eliminate the step to grab aaallllll the packages for the system 
>>>>> when all I really want to do is just change or add a couple packages.
>>>>>
>>>>> For example, maybe I just want to rebuild SUNWslim-utils or add 
>>>>> SUNWgnome-a11y-speech-espeak.  From a prior run, something has 
>>>>> already pulled all the other packages off my IPS and put them in 
>>>>> the package image.  Since that takes sooooooooo long, I'd like to 
>>>>> avoid repeating that step if I can.
>>>>>
>>>>> So...what I'm looking for is a way to:
>>>>>
>>>>> 1) Populate the package image with everything from the standard IPS 
>>>>> files and make a checkpoint.
>>>>>
>>>>> 2) Start with the checkpoint.
>>>>>
>>>>> 3) Create/modify the packages I want to play with.
>>>>>
>>>>> 4) Put my new packages in the package image, removing/replacing old 
>>>>> ones if necessary.
>>>>>
>>>>> 5) Build my iso and test.
>>>>>
>>>>> 6) Go back to #2.
>>>>>
>>>>> I could accomplish this, the load on the IPS server would be 
>>>>> greatly reduced and I would be able to prototype/test much faster.
>>>>>
>>>>> Is this possible today?  I played with checkpointing and it seems 
>>>>> to work (yeah!), but I'm not sure how to update the package image 
>>>>> without just replacing it entirely.
>>>>>
>>>>> Will
>>>>>
>>>>> _______________________________________________
>>>>> caiman-discuss mailing list
>>>>> caiman-discuss at opensolaris.org
>>>>> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
>>>>>               
>>>> _______________________________________________
>>>> caiman-discuss mailing list
>>>> caiman-discuss at opensolaris.org
>>>> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
>>>>         
>>
>> _______________________________________________
>> caiman-discuss mailing list
>> caiman-discuss at opensolaris.org
>> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
>>   
> 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo
URL: 
<http://mail.opensolaris.org/pipermail/caiman-discuss/attachments/20080924/1acabd5b/attachment.ksh>

Reply via email to