RubyGems 9.9.9 packaged – Fake install RubyGems on Debian/Ubuntu

For a lot of reasons I often rely on a mixture of a Debian/Ubuntu pre packaged Ruby with a self compiled RubyGems. It helps you in situations where you don’t care that much about the Ruby interpreter itself but need an up to date RubyGems. While this is easy to install, you might run into trouble when installing packages that depend on Ruby and RubyGems, namely packages like „rubygems“, „rubygems1.8“ and „rubygems1.9“.

After unsuccessfully playing around with dpkg for a while (you can put packages on „hold“ which prevents them from being installed automatically, I came to the conclusion, the best way is to install a fake package that is empty but satisfies depencies.

So, here it is: The shiny new RubyGems 9.9.9 which delivers rubygems, rubygems1.8 and rubygems1.9 right away. Just install it (e.g. with dpkg) and you’ll be able installing packages that rely on a rubygems package.

In case you want to play around with the package and customize it to your needs, e.g. only deliver rubygems1.8 or rubygems1.9, take

1. Install equivs

$ sudo apt-get install equivs

2. create a control file

$ equivs-control rubygems

3. edit the control file

$ vim rubygems

You can compare the default settings in the control file with the output of e.g. „apt-cache show rubygems“. The crucial field is „Provides:“ where you can put a comma separated list of packages you want to fake install. Choose a high version for  there „Version: “ field as this will mark the package newer as the distribution’s own package. This prevents the packager from replacing it.

Section: universe/interpreters
Priority: optional
Homepage: http://www.screenage.de/blog/
Standards-Version: 3.6.2
 
Package: rubygems
Version: 9.9.9
Maintainer: Caspar Clemens Mierau <[email protected]>
Provides: rubygems1.8,rubygems1.9,rubygems
Architecture: all
Description: Fake RubyGems replacement
 This is a fake meta package satisfying rubygems dependencies.
 .
 This package can be used when you installed a packaged ruby but want
 to use rubygems from source and still rely on software that depends
 on ruby and rubygems

4. build the package

$ equivs-build rubygems

p.s.: You can also use equivs for easily building meta packages containing a list of packages you want to install at a glance, e.g. for semi automated server bootstrapping.

Global Jam Participation – Ubuntu Berlin is prepared – are you?

(Wow, I needed to type „Global Jam“ more than once as I’s used to write „Global Bug Jam“.)

I am happy looking forward to the third „Ubuntu Global Jam“ taking place from 2nd to 4th of October 2009. „We“, meaning „Ubuntu Berlin„, Daniel Holbach, Benjamin Drung and me, already managed to prepare the local Jam session as far as possible:

  1. We found a place with power supply and network uplink: the c-base, where Ubuntu Berlin became some kind of resident.
  2. We decided to schedule our Global Jam for Saturday, the 3rd of October, from 11 am to 7 pm, which should allow people with different personal schedules to join us at least for some hours.
  3. We added our Global Jam to the official team list.
  4. We set up a core team with responsibilities for different aspects of the Jam. Daniel Holbach and Benjamin Drung will care for bug triaging, bug squatting and packaging while I’ll work on and present translation and documentation.
  5. We announced our Global Jam participation and invited more people to join us on several mailing lists (from Ubuntu Berlin lists over local Berlin Linux lists to c-base lists).
  6. We started to announce our invitation on different twitter feeds, our facebook group, identi.ca and some blogs. One of them you are currently reading :)
  7. Last but not least I dropped some lines on the Ikhaya-suggest-an-article box, one of the most read German Ubuntu ressources.
  8. We will continue inviting people on personal basis as there are a bunch of people able to support us and just need a small friendly push… :)

I admit I am curious about this years participation and impact. And you? What are your hints for setting up a Global Jam session? Or do you need any more advices? Let me know. I am curious. Really.

my (not yet) package of the day – circular application menu

(Not yet a package, but still interesting enough to tell and hey: bleeding edge.) Circular Application Menu for Gnome is a Google Code hosted project providing a different access method to your Gnome menu. Actually all it does, is displaying the menu as circles:

