Lee Packham’s Corner
The rants of a software busy body
  • Home
  • Gallery
  • About
  • dtrace Stuff

pkgsrc and OpenSolaris 2008.05 - made easy

Open Solaris 1 Comment »

This is something that’s been bugging me for ages. I could not easily make pkgsrc bootstrap and compile packages under OpenSolaris. Today I cracked it:

  1. Grab the latest stable tarball and gtar xzf it somewhere sensible (under /usr is good).
  2. pfexec pkg install SUNWgcc sunstudioexpress SUNWgmake
  3. pfexec pkg install SUNWxwinc
  4. pfexec pkg install SUNWcvs SUNWgnome-common-devel
  5. su
  6. cd /usr/pkgsrc/bootstrap
  7. export PATH=/usr/ccs/bin:$PATH
  8. ./bootstrap
  9. <patience>
  10. Edit your .bash_profile to make sure /usr/pkg is in your path

And you’re done! Working a charm for me here.


September 12th, 2008 |



OpenSolaris 2008.05 finally works properly on HP Proliant ML115 G5

Solaris No Comments »

Finally, OpenSolaris 2008.05 snv_97 is out! This includes the network driver for the network card on the HP Proliant ML115 G5 (the Broadcom BCM 5722). By surprise, it also includes the GFX driver for the onboard graphics card (some MGA 200 thing). This makes installation a lot easier than trying to do it via Text.

This is great news. I can finally drop running Solaris under ESXi 3.5u2 and get onto using the OpenxVM (which is really XEN, but packaged by Sun). Why is that good news? I prefer native ZFS. Speed being the main thing.

You can get the DVD directly from Genunix in both primary languages and all languages formats.


September 12th, 2008 |



Not so Genius iTunes

Mac / OSX No Comments »

The new iTunes 8 came out yesterday! Excellent. Loving the new features - especially the Genius playlist thingie. Apart from… It’s not ACTUALLY that good. Sorry. If you’re listening to a popular artist (Say Coldplay, Michael Jackson or similar), it’s great. If you’re listening to one of the reams of Christian music albums, forget it.

Genius just pops up a message saying “Tough” (see the image for the proper text) when I click the little Genius button while Tim Hughes is playing. Tim Hughes is one of the most popular worship leaders in the UK (and a top guy to boot). I was hoping it would find other inspirational songs when I hit the button. Alas, just the error.

The iTunes store had no trouble finding other Christian tracks for me to buy in the Genius sidebar! Figures. Pandora (although that’s no longer available) and last.fm don’t ever have this trouble. So why does iTunes. I put to you that Genius is truly not Genius.

EDIT: It can’t even handle the Mark Ronson - Version album. That’s far less obscure than some big religion thing!


September 10th, 2008 |



Debugging SMTP

Python 2 Comments »

I saw this today on djangosnippets and figured it’s useful enough for me to post! Sometimes when writing a webapp you need to debug the output of your e-mail sending. This can be quite hard as things have to, usually, go via an SMTP server. What you really want is a quick way to grab the output with all the headers that YOUR code is setting - you can, easily, with Python.

OSX/Unix/Linux

sudo /usr/lib/python2.5/smtpd.py \
    -n -c DebuggingServer localhost:25

(obviously on Solaris/OpenSolaris you want to use pfexec instead of sudo!)

Windows

c:\python25\python.exe c:\python25\lib\smtpd.py \
    -n -c DebuggingServer localhost:25

You then get an output in the terminal window you ran it in every time a message hits the server. Handy.


September 9th, 2008 |



Be* Mixes Toolbar

Web/Tech No Comments »

When we made Mixes at work, we made sure that we built it in a RESTful way. This has a few cool advantages. Not least because one of the guys I work with, Lloyd Pick, made a quick toolbar up for Firefox to view the status of current matches.

It’s a very simple affair. The grey men change to green men as the server fills up and you can click to go to the page and get yourself on that server.

I’m loving it during the beta. It means I don’t have to sit on the page waiting for a game to get going, I can see instantly as I browse round the web that something’s going on.

Good job Limi, let’s hope Mozilla Addons get it out of the Experimental bin.

Mixes Toolbar @ addons.mozilla.org


September 1st, 2008 |



Postgres Replication with Slony on Solaris

PostgreSQL No Comments »

Slony doesn’t compile out of the box on a Solaris 10/OpenSolaris 2008.5 box. Quite frustrating! Even with everything installed, it can’t find libpgport.a. I tried hunting through Google, but had no joy - but I did fix it!

