Penguin, small TECH.BARWICK.DE

Recent posts





Powered By



Notes and stuff related to software development.

I was setting up a cronjob and it kept failing with the very unhelpful util.c: No such file or directory. After much headscratching it turns out this is a gnuplot error message, meaning it is unable to read from or write to a file (in this case the latter). The file in question is not of course util.c.

Posted in Devel | add a comment

Saturday, September 27, 2014   1:42 AM

Ansible and "powershell: not found" error

I was bemused by the below error when attempting to run an Ansible playbook on a new (Linux) server for the first time:

PLAY [someserver] ***************************************************************** 

GATHERING FACTS *************************************************************** 
failed: [someserver] => {"failed": true, "parsed": false}

/bin/sh: 1: powershell: not found

This happened with gather_facts set to true. Setting it to false worked around the issue, however I'm pretty sure powershell hasn't been ported to Debian... Ansible version:

$ ansible-playbook --version
ansible-playbook 1.8 (devel ffee9a8fe0) last updated 2014/09/27 14:24:58 (GMT +900)

The actual cause was the absence of python on the target server; this will need to be manually installed before Ansible can be of much use.

Posted in Devel | add a comment

After upgrading my development environment to openSuSE 12.1, I started getting a bunch of notices like the below after every Subversion operation which uses SSH:

A    /tmp/svn25825/public/favicon.ico
Exported revision 16786.
Killed by signal 15.

The issue is discussed here; in a nutshell, the solution is to add "-q" to the ssh command invoked by SVN, which is defined in the configuration file (typically ~/.subversion/config). In my case, the line in question now looks like this:

ssh = $SVN_SSH ssh -q -o ControlMaster=no

Note: ensure this line is in the [tunnels] section of the config file.

Posted in Devel | add a comment

Monday, September 21, 2009   1:25 AM

Pointing an SVN working copy to a different server

Having moved a bit recently and being busy at the same time, I still haven't got round to setting up my home network quite the way I'd like it. With the result that a while back I checked out some code from a Subversion repository to a laptop, and when I came to check it back in the LAN IP of the box with the repository on it had changed. Of course the working copy was still pointing to the old IP, making it impossible to commit my code changed, and the cheap consumer-grade router which looks after the network doesn't seem capable of assigning IP addresses based on MAC address. How to get the working copy pointed at the changed IP address?

Castig about in the .svn directories in the working copy, each contains a text file named "entries" which in turn contains two lines which look like this:

svn+ssh:// svn+ssh://

Manually updating the IP address seemed to work for that directory, so a simple

sed -i 's/svn+ssh:\/\/192\.168\.0\.5\//svn+ssh:\/\/svn.local\//'

took care of the entire working copy. Rather than just update the IP address I created an entry in /etc/hosts for svn.local, so should the repository IP address change again before I get things sorted, all I need to do is update the IP address here rather than mess about with SVN internals.

(Another workaround would be to make a tarball of the working copy without the .svn directories, delete the working copy, check it out again and untar the code over the new working copy.)

Posted in Devel | add a comment

Thursday, September 17, 2009   4:32 AM

SVN repository backup

A quick shell script to make an atomic copy of a Subversion repository using svn hotcopy:

#!/bin/bash SVNDIR=/home/svn/ BACKUPDIR=/tmp/svn.`date +%Y-%m-%d`/ BACKUPFILE=/tmp/svn.`date +%Y-%m-%d`.tgz mkdir $BACKUPDIR svnadmin hotcopy $SVNDIR $BACKUPDIR tar -C $BACKUPDIR -czf $BACKUPFILE . scp $BACKUPFILE \ && rm $BACKUPFILE && rm -rf $BACKUPDIR

Posted in Devel | add a comment

Sunday, November 9, 2008   6:01 AM

Useful Slashdot Threads

Venerable tech discussion site Slashdot seems to have lost its way a bit in recent years, but occasionally it comes up with some useful stuff apart from tired memes ("In Soviet Russia Natalie Portman pours hot grits into your pants"), such as the following three threads which contain a mixed bag of readers' Unix, vi (vim) and Emacs tricks.

Of course, there are more than one or two tricks I'm personally familiar with, but also a whole boatload of stuff where you have to think "Why didn't I know this before (or think to find out if such a thing exists)?". Such as generic auto-completion in Emacs, "Meta-/".


Posted in Devel | add a comment