Craig Box's journeys, stories and notes...


Posts Tagged ‘linux’

Mongrel upload progress problem - cause found

Friday, June 15th, 2007

Per my previous post on upload progress in Rails, I can now confirm:

The certificates must be in PEM format and must be sorted starting with the subject's certificate (actual client or server certificate), followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA.

Which means, cat site.cer chain.cer Equifax_Secure_Global_eBusiness_CA-1.cer site.key > site.pem.

I've backported Pound to Ubuntu Dapper, from Debian Testing. Dapper only has 1.0, which might work, but the configuration has changed beween 1.x and 2.x, which makes the examples incorrect.

SpamAssassin 3.2.0 backport for Ubuntu Dapper

Wednesday, June 6th, 2007

I've built packages for SpamAssassin 3.2.0 for Ubuntu Dapper. They are available in my firewall repository with the dependencies (libnet-dns-perl, libnetaddr-ip-perl, libmail-spf-perl):

deb http://ubuntu.hs.net.nz dapper firewall

If you use this repository, you'll get a new version of ClamAV, and some other packages also. Beware.

It was a bit of a mission to build, but made easier with the Prevu tool. This is like pbuilder for backports, and anyone doing anything with backports should use it. You can use the 0.4.1 release on Sourceforge on Dapper.

Building NM-PPTP from source

Sunday, May 13th, 2007

I had to spend a lot of time today re-remembering how to take a CVS/SVN tree and make a distributable package of it. Here are my notes, for me next time, and for anyone interested, now.

sed -i -e "s/AC_INIT(NetworkManager-ppp_vpn, 0.7.0-beta, eemynotna@gmail.com, NetworkManager-ppp_vpn)/AC_INIT(NetworkManager-pptp, 0.6.5, eemynotna@gmail.com, NetworkManager-pptp)/" configure.in
sed -i -e "s/SUBDIRS = src auth-dialog auth-dialog-general properties po/SUBDIRS = src auth-dialog properties po/" Makefile.am
sed -i -e "s_auth-dialog-general/Makefile__" configure.in
ln -s /usr/include/pppd src/pppd
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make dist

What's all that do, then?

  1. Downgrade the version number
  2. Remove the new auth-dialog-general, which isn't ready for primetime yet, from the Makefile
  3. (as above, but for the configure script)
  4. Link the system pppd dir - not actually packaged, but <tt>make dist</tt> fails if the PPP headers are missing
  5. Run the GNOME autogen script, which runs the autotools
  6. Builds a NetworkManager-pptp-0.6.5.tar.gz, with a configure script, ready for packaging.

It helps to remember things. Before re-reading the docs, and realising there was an autogen script, I was running all these commands (which of course required Perry to figure out, as I hate the autotools)

aclocal
autoheader
intltoolize --copy --force --automake
libtoolize --force
automake --copy --add-missing
autoconf
./configure --with-pppd=/usr/include/pppd
ln -s /usr/include/pppd src/pppd
make dist

New NetworkManager PPTP package (fixes AMD64 crashes)

Sunday, May 13th, 2007

(Updated updated update: historical information only; blog posts from 2007 are rarely relevant in 2011.)

I've built a new Ubuntu package of the PPTP plugin for NetworkManager, from a recent SVN checkout. It closes some bugs, and hopefully solves a number of other issues with the stability of the program.

Download links removed; if you're still running Edgy or Feisty, you should really upgrade.

I will rely on comments here to gauge the success of this version, and if it works well, I'll get it uploaded for Gutsy, and possibly push for an -updates release.

Thanks to Ed Schofield for pointing out I'd only linked to i386 packages, and compiling me an AMD64 package. He reports it clears up the segfault. Andrew Mitchell also contributed an AMD64 Edgy deb.

If you've come here from Launchpad, welcome, and please take the time to have a read around. I sometimes post about interesting stuff.

Freeview and MythTV

Wednesday, May 2nd, 2007

With the launch of Freeview, I've decided to upgrade my TV capture setup.

I bought a TechniSat SkyStar2 from Martin at Digiview.co.nz (he has them listed for $145 on Trade Me with a 1 year warranty).Β  Go buy one off him and tell him I sent you.

Thanks to David Zanetti's in-depth information at pvr.geek.nz, and the always up-to-the-minute information from Steven Ellis on the mythtvnz mailing list, I found out everything I needed to know. And, as you've come to expect, processed it into an easy-to-replicate format, and wrote it up: Freeview MythTV setup. I'm running Ubuntu Edgy, and other than some DVB test utilities I chose to play with, didn't have to install anything - a complete "out of the box" experience.

I'm enjoying watching Stargate SG-1 on the TVNZ widescreen test channel. Unfortunately, I'm going to have to plug the aerial back into Sky eventually.

Next step, moving the card into my server, retiring the dedicated MythTV machine, and setting up XBMC's MythTV scripts.

LVM bug on Feisty

Friday, April 27th, 2007

Once upon a time, there was a race condition between udev and device-mapper (the kernel interface used for EVMS and LVM2). DM would create and destroy devices regularly, say in the action of creating an LVM snapshot, and udev would say "ooh, shiny new device created" and try and do stuff with it, only to find it had gone away.

For some time, the fix for Ubuntu was a udev rule instructing it to ignore dm-N devices, as such:

KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"

All well and good, until they fixed that bug in Feisty. Now, if you still have that option in your udev rules, you will get LVM snapshots taking 10 minutes to create, and you'll also get LVM not starting properly at boot.

Check your workarounds when you upgrade packages. Sometimes, they not only don't work around any more, they cause all new problems.

GPG agent doesn't prompt for my passphrase

Thursday, February 22nd, 2007

Something that has always bothered me; I use the gpg-agent program to cache my passphrase in memory, but if I call it from dpkg-buildpackage or falcon, it just does this:

You need a passphrase to unlock the secret key for
user: "IT Partners <packages@itpartners.co.nz>"
1024-bit DSA key, ID xxxxxxx, created 2005-04-21

gpg: cancelled by user
gpg: skipped "xxxxxxxx": bad passphrase

Why does it punish me so? Turns out that pinentry, the program that asks for the passphrase, can't find a terminal, so can't run, and the key doesn't get cached.

To fix this, you can set the GPG_TTY variable, which I do in my .bashrc like so: export GPG_TTY=`tty`

Problem solved. And added to the WLUG wiki for posterity.

Everything about Exim

Wednesday, November 29th, 2006

Courtesy of Daniel, one excellent Exim cheatsheet.

Periods in run-parts

Tuesday, October 31st, 2006

Repeat after me, Debian/Ubuntu sysadmins. You cannot use the period (.) character in /etc/foo.d directories. Can't can't can't.

Why? Well, man runparts says:

If the --lsbsysinit option is not given then the names must consist
entirely of upper and lower case letters, digits, underscores, and
hyphens.

So, you can't have files named "vhost.foo.co.nz" in your /etc/logrotate.d directory, and you can't have files named "awstats-foo.co.nz" in your /etc/cron.d directory.

As much of a big deal is made of Halloween, and as many groups of kids I saw walking the streets about 7:45, we only had one person knock on the door trick-or-treating. And we managed to successfully pretend we weren't here, sitting in the lounge watching Torchwood. (I keep waiting for the Doctor to turn up.)

Ubuntu Edgy released, foibles and all

Sunday, October 29th, 2006

I got a birthday present on Friday in the form of a new Ubuntu release, Edgy Eft. I downloaded the 6.10 ISO and promptly burned the 6.06 ISO to CD, only noticing when I got it home. Oh well, several hundred megs of downloads later...

Some notes:

  • Due to a change in Python packaging policy, python2.4-module packages are deprecated in favour of python-module packages that have an X-Python-Version field in their control file.
  • If you get a black screen & crash testing the beta NVIDIA driver, you probably need to edit /etc/modules and remove the eeprom driver. Found on the official NVIDIA Linux forum.

Beryl, the community Compiz fork, is, well, "a little over the top". After figuring out the settings to subdue it a little bit, I've got it usable. The settings dialog could do with a lot of love however, so anyone who is interested in UI and has free time (unfortunately I only currently hit one out of two) might like to volunteer to help.

I leave with a little laugh (courtesy of Jorge Bernal):

Bill Gates recommending Ubuntu