Assuming you’re using Postgres 8.2.9 (that’s the latest shipping version in Solaris 10/OpenSolaris):

  1. Grab the source code for Postgres
  2. Make sure Coolstack 1.3 is installed (or some other copy of readline)
  3. Make sure /opt/coolstack/lib is in your crle path
  4. Make sure you have sunstudio or sunstudioexpress installed and in the path
  5. gtar xjf postgresql-8.2.9.tar.bz2
  6. cd postgresql-8.2.9
  7. CC=cc CXX=CC ./configure --prefix=/opt/postgres \
    --with-libs=/opt/coolstack/lib \
    --with-include=/opt/coolstack/include
  8. cd src/port
  9. gmake
  10. cp *.a /usr/postgres/8.2/lib

Now you’ll be able to make Slony. I’m not saying this is the right way, but it certainly worked for me and I now have it up and running just fine.


August 28th, 2008 |



Apple iPhone 2G advert banned

Uncategorized No Comments »

So Apple’s UK advert for ‘All parts of the Internet’ on the iPhone has been banned. It’s taken them long enough, the advert was for the old 2G phone, not the new one. It’s also well over 6 months old.

Included here for viewing pleasure:


August 27th, 2008 |



WARNING: Time-of-day chip unresponsive; dead batteries?

Uncategorized 1 Comment »

I was getting this a lot in ESXi 3.5 with OpenSolaris snv_95. Until I spotted a useful snippet on the OpenSolaris forums.

I thought, what the hell. I ssh’d into the ‘host’ (you need to enable it, instructions can be found here) and then went to the vm’s directory in vmfs and deleted the .nvram file. Then started up the VM again and the problem was all gone! Woohoo! No more 1986 vm. Now if only the other problems with performance could be sorted.


August 26th, 2008 |



Phone Stuck on ‘Setup new iPhone’

Mac / OSX No Comments »

This morning I updated to 2.0.2 of the iPhone firmware (I have an original iPhone). My phone is unlocked to Vodafone using Pwnage - I won’t provide links to all that stuff here. Problem was, I put the phone into recovery mode, restored my new custom 2.0.2 firmware and iTunes went "Do you want to restore xyz backup?" Yes! This is what I usually do and it works every time.

Anyhow, it restored as normal and rebooted the phone. Only iTunes still saw it as a new phone! That’s not right at all! Anyway a quick Google dug up this thread with details on how to fix it. Appears it’s a common 2.0.2 problem then.

  1. Click set up as new iPhone and hit Continue
  2. As soon as it starts - CANCEL IT on the iPhone. Then cancel it on iTunes as well
  3. Unplug phone
  4. Turn off by holding the top button down then ‘Slide to turn off’
  5. Turn on the phone by pressing the top button again
  6. Once fully booted, plug in phone

And then it all shall work well again.


August 26th, 2008 |



Adding disks in ESXi to OpenSolaris

Open Solaris 1 Comment »

Cool, I’ve got my VM up and running with OpenSolaris 2008.05 @ snv_95 in ESXi 3.5 U2 on my nice new server.

Now - to add more disks. I wanted to add 3 new hard disks to use RAID-Z. Obviously I would be using 3 physically seperate disks, but make vmdk’s on each of them. I wanted to do this without rebooting at all, and manged it. Here’s how:

  1. Create new DataStores in the VMware Infrastructure Manager.
  2. Add 3 new virtual hard disks to the VM, making sure they are all the same size but on 3 different data stores.
  3. Apply the changes
  4. SSH into the VM (or use the console… SSH is better)
  5. pfexec devfsadm -c disk
  6. pfexec zpool create <name here> raidz c4t1d0p0 c4t2d0p0 c4t3d0p0

Obviously device nodes might be different, those were what they were for me. Was very nice to be able to do this with zero downtime on the server itself.

Step 5 forces Solaris to reload the /dev structure in relation to disks. Means all the new /dev/rdsk and /dev/dsk nodes are created without the normal reboot. Step 6, obviously, is the creation of the zpool. Once you have that - go ahead and store lots of stuff!


August 17th, 2008 |



Previous Entries
Next Entries
  • Friend's Blogs/Sites

    • David Rickard
    • Lloyd Pick
    • Michael Smith
  • Recent Posts

    • Is it any wonder the world is infested with spam?
    • The Wowhead Christmas Wallpaper
    • Unibody Macbook Pro constantly waking up
    • How Warcraft reigned supreme in 2008
    • CRY vs. DRY
  • Archives

    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • November 2007
    • October 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • January 2007
    • December 2006
    • October 2006
    • September 2006
  • Recent Tracks (last.fm)

    • Nickelback – Gotta Be Somebody 16 hours ago
    • Nickelback – Burn It to the Ground 16 hours ago
    • Nickelback – Something in Your Mouth 16 hours ago
    • Lisa Miskovsky – Still Alive (The Theme from Mirror's Edge) (Paul Van Dyk Mix) 16 hours ago
    • The Prodigy – Charly 20 hours ago
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
Copyright © 2009 Lee Packham’s Corner All Rights Reserved
RSS XHTML CSS Log in
Wp Theme by n Graphic Design
Powered by Wordpress