Compiling audacious 3.1

I’m a big fan of classic media players (audacious, xmms, the old winamp, etc.) That’s why I wanted today to complile the latest version of audacious (3.1) for my slackware laptop. Since the audacious build scripts are kind enough to provide make uninstall I didn’t bother with package builds, I simply compiled the stock source.

BTW that required upgrading libmowgli  (got one from slacky). Audacious compiled succesfully but for audacious-plugins configure refused to run:
[cce_bash]
checking for AUDACIOUS… no
configure: error: Cannot find Audacious 3.1; have you installed Audacious yet?

[/cce_bash]
That was strange as I just finished compiling and installing audacious. I double checked and it was installed, binary in /usr/local/bin

I tried to run audacious and got:
[cce_bash]
bash-4.1# ./audacious
WARNING: Audacious seems to be already running but is not responding.
FATAL: No output plugin found.
[/cce_bash]
The warning was strange, there was no stale process. I checked ~/.config/audacious and found a lock file. Removing that allowed configure to proceed.

Update: Spoke (blogged) to soon. I was in the wrong folder and I though it worked but it didn’t. This was actually needed since I was installing in /usr/local (run prior to configure)
[cce_bash]
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

[/cce_bash]
 

stdin: is not a tty

This was a new one for me. Received when doing automated remote log-ins on a cPanel server. The scripts would be confused by the following message:

[ccNe_bash]
stdin: is not a tty
[/ccNe_bash]

It was  caused by the following line in .bashrc (note that it could be in /etc/bashrc or /etc/profile, all those are on the target host)

[ccNe_bash]
mesg y
[/ccNe_bash]

Often it can be caused by biff y as well.

Replacing the line with the following should fix it:
[cce_bash]
if `tty -s ` && `test -x /usr/bin/mesg`; then
mesg y
fi
[/cce_bash]
What happens is that some program in your bashrc (or one sourced automatically from /etc ) is expecting the shell to be interactive when it’s not (for example you run commands over ssh). The fix is to find the problematic program and test for an interactive shell before calling it.

Secondary DNS cannot transfer zone

I’m no Bind expert but I’m not a beginner either. I was configuring a secondary backup DNS for a master server and I noticed that after configuring everything the zones didn’t get replicated on the slave DNS. I checked the logs and saw the following:

First I thought there was a mistake related to a missing permission on the master configuration
[ccNe_bash]
allow-transfer { aaa.bbb.ccc.ddd; };
[/ccNe_bash]
I double checked but the permissions were set correctly. The solution was easier (after finding it) than expected. The folder where the zones would have landed was not writable by the Bind user (named in my case)

[cce]
Oct 31 01:43:33 ZAC1A81MGL named[26208]: 31-Oct-2011 01:43:33.167 xfer-in: info: transfer of ‘openfreeway.com/IN/internal’ from 10.106.178.57#53: Transfer completed: 0 messages, 20 records, 0 bytes, 0.001 secs (0 bytes/sec)
Oct 31 01:43:33 ZAC1A81MGL named[26208]: 31-Oct-2011 01:43:33.168 general: error: dumping master file: internal/tmp-Si8sPK3ZVU: open: permission denied

[/cce]

DNS::ZoneParse has an undocumented $ORIGIN

I was working writing a few scripts that should update a DNS zone file on the fly. I decided to use the DNS::ZoneParse perl module for convenience.

The example there is straightforward for changing MX records so I thought modifying it to change an A record should be a piece of cake. Right? Wrong!

For the love of it I couldn’t get my code to modify the record in question, it would always delete it.

All the beer in the world goes to this guy who found the reason. Basically if the ORIGIN method is not set the record won’t be written to the new file.

So, changing for example the record like this will actually erase it

[cce_perl]
$a->[i] = { host => ‘blah.com’,
class => ‘IN’,
ttl => ‘1m’,
name => ‘@’ };
[/cce_perl]

and like this it will work:

[cce_perl]
$origin=’host.domain.com.’;
$a->[i] = { ORIGIN => $origin,
host => ‘blah.com’,
class => ‘IN’,
ttl => ‘1m’,
name => ‘@’ };
[/cce_perl]