Adding a dependency into upstream-supplied systemd units

I recently restarted all my VMs at once and found that several managed to start services before they finished mounting their NFS shares. These shares back apache virtualhosts, mysql databases, and ultimately left several services in non-functional states. Systemd has the ability to depend on services (Requires=, and others) as well as filesystems (RequiresMountsFor=). However, I don’t want to modify or replace the .service files installed from the package. I’d have to manually reconcile changes during updates, and it just generally isn’t nice. ...

2015-03-09 · Chris Irwin

Recovering a deleted file (on btrfs)

So you might find yourself saying this one day: HELP! I just deleted a file on my btrfs! It wasn’t old enough to be in a backup, snapshot, or git It was old enough that I don’t want to retype it. How do I get it back? Also, my btrfs is on an SSD, and it might kick off a garbage collection routine at any time! Well, as luck would have it, I just did that to a blog post I’ve spent all evening writing. ...

2015-01-16 · Chris Irwin

Fedora Cloud Image on Linode

Linode offers pre-assembled Fedora VMs, but their environment doesn’t support SELINUX. You also don’t get any notification on when you should reboot for new kernels, etc. I decided to attempt to adapt Fedora’s stock cloud image on Linode. It was not without it’s own effort, but ultimately I think it’s a better solution than attempting to retro-fit the linode image for booting. Also, I’m using the fedora cloud image on all my other VMs, so I’m familiar with how it’s set up (and can easily spool up a local copy for testing). ...

2015-01-16 · Chris Irwin

SELinux and apache (httpd)

I’ve just built a new web server vm, basically identical to my mariadb one, and the fedora cloud image. This is documentation on how I configured it, as well as the ttrss update daemon. To get nfs to work, install nfs-utils. I need some packages also for ttrss. $ yum install nfs-utils httpd php php-mysql php-mbstring php-xml I’m putting the web root on an nfs mount from my nas. I have multiple virtualhosts. ...

2015-01-15 · Chris Irwin

SELinux and mariadb (mysql)

I’ve just built a new mysql server vm, using the instructions I posted previously. This is documentation on how I configured it. To get nfs to work, install nfs-utils. $ yum install nfs-utils httpd mariadb mariadb-server I’m putting the database on an nfs mount from my nas. Socket files can’t exist on nfs. It’s easier to move the data than the socket file (I think I hit an selinux issue with socket access). ...

2015-01-15 · Chris Irwin

Fedora cloud for mere mortals

I’ve come across a post by Marek Goldmann detailing the basics of running Fedora cloud images on kvm. I found it was a massive help, but only got me part-way toward what I wanted. The documentation for cloud-init is sub-par from what I can find, so I thought I’d post this with my own modifications. My requirements were: Easy scriptable deployment (Marek’s script got me 100% of this goal) Static (sequential) IP assignments instead of DHCP hostname != KVM domain name, making system replacements easier Additionally, I changed some logic ...

2015-01-15 · Chris Irwin

Offlineimap repeatedly deleting All Mail

or “That’s why you read changelogs” I was having some significant difficulties with offlineimap after upgrading to 6.5.4 (I’m using Ubuntu currently, so I upgraded straight from 6.3.4). The original issue was a FolderValidity error, which is covered by the offlineimap FAQ. This affected my “All Mail” folder (It also affected my “Sent Mail”, but it got lost in the noise of the 67964 messages in All Mail). The recovery process is simply to remove that folder (and it’s sync history), and start over. Unfortunate, but fine. That’s why I’ve got a 28Mbit connection, after all. ...

2013-02-28 · Chris Irwin

Workaround for conflict between gnome-shell and vmware-player

I recently got a new machine for work, with lots of fancy memory and everything. First thing to do was install a friendly operating system with gnome-shell, and set up a VM for my windows/office requirements at work. Normally I would favour Virt-Manager+kvm, but since we’re now using vmware-server (and soon vsphere hypervisor) I thought it would be better to keep compatible. Luckilly, vmware has a free player that works pretty well for my basic needs. ...

2012-02-07 · Chris Irwin

Update for maildir-indicator

Follow-up to my post about using Maildirs with Ubuntu’s messaging menu. Brad, the original author, has indicated that he considered his code to be essentially WTFPL. I feel the same about my bits, and have added a COPYING file specifically indicating this license instead of the previous GPL3 license. I have made some other changes since that last version: The configuration values (frequency, directories) are now loaded from separate files. Default values are in /etc/maildir-indicator.conf, user-specific in $XDG_CONFIG_HOME/maildir-indicator.conf (or more likely, $HOME/.config/maildir-indicator.conf). This allows it to be installed system-wide and have users configure their own notifications. The .desktop file has been cleaned up, and is now advertising “Maildir Indicator” instead of mutt. This is what will be read in the menu as well (though of course, clicking it runs whatever mail agent you want). Cleaned up some debug messages to make the output a little easier to read Changed ‘path’ to no longer have a trailing slash. I’m not sure what happens if you have a trailing slash on your paths, I didn’t test it. The program can still be used by grabbing the source from the Maildir-Indicator repository on Gitorious and running ./maildir-indicator in the directory you get. However, it also supports being installed system-wide, which can be done easily by installing it from the maildir-indicator PPA. Installing from the PPA will also set it to run automatically at login. ...

2011-08-08 · Chris Irwin

My own Firefox Addon Collection

I’ve created a Firefox addon collection. This is mostly for my own use (Since firefox can’t sync addons, a single list of addons I use helps bring up machines), but I thought I’d throw it out there if anybody else was curious. [Chris’ Addons](https://addons.mozilla.org/en-US/firefox/collections/chrisirwin/chris-a/ Chris’ Addons collection at addons.mozilla.org)

2011-08-08 · Chris Irwin