Instructions For Changing an OpenSolaris Unbundled IPS Package

[Last updated 12th July 2010 to work with build #134. Thanks to Chris Quenelle for working out what changes were needed to the scripts used for publishing].

Yet another project team need to upgrade their unbundled OpenSolaris software, so it's time to write out the instructions and just point them at them. They will need to adjust to taste. These instructions are also some what Oracle-internal specific.

When I'm updating one of the unbundled OpenSolaris packages, then I'll do something like the following. There needs to be a bug number in the OpenSolaris Bugzilla for this work, so let's pick 13523 (the recent one used for NetBeans 6.8):

  1. Check out the latest pkg source workspace:

          $ mkdir -p ~/pkg/bugs/13523
          $ cd ~/pkg/bugs/13523
          $ hg clone ssh://anon@hg.opensolaris.org/hg/pkg/gate
          

  2. Make any changes to the unbundled IPS package manifest file.

    For example, if you wanted to change the version number for the NetBeans packages, then you would edit the .../gate/src/util/distro-import/unbundleds/NetBeans file and adjust the version lines accordingly.

  3. Build and install your workspace:

          $ cd gate/src
          $ make -e; make -e install; make -e packages
          

    You might need to setup your OpenSolaris machine so that the build process will work. I have some notes from about a year ago, when I went through this.

    Note that the pkg build process doesn't currently work properly with GNU Makefile, so make sure your PATH is something like:

          export PATH=/opt/sunstudio12.1/bin:/usr/bin:/usr/sfw/bin:/usr/X11/bin:/usr/sbin:/sbin:/usr/gnu/bin
          

    so that it picks up the correct make executable.

    There are a couple of packages you might need to install to get pkg (and associated packaging commands) to run properly. These are:

            $ pfexec pkg install SUNWpython26-pyopenssl
            $ pfexec pkg install SUNWpython26-simplejson
          

  4. Copy three shell scripts (originally written by David Comay):

    start-depotd
    start-import
    start-cluster

    into ~/pkg/bugs/13523/gate and adjust them accordingly. If you look at them, you'll hopefully see what needs to be tweaked for your unbundled package. Let me know if you need more details.

  5. Run a local pkg.depotd server

    In one terminal window, I'll start up the pkg.depotd process by running:

          $ cd ~/pkg/bugs/13523/gate
          $ start-depotd
          

    and then monitor it with:

          $ tail -f errs.depotd
          

  6. Before I can publish my unbundled package, I need to publish any WOS ON package to my local repository. This needs to be done otherwise certain things in the publish process aren't setup correctly:

    In another terminal window, I'll start up the importer.py package publishing process with:

          $ cd ~/pkg/bugs/13523/gate
          $ start-import
          

    and then monitor it with:

          $ tail -f errs.import
          

    Note that you should set:

    JUST_THESE_PKGS to just the single package you'd like published (in this case driver/firewire). If you are building against an earlier build before the Great Renaming (which occurred in build #133), then you will need to pick one of the old style package names. I suggest SUNWiscsi.

  7. Now it's time to publish the unbundled package. I do this in yet another terminal window with:

          $ cd ~/pkg/bugs/13523/gate
          $ start-cluster
          

    and then monitor it with:

          $ tail -f errs.cluster
          

    Adjust PKGS in the start-cluster script to the location of the new unbundled SVR4 packages you want to publish.

    The start-cluster script is now setup to publish against build 134. If you want to publish your unbundled packages against another build (say 126), then adjust the BUILDNO= line accordingly.

    If it's successfully published the packages to my local repository, I can then look at them via my browser at http://stard.sfbay.sun.com:13523

  8. I will then need to install and test my new packages:

          $ pfexec pkg set-authority -P -O http://stard.sfbay.sun.com:13523 bug13523
          $ pfexec pkg install developer/netbeans
          $ pfexec pkg set-authority -P opensolaris.org
          $ pfexec pkg unset-authority bug13523
          
  9. Then I'll test these new package(s), and repeat steps 2-8 as needed.

  10. When things are looking good, you will need to get a code review. For simple changes like this, the differences can be sent as part of the message to the pkg-discuss mailing list. Use:
          $ hg diff
          
    to get a set of diffs for the changes you've made. An example of such a code review request can be found here.

  11. When the code review request has been approved, then the changes need to be checked into the pkg source workspace. Initially unbundled project team members won't have checkin permission to this workspace, so they will need to send the diffs to somebody who does.

    First commit the changes:

          $ cd ~/pkg/bugs/13523/gate
          $ hg commit
          

    This puts you in the text editor. Add a one line comment to describe the change. Something like:

          13523 Integrate NetBeans 6.8 as an unbundled package  
          

    Note the changeset number with:

          $ hg tip
          changeset:   1954:bef1d4d2996f
          user:        Rich Burridge 
          date:        Wed Jun 23 07:30:54 2010 -0700
          summary:     13523 Integrate NetBeans 6.8 as an unbundled package
          

    Export the changeset:

          $ hg export 1954:bef1d4d2996f >~/PKG-EXPORT/pkg-13523.patch
          

    and then send the pkg-13523.patch file to the pkg developer who can check it in for you.

[]

[]

Comments:

Post a Comment:
Comments are closed for this entry.
About

user12607856

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today