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

Install the keyring if it's missing #338

Merged
merged 1 commit into from
Aug 13, 2018
Merged

Conversation

wilzbach
Copy link
Member

@wilzbach wilzbach commented Aug 13, 2018

In case the user deleted it manually, the installer should detect this.

@dlang-bot
Copy link
Contributor

dlang-bot commented Aug 13, 2018

Thanks for your pull request, @wilzbach!

Bugzilla references

Auto-close Bugzilla Severity Description
19100 major install.sh signature verification fails, no public key

@marler8997
Copy link

This fixed an issue I was having (https://issues.dlang.org/show_bug.cgi?id=19100). I downloaded install.sh directly to ~/dlang/install.sh, so this "conditional" would always evaluate to false meaning it would never download d-keyring.gpg. This would cause an "invalid signature" error.

@marler8997
Copy link

Note: if the keyring ever changes (i.e. if someone has an old keyring installed), the install.sh script should probably detect this and remove/download the new keyring. You could do this by checking the sha of the keyring to detect if it is out-of-date.

@wilzbach
Copy link
Member Author

Added a small test to it and merging now as this is a very trivial fix.

@wilzbach wilzbach merged commit bdd228c into dlang:master Aug 13, 2018
@wilzbach wilzbach deleted the keyring-missing branch August 13, 2018 17:50
@wilzbach
Copy link
Member Author

Note: if the keyring ever changes (i.e. if someone has an old keyring installed), the install.sh script should probably detect this and remove/download the new keyring. You could do this by checking the sha of the keyring to detect if it is out-of-date.

Yep, very valid point (in fact there should also be a more sophisticated process for the install.sh script to update itself).
I created an issue, s.t. it's not forgotten: https://issues.dlang.org/show_bug.cgi?id=19166

@marler8997
Copy link

Lol...already created one :) https://issues.dlang.org/show_bug.cgi?id=19165

I marked yours as duplicate

@MartinNowak
Copy link
Member

Doesn't ~/dlang/install.sh update also replace the keyring?
Auto-updating would be nice, maybe S3 provides ETags that could be queried?
Or we publish a timestamp under dlang.org/install.sh.mtime. Just some ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants