Category Archives: Uncategorized

Adding a new disk to a Xen VM

      No Comments on Adding a new disk to a Xen VM

Create a new image file (10GiB): (Note: You can also create a sparse file with dd’s seek option. Have a look at the dd manpage or the examples on http://en.wikipedia.org/wiki/Dd_(Unix)) Create the new filesystem: Label the filesystem: Edit the DomU’s config file, /etc/xen/<hostname>.cfg and add the new disk: Start the VM: Edit DomU’s /etc/fstab & mount the disk:

Installing yum build dependencies with yum-builddep

After fiddling around with rpmbuild for quite a while, I stumbled upon yum-builddep. It’s basically a tool to install all packages required to rebuild an RPM package from the SRPM. So if you want to install all “BuildRequires” mentioned in the spec file of a package, invoke The source RPM for the specified package must be available in the yum… Read more »

Display current git branch in bash

      No Comments on Display current git branch in bash

Sometimes it’s very useful to know which git branch you are working on right from the command prompt. There are many solutions out there, but most of them include python and some awk or grep magic which can time a serious amount of time when you cd into a reasonably large git tree. But you can also take advantage of… Read more »

BackUpWordPress plugin produces tarballs containing duplicates

I’m using BackUpWordPress to do regular database and file tree backups of this blog. Unfortunately, there is a nasty bug in this plugin which may cause the tarball to contain every backuped file multiple times (to be precise, every file except the first one will go into the tarball exactly three times). The problem is that the . and ….. Read more »

Visualizing rpm dependencies with Graphviz

Sometimes, rpm dependencies get rather complex. It’s not always easy for an rpm maintainer to keep track of the runtime requirements of his package and therefore, huge rpm dependency trees develop. And it’s even more difficult so see which packages get pulled by yum, because only a tiny part of those are actually listed as requirements in the spec file…. Read more »

Granting access to X server with xhost

      8 Comments on Granting access to X server with xhost

Every X server internally manages an ACL (Access Control List) of those hosts, that are allowed to connect. The server only authorizes connections from X clients, whose host is on that list and rejects access to all others. The xhost program is used to add or revert access to the X server for specified hosts. It’s also possible to specify… Read more »

Dealing with .rpmnew and .rpmsave files

      1 Comment on Dealing with .rpmnew and .rpmsave files

When an upgrade includes changes to a default configuration file, the package will write either a .rpmnew or a .rpmsave file instead of overwriting the configuration file on your system. Which file a package creates is up to the discretion of the package maintainer. From “Dealing with .rpmnew and .rpmsave files” By Bruce Byfield: An .rpmnew file contains the new… Read more »

Cleaning up locally-installed RPMs with package-cleanup

Sometimes, packages you never actually use get installed as dependency by yum (or even during initial installation by anaconda). package-cleanup is a great tool that helps you find packages not required by other packages. It it part of the yum-utils package which can easily be pulled with yum: 1. Find and review “unused” packages You can find packages not required… Read more »

Duplicate log4j output lines

      No Comments on Duplicate log4j output lines

Ever seen duplicate lines in your log4j output? Maybe something like this: Well, the obvious cause is probably duplicate loggers your log4j configuration: As the properties are inherited from the root logger, this is telling log4j that all quartz-classes should send their log to the DefaultConsoleAppender (which the root logger is doing anyway). So we simply have to remove the… Read more »