Steven Jewel Blog RSS Feed

10 Oct 2013

Hacking Open Source

There are many benefits to using open source software, even for those that aren't programmers. But for those that can read code, there's an additional benefit: you can modify software to meet your needs.

Usually the sort of modifications you want to do are minor. For example, I wish that liferea (a RSS reader) didn't have a context menu, since I never use it. Pidgin tells me whenever a buddy changes his name. I have a coworker who uses his real name on one computer and an alias on another, so our conversations are interlaced with meaningless notifications.

Also with pidgin, I prefer to have the buddy icon next to the name in the buddy list, with the status icon overlaid. This is a simple change to make.

So far I have been using a small script to make changes, but it is insufficient. Debian contains all the tools that are necessary, but they aren't available behind a single front-end.

This post is a proposal for a mechanism to make it really simple to make small changes, and a system for tracking those changes through the life of a package.

The ideal workflow

Once a user identifies the software that she wants to change, she would start the apt-hack GUI and pick it from the operating system package list (alternatively, she could use the command-line interface to apt-hack). The source package would be downloaded and unpacked, and the file manager would be launched in the correct directory. The build dependencies can then be installed in the background.

The user would then find and make the change. She can launch the build directly from apt-hack, which saves her the trouble of learning the build system used by the particular package. The build creates a system package which is installed over the top of the existing package. She can then test out her changes. If desired, she can make further changes or revert back to the official package.

Once she's done, she can turn her changes into a patch, with a 'hack' extension. The patch will be preserved by apt-hack and when the package is updated by the distribution, apt-hack will intervene in the install process and attempt to apply the patch automatically.

The hack can be transfered to other computers and contains enough information to launch apt-hack, apply, build, and install the modified package without additional guidance.

Sharing site

A site should be made where hacks can be shared. Due to the name, it seems unlikely that hacks would be installed by the unwary (and it seems even more unlikely that apt-hack would be installed by default).

This would provide a neat vector for the long-tail of customizations that are difficult for software authors to try and fit into their options dialog.

Launchpad bugs

It seems like I run into a bug on launchpad with a patch already written often. Invariably, someone will ask for a PPA. This would help those users.

Additionally, it lowers the barrier to entry for technical users to attempt to fix the bugs themselves, which will benefit everyone.