Hello Drush developers,

Some of my coworkers and I have created a simple Debian package for Drush that we've been using on several machines. Now that there's a Drush release candidate, we'd like to begin the process of including Drush in Debian, but I wanted to get developer feedback on whether Drush is stable enough to be responsibly packaged for distributions, and to solicit any other feedback you may have about packaging Drush in general, or how future development might impact packaging.

Thanks,
-G

Comments

moshe weitzman’s picture

Well, what's expected of a Debian package? Can it be marked as unstable and still packed for those who are daring?

gdl’s picture

I'm not really sure what you're asking by what's expected of a Debian package. It's expected to be in a certain format, and the maintainer of the package(i.e. me) is expected to ensure it's packaged appropriately, to keep it up to date with new upstream versions, to test it, and to deal with any bugs specific to the Debian version. Is that the kind of answer you were looking for?

It will certainly be marked unstable in Debian, and still be available to those want it, though.

If folks aren't familiar with Debian, or its packaging process, there are three main distributions of Debian: unstable[1], testing[2], and stable. Stable is the recommended version, it's what you get when you go to debian.org and download the first thing you find. Stable only gets security upgrades. Unstable is where new software or new versions of software are uploaded. Things aren't guaranteed to work, so it's much more for developers than end-users. Testing is in between, a staging ground between unstable and stable. Packages move out of unstable into testing based on various criteria[3]. Eventually, testing is frozen and becomes a new stable distribution. If Debian accepts the package we've created, Drush would go into unstable, where it would stay for a while, and then it will become available in testing. It will not move into stable until there's another freeze and a new stable release, which won't happen for some time, as one has just happened.

However, Debian's packaging system allows you to install software from arbitrary, non-official packagers, as well as mix-and-match software from the official versions. So it is certainly possible, as well as relatively easy, for someone to be running the stable version of Debian, but pull in Drush and only Drush from the unstable or testing distributions if they choose. Since Drush doesn't rely on much beyond PHP, I don't expect that using Drush from Debian unstable on an otherwise Debian stable system would cause many issues.

My apologies if everyone already knows all of this.

Best,
-G

[1] http://www.debian.org/releases/unstable/
[2] http://www.debian.org/releases/testing/
[3] http://www.debian.org/doc/developers-reference/pkgs.html#testing

asb’s picture

I like the idea of a Debian package - especially until Drush becomes able to update itself ;-)

However, at least for lenny there are no packages for Drupal modules; wouldn't it make sense to start with an inoffical repository?

Anyway, thanks! -asb

moshe weitzman’s picture

I'm going to let adrianor grugnog2 speak to the debian/macports/whatever packaging strategy. i have no strong opinions.

adrian’s picture

There are some issues related to this.

http://drupal.org/node/459678 - store drush files in standard locations.

Basically, this would allow the debian package the create a drushrc.php file in the package repository, to point drush towards the system's packages. This would allow us to add any non-drupal version specific commandfiles in /usr/share/drush or /usr/local/share/drush (whatever is configured).

Regarding module packaging :
http://drupal.org/node/112692

I've started working on a meta-information archive of drupal modules, that work kind of like the freebsd ports collection.
One big issue is that unlike debian's mechanism of one version of a package at a time, you will likely have different versions of packages installed at the same time, in multiple places.

The same way that debian can create packages of pear and pecl extensions, this system could theoretically be wrapped in .deb files.

adrian’s picture

Those related issues were resolved, so drush can be packaged now.

Drush commandfiles like provision should be stored in /usr/share/drush/commands

Drush will load a drushrc.php from /etc/drush/drushrc.php

betz’s picture

I just wanted to say i would be delighted to have drush in the debian repository.
Just starting to use drush for today, and it rocks!!
If i now could install and update drush with aptitude, this would be fantastic.

ngaur’s picture

The main reason I'd want this is to help avoid having drush get out of date.

I'd be just as happy with drush cron notifying the admin periodically if drush is out of date. (not every time cron runs).

