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:
- 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 - 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/ClusterTools8file and adjust the version lines accordingly. - Build and install your workspace:
$ cd gate/src $ make -e; make -e install; make -e packagesYou 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/binso 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 Copy three shell scripts (originally written by David Comay):
start-depotd
start-import
start-clusterinto
~/pkg/bugs/12999/gateand 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.- 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-depotdand then monitor it with:
$ tail -f errs.depotd - 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-importand then monitor it with:
$ tail -f errs.importNote that you should set:
JUST_THESE_PKGSto 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.importoutput 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 - Now it's time to publish the unbundled package. I do this in yet
another terminal window with:
$ cd ~/pkg/bugs/12999/gate $ start-clusterand then monitor it with:
$ tail -f errs.clusterNONWOS_PKGSto 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-clusterscript is setup to publish against build 111. If you want to publish your unbundled packages against another build (say 126), then adjust theBUILDNO=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
- 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 - Then I'll test these new package(s), and repeat steps 2-8 as needed.
- 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 diffto get a set of diffs for the changes you've made. An example of such a code review request can be found here. - 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 commitThis 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.1Note the changeset number with:
$ hg tip changeset: 1470:0775809e07bd tag: tip user: Rich Burridgedate: 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.patchand 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 are closed for this entry.











