I can’t speak for @arenas93 , but I have been hacking at this for a little while.
When I fix the existing google-chrome.repo in the silverblue image and add google-chrome-stable
to the list of packages to add, I get this error:
Installing 2 packages:
google-chrome-stable-124.0.6367.91-1.x86_64 (google-chrome)
liberation-fonts-1:2.1.5-9.fc40.noarch (fedora)
error: package google-chrome-stable-124.0.6367.91-1.x86_64 cannot be verified and repo google-chrome is GPG enabled: /var/cache/rpm-ostree/repomd/google-chrome-40-x86_64/packages/google-chrome-stable-124.0.6367.91-1.x86_64.rpm could not be verified.
/var/cache/rpm-ostree/repomd/google-chrome-40-x86_64/packages/google-chrome-stable-124.0.6367.91-1.x86_64.rpm: digest: SIGNATURE: NOT OK
Hmm. That smells like that RPM bug I find when I google “Install Chrome in Silverblue”. So let’s try the workaround, since we’re in a container and can do that! Run this script before rpm-ostree does:
# First, delete all old keys; see https://github.com/rpm-software-management/rpm/issues/2577
GOOGLE_PUBKEYS_RPMS=$(rpm -qa gpg-pubkey* --qf '%{NAME}-%{VERSION}-%{RELEASE} %{PACKAGER}\n' | grep 'linux-packages-keymaster@google.com' | sed 's/ .*$//' | xargs rpm -e)
if [ -n $GOOGLE_PUBKEYS_RPMS ]; then
echo "Removing pakcages $GOOGLE_PUBKEYS_RPMS"
rpm -e $GOOGLE_PUBKEYS_RPMS
fi
echo "Downloading Google Signing Key"
curl https://dl.google.com/linux/linux_signing_key.pub > /tmp/linux_signing_key.pub
rpm --import /tmp/linux_signing_key.pub
Here’s what rpm-ostree
says:
Installing: google-chrome-stable
Enabled rpm-md repositories: code google-chrome copr:copr.fedorainfracloud.org:ublue-os:akmods rpmfusion-free-updates-testing rpmfusion-free-updates rpmfusion-free rpmfusion-nonfree-updates-testing rpmfusion-nonfree-updates rpmfusion-nonfree fedora-cisco-openh264 fedora updates updates-archive
Importing rpm-md...done
rpm-md repo 'code' (cached); generated: 2024-04-26T03:16:40Z solvables: 413
rpm-md repo 'google-chrome' (cached); generated: 2024-04-26T17:08:26Z solvables: 3
rpm-md repo 'copr:copr.fedorainfracloud.org:ublue-os:akmods' (cached); generated: 2024-04-26T05:31:03Z solvables: 216
rpm-md repo 'rpmfusion-free-updates-testing' (cached); generated: 2024-04-26T21:26:11Z solvables: 9
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2024-04-26T21:25:38Z solvables: 18
rpm-md repo 'rpmfusion-free' (cached); generated: 2024-04-20T12:11:51Z solvables: 422
rpm-md repo 'rpmfusion-nonfree-updates-testing' (cached); generated: 2024-04-26T21:49:48Z solvables: 21
rpm-md repo 'rpmfusion-nonfree-updates' (cached); generated: 2024-04-26T21:48:35Z solvables: 54
rpm-md repo 'rpmfusion-nonfree' (cached); generated: 2024-04-20T12:18:23Z solvables: 194
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2023-12-11T14:43:50Z solvables: 4
rpm-md repo 'fedora' (cached); generated: 2024-04-14T18:51:11Z solvables: 74881
rpm-md repo 'updates' (cached); generated: 2024-04-27T02:05:39Z solvables: 8161
rpm-md repo 'updates-archive' (cached); generated: 2023-10-06T17:04:49Z solvables: 0
Resolving dependencies...done
Installing 2 packages:
google-chrome-stable-124.0.6367.91-1.x86_64 (google-chrome)
liberation-fonts-1:2.1.5-9.fc40.noarch (fedora)
Installing: liberation-fonts-1:2.1.5-9.fc40.noarch (fedora)
Installing: google-chrome-stable-124.0.6367.91-1.x86_64 (google-chrome)
error: Error -1 running transaction
No signature problems, but …
Not sure what the -1 means, but I suppose I can look up the code when I get the time.
In the meantime, I do know that layering the RPM you download from Google’s website works. But IIRC updates don’t work. (At least that’s what I found in searching the Silverblue forums.) And I’m pretty sure it doesn’t check the signature.
As a (very ugly) workaround I’ve added a script to my custom build that downloads, verifies, and saves the very latest Chrome package from Google in the image, so you can layer it manually at runtime. I’m currently working on adding some automation that will automatically run rpm-ostree install
to re-layer the package when it detects there’s a new version downloaded. It’s really inconvenient (two reboots required to get the latest Chrome), and I haven’t tested it with a Real Live Chrome Update yet, but it’s the only way I’ve gotten a native Chrome install to work.