Pedro Lozano’s picture

I know a certified debian developer, I'll ask him about this.

Brian@brianpuccio.net’s picture

grrgle, you wouldn't happen to have a publicly available deb package repository, now would you? :)

If not, that's fine too. I was debating creating one for myself (or rather my half dozen servers) and making it publicly available, but I got lazy and just threw in a few lines in .bash_profile that would update a locally installed drush in a single command. Kudos to you for doing what I was too lazy to do.

(Another option is to not seek inclusion with Debian proper and just host your own third party repository, like Tor does with Debian/Ubuntu.)

anarcat’s picture

Version: All-Versions-2.0-rc1 » All-Versions-2.0
Category: support » task

Koumbit has a unofficial debian repo while we develop the package. I'm interested in testing and helping out. I know DDs and wish to become one... eventually.

moshe weitzman’s picture

I have a lot of trust and confidence in Koumbit. Would be great if you led this effort.

anarcat’s picture

Assigned: Unassigned » anarcat

Alright. Now that Provision and Drush are out, I'm ready to take a stab at this.

anarcat’s picture

So the first issue I'm finding is minor, but I'd like to get advice from the people here, especially Moshe. Debian requires an 'upstream author' in various locations. Right now in the ITP (intent to package, a formality when we start building a new package for debian), I wrote down Moshe as the author, but I don't feel that's quite right.

Who should a Debian user write to if the maintainer of the Debian package is not available?

moshe weitzman’s picture

I can be upstream author. I am expecting the Debian maintainer to field most of the debian specific queries.

anarcat’s picture

Some good links I'm going to follow for maintaining the package, with a git backend:

http://www.debian.org/doc/maint-guide/
http://www.eyrie.org/~eagle/notes/debian/git.html#debian
http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import...

I also fairly confident I can find a sponsor to get this in unstable once it's into shape.

anarcat’s picture

@grrgle - do you have your work available somewhere? Do you want to take over maintainership of the package? Do you want us to work collectively on it? Or I can just do it...

@moshe - of course, it is the responsability of the Debian maintainer to be the first line of support for the Debian community. Basically, the upstream author is the one that holds the copyright to the actual source code originally. Not sure what it is really in this case. The upstream author mainly ends up in the debian/copyright file and is rather important, in name, see: http://lists.debian.org/debian-devel-announce/2003/12/msg00007.html and http://www.debian.org/doc/maint-guide/ch-dreq.en.html#s-copyright

anarcat’s picture

Status: Active » Needs review

So I have made a drush debian package. I have just uploaded it to http://debian.koumbit.net/ and it should be available within a few minutes.

You will need to add this to your sources.list to be able to download the package:

deb http://debian.koumbit.net/debian sid main

The package has been uploaded to our 'sid' depot, but it will probably run anywhere...

I would appreciate testing.

I will now try to find a sponsor to get this officially uploaded.

asb’s picture

Nice!

I included the repository from #18 on a "Lenny" system (without apt-pinning - what are your recommendations for setting this up properly?), and so far it seems to work fine. However, after installing drush (aptitude install drush) I didn't receive any updates for drush yet. Let's see how this works in the next days...

Bottomline: So far no complaints (+1)

Thanks & greetings, -asb

PS: Anyone volunteering to get drush into the FreeBSD ports collection, also? ;-)

betz’s picture

Allright! Kudos to all!!!

@asb: Could you also include the repository to etch?

anarcat’s picture

@asb - for freebsd, i recommend you open a separate issue.

@betz + @asb - for now, the package in "sid" is basically a lenny package, but it should work anywhere since it's architecture-neutral (ie. not compiled or linked against specific libs). furthermore, there aren't a lot of packages on our 'sid' depot so it shouldn't upgrade anything for you.

if all goes according to plan here, the package should get into unstable (sid) shortly, then eventually (after approx. 2 weeks, if my memory is correct) migrate to testing, where it can be backported (ie. backports.org) to etch if necessary. since there aren't any change required to backport, i don't think it makes much sense to use backports.org and I would recommend using the 'testing' repos with apt-pinning. i can provide instructions on how to perform that magic once the package actually gets there.

in the meantime, i suggest we stick to our 'sid' depot, unless we get major resistance from inclusion into debian (at which point i will migrate the package to our stable repo).

anarcat’s picture

Status: Needs review » Needs work

so the way the package works right now breaks the provision cronjobs. basically, the shell wrapper expects the terminal to be functional ($TERM set):

tput: No value for $TERM and no -T specified

So this needs some work before getting into Debian still. In fact, I would think this is a bug with the wrapper itself, but I'm not too familiar with it so I hesitate in filing a bug directly against it.

anarcat’s picture

Status: Needs work » Needs review

I uploaded version 2.0-2 that fixes the cron issue by symlinking drush.php straight into /usr/bin/drush, without the wrapper, which works fine.

anarcat’s picture

Status: Needs review » Fixed

Drush 2.0-3 (small changes, see changelog) is being uploaded to debian unstable as we speak and should hit the archive fairly soon.

betz’s picture

Men, i love drupal :)

thanx anarcat ;)

asb’s picture

Hi,

updating the package through aptitude fails in my installation of "Lenny":

[~@ocr #] aptitude safe-upgrade
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Lese Status-Informationen ein... Fertig
Lese erweiterte Statusinformationen      
Initialisiere Paketstatus... Fertig
Lese Task-Beschreibungen... Fertig 
Die folgenden Pakete werden aktualisiert:
  drush 
1 Pakete aktualisiert, 0 zusätzlich installiert, 0 werden entfernt und 0 nicht aktualisiert.
Muss 80,4kB an Archiven herunterladen. Nach dem Entpacken werden 4096B frei werden.
Wollen Sie fortsetzen? [Y/n/?] 
Schreibe erweiterte Statusinformationen... Fertig
Hole:1 http://debian.koumbit.net sid/main drush 2.0-3 [80,4kB]
80,4kB wurden in 0s heruntergeladen (84,7kB/s)
E: Konnte http://debian.koumbit.net/debian/dists/unstable/main/binary-all/admin/drush_2.0-3_all.deb nicht herunterladen: Größe stimmt nicht überein
Paketlisten werden gelesen... Fertig             
Abhängigkeitsbaum wird aufgebaut       
Lese Status-Informationen ein... Fertig
Lese erweiterte Statusinformationen      
Initialisiere Paketstatus... Fertig
Lese Task-Beschreibungen... Fertig 

The error message says, roughly translated: "Couldn't download drush_2.0-3_all.deb because size did not match".

Greetings, -asb

anarcat’s picture

Hum. Maybe I screwed up that last upload. I suggest you wait until it hits the main archive for now.

Update: i confirm the upload got screwed up. I tried reuploading because of a tiny change in the source package and that cause the package to change size.

Original upload:

Date: Sun, 14 Jun 2009 19:40:02 -0400 (EDT)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 14 Jun 2009 17:10:59 -0400
Source: drush
Binary: drush
Architecture: source all
Version: 2.0-3
Distribution: unstable
Urgency: low
Maintainer: Antoine Beaupré <anarcat@koumbit.org>
Changed-By: Antoine Beaupré <anarcat@koumbit.org>
Description: 
 drush      - command line shell and Unix scripting interface for Drupal
Changes: 
 drush (2.0-3) unstable; urgency=low
 .
   * make this work without warnings on sid, will now fail to build on lenny
   * cleanup comments in watch and rules files
   * update to standards 3.8.1
Checksums-Sha1: 
 0c5b5a9019528f9d8f1fd7b2be76166352a4a01a 958 drush_2.0-3.dsc
 467780f463ad9c1e6a5f01c7673df036507aa6f9 11222 drush_2.0-3.diff.gz
 fb7e6ca56bf7d61c7909349a2a211afc39d6d80b 80368 drush_2.0-3_all.deb
Checksums-Sha256: 
 34bf72f83c00acac7f9307a84d39589f276755e5435369bbe2964479e7802278 958 drush_2.0-3.dsc
 5c81f1fc99ef077c21948be351f1397806ce2a3ead1a8205f059a696ca9ff631 11222 drush_2.0-3.diff.gz
 71b863d4e3ec17ccdd18a61e4d08998b66cce9562559909cef8851eccb55c953 80368 drush_2.0-3_all.deb
Files: 
 e901595ca854dfa76a77b52653e60e74 958 admin optional drush_2.0-3.dsc
 fbab9145ace6c8f690d9face8808b0ce 11222 admin optional drush_2.0-3.diff.gz
 e87a60ca132b3725b5cdcdc00ed050bd 80368 admin optional drush_2.0-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAko1ifwACgkQWGBzs0AjcC+0oQCfVw7rTfRebo2YVCQ076t7ClUU
VOUAn3Tu01IbwPYd7pJxICIuuIZuYAs6
=eHM2
-----END PGP SIGNATURE-----

Second upload:

Date: Sun, 14 Jun 2009 20:15:02 -0400 (EDT)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 14 Jun 2009 17:10:59 -0400
Source: drush
Binary: drush
Architecture: source all
Version: 2.0-3
Distribution: unstable
Urgency: low
Maintainer: Antoine Beaupré <anarcat@koumbit.org>
Changed-By: Antoine Beaupré <anarcat@koumbit.org>
Description: 
 drush      - command line shell and Unix scripting interface for Drupal
Changes: 
 drush (2.0-3) unstable; urgency=low
 .
   * use dh_prep instead of dh_clean to silence warnings on sid. this will
     now fail to build on lenny.
   * cleanup comments in watch and rules files
   * update to standards 3.8.1
Checksums-Sha1: 
 3a6b6fb4a8eb5d30cd1a10b9621e9219c865c00a 958 drush_2.0-3.dsc
 11a749d416d8cd98cc056957070ffffa7f88e0cb 11239 drush_2.0-3.diff.gz
 a18f0069b4d72dfcb773bc008ffeca9749809be5 80390 drush_2.0-3_all.deb
Checksums-Sha256: 
 a60768d839091822d31eb2a2fb505789c4f37e2d02c2a046e96f2a8d96c1b1f1 958 drush_2.0-3.dsc
 cb060a7fe29f5a91b0cde4e5d7370ff878f235315dcc3c74e64337fef384cce4 11239 drush_2.0-3.diff.gz
 14d8464904938ce36526588734f92de11e027f63ad96656cddae0bbde30f2530 80390 drush_2.0-3_all.deb
Files: 
 c9d56738f900a981f83cb67159fd4be0 958 admin optional drush_2.0-3.dsc
 823135c429c168981b787cbeae52c221 11239 admin optional drush_2.0-3.diff.gz
 1c8b587ce40797dbcbd193400cd793c2 80390 admin optional drush_2.0-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAko1kI8ACgkQWGBzs0AjcC9UbACdG6ufekwORi5w5X4TWGHNMNDT
CsgAnjDinq4NOrc+Bk9Lp0Ox+13Z3YGQ
=V8LU
-----END PGP SIGNATURE-----

Notice the change in checksum and size of the .deb, that didn't seem to get picked up by debarchiver properly. Maybe you can try to do apt-get update again to reload the package list, or you can just download and install the package manually (using dpkg -i) after checking the checksums above (signed with my PGP key).

anarcat’s picture

I have made public the git repository I use to maintain the package, in case someone wants to join in the party:

Vcs-git: git://git.koumbit.net/drupal/drush
Vcs-browser: http://git.koumbit.net/?p=drupal/drush

Patches can of course be uploaded here (in a new issue, i guess) or sent to me by email (see contact form).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

anarcat’s picture

drush is back in NEW after some problems with the original upload. follow the thrilling action here: http://ftp-master.debian.org/new/drush_2.0-5.html (yes, that was some sarcasm... for the record, i really appreciate all the hard work the ftp-master team is doing at debian and i understand the reasons behind the delays, check this graph out... http://molly.corsac.net/~corsac/debian/new/ (and no, that last part wasn't sarcasm :))

anarcat’s picture

Good news everyone! Drush has finally been accepted in Debian!

http://lists.debian.org/debian-devel-changes/2009/08/msg02211.html

It should show up in unstable (sid, and therefore Ubuntu) shortly.

beanjammin’s picture

Nice work!

Before finding this thread I went trolling for drush in debian this AM and was very happy to find it.

SeanBannister’s picture

Doesn't appear to be in Ubuntu repository yet.

betz’s picture

SeanBannister, i think it's in testing repo

SeanBannister’s picture

betz: Had a Google but couldn't find any info on the testing repo. After testing does it get released to the main repo? I'm keen to apt-get install drush and know it's up to date.

betz’s picture

SeanBannister’s picture

Yeah I've seen that page for debian, but are there any details for Ubuntu?

rickvug’s picture

@SeanBannister Ubuntu is based on Debian. The Drush package will be included in Lucid when it comes out in late April (see http://packages.ubuntu.com/lucid/drush). Unfortunately it is looking like the version packaged is 2.0 (beta 6?), so you'd likely want to update to 2.1 anyways. I'm not sure of how updates to unstable work and when Lucid will stop importing upstream code. Since drush development moves quickly, the best thing to do may be to maintain a separate package repository for drush (perhaps a PPA?).

@anarcat Feel free to correct me on any of this. Your work on this issue is appreciated.

rickvug’s picture

Just to throw something out there... it would be really neat to see Drush Make package as well.

anarcat’s picture

Hi. I haven't packaged 2.1 because of the numerous issues that were occuring with /bin/dash and so on. It would have required me to include a bunch of patches and I just didn't have time to do it.

Now I'm thinking it would just be better to wait for a stable 3.0 release to come out (which should happen any time now) or just package alpha1 as is and follow the changes.

I think that since Drush is a arch: all package, it can be trivially "backported". In fact it doesn't *need* to: proper sources.list + apt pinning can make any server fetch drush from unstable/testing if necessary. So I would rather people avoid creating a separate archive for drush and let me work on the official package. I'm fully available to bundle patches submitted, which can be done in the Debian BTS, so that shouldn't be a problem, or we can even maintain the package collectively if that becomes an issue.

The Drush Make package is also a good idea, I'm ready to maintain it too if needs be, but I'm not available to build the actual package right now (although that should be fairly easy: take a look at aegir-provision for a sample of how to deploy Drush commands). A separate issue in the Drush Make queue would be appropriate here however. An ITP/RFP in the Debian BTS could also be a nice thing for that.

Thank you for your interest in the debian package.

moshe weitzman’s picture

seems that anyone who wants drush_make can just

apt-get drush
drush dl drush_make

colan’s picture

Subscribing (in case there are any updates for version 3).

tdgsandf’s picture

@asb and for general info - I have submitted a port for FreeBSD for version 3.0 of Drush.

Pr reference is: http://www.freebsd.org/cgi/query-pr.cgi?pr=146185

anarcat’s picture

@colan and the others watching this issue for Debian updates: don't! Follow this bug instead: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567983

In general the Debian stuff will now happen in the Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567983

As for drush_make: yes, drush can dl drush_make and everything else, but will it automatically upgrade it on security issues? :) That is the kind of integrated system Debian provides and it's the main reason why I'm packaging drush and others...

brianmercer’s picture

Ubuntu lucid 10.04 has version 2.0 and Debian unstable (sid) has 3.1. Does anyone maintain a more recent version in an apt repo? I don't see one on launchpad.

anarcat’s picture

I'm negotiating with the debian-release team to make sure we have the best improvements in squeeze, the upcoming release. I think it will be difficult to get 3.3 in because there are a bunch of unrelated issues that got fixed that may not be relevant for stable.

I'll do my best to get this in though, but Debian are pretty strict for that...

brianmercer’s picture

Thanks your work on the package, Antoine. I've heard Debian policies for official packages can be a pain.

I applied the 3.3 source tar to your sid 3.1 package with uupdate and the diff applied cleanly, so I uploaded to a ppa on my launchpad account. https://launchpad.net/~brianmercer/+archive/drush

After it finishes compiling, I'll test it out.

pascal.vree’s picture

I'm a heavy debian user and I installed the squeeze drush package ... I was able to run all the "simple" commands such as status and stuff, but the second I tried to use pm-list and as such, I got the "need higher bootstrap" message ...

In the end, I solved my troublez by replacing the drupal symlinks from /usr/share/drupal6/sites -> /etc/drupal/6/sites by /usr/share/drupal6/sites <- /etc/drupal/6/sites (a symlink the other way around); I also did this for profiles and now it all works like a charm.

If memory serves me well, I read a post about Drush not able to handle symlinks very well in order to find the Drupal Installation Directory. Now I wonder, is this by design and should I contact the Drupal Package Maintainer and file a bug report or should I give you guys a hand and try to fix this issue?

mlncn’s picture

Version: All-Versions-2.0 » All-versions-4.1

@Brian - i've added your packages which says they are updated to 4.1, but apt-get still tells me Drush is at the latest version? Ideas?

brianmercer’s picture

I'm not sure what you're describing. I did update my launchpad packages to 4.1.

On Ubuntu:

sudo add-apt-repository ppa:brianmercer/drush
sudo aptitude update
sudo aptitude install drush

If you had Drush installed before, you should remove the old one. drushrc.php files should go in /etc/drush for global settings and site aliases or in the site's document root if you want site specific settings.

Although it's not part of the package, I recommend creating a directory at /var/backups/drush and putting $options['backup-dir'] = '/var/backups/drush'; in your /etc/drush/drushrc.php file.

anarcat’s picture

Hi folks,

I would really appreciate if you guys could direct your requests to the debian package BTS at drush@bugs.debian.org. You can see opened bugs here: http://bugs.debian.org/drush

I have just uploaded 4.1 to unstable, we'll see when/if it gets accepted. A backport will likely not be allowed until squeeze is released, at which point I will lobby for one. I will also try to maintain 3.3 (in squeeze and lenny-backports) for security upgrades).

@brianmercer - I am happy to see you contribute to the porting effort, but if it wasn't for @mlncn, I wouldn't have noticed your port and we would have ended up duplicating efforts... How about joining me in the maintenance? :)

brianmercer’s picture

I should have dropped you a note about my repo, anarcat. https://launchpad.net/~brianmercer/+archive/drush

We aren't duplicating efforts because you're doing all the work. All I do is run a uupdate on your package with the latest upstream source tarball and dput to the Launchpad repo.

Please let me know how I can assist. I know enough about the apt system and helper scripts to make simple packages from scratch (fcgiwrap, xhprof) and backport and update existing packages (php5, nginx, apc, drush). I have no experience dealing with Debian policies.

anarcat’s picture

What you're doing is great: through you I knew I only needed to merge the branch in. :)

Juste let me know at drush@bugs.debian.org when you update your side.

Update: actually, that email doesn't work - you need to submit a bug as directed here: http://www.debian.org/Bugs/Reporting - which should just be sending an email like this:

To: submit@bugs.debian.org
From: you@example.com
Subject: new drush upstream version available

Package: drush
Version: 4.3-1
anarcat’s picture

Note that we're working in clearing up the documentation on the debian package here: #1215346: Distributing drush via PEAR (was drush debian packaging usage instructions.