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
Comment #1
moshe weitzman commentedWell, what's expected of a Debian package? Can it be marked as unstable and still packed for those who are daring?
Comment #2
gdl commentedI'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
Comment #3
asb commentedI 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
Comment #4
moshe weitzman commentedI'm going to let adrianor grugnog2 speak to the debian/macports/whatever packaging strategy. i have no strong opinions.
Comment #5
adrian commentedThere 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.
Comment #6
adrian commentedThose 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
Comment #7
betz commentedI 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.
Comment #8
ngaur commentedThe 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).
Comment #9
Pedro Lozano commentedI know a certified debian developer, I'll ask him about this.
Comment #10
Brian@brianpuccio.net commentedgrrgle, 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.)
Comment #11
anarcat commentedKoumbit 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.
Comment #12
moshe weitzman commentedI have a lot of trust and confidence in Koumbit. Would be great if you led this effort.
Comment #13
anarcat commentedAlright. Now that Provision and Drush are out, I'm ready to take a stab at this.
Comment #14
anarcat commentedSo 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?
Comment #15
moshe weitzman commentedI can be upstream author. I am expecting the Debian maintainer to field most of the debian specific queries.
Comment #16
anarcat commentedSome 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.
Comment #17
anarcat commented@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
Comment #18
anarcat commentedSo 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:
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.
Comment #19
asb commentedNice!
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? ;-)
Comment #20
betz commentedAllright! Kudos to all!!!
@asb: Could you also include the repository to etch?
Comment #21
anarcat commented@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).
Comment #22
anarcat commentedso the way the package works right now breaks the provision cronjobs. basically, the shell wrapper expects the terminal to be functional ($TERM set):
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.
Comment #23
anarcat commentedI 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.
Comment #24
anarcat commentedDrush 2.0-3 (small changes, see changelog) is being uploaded to debian unstable as we speak and should hit the archive fairly soon.
Comment #25
betz commentedMen, i love drupal :)
thanx anarcat ;)
Comment #26
asb commentedHi,
updating the package through aptitude fails in my installation of "Lenny":
The error message says, roughly translated: "Couldn't download drush_2.0-3_all.deb because size did not match".
Greetings, -asb
Comment #27
anarcat commentedHum. 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:
Second upload:
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).
Comment #28
anarcat commentedI 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).
Comment #30
anarcat commenteddrush 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 :))
Comment #31
anarcat commentedGood 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.
Comment #32
beanjammin commentedNice work!
Before finding this thread I went trolling for drush in debian this AM and was very happy to find it.
Comment #33
SeanBannister commentedDoesn't appear to be in Ubuntu repository yet.
Comment #34
betz commentedSeanBannister, i think it's in testing repo
Comment #35
SeanBannister commentedbetz: 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.
Comment #36
betz commentedhere youo go
http://packages.debian.org/sid/drush
Comment #37
SeanBannister commentedYeah I've seen that page for debian, but are there any details for Ubuntu?
Comment #38
rickvug commented@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.
Comment #39
rickvug commentedJust to throw something out there... it would be really neat to see Drush Make package as well.
Comment #40
anarcat commentedHi. 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.
Comment #41
moshe weitzman commentedseems that anyone who wants drush_make can just
apt-get drush
drush dl drush_make
Comment #42
colanSubscribing (in case there are any updates for version 3).
Comment #43
tdgsandf commented@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
Comment #44
anarcat commented@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...
Comment #45
brianmercer commentedUbuntu 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.
Comment #46
anarcat commentedI'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...
Comment #47
brianmercer commentedThanks 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.
Comment #48
pascal.vree commentedI'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?
Comment #49
mlncn commented@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?
Comment #50
brianmercer commentedI'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.
Comment #51
anarcat commentedHi 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? :)
Comment #52
brianmercer commentedI 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.
Comment #53
anarcat commentedWhat 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:
Comment #54
anarcat commentedNote 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.