Repairing apachetop in Intrepid Ibex (8.10)

Posted by Ralph on December 16, 2008

It’s a shame that one of my favorite tools is broken in Ubuntu 8.10. It crashes right after you rune it with segmentation fault.  There is a patch in launchpad Bug #294599 but it did not work for me. I was getting some crypted error message. Finally after 10 minutes of googleing and trying i got the solution.

Here are the steps to build your own package:

  1. sudo apt-get install build-essential fakeroot devscripts
  2. mkdir apachetop && cdapachetop
  3. wget http://launchpadlibrarian.net/19754557/apachetop.debdiff
  4. apt-get source apachetop
  5. cd apachetop-0.12.6 && patch -p1 < ../apachetop.debdiff

Now before you do anything we have to make one small change to the code by hand:

$ vim src/apachetop.cc

go to line 967 (in vim write 967G) and replace line

char realfile[MAXPATHLEN];

with:

char realfile[PATH_MAX];

now go to the apachetop-0.12.6 directory and do:

$ debuild -uc -us

after compiling is successfully you can install your new package with:

$ sudo dpkg -i ../apachetop_0.12.6-8ubuntu1_i386.deb

Hope it will help someone.

PS: Installation steps based on https://wiki.ubuntu.com/UbuntuPackagingGuide/BuildFromDebdiff?highlight=(debdiff)

Tags: , ,

«            »

Leave a Reply