Instructions For Testing an OpenSolaris IPS Package Change
|
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://richb@hg.opensolaris.org/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 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/SunStudioExpress/bin:/usr/bin:/usr/sfw/bin:/usr/X11/bin:/usr/sbin:/sbin:/usr/gnu/binso that it picks up the correct Makefile.
- Next, I'll copy two shell scripts,
start-depotd
and
start-import
(originally written by David Comay)
into
~/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-depotdand 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-importand then monitor it with:
$ tail -f errs.importNote 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.
( Jul 14 2009, 12:17:32 PM PDT ) [Listen] Permalink Comments [1]
Closed TRACKEDINBUGSTER - Two Months Later
|
See a previous post for more background. Well it's almost two months on, and I've shuffled a load more bugs over to Bugster, so I thought I'd run my script again. |
There are now 644 bugs that have been closed in OpenSolaris Bugzilla as TRACKEDINBUGSTER. Here's their current status, this time with percentage figures:
1-Dispatched: 146 22.67% 2-Incomplete: 24 3.72% 3-Accepted: 70 10.87% 4-Defer: 16 2.48% 5-Cause Known: 6 0.93% 6-Fix Understood: 6 0.93% 7-Fix in Progress: 15 2.33% 8-Fix Available: 11 1.71% 10-Fix Delivered: 179 27.80% 11-Closed: 171 26.55%
( Apr 14 2009, 08:58:51 AM PDT ) [Listen] Permalink Comments [3]
Backing Up Your Twitter Posts
Now I'm
twittering
I wanted to make sure I had a way to locally save my
pearls of wisdom drivel. From googling, I'd
found
tweetake
and
twistory
but didn't like the idea of passing over my username
and password to a site I didn't know.
I then stumbled on a Python frontend to the Twitter API. I downloaded the compressed tarball and unpacked, built and installed it with:
$ gzip -dc python-twitter-0.5.tar.gz | tar -xvf - $ cd python-twitter-0.5 $ python setup.py build $ pfexec python setup.py install
Now "backing up" my tweets is as simple as running:
$ python backup.py > richb-tweets.txt
where backup.py is:
import twitter
api = twitter.Api()
statuses = api.GetUserTimeline("richburridge")
for s in statuses:
date_ts = " ".join(s.created_at.split()[:4])
print "%s: %s\n" % (date_ts, s.text)
for output that looks like:
Mon Mar 02 20:39:10: Oooh! Twitter has a Python front-end to it's API: http://code.google.com/p/python-twitter/ I can see hours of tinkering ahead. Mon Mar 02 19:10:46: Added twitter monitor thingy to left column on main blog. Didn't help that Twitter went oopsie while I was debugging this. ...
(Adjust the "richburridge" user name to your own, if you want to use this).
Still lots more to explore with python-twitter, but that's enough for today.
( Mar 02 2009, 02:26:58 PM PST ) [Listen] Permalink
Closed TRACKEDINBUGSTER
|
For the past couple of weeks, I've been triaging bugs in the kernel and software sub-categories in the OpenSolaris Bugzilla bugs database. |
Bugs that are filed in these two sub-categories tend to be catchalls for all the bugs that don't have another existing product/cat/sub-cat. defined that they could go into. They are also typically dumping grounds for bugs that are not being actively looked at by Sun engineers.
OpenSolaris releases are currently based on Nevada builds. We just take the SVR4 packages that the Nevada distributions create, and convert them into IPS packages and put those in network repositories or deliver via updated ISO images of the Live CD.
If we want these bugs to be fixed properly, then those fixes need to be applied to the Nevada sources. In order to get the Sun engineers to do that, they need to be aware of the bugs. That's why they are being transferred over to the Bugster database and closed here.
It's far from a perfect system, but hey, you work with what you've got.
In doing this bug transferring, I noticed that a lot of the new bugs that I'd filed in Bugster, were being actively picked up and worked on. That got me curious on just how successful this reverse transfer has been.
I wrote a small Python script that did a query to get a list of all the bugs that have been closed as TRACKEDINBUGSTER, and then scrapped this to get a list of all the BugsterCR values from their Whiteboard fields. I then used an internal Bugster->Web web site, to read each of those bug reports and extract the Status field. I then summarized the results.
(I fully appreciate that this would be much easier if I used SQL to integrate these bugs databases, but I don't know how to do that, or even where to go to find out how to do that).
Currently there are 400 bugs that have been closed in OpenSolaris Bugzilla as TRACKEDINBUGSTER. Here's their status:
1-Dispatched: 99 2-Incomplete: 19 3-Accepted: 59 4-Defer: 8 5-Cause Known: 4 6-Fix Understood: 3 7-Fix in Progress: 10 8-Fix Available: 6 10-Fix Delivered: 109 11-Closed: 87
The real bug that needs to be fixed here is to get the Sun engineers to actively monitor (and respond to) all bugs that are filed at defect.opensolaris.org (and I understand that that is being worked on), but it's nice to know that this triaging is having some effect, rather than all those open bugs just lying stagnant.
( Feb 17 2009, 03:16:09 PM PST ) [Listen] Permalink
How To Contribute Software To OpenSolaris
|
As you've probably seen from a previous post, we now have OpenSolaris IPS pending and contrib repositories. On the web pages referenced there, are some instructions on how to go about contributing your own favorite software to these repos. |
This is great, but what's needed is a step-by-step guide with an example.
John Sonnenschein is a new member of our team, and is going to help out with OpenSolaris packaging. I recently asked him to investigate what it would take to create a .spec file for Drupal, so that it could then be a candidate for the "pending" OpenSolaris IPS repository.
He's now done that, and blogged about all the steps and included the sample .spec file.
It looks good (thanks John). I asked him:
"How did you solve the there-is-no-scripting-in-IPS part"?
and he replied:
"I didn't need to for Drupal. The first time the user connects to the server it'll go through the setup script as a function of how Drupal works. It complains to the user with instructions how to set it up if the .php itself can't do the work."
Excellent. A properly written software package.
Hopefully John's note can be used to help others easily contribute their favorite missing packages to OpenSolaris.
( Jan 13 2009, 08:27:12 AM PST ) [Listen] Permalink
Radio Paradise on OpenSolaris?
|
This year, I'd really like to swap over to using OpenSolaris as my default desktop at home if possible, but there are several things that are just not there yet, and are therefore preventing me from doing so. |
The first one is being able to listen to my favorite Internet radio station. If I click on any of the "listen" links (such as the 128k MP3 one in my Firefox browser, I get the "Opening rp_128.m3u" popup, with Totem Movie Player as the default application. If I try to run that, Totem bitches that:
An error occurred The playback of this movie requires a MPEG-1 Layer 3 (MP3) decoder plugin which is not installed [ OK ]
Unfortunately it doesn't just ask me if I'd like to install one (like Ubuntu does the first time I try this on that platform). Also my Mac and Windows XP machine "just work", right out of the box.
I then tried Songbird. Same problem.
I found a LifeHacker entry on Radio Beta that looked promising. I entered "Radio Paradise" in the Quick Search field, and then clicked on the Play icon for the entry that it found. It then bitches that:
In order to listen to this radio, please download VLC and Firefox plugin (for MacOS X and Linux users.)
I clicked on that download link, and found that for Solaris (and therefore presumably OpenSolaris), that there are no precompiled binaries and that I would have to get the source code and build it myself.
My interest started to wane at this point.
Am I missing something? Is there a package I can just install that will allow me to do what I want on OpenSolaris?
[Technorati Tag: Internet Radio]
[Technorati Tag: Radio Paradise]
( Jan 05 2009, 08:07:11 AM PST ) [Listen] Permalink Comments [21]
OpenSolaris Pending and Contrib Repositories Online
|
With the official launch today of OpenSolaris 2008.11, we see two more package repositories coming online. |
pending - contains packages contributed from the community or by package generation programs that have completed the pending repository process. Packages in this repository are not qualified and are for "use at your own risk".
contrib - contains packages contributed from the community that have completed the contrib repository process. Packages in this repository have gone through some qualification but are still at a "use at your own risk".
(Admittedly the pending repository has been there for a few days).
If you are interesting in contributing more F/OSS packages to OpenSolaris, then check out the sw-porters contributing web page for all the details.
[Technorati Tag: Open Solaris]
( Dec 10 2008, 12:56:52 PM PST ) [Listen] Permalink
OpenSolaris 2008.11 - It's Available!
|
You've been patiently waiting, and we can now finally blog about it. After a lot of hard work by a lot of people all around the world, the new release is available for you to download now. It's easy to use and simple to install. Lots of new features for you to check out. See the online documentation on how to use it and for what's new. I hope everybody will give it a try as soon as possible, because this is the one everything else will be compared against. |
[Technorati Tag: Open Solaris]
( Dec 10 2008, 09:04:32 AM PST ) [Listen] Permalink
It's Available!
|
You've been patiently waiting, and it's finally ready. After a lot of hard work by a lot of people all around the world, the new release is available for you to download now. It's easy to use and simple to install. Lots of new features for you to check out. |
See the online documentation and what's new. I hope everybody will give it a try as soon as possible, because this is the one everything else will be compared against.
What? You didn't think I was blogging about something else did you?
( Dec 04 2008, 07:37:34 AM PST ) [Listen] Permalink
The IPS Code Swarm
You've seen the code. Now watch the video.
Albert White has put together a blog entry today about OpenSolaris Code Swarms.
There is a great video, which is a graphical representation of the development over time of the Image Packaging System, (which I started checking packaging changes into a couple of months ago). I just love how large scale changes are represented (such as the integration of a new WOS build with many new or changed packages).
Image Packaging System Code Swarm from Albert White on Vimeo.
(Thanks Alan).
( Nov 20 2008, 07:24:31 AM PST ) [Listen] Permalink Comments [1]
Getting the Freenode Channel List
|
This should have been a simple task, but it took longer than I expected. Perhaps somebody can show me a quicker, better way to do this. |
I've been connecting to the #pkg5 IRC channel on freenode.net for the last few days, and today I went to see what other channels were there. I'm using pidgin 2.5.1 on OpenSolaris 2008.11 (build 101a).
I knew enough about IRC to type /list in the input area at
the bottom of my conversation(s) window. When I do that, up comes a popup
dialog with a room list. I can click on the column headers to sort it
in various ways. Neat. How to I save the information, so I can process it?
Darned if I know. I furtled around in various menus and preference dialogs,
couldn't find anything useful and gave up.
I then installed XChat 2.8.6. Under the Server
menu, there is a List of Channels... menu item which brings
up another popup dialog of the Channels List. Again, you can sort in
various ways, but there is also a Save List... button. Yay!
I now have a text file containing a full channel list, sorted by the number of users, and from this I can extract useful URL's provided as part of the various channel descriptions.
( Nov 12 2008, 11:28:06 AM PST ) [Listen] Permalink
Trying To Fix the Intrusive Firefox
|
You may remember from a previous post, that if I clicked on a hyperlink in Thunderbird, then Firefox would be intrusive and start up on my current desktop. |
The "workaround" was to set "browser.tabs.loadDivertedInBackground" to True via "about:config" in Firefox.
Bug 175904 on Ubuntu's Launchpad has been tracking this problem, and on Monday, an interesting workaround appeared from Jeremy Nickurak
I wrote up a script that I call on opening URL's instead of calling firefox directly. It checks to see if there's a firefox window on the current desktop. If there is one, it'll focus it, and open the URL in a new tab there. If there isn't one, it'll just open a new window right where you are.
Hopefully this'll be useful to somebody.
It requires wmctrl to be installed. (sudo apt-get install wmctrl)
The script is attached to the bug. I thought I'd give it a try.
Well there is no equivalent of sudo apt-get install wmctrl
on my OpenSolaris box at the moment, so I downloaded the
tarball
for wmctrl, unpacked it and tried to build it with:
$ gzip -dc wmctrl-1.07.tar.gz | tar -xvf - $ cd wmctrl-1.07 $ ./configure --prefix=/usr $ make $ pfexec make install
Unfortunately it bitched about not having some of the X11 header files, so I had to do:
$ pfexec pkg install SUNWxwinc
before I was able to successfully build and install it.
Now I needed to get Thunderbird to recognize the new firefox-tab script. I put a copy of it in my own personal bin directory and gave it execute permission:
$ cd ~/bin $ mv ~/Desktop/firefox-tab . $ chmod +x firefox-tab
As I previously had set "browser.tabs.loadDivertedInBackground" to True via "about:config" in Firefox, then I had to revert that. I restarted Firefox for good measure.
Then I needed to terminate Thunderbird and
add three lines to the prefs.js file in my current Thunderbird profile
(~/.thunderbird/hd7h4tp9.default/prefs.js):
user_pref("network.protocol-handler.app.ftp", "~/bin/firefox-tab");
user_pref("network.protocol-handler.app.http", "~/bin/firefox-tab");
user_pref("network.protocol-handler.app.https", "~/bin/firefox-tab");
I then restarted Thunderbird and clicked on a hyperlink. Even though I had Firefox running on a different workspace with several tabs in it, it started up a new Firefox window on my current workspace (where Thunderbird was running). Hmm.
It's definitely running ~/bin/firefox-tab. It's just not
doing the right thing. If anybody has any ideas why this isn't working,
I'm all ears. For now I've gone back to my previous "workaround".
( Oct 24 2008, 11:25:26 AM PDT ) [Listen] Permalink Comments [4]
Determining Changes In The OpenSolaris Mercurial World
|
Coming from the GNOME open source development world, I'm used to seeing active discussion in the GNOME bugs, including patch attachments for the proposed fixes, and then a ChangeLog entry that lists the files that have changed and a description of the fix. |
The way that the OpenSolaris pkg engineers work is different. They've got their own equivalent Bugzilla bug database, but patch attachments are rare, and usually the last comment in the bug is something like:
Fixed in changeset ee3df64105403de274760b7de3bf78546105350b
which is not immediately useful if you want to see how the bug was fixed.
But it's not too much more work to derive a patch from that or a list of files that have changed, if you know the appropriate magical incantations.
First, find a wizard. In my case, I asked Danek Duvall.
Here's an example based on a recent change of mine to the pkg source workspace to make a slight adjustment to the fix for bug #2198. You'll see the last changeset value in comment #13. Let's turn that into a patch and a list of files that were changed.
If you want to follow along at home, you will need to first checkout a copy of the hg workspace:
$ hg clone ssh://anon@hg.opensolaris.org/hg/pkg/gate
To get a list of files that changed in a particular rev, first look at the log:
$ cd gate $ hg log | more changeset: 619:ee3df6410540 tag: tip user: Rich Burridge <...> date: Thu Oct 23 08:08:45 2008 -0700 summary: 2198 Need cluster packaging for OpenOffice.org 3.0 (fix versioning) changeset: 618:7be9399f34fc user: Bart Smaalders <...> date: Wed Oct 22 18:51:16 2008 -0700 summary: 4174 need hostid workaround for build 100a ...
From that, to get a list of the files that changed between rev #618 and #619, do:
$ hg stat --rev 618:619
To get a list of the changes in diff (patch) format for rev #619, you simply do:
$ hg log -p -r ee3df6410540
(Thanks Danek!)
( Oct 23 2008, 09:52:54 AM PDT ) [Listen] Permalink Comments [1]
Minor, the New Normal
|
Is it just me, or shouldn't the default Severity setting for new bugs being entered at defect.opensolaris.org, be normal not minor? |
The choices are:
- blocker
- critical
- major
- normal
- minor
- trivial
- enhancement
There's normal, sitting in the middle. Why isn't that the starting Severity? That's the way it works for GNOME and Mozilla.
Same for Priority. P3's in the middle, yet the default is P4.
Color me confused.
( Oct 14 2008, 07:54:51 AM PDT ) [Listen] Permalink Comments [2]
Arduino Night At The Next SVOSUG Meeting
|
Alan Duboff has just announced details of a special Arduino night at the next Silicon Valley OpenSolaris User Group meeting in Santa Clara on Thursday 23rd October 2008. |
I plan to be there. I better dust off my Arduino board.
Work is on-going in getting the full Arduino development environment running on OpenSolaris, but things are coming together nicely, mainly due to the work of Alan and John Plocher and John Weeks.
There will be a limited number of kits available at the meeting, so if you are interested in this, it is suggested that you get one ahead of time. See the various links in Alan's post for places that sell the kits.
For a good introduction to the world of Arduino, then I suggest the various lessons provided by ladyada.
( Oct 08 2008, 08:48:41 AM PDT ) [Listen] Permalink












