Packaging Drush and Dependencies for Debian

Lately I have been trying to avoid non packaged software being installed on production servers. The main reason for this is to make it easier to apply updates. It also makes it easier to deploy new servers with meta packages when everything is pre packaged.

One tool which I am using a lot on production servers is Drupal's command line tool - drush. Drush is awesome it makes managing drupal sites so much easier, especially when it comes to applying updates. Drush is packaged for Debian testing, unstable and lenny backports by Antoine Beaupré (aka anarcat) and will be available in universe for ubuntu lucid. Drush depends on PEAR's Console_Table module and includes some code which automagically installs the dependency from PEAR CVS. The Debianised package includes the PEAR class in the package, which is handy, but if you are building your own debs from CVS or the nightly tarballs, the dependency isn't included. The auto installer only works if it can write to /path/to/drush/includes, which in these cases means calling drush as root, otherwise it spews a few errors about not being able to write the file then dies.

A more packaging friendly approach would be to build a debian package for PEAR Console_Table and have that as a dependency of the drush package in Debian. The problem with this approach is that drush currently only looks in /path/to/drush/includes for the PEAR class. I have submitted a patch which first checks if Table_Console has been installed via the PEAR installer (or other package management tool). Combine this with the Debian source package I have created for Table_Console (see the file attached at the bottom of the post), you can have a modular and apt managed instance of drush, without having to duplicate code.

I have discussed this approach with anarcat, he is supportive and hopefully it will be the approach adopted for drush 3.0.

Update The drush patch has been committed and should be included in 3.0alpha2.

AttachmentSize
php-console-table-1.1.3-debian.tar.bz210.92 KB

Excelent point, and thanks for the patch!

manuee wrote:

Also, I didn't know it would be included in ubuntu lucid, great news :D

Only it will be the 2.x version it seems, which will stil have the problem you mention... or I'm I wrong?

Added Mon, 2010-02-08 05:10

Lucid

Dave wrote:

@manuee at this stage it will be 2.x in lucid, so it will have the same problem.

If drush 3.0 goes stable and the packaging by anarcat is solid, it might be able to get in. I would like to see 3.0 in lucid, another package I can drop from my internal package repository. Once it is in Debian I'll file a bug report asking for the update.

Glad you liked the patch - enjoy!

Added Tue, 2010-02-09 16:59

If drush 3.0 goes stable and

Greg Aziz wrote:

If drush 3.0 goes stable and the packaging by anarcat is solid, it might be able to get in. I would like to see 3.0 in lucid, another package I can drop from my internal package repository. Once it is in Debian I'll file a bug report asking for the update. Greg Aziz

Added Wed, 2014-10-29 16:45

We Build High Quality

seo wrote:

We Build High Quality Backlinks Through Blog Commenting For Helping to Improve Domain Authority , Page Authority and Trust Flow of your website/Blogs. High DA PA Backlinks | trust flow blog comments

Added Tue, 2017-10-03 07:02

Cool stuff you have and you

seo wrote:

Cool stuff you have and you keep overhaul every one of us. Accountants Forest Row

Added Sat, 2017-10-07 09:32

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <div> <blockquote> <pre>

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.