playwright/utils/linux-browser-dependencies
Yury Semikhatsky c751bf135e
devops: stop using deprecated method of installing node (#27392)
Otherwise we see a warning for 1 minute every time during the script
run:

<img width="616" alt="image"
src="https://github.com/microsoft/playwright/assets/9798949/4593048c-a901-4db5-a15e-1b6dd1970625">


The instructions are taken from
https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions
2023-10-02 14:24:58 -07:00
..
inside_docker devops: stop using deprecated method of installing node (#27392) 2023-10-02 14:24:58 -07:00
.gitignore devops: add script to generate shared object => package mapping (#3022) 2020-07-20 10:35:42 -07:00
README.md chore: use bash instead of sh in code blocks (#6847) 2021-06-02 18:23:06 +02:00
run.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00

Mapping distribution libraries to package names

Playwright requires a set of packages on Linux distribution for browsers to work. Before launching browser on Linux, Playwright uses ldd to make sure browsers have all dependencies met.

If this is not the case, Playwright suggests users packages to install to meet the dependencies. This tool helps to maintain a map between package names and shared libraries it provides, per distribution.

Usage

To generate a map of browser library to package name on Ubuntu:bionic:

./run.sh ubuntu:bionic

Results will be saved to the RUN_RESULT.

How it works

The script does the following:

  1. Launches docker with given linux distribution
  2. Installs playwright browsers inside the distribution
  3. For every dependency that Playwright browsers miss inside the distribution, uses apt-file to reverse-search package with the library.