Opened 2 years ago

Closed 2 years ago

#11691 closed Bug/Something is broken (fixed)

Updating drush on floriberto (and other servers?)

Reported by: https://id.mayfirst.org/jackaponte Owned by: https://id.mayfirst.org/jamie
Priority: Medium Component: Tech
Keywords: floriberto Cc:
Sensitive: no

Description

Drush version 5.10.0 is installed on floriberto; that version is unsupported and is missing many key features.

I can't install newer versions of Drush locally for the nec user because Composer isn't installed or accessible to me.

Could Drush 6 at minimum, Drush 7 preferably be installed on floriberto and all other MFPL servers? I know that Drush 8 is the recommended version, but I've run into a particularly nasty git repo destroying bug more frequently with Drush 8 than with 7 or earlier.

Change History (5)

comment:1 Changed 2 years ago by https://id.mayfirst.org/jaimev

  • Owner set to https://id.mayfirst.org/jamie
  • Status changed from new to assigned

Let's get jamie's input on this.

comment:2 Changed 2 years ago by https://id.mayfirst.org/jamie

See #7983...

I think we can officially give up on proper debian packaging of Drush. The build approach seems at odds with Debian package practices (pulling in dependencies rather than relying on libraries on the server).

So I think we'll have to maintain our own version of drush the same way we maintain our own copies of Drupal itself.

The trouble is that the official docs for installing drush suggest downloading drush over an insecure connection, which won't really work for us.

However, it seems we can get the most recent version of the 7 branch from github with:

wget https://github.com/drush-ops/drush/archive/7.x.zip

However, that won't give us the pre-built version with all dependencies included.

Still working... (and open to suggestions).

Ideally I'd like something along the lines of drupal core: a https enabled downlink plus a sha1 or md5 hash to confirm it.

comment:3 Changed 2 years ago by https://id.mayfirst.org/rootwork

I would definitely love to see the servers finally move past Drush 5.x.

I know the request is for a server-wide upgrade, but for Jack's benefit I thought I'd share that it is possible to get composer installed:

From https://getcomposer.org/download/ :

php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'a52be7b8724e47499b039d53415953cc3d5b459b9d9c0308301f867921c19efc623b81dfef8fc2be194a5cf56945d223') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

And then per http://docs.drush.org/en/master/install-alternative/ :

echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bashrc
php composer.phar global require drush/drush

That will give you the current version of Drush, which is 8.1, so if you want 7.x you could run this as the final command instead:

php composer.phar global require drush/drush:7.3.0

Then run drush version to check that you've got the updated version going.

Tickets #10624 and #10524 also deal with upgrading Drush.

Still in favor of a server-wide upgrade, but this can fill the gap in the meantime.

comment:4 Changed 2 years ago by https://id.mayfirst.org/jackaponte

Thank you so much for the instructions above, Ivan--they were very helpful! I've adapted them and posted them in Palante's public wiki for future reference.

comment:5 Changed 2 years ago by https://id.mayfirst.org/jamie

  • Resolution set to fixed
  • Status changed from assigned to closed

drush finally has a one liner to securely download so I've added it to our puppet repo and installed it on buffy (and will be installed everywhere the next time we sign a release).

At the moment, it installs in /usr/local/bin which means the newer version (8.1.3 at the moment) should be used by default when you type the drush command (the older version is still available in /usr/bin/ and will continue to be available until we purge the drush debian package).

I'm following https://github.com/drush-ops/drush/releases.atom to be notified of updates and am downloading via: wget -q -O drush https://s3.amazonaws.com/files.drush.org/drush.phar && chmod 755 drush.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.