All | 43 Folders | Accessibility | BoingBoing | Books | Computer Related | Family | Films | General | Hacking | Hobbies | Humor | Java | Links | Omni | OpenSolaris | Puzzles and Games

« Spicy vegetarian... | Main | Book Buying And... »
20091110 Tuesday November 10, 2009

Instructions For Changing an OpenSolaris Unbundled IPS Package

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 Sun-internal specific.

[Last updated 4th February 2010].

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 a bug number of 12999:

  1. Check out the latest pkg source workspace:

          $ mkdir -p ~/pkg/bugs/12999
          $ cd ~/pkg/bugs/12999
          $ 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 ClusterTools8 packages, then you would edit the .../gate/src/util/distro-import/unbundleds/ClusterTools8 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 Makefile.

    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/12999/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/12999/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/12999/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 I picked SUNWiscsi (but it can be any of them).

    At the end of the errs.import output you will see something like:

          ./build_entire_incorporation: fatal error
          *** Error code 1
          make: Fatal error: Command failed for target `126/entire.incorporation'
          Current working directory /export/home/george/ips/gate/src/util/distro-import
          *** Error code 1
          make: Fatal error: Command failed for target `126/entire'
          Current working directory /export/home/george/ips/gate/src/util/distro-import
          *** Error code 1
          make: Fatal error: Command failed for target `redist_import'
          Current working directory /export/home/george/ips/gate/src/util/distro-import
          *** Error code 1
          make: Fatal error: Command failed for target `126/redist_import' 
          

    These errors can be ignored. You just need to make sure you got an output line earlier, similar to:

          PUBLISHED: pkg://bug12999/SUNWiscsi@0.5.11,5.11-0.126:20091214T185611Z 
          

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

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

    and then monitor it with:

          $ tail -f errs.cluster
          

    NONWOS_PKGS to a list of the places where you can find the Non-WOS SVR4 packages (space separated). In other words, add the location of your new unbundled SVR4 packages to the front of this list if one of the existing entries doesn't already contain them. This will be something like:

          export NONWOS_PKGS="/where/my/packages/are /net/paradise.sfbay/export/integrate_dock/nv/nv_osolub/all /net/paradise.sfbay/export/integrate_dock/nv/nv_osolub/${ARCH} /net/paradise/export/integrate_dock/nv/nv_osol0906/${ARCH} /net/paradise/export/integrate_dock/nv/nv_osol0906/all"
          

    The start-cluster script is setup to publish against build 111. 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:32999

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

          $ pfexec pkg set-authority -P -O http://stard.sfbay.sun.com:32999 bug12999
          $ pfexec pkg install clustertools
          $ pfexec pkg set-authority -P opensolaris.org
          $ pfexec pkg unset-authority bug12999
          
  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/12999/gate
          $ hg commit
          

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

          12999 Upgrade ClusterTools 8 to version 8.2.1
          

    Note the changeset number with:

          $ hg tip
          changeset:   1470:0775809e07bd
          tag:         tip
          user:        Rich Burridge 
          date:        Thu Nov 09 12:39:57 2009 -0800
          summary:     12999 Upgrade ClusterTools 8 to version 8.2.1
          

    Export the changeset:

          $ hg export 1470:0775809e07bd >~/PKG-EXPORT/pkg-12999.patch
          

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

[]

[]

( Nov 10 2009, 07:23:58 AM PST ) [Listen] Permalink

Comments:

Post a Comment:

Comments are closed for this entry.