hauptmenuecircular.png

Installation

But as it is different, it is somehow attractive and therefore let’s give it a try. Building „circular application menu“ is quite easy. You just have to install some libraries, subversion and essential build stuff, check out the current repository and compile it. Huh? Try this:

$ sudo aptitude install subversion build-essential \
libgnome-desktop-dev libgnome-menu-dev
$ svn checkout \
http://circular-application-menu.googlecode.com/svn/trunk/ \
circular-application-menu
$ cd circular-application-menu
$ make

Running

If no severe error occurred, you are already able to run „circular application menu“ it via ‚./circular-application-menu‘ now. Ignore error messages on the console as long as it comes up. Strange feeling to use it, isn’t it? I haven’t decided, if I really like it or not, until now.

If you like you can now install it to the system via make install, though I am fine with running it from the build directory, which I moved to „~/opt/circular/“. As it is pre-alpha-something, I just don’t want the code be mixed up with my distribution binaries.

Customizing

If you want to go one step further, install the Avant Window Navigator („$ sudo aptitude install avant-window-navigator“), the OS X style application panel, which just moved from Google Code to Launchpad (points taken!) and add an icon for circular menu to it by doing a right-click=>settings=>Launchers=>Add. Now you can start all normal applications by calling Circular Menues from the AvantGo launcher. Definitely an eye catcher:

Circular Application Menu combined with Avant Window Navigator
(click to enlarge)

Pitfalls

There are, of course, a couple of pitfalls. For instance, when running circular application menu on top of a dark or even black application, you cannot see it’s borders:

bildschirmfoto-1.png

Also, you currently don’t have the possibility to customize the launcher at all.

Nevertheless: circular application menu for Gnome is a nice desktop gimmick. I am sure, it will be packaged soon (will I?) and go to the community repositories of most GNU/Linux distributions.

libapache2-mod-xsendfile – processes X-SENDFILE headers with apache2

For some projects I had to figure out a way to deliver a file via Apache2 but still being able to put some business logic before the download. Imagine you have a php, perl, rails, ruby or whatever project and want to check credentials before delivering a file while not blocking your application with submitting large amounts of data. Lighttpd has a mechanism called „xsendfile“ for this. To make it short, this looks for a X-Sendfile header sent by the application. If this header is set and directs to a file the web server stops processing its script and starts delivering a file.

Fortunately there is a promising Apache2 port for this: mod-xsendfile. As I had to compile this serveral times and did not find it in Debian unstable or Ubuntu I made it my first packaging attempt (after having attended the first German Packaging Jam held by Daniel Holbach – thank you!).

If you like, you can test the module for hardy by enabling my ppa archive:

deb http://ppa.launchpad.net/damokles/ubuntu hardy main
deb-src http://ppa.launchpad.net/damokles/ubuntu hardy main

and „aptitude install libapache2-mod-xsendfile“ afterwards. See the website for reference. I will also upload this to my ppa for stable releases within the next days.

There is a launchpad bug I created for this. Feel free to test the module and the package and add comments there or directly here. Sadfully this package is to late to be integrated into hardy, so maybe the Intrepid Ibex (what a name…) will be a good milestone.

Packaging Jam session on 6th of February at Newthinking store Berlin/Germany

Time to get a ticket to Berlin! As Daniel Holbach already mentioned on this blog, the „Ubuntu Berlin“ team is proud to present the first „Packaging Jam“ session in Germany (if not even in Europe).

On 6th of February between 19:00 and 21:00 you’ll have the possibility to attend a workshop with Ubuntu developer and Canonical employee Daniel Holbach who explains the essential steps towards Ubuntu packaging and answers development related questions. The workshop takes place at the Linux friendly „Newthinking store“ (thank you, guys!), Tuchholskystraße 48, 10115 Berlin, and will be, of course, free of charge.

Feel free to bring your notebook along in order to be able to check if Daniel is right about what he tells you 😉 If you don’t feel like carrying it around – you don’t have to. Just join us for a fine evening!

More information: