-
Notifications
You must be signed in to change notification settings - Fork 31
Add chrome.json rule
#87
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I added a few minor suggestions, but this looks good to me for the most part.
I also tried reproducing that error on Ubuntu 18 but could not, and am wondering if that was a one-off failure:
Unpacking google-chrome-stable (91.0.4472.114-1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /tmp/apt-dpkg-install-n5GYl4/112-google-chrome.deb (--unpack):
cannot copy extracted data for './opt/google/chrome/chrome' to '/opt/google/chrome/chrome.dpkg-new': unexpected end of file or streamDo you want to try adding Ubuntu 18 again?
|
Yes, it seems like it was a one-off failure. Yay! I can repro a success for Bionic on my machine. |
|
The failing CI job for bionic seems to be about a missing GPG key. It only happens when you run an $ wget -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ DEBIAN_FRONTEND='noninteractive' apt-get install -y /tmp/google-chrome.deb
$ apt-get update
Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]
Err:1 http://dl.google.com/linux/chrome/deb stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78BD65473CB3BD13
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
W: GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78BD65473CB3BD13
E: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.I think the issue is that the Chrome installer adds the Chrome repo and installs Google's GPG key, but the key isn't added if # After installing Chrome, without gnupg installed:
$ wget -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ DEBIAN_FRONTEND='noninteractive' apt-get install -y /tmp/google-chrome.deb
$ apt-key list
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
# After installing Chrome, with gnupg installed:
$ wget -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ DEBIAN_FRONTEND='noninteractive' apt-get install -y /tmp/google-chrome.deb
$ apt-key list
/etc/apt/trusted.gpg
--------------------
pub rsa4096 2016-04-12 [SC]
EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796
uid [ unknown] Google Inc. (Linux Packages Signing Authority) <[email protected]>
sub rsa4096 2019-07-22 [S] [expires: 2022-07-21]
...
apt-get install -y gnupg |
|
Thank you for the debugging @glin ! I definitely would have been at a loss on how to fix it. |
Fixes #86 by removing the rule entirely (as installing Chrome will cover the typical usage).
Related: rstudio/shinyapps-package-dependencies#302 where shinyapps.io is wanting to install chrome for
chromote(andpagedown).~~I could not get not get Ubuntu Bionic to work with the new rule. Half way through install Chrome's
.debfile, it fails. ~~Update: Can now install on bionic. Maybe bad timing. 🤷
Ubuntu Bionic installation failure logs
The real logic is all in the
pre_installcommands as there is noapt-getname to readily install. Withchromotewanting to be used on GHA, I decided to add a check ofwhich google-chrometo avoid unnecessarily downloading of the.debfile when an instance ofgooglechrome already exists.Please let me know if there is a different approach I should take.
I've successfully manually tested on
Update: And