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 gnupg and apt to depends #20988

Merged
merged 1 commit into from
Feb 27, 2017
Merged

Add gnupg and apt to depends #20988

merged 1 commit into from
Feb 27, 2017

Conversation

fsateler
Copy link
Contributor

The postinst template uses tools from those packages.

Normally they are installed in most systems. However, this is not guaranteed. Lets make it guaranteed.

The postinst template uses tools from those packages.

Normally they are installed in most systems. However, this is not guaranteed. Lets make it guaranteed.
@mention-bot
Copy link

@fsateler, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Tyriar and @joaomoreno to be potential reviewers.

@msftclas
Copy link

Hi @fsateler, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@Tyriar
Copy link
Member

Tyriar commented Feb 21, 2017

Is gnupg required? You mention you only need this when apt-key is used in #2973 (comment)?

Also will this work in both 32-bit and 64-bit versions across most distributions? They're not called out in Chromium's deps despite using a similar system to us.

@fsateler
Copy link
Contributor Author

Is gnupg required? You mention you only need this when apt-key is used in #2973 (comment)?

Well, the postinst template is using a tool from gnupg, instead of having apt-key use gpg you are using it yourself. I do not consider using gpg a problem for vs code, but declaring a dependency is good. Otherwise in the (admittedly rare) case a user doesn't have gpg installed the installation will not install the key, and upgrades then will not happen (because the repository is not signed by a trusted key).

If you really want to avoid using gpg, the armored block is just a base64 encoded block, so the gpg call can be changed to:

echo "<snipping actual key>" | awk '/^$/{ x = 1; } /^[^=-]/{ if (x) { print $0; } ; }' | base64 -d > microsoft.gpg

Or even:

echo "<only the key block without headers>" | base64 -d > microsoft.gpg

base64 is part of the Essential set so you can rely on it existing.

Also will this work in both 32-bit and 64-bit versions across most distributions?

Yes. Both packages are available under the same name in both architectures, and across debian and ubuntu systems. I'd be surprised if there were any derived distros that deviated from the apt or gnupg names.

They're not called out in Chromium's deps despite using a similar system to us.

As I mentioned in the commit message, not having gpg installed is rare, but not impossible.

@Tyriar Tyriar added this to the March 2017 milestone Feb 21, 2017
@Tyriar
Copy link
Member

Tyriar commented Feb 21, 2017

Sounds good, I'll merge this in for March as the February release is just wrapping up.

@Tyriar Tyriar merged commit 713a4d6 into microsoft:master Feb 27, 2017
@Tyriar
Copy link
Member

Tyriar commented Feb 27, 2017

Thanks @fsateler!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants