Software Freedom Day

FOSS, GNOME, NewZealand, OpenSolaris, Sun 1 Comment

The Wellingtonites, led by my very own Jayne, launched their initiative for Software Freedom Day. The event will, predictably, held on Saturday 20th September at the Convention Centre. We’re planning on having a hackfest organized by SuperHappyDevHouse (and br3nda), an installfest organized by WellyLug, and best of all, an open source BarCamp.

Really looking forward to this, and hoping a large crowd get out and register for this event. It’ll be a lot of fun. I’ll be doing a quick session on OpenSolaris, DTrace, and anything else I’m asked to do (perhaps an impromtu GNOME session?).

Hoping this is going to charge up the other teams around NZ into organizing events!

OpenSolaris Moo Cards!

General 1 Comment

A while ago I ordered some moo cards. My business cards from Sun had run out, and badly needed some more. Figured I’d join the fad and ordered some based on the pretty iPhone wallpapers. This week, they arrived, and I’m pretty thrilled with them. The image quality is a little fuzzy in places, but they’ll be perfect for the job.

OpenSolaris Moo cardsOpenSolaris Moo cardsOpenSolaris Moo cardsOpenSolaris Moo cards
OpenSolaris Moo cardsOpenSolaris Moo cardsOpenSolaris Moo cardsOpenSolaris Moo cards

Playing with IPS and SFE, Part II

General, OpenSolaris 2 Comments

After picking up Petr’s excellent work to add IPS support to pkgbuild, generating IPS packages from SFE is now even easier.

Download an updated install image of pkgbuild, and put it in /opt. Now set up your usual desktop CBE environment, but add /opt/pkgbuild-beta/bin to the front of your path.

With the latest changes, pkgtool will automatically create an SVr4 package and generate the necessary IPS scripts and manifests and automatically publish to http://localhost:80/ (or $PKG_SERVER).

gman@rampage:~/SFE/$ pkgtool --interactive --download --ips build SFEmonkey-bubble.spec

though does not yet install them by default. It will however install an SVr4 package if you provide --svr4 at the command-line instead of --ips

If for some reason you decide to delete the contents of your repository, then you can simply

gman@rampage:~/$ cd packages/PKGMAPS/scripts
gman@rampage:~/packages/PKGMAPS/scripts/$ ./SFEmonkey-bubble_ips.ksh

to import the package.

The enhancements also try and detect the appropriate grouping from the freedesktop.org menu spec if you’ve defined ‘Group’ in your spec file, and will also attempt to add a license if you’ve specified it in ‘SUNW_Copyright’.

Next step, cleaning up SFE packages to include the right meta-information and copyrights/licenses.

OpenSolaris Fan Buttons

General 4 Comments

I did a bit of work to clean up the existing downloadables page (now called OpenSolaris Artwork) – hopefully now you’ll know that there are cutsey iPhone backgrounds that you can download with the new OpenSolaris logo.

Dan also sent me a new set of OpenSolaris (.com) fan buttons – Go check them out!

Playing with IPS and SFE

OpenSolaris 2 Comments

Decided to spend some time playing around with IPS and SFE on Friday afternoon, to figure how easy it would be to contribute a package to our contributor package repository.

Set up an IPS repository

First things first, I set up a package repository locally. This was a piece of cake –

 
gman@rampage:~/# svccfg -s pkg/server "setprop pkg/inst_root=/var/repo" 
gman@rampage:~/# svcadm refresh pkg/server 
gman@rampage:~/# svcadm enable pkg/server 
gman@rampage:~/# svcadm restart pkg/server

I tweaked the default configuration through SMF, changing the install root for the repository to be /var/repo.

Install the desktop CBE

Next, I set about installing the very useful desktop CBE, version 1.7 rc1, a test version which has support for OpenSolaris, multiple compilers, and new interactive goodness in the installer.

gman@rampage:~/desktop-cbe-1.7.0-rc1# cbe-install

The CBE tools install into /opt/dtbld and mostly consist of a bunch of GNU utilities whose versions are a little bit newer than what’s on pkg.opensolaris.org.

Download SFE

Next up, was grabbing a copy of the SFE repository. SFE, or spec-files-extra, is a repository full of build recipes for various open source component, which the pkgbuild tool uses to build into a SVr4 package (native IPS packages are coming soon). SFE has just over 800 recipes at the moment – it used to be 1000+, but as packages get added to pkg.opensolaris.org, they get removed from the repository.

gman@rampage:~/# svn co https://pkgbuild.svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk SFE

Build a package

I figured I’d start off building monkey-bubble, using the SFEmonkey-bubble.spec build recipe. A simple command started off the build

gman@rampage:~/SFE# pkgtool build --interactive --download SFEmonkey-bubble.spec

As it turns out, I had issues with the current version of GNU m4 on the system, and had to quickly install CBEm4 from the desktop CBE. Once it did that, I had some shiny monkey-bubble packages in ~/packages/PKGS/.

Import this package into IPS

This was by far the most tricky step, though not ridiculously so. There are a number of ways to import a package into IPS, including the pkgsend(1) command-line utility (Volker gives a good tutorial here). I decided to cheat somewhat, and use the solaris.py utility that we’ve used to import packages from the old Nevada dock. To get the gate, a simple hg(1) command is used –

gman@rampage:~/# hg clone ssh://anon@hg.opensolaris.org/hg/pkg/gate pkg

Creating the import files

While a little overkill for this purpose, I created a cluster import file, and import files for both SFEmonkey-bubble and SFEmonkey-bubble-root –

gman@rampage:~/ cat cluster.all
include SFEmonkey-bubble
gman@rampage:~/ cat SFEmonkey-bubble
package SFEmonkey-bubble
import SFEmonkey-bubble
import SFEmonkey-bubble-root
version 0.4.0
end package
gman@rampage:~/ cat SFEmonkey-bubble-root
package SFEmonkey-bubble-root
depend SFEmonkey-bubble
end package

With IPS we’ve taken the decision to merge multiple packages into a single one, and use filtering if want want to separate them eg. documentation, developer headers, licenses, etc.. I’ve decided to create a single SFEmonkey-bubble package in the IPS repository.

Run the import script

Now we’ve got everything ready, it’s a simple command to run (so long as you remember the locations of where things are!) –

gman@rampage:~/ pkg/src/util/distro-import/solaris.py -b 0.4 -w ~/packages/PKGS/ cluster.all

The command will output a bunch of stuff, but by the end of it, you’ll be able to go to http://localhost:10000 in a browser and see the SFEmonkey-bubble package in the repository.

Install the package

Now that you’ve created a repository, and seeded it with a package, it’s time to add it to your system. You’ll need to add the new repository to the list that IPS should search through, and refresh the catalog before you can install it –

gman@rampage:~/ pfexec pkg set-authority -O http://localhost:10000/ localrepo
gman@rampage:~/ pfexec pkg refresh --full
gman@rampage:~/ pfexec pkg install SFEmonkey-bubble

Refresh the desktop cache

After successfully installing it, you’ll need to do a temporary step to ensure the GConf schemas are properly installed – this is because we now have a new SMF service to update the various desktop caches, but unfortunately IPS does not yet start this service when it installs a new package yet.

gman@rampage:~/ pfexec svcadm restart desktop-cache/gconf-cache

Pull my package

The final step is to send my IPS repository URL to the maintainers of pkg.opensolaris.org/contrib, so they can run a simple command to pull in the package –

admin@pkgserver:~/ pfexec pkgrecv -s http://myrepo.com:10000/ SFEmonkey-bubble

Final thoughts

Setting up an IPS repository isn’t the hardest thing in the world, though it does show that we’ve still got a little way to go to simplify the procedure. More and more packages are continuously getting added (ARC mail archives), and over time I expect this to be much, much easier to do. With Petr’s work to make pkgbuild output native IPS packages, I’m very hopeful to see OpenSolaris really starting to provide the common packages that people are using. If you are keen to help, join the pkgbuild team and start packaging for OpenSolaris today!

Update: Petr has published a first beta release of the pkgbuild IPS conversion – go check it out!