Instructions For Testing an OpenSolaris IPS Package Change
By user12607856 on Jul 14, 2009
I've written these notes out for two people so far, so it's probably time I created a blog post. I can then just point future interested parties here, and they can adjust to taste. The notes are some what Sun-internal specific.
When I'm trying to fix a bug that involves changing the way that an IPS package is created from an SVR4 package, then I'll do something like the following. (This was for bug #9683):
- First I check out the latest pkg source workspace:
$ mkdir ~/pkg/bugs/9683 $ cd ~/pkg/bugs/9683 $ hg clone ssh://email@example.com/hg/pkg/gate
- Next, I'll edit the files in the workspace as appropriate and build it:
$ 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:
so that it picks up the correct Makefile.
- Next, I'll copy two shell scripts,
(originally written by David Comay)
~/pkg/bugs/9683/gateand adjust them accordingly. If you look at them, you'll hopefully see what needs to be tweaked for your situation. Let me know if you need more details.
- Next I need to run a local pkg.depotd server
In one terminal window, I'll start up the pkg.depotd process by running:
$ cd ~/pkg/bugs/9683/gate $ start-depotd
and then monitor it with:
$ tail -f errs.depotd
- Next I need to publish my new package(s) to my local repository:
In another terminal window, I'll start up the solaris.py package publishing process with:
$ cd ~/pkg/bugs/9683/gate $ start-import
and then monitor it with:
$ tail -f errs.import
Note that you should set:
JUST_THESE_PKGSto just the list of packages you'd like publish (space separated).
WOS_PKGSto a list of the places where you can find the SVR4 packages (space separated). In other words, add the location of your new SVR4 packages to the front of this list. This will be something like:
export WOS_PKGS="/where/my/packages/are /net/netinstall.sfbay/export/nv/x/111/Solaris_11/Product/"
The script is setup to publish against build 111. If you want to publish against another build (say 118), then adjust the two occurrences of "111" 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:29683
- I will then need to install and test my new packages:
$ pfexec pkg set-authority -P -O http://stard.sfbay.sun.com:29683 bug-9683 $ pfexec pkg install SUNWcs $ pfexec pkg set-authority -P opensolaris.org $ pfexec pkg unset-authority bug-9683
- Then I'll test these new package(s), and repeat steps 2-6 as needed.