Bulk Tumblr Image Posting

Sunday, 17. 03. 2013  –  Category: sw

I didn’t really get along with the current offerings of bulk image uploaders, so I wrote one: tumblr-tools

freebsd-update and custom kernels

Saturday, 16. 03. 2013  –  Category: stash, sw

This post is search fodder, mostly.

If you’re using freebsd-update to upgrade FreeBSD and you run a custom kernel and temporarily using the generic kernel isn’t an option and it’s been ages since you’ve done this, then welcome!

$ sudo freebsd-update upgrade -r 9.1-RELEASE

[ warnings about custom kernel ]

$ sudo freebsd-update install

[ this is when the new generic kernel is installed if we weren't running a custom kernel ]

$ cd /usr 
$ mv src{,-8.2}
$ sudo svn co https://svn.freebsd.org/base/releng/9.1/
$ sudo cp src{-8.2,}/sys/i386/conf/PULP
$ cd src

$ sudo rsync -a /boot/kernel{,-8.2}/
$ sudo make kernel-toolchain
$ sudo make buildkernel KERNCONF=PULP
$ sudo make installkernel KERNCONF=PULP

$ sudo reboot

$ sudo freebsd-update install
$ sudo reboot

The kernel-toolchain bit is the important one. In the Old Days1 of buildworld the new kernel is built with the new world’s compiler, linker etc instead of what’s currently installed. Going directly to buildkernel during the freebsd-update dance means the custom kernel builds with the toolchain that’s about to be replaced.

Trying to build the new kernel with the old toolchain results in

  • warnings-as-errors in random modules
  • old kernel linker unable to parse new kernel link data

and no kernel.

  1. not really, but binary updating is way nicer []

Extracting voicememo name and file location from iTunes

Saturday, 2. 03. 2013  –  Category: sw

iTunes helpfully copies voicememos from the phone to a handy local directory, but the filenames are just timestamps, which isn’t so great if you’ve diligently named them. The voicememo’s title is visible in iTunes, but it’s coy about revealing which file it corresponds to. So into the iTunes database we go… with xmlstarlet.

Because every Saturday morning needs some XML, right?