4

I want to install a particular version of Chrome from the official Google's repository. This is how I install Chrome now:

RUN apt-get update \
    && apt-get install -y wget gnupg \
    && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
    && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
    && apt-get update \
    && apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 \
      --no-install-recommends \
    && rm -rf /var/lib/apt/lists/*

As I undersand, this is the repository entry:

http://dl.google.com/linux/chrome/deb/ stable main

according to the format described here:

deb http://site.example.com/debian distribution component1 component2 component3

So here it uses stable as distribution, and main as a component. Stable is supposed to the version, but maybe it's a metapackage that points to the latest? But I can't figure out how to see what versions are available in this repository?

When I install it I see the following output, particularly this line:

The following packages will be upgraded:
  google-chrome-stable
1 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
Need to get 105 MB of archives.
After this operation, 3688 kB of additional disk space will be used.
Get:1 https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 120.0.6099.71-1 [105 MB]

so it somehow knows that the latest is 120.0.6099.71-1 and the repository link becomes this:

https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 120.0.6099.71-1

1 Answers1

5

That doesn't seem to be a meta-package per-se ... compare the output (Depends: part in particular) of:

$ apt show -a google-chrome-stable
Package: google-chrome-stable
Version: 120.0.6099.71-1
Priority: optional
Section: web
Maintainer: Chrome Linux Team <chromium-dev@chromium.org>
Installed-Size: 338 MB
Provides: www-browser
Pre-Depends: dpkg (>= 1.14.0)
Depends: ca-certificates, fonts-liberation, libasound2 (>= 1.0.17), libatk-bridge2.0-0 (>= 2.5.3), libatk1.0-0 (>= 2.2.0), libatspi2.0-0 (>= 2.9.90), libc6 (>= 2.17), libcairo2 (>= 1.6.0), libcups2 (>= 1.6.0), libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3, libdbus-1-3 (>= 1.9.14), libdrm2 (>= 2.4.75), libexpat1 (>= 2.1~beta3), libgbm1 (>= 17.1.0~rc2), libglib2.0-0 (>= 2.39.4), libgtk-3-0 (>= 3.9.10) | libgtk-4-1, libnspr4 (>= 2:4.9-2~), libnss3 (>= 2:3.35), libpango-1.0-0 (>= 1.14.0), libu2f-udev, libvulkan1, libx11-6 (>= 2:1.4.99.1), libxcb1 (>= 1.9.2), libxcomposite1 (>= 1:0.4.4-1), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxkbcommon0 (>= 0.5.0), libxrandr2, wget, xdg-utils (>= 1.0.2)
Download-Size: 105 MB
APT-Manual-Installed: yes
APT-Sources: https://dl.google.com/linux/chrome/deb stable/main amd64 Packages
Description: The web browser from Google
 Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.

to the output of an actual meta-package like:

$ apt show -a linux-image-generic
Package: linux-image-generic
Version: 6.5.0.14.16
Priority: optional
Section: kernel
Source: linux-meta
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 15.4 kB
Provides: spl-modules (= 2.2.0-0ubuntu1~23.10), v4l2loopback-modules (= 0.12.7-2ubuntu4), virtualbox-guest-modules (= 6.5.0-14), wireguard-modules (= 1.0.0), zfs-modules (= 2.2.0-0ubuntu1~23.10)
Depends: linux-image-6.5.0-14-generic, linux-modules-extra-6.5.0-14-generic, linux-firmware, intel-microcode, amd64-microcode
Recommends: thermald
Download-Size: 9,026 B
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 Packages
Description: Generic Linux kernel image
 This package will always depend on the latest generic kernel image
 available.

Package: linux-image-generic Version: 6.5.0.9.11 Priority: optional Section: kernel Source: linux-meta Origin: Ubuntu Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 15.4 kB Provides: spl-modules (= 2.2.0~rc3-0ubuntu4), v4l2loopback-modules (= 0.12.7-2ubuntu4), virtualbox-guest-modules (= 6.5.0-9), wireguard-modules (= 1.0.0), zfs-modules (= 2.2.0~rc3-0ubuntu4) Depends: linux-image-6.5.0-9-generic, linux-modules-extra-6.5.0-9-generic, linux-firmware, intel-microcode, amd64-microcode Recommends: thermald Download-Size: 8,892 B APT-Sources: http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages Description: Generic Linux kernel image This package will always depend on the latest generic kernel image available.

... as you can see the former shows real dependencies on other different packages not among which a google-chrome* package so not a meta-package by this definition while the latter lists dependency on a certain version of itself so a meta-package by this definition (in layman's terms, that is)

That said, you can search available packages from added repositories like this:

$ apt search '^google-chrome.*'
Sorting... Done
Full Text Search... Done
google-chrome-beta/stable 121.0.6167.8-1 amd64
  The web browser from Google

google-chrome-stable/stable,now 120.0.6099.71-1 amd64 [installed] The web browser from Google

google-chrome-unstable/stable 121.0.6156.3-1 amd64 The web browser from Google

or like this:

$ apt list 'google-chrome*'
Listing... Done
google-chrome-beta/stable 121.0.6167.8-1 amd64
google-chrome-stable/stable,now 120.0.6099.71-1 amd64 [installed]
google-chrome-unstable/stable 121.0.6156.3-1 amd64

or alternatively search text in the related repository cached list of packages file under /var/lib/apt/lists/ (gets updated with sudo apt update) like for example:

$ awk '/^Package: |^Version: |^Architecture: / {
        print
}

/^Filename: / { printf "%s\n\n", $0 } ' /var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-amd64_Packages Package: google-chrome-beta Version: 121.0.6167.8-1 Architecture: amd64 Filename: pool/main/g/google-chrome-beta/google-chrome-beta_121.0.6167.8-1_amd64.deb

Package: google-chrome-stable Version: 120.0.6099.71-1 Architecture: amd64 Filename: pool/main/g/google-chrome-stable/google-chrome-stable_120.0.6099.71-1_amd64.deb

Package: google-chrome-unstable Version: 121.0.6156.3-1 Architecture: amd64 Filename: pool/main/g/google-chrome-unstable/google-chrome-unstable_121.0.6156.3-1_amd64.deb

... where Filename: is the actual file path under that repository i.e. for example the stable Google Chrome package file is at:

https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_120.0.6099.71-1_amd64.deb
Raffa
  • 34,963