Skip to main content

· One min read

There's always been a problem with Oracle provided MySQL rpms and older Centos/RHEL MySQL rpms. The former provides "MySQL" and the latter provides "mysql", so a lot of the packages in Centos/RHEL require "mysql" which creates some conflicts.

A quick way to fix this is to use rpmrebuild -e -p <rpmfile> and change the "requires" from "mysql" to "MySQL". Hopefully in the future Centos/RHEL will be standardized with the Oracle naming convention or Oracle packages be "backwardly" compatible.

· One min read

We just provisioned a new server with Sandy Bridge and 4 SSDs in RAID 5 configuration. The server it was replacing was seriously under powered so this is a timely replacement. I ran hdparm on both servers to compare:

Old Server:

dag:/home# hdparm -Tt /dev/sda6

/dev/sda6:
Timing cached reads: 6678 MB in 2.00 seconds = 3341.64 MB/sec
Timing buffered disk reads: 186 MB in 3.03 seconds = 61.38 MB/sec

New Server:

root@dagnew:/home# hdparm -Tt /dev/sda6  

/dev/sda6:
Timing cached reads: 25048 MB in 2.00 seconds = 12539.88 MB/sec
Timing buffered disk reads: 1956 MB in 3.00 seconds = 651.75 MB/sec

I'll be rolling out more of these when other servers are up for replacement.

· One min read

It seems that the latest versions of vbulletin are very broken in PHP 5.4 even though they state that "vBulletin 4.x requires PHP 5.2.0 or greater and MySQL 4.1.0 or greater"

Most of the problems are from E_STRICT which is part of E_ALL in PHP 5.4, but vBulletin and Internet Brands (who own vBulletin) seem very slow to fix these problems. They even denied that it was a problem with vBulletin when I originally reported some of the errors in June 2012 stating "Closing this issue because it appears to be unrelated to vBulletin code."

They have since reopened the issue and it has been rolled up in a PHP 5.4 check task, but seems quite slow being that PHP 5.4 was released nearly a year ago and PHP 5.5 is due out soon.

So to get vBulletin working without errors on my sites I have to modify and fix all of these problems. I wish I could contribute back to vBulletin or to its users so that this effort is not duplicated, but there doesn't seem to be a way to do it (hosting files on here would violate copyright).

· One min read

I recently had a database server fail during a large DELETE query, this caused some problems with innodb's ibdata1. The index of this data file was different to what MySQL expected. As this wasn't one of our main servers I hadn't tuned innodb and all the innodb data was in the single ibdata1 file. The only way for me to start MySQL was to add this to my.cnf:

innodb_force_recovery = 4  

This forced MySQL to ignore all innodb errors and I used mysqldump to extract all the data from the innodb tables. Innodb tables were found using the following query:

SELECT table_schema, table_name
FROM INFORMATION_SCHEMA.TABLES
WHERE engine = 'innodb';

I stopped MySQL server again, removed the innodb_force_recovery, deleted the ibdata1 file and tuned innodb. I also made sure I added this to my.cnf:

innodb_file_per_table = 1
innodb_log_files_in_group      = 2

All tables were loaded from the mysqldump backup files and everything is all happy again.

· One min read

While converting my cvs repositories to git I needed to copy all the changed files from my working directory into a temp directory and then into my git working dir. This was the solution that I came up with:

cvs -qn update -d 2>/dev/null | grep '^[M|\?|P] ' | awk '{print $2}' > files.list while read file; do cp -r -f --parents "$file" /tmp/dest/; done < files.list

Basically, cvs -qn update -d does a mock update (doesn't change files), piped to grep to only list the changed files, use awk to exclude the M, P, ? etc, output to a file.

Loop over the lines in the new file using the cp --parents to preserve directory structure

· One min read

When trying to build an rpm for apr-utils on my CentOS 6.2 box I got a nasty error when the rpm was running test:

testmemcache : |/bin/sh: line 2: 14322 Segmentation fault LD_LIBRARY_PATH="`echo "../crypto/.libs:../dbm/.lib s:../dbd/.libs:../ldap/.libs:$LD_LIBRARY_PATH" | sed -e 's/::*$//'`" ./$prog
Programs failed: testall
make: *** [check] Error 139
+ exit 1
error: Bad exit status from /var/tmp/rpm-tmp.OQddG8 (%check)

This relates to this bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=52705

Thanks to Peter Poeml for releasing a patch for this, which I've put into an updated apr-util.spec

· One min read

I have been building a lot of custom RPMs lately and I found this great resource which lists all of the macros that can be used in the spec files and what they equate to.

http://www.zarb.org/~jasonc/macros.php

· One min read

I recently changed to using the unix command line for cvs and changed all my cvs roots to :ext: instead of :ssh: (tortoise prefers ssh).

When I made the change, anytime I updated cvs I got this error:

/CVSROOTccess /cvsroot
No such file or directory

This makes no sense. Luckily, after searching around I found this is a problem with DOS line breaks screwing with unix cvs. Running the following fixes the problem:

dos2unix `find . -name Root`
dos2unix `find . -name Entries`
dos2unix `find . -name Repository`

· One min read

It's interesting that not only does netsol not list any information what-so-ever on their knowledge base about DNSSEC, their support staff have no idea what it is either.

Come on network solutions, sort it out otherwise I may have to move my domains to a registrar that does support DNSSEC.

· One min read

There is a way to stream music to your airport express from VLC (means you don't have to install iTunes).

Under preferences > all > stream output enter this in the "Default stream output chain":

#transcode{acodec=alac,channels=2,samplerate=44100}:raop{host=<ip address of aiport express>,volume=175}