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

Add upgradevm command #257

Merged
merged 3 commits into from Feb 14, 2020
Merged

Add upgradevm command #257

merged 3 commits into from Feb 14, 2020

Conversation

ocdtrekkie
Copy link
Collaborator

Fixes #245

Super simple for now. It grabs the same code as setupvm but just for Vagrantfile and global-setup.sh, which shouldn't generally be modified by app packagers.

As a test, I grabbed the GitWeb source prior to @abliss updates, because I knew he hit the 404 box issue. Went through the flow and failed to start the VM. I ran vagrant-spk upgradevm and then I was able to start up the VM. (Although I also got a 502 Bad Gateway because there was other related bitrot for GitWeb.)

Note that currently neither setupvm nor upgradevm has any sort of protection to prevent you from clobbering what you have. (This is worse in setupvm's case, because it can mess up your app build.) Though hopefully people are committing to GitHub or have original sources to fall back on. But we can do better here. We should also put comments at the top of both files we upgrade this way to further discourage user customization to make this command 'safer'.

Also, I'm not yet detecting the box that caused GitWeb to 404, and we're going to amend the detection for that to do so.

@ocdtrekkie
Copy link
Collaborator Author

This now also fixes #244

There was a lot of complicated logic in deciding not to flip out if someone pinned an old enough jessie64 box. I decided we don't want to continue to support super old pinned versions of jessie64 boxes anyways, and scrapped all of it. Though I left instructions to update to a supportable contrib-jessie64 box if someone really wants to get a package working on Jessie, we'd prefer people upgradevm to clear out any and all Vagrantfile-related bitrot, of which there is plenty since that era of vagrant-spk.

@ocdtrekkie ocdtrekkie linked an issue Feb 6, 2020 that may be closed by this pull request
@ocdtrekkie
Copy link
Collaborator Author

Now when downloading the pre-Adam-updated GitWeb, instead of getting a 404 for trying to download the box that doesn't exist, we tell people they should upgradevm or switch boxes to contrib-jessie64. After running upgradevm, the correct versions are placed in the directory and the VM can correctly boot up.

@ocdtrekkie ocdtrekkie changed the title Add upgradevm command (WIP!) Add upgradevm command Feb 6, 2020
@abliss
Copy link
Contributor

abliss commented Feb 6, 2020 via email

Copy link
Collaborator

@zenhack zenhack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor bitrot re: mention of distro name, but otherwise LGTM. We should proabably add an 'are you sure?' or something at some point, but I'm fine with it as is for a first pass.

vagrant-spk Show resolved Hide resolved
@ocdtrekkie ocdtrekkie merged commit a76cf3d into master Feb 14, 2020
@ocdtrekkie ocdtrekkie deleted the upgradevm branch April 11, 2021 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a way for vagrant-spk to update scripts Cleanup: Function that recommends sandstorm/jessie64
3 participants