Secondary menu

Drush in RPM Form

Drush in RPM Form

Written by Gary Gogick on

Drupal without drush is like a burger without cheese. So when, in the course of human events, it becomes necessary to ensure that a specific version of drush is installed on a number of systems in a standard location, falling back to your distribution's package management system is probably a good idea.

Thus, I've hacked together a quick script that'll grab a version of drush and turn it into a noarch binary RPM, suitable for use on RHEL/CentOS (and probably Fedora, for that matter).

Drush ends up in /usr/local/drush, and for the sake of simplicity, a symbolic link (/usr/bin/drush) is created and pointed at /usr/local/drush/drush.

The script (which is attached below) has few requirements - basic utilities such as tar and wget, and your distribution's rpm building package (rpm-build for RHEL/CentOS).

Invocation is simple - you merely need to pass the script a URL to grab drush from. Example:

rpm_build-drush http://ftp.drupal.org/files/projects/drush-6.x-3.3.tar.gz

This happily spits out a lovely little package:

drush-6.x_3.3-1.noarch.rpm

Note that the generated RPM will not have dependencies of the rational sort - theoretically, one could and probably should have a PHP dependency (given that you're probably not running drush without it ;)) - however, internally, we're not using standard RHEL/CentOS PHP packages. Our dependencies would likely not be your dependencies. ;)

Updated: attached as a zip with proper newlines for use on unix systems.