Skip to content

PECL GeoIP on Gentoo

Even if the GeoIP bindings for PHP have been available for more than a year on PECL, I have never took the time to write an ebuild for it on Gentoo.

Until now, I was using the PEAR installer, which is great for installing PECL packages. The only downside is that those packages won't be seen when doing a world upgrade with Gentoo. You then have two choices:

  1. Do an emerge world followed by a pecl upgrade-all
  2. Install PECL packages via Portage

Since I'm lazy, I like the fact to upgrade everything at one place.

The hard part now is to write the ebuild, which is really simple considering the fact that it is a PECL package and that eclass are available.

One thing to another, this ebuild is now part of the testing overlay for Gentoo. If no bugs are found, it should be part of the normal tree shortly.

Kerberos kpropd on Gentoo

Nothing fancy, but while configuring a Kerberos slave on a Gentoo server, an init script seems to be missing for starting kpropd.

While it seems some have difficulties writing init scripts, here is what I am using:


daemon="MIT Kerberos 5 KPROPD"

opts="start stop restart"

depend() {
        need net

start() {
        ebegin "Starting $daemon"
        start-stop-daemon --start --quiet --exec ${exec} -- -S 1>&2
        eend $? "Error starting $daemon"

stop() { 
        ebegin "Stopping $daemon"
        start-stop-daemon --stop --quiet --oknodo --exec ${exec} 1>&2
        eend $? "Error stopping $daemon"

restart() {