Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a site admin, I need definitive steps for updating the govCMS distro (including security updates) #344

Closed
therobyouknow opened this issue Sep 2, 2016 · 7 comments

Comments

@therobyouknow
Copy link

commented Sep 2, 2016

Can you advise where I would find such a guide, if it exists?

I haven't been able to find one so far. So I have written my own, which I have now updated (and works) as my old approach based on the steps for Panopoly ( https://www.drupal.org/node/2691663#comment-11571127 ) did not work for govcms.

Updated version

My previous approach (based on the Panopoly steps) did not work, here is what works:

  • Download the distro as a .zip (or .tar.gz) from the drupal.org/project/govcms project page - either manually via the web or with wget or curl at the command line.
  • Unpack/unzip the download and Replace your current distro files with the updated files from the downloaded distro
  • Run drush updb

I found this new approach to work. Thanks to drupal.org user edb for the advice on the above.

Why did my previous approach not work?
When I issued drush dl govcms I got the error:

Source directory /tmp/drush_tmp_1472811109/govcms is not readable or does not exist. [error]
Project govcms (7.x-2.8) could not be downloaded to /var/www/site.dev/sites/all/modules/contrib/govcms.

I tried setting all the permissions, changing the tmp path in Media, File System in Config in Drupal Admin pages, but still got the same error.

Tip for the new working approach: Make sure you use the .zip/tag.gz from drupal.org/project/govcms and not the ones from the github project page for the distro. I would not suggest using the zip from github in these steps as not everything is included with that version, regarding dependencies. Package/dependency management is used to resolve that. But with the zip (or tar.gz from drupal.org/project/govcms everything regarding dependencies is included) so it's good to go straight out the box.

I've updated the drupal.org issue: https://www.drupal.org/node/2691663#comment-11571127

I know that one cannot just do a drush up and update modules individually as this would mean the versions would become misaligned between modules and deviate from those specified in the distro, resulting in potentially unpredictable behaviour. So the above steps look like the best option as far as I can see.

There is a guide for developers, https://github.com/govCMS/govCMS/wiki/Managing-Drupal-Security-Updates - but this appears to be about contributing fixes into the govCMS codebase, so is not for Site Admins who actually want to apply updates to the distro that have been officially made available.

@aleayr

This comment has been minimized.

Copy link
Contributor

commented Sep 8, 2016

Hi @therobyouknow,

Your approach above is a good one. The issue with using the raw ZIP/TAR from Github is that it's actually a series of build scripts essentially, that build sources like Drupal.org will process and turn into something more usable as you've unfortunately discovered the hard way. So, yes, preferable to take the download directly from Drupal.org and apply that.

One of my focuses over the backend of this year is to really ramp up the amount of supporting documentation we have available for the distribution, both from a maintenance perspective for customers using it outside of our hosted platform, and for modules and functionality available to Site Builders and editors that might not be immediately obvious (especially for those new the Drupal).

Thanks
Adam.

@therobyouknow

This comment has been minimized.

Copy link
Author

commented Sep 9, 2016

Thank you @aleayr for the folllow up here and on my Drupal issue: https://www.drupal.org/node/2691663 - thank you for commenting there and closing - I will now follow the the thread here on Github. Thank you for your support regarding documentation creation.

I can close this issue on the basis that you have agreed my approach is good for updating. Or perhaps keeping it open it may be useful as todo when updating the official documentation. Let me know and I can close if that would be suitable. Thank you.

@aleayr

This comment has been minimized.

Copy link
Contributor

commented Nov 4, 2016

Thanks @therobyouknow - I'll leave it open as a reminder for myself. Cheers!

@therobyouknow

This comment has been minimized.

Copy link
Author

commented Dec 6, 2016

I should add further information to my instructions to make them more precise:

Download the distro as a .zip (or .tar.gz) from the drupal.org/project/govcms project page - either manually via the web or with wget or curl at the command line.

What this actually means is to download the packaged version of the distro that includes Drupal core, so that both the distro and Drupal core version (that the distro is parity with) will be upgraded. For example, on the drupal.org/project/govcms page you can download the code with both core and govcms distro here: https://ftp.drupal.org/files/projects/govcms-7.x-2.10-core.zip

But note that if a version of the distro is released that uses the same version of Drupal core as before, then you would only need the distro itself.

In my most recent case we needed to upgrade both: we were running 7.44 parity with govcms 2.8. Core 7.52 introduced security updates and govcms 2.10 is parity with this so we upgraded both.

Unpack/unzip the download and Replace your current distro files with the updated files from the downloaded distro

For a core and distro update the files from the downloaded package (e.g. .zip) need to replace both core files and distro files. I removed all of my existing Drupal core and replaced with that from the downloaded zip above. I was careful to leave intact my contrib and custom modules, and themes, anything specific to my implementation not part of core. I deleted the profiles folder I had and replaced this with the profiles folder from the zip download (this folder contains the updated govcms).

Run drush updb

as before. No change here. You should still run this command.

@tobybellwood

This comment has been minimized.

Copy link
Contributor

commented Mar 9, 2018

FYI Distros can be updated the CLI way - not for the faint of heart so YMMV.

You can do it with Drush - check the process and it’s caveats on this page re: features (https://www.drupal.org/node/22721772):

Change into the root directory of your govCMS site and run:

drush dl govcms
drush make profiles/govcms/drupal-org-core.make .
drush updb
drush updb # yes, do it twice!
drush cc all

…or you can follow the manual upgrade instructions to download and update database on that same Panopoly page…

You should always update release-by-release - skipping a release could have unintended consequences.

Happy to help more if you need it!

@ghost ghost removed the Status: Needs Documentation label Mar 9, 2018
@Feng-Shui

This comment has been minimized.

Copy link
Contributor

commented Mar 9, 2018

This might be of interest: https://github.com/fiasco/govcms-updater

@therobyouknow

This comment has been minimized.

Copy link
Author

commented Mar 14, 2018

@tobybellwood Can you advise if you tried it yourself, please: #344 (comment)

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.