Posted on Feb 1, 2011
I recently learned that python setup.py can be used to build a rpm using the bdist command. Since we're using puppet to manage installed software, this makes it really easy to add python modules to a bunch of servers.
During the process of trying to build a rpm, I ran into a problem: "Installed (but unpackaged) file(s) found." The details of this problem are explained here: https://bugzilla.redhat.com/show_bug.cgi?id=198877
Comment #1 in the above bug offers a work-around, which I simplified into the following two commands:
echo 'python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES' > install.spec
python setup.py bdist_rpm --install-script install.spec --packager="Joe Crobak"
RPMs are placed in the dist dir.
Posted on Jan 15, 2011
I've moved my wordpress blog from a hosted account on godaddy.com to a server that's running lighttpd on ubuntu. The move was more complex than I expected, so I thought I'd share some details for others...
www-data
user, which lighttpd is installed as. I did a sudo chown -R ww-data:www-data
on the install directory.server.error-handler-404 = "/index.php"
per Setting up a Wordpress Blog on lighttpd./%year%/%monthnum%/%postname%/
In the end, my lighttpd config looks something like:
$HTTP["host"] == "www.crobak.org" { server.document-root = "/var/www/www.crobak.org" server.error-handler-404 = "/index.php" url.rewrite-final = ( # Exclude some directories from rewriting "^/(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0", # Exclude .php files at root from rewriting "^/(.*.php)" => "$0", # Handle permalinks and feeds "^/(.*)$" => "/index.php/$1" ) }
I've also switched to the awesome new Twenty Ten 1.1 Theme by the WordPress team.
Leave a CommentPosted on Oct 8, 2009
I was working on configuring HBase to run on my Mac OS X machine, and I ran into a hiccup setting up the JAVA_HOME
environment variable. Eventually, I determined that there's a "Home" directory inside of each Java Framework. So, the full command is is:
Leave a Comment
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Posted on Oct 2, 2009
I've had this list scribbled on the back of a receipt for months, and thought I should commit it somewhere more permanent. Hopefully it's of use to someone out there!
The basics
Sustenance
If Camping
Posted on Jun 20, 2009
At work, we use svn as a code repository and svnmerge for branch management. A coworker who recently switched to Mac asked me how he could assign a global variable so that he could run the svnmerge command without specifying the full path to the python script. The solution was to add an alias
to svnmerge that is loaded on shell startup. Since Mac OS X uses the bash shell, he needed to add the following to his .profile
file (the .profile
file sits in the home directory and can be created if it doesn't yet exist):
alias svnmerge='/path/to/svnmerge.py'
The svnmerge.py
file also needs to be executable (chmod a+x svnmerge.py
). The changes will take effect the next time you open a new shell.
While I'm at it, it's worth mentioning another useful option that I have in my .profile file. By adding export CLICOLOR=1,
the ls command will output in color to distinguish between directories, files, and executables.
Joe Crobak is a software engineer at the United States Digital Service and runs Hadoop Weekly.
Elsewhere on the internet:
subscribe via RSS