Skip to content

feat(registry): install-deps via dnf on Fedora and RHEL family#40840

Open
yury-s wants to merge 4 commits into
microsoft:mainfrom
yury-s:feat-fedora-install-deps
Open

feat(registry): install-deps via dnf on Fedora and RHEL family#40840
yury-s wants to merge 4 commits into
microsoft:mainfrom
yury-s:feat-fedora-install-deps

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented May 14, 2026

Summary

  • Adds a dnf-based code path to playwright install-deps for Fedora and the RHEL family (RHEL, CentOS Stream, Rocky, Alma, Oracle, Amazon Linux 2023).
  • Resolves missing SONAMEs via dnf repoquery --whatprovides against installed browser binaries, then either prints the list (--dry-run) or runs dnf install -y via the existing root-elevation helper.
  • Updates the host-requirements error path to suggest the dnf install command on dnf-based distros.
  • Adds a GitHub Action that runs @smoke tests inside a stock fedora:latest container whenever packages/playwright-core/browsers.json changes.

Note: Chromium and Firefox work; WebKit currently fails because it links against Ubuntu's libicu/libjpeg/libx264 SONAMEs that Fedora does not ship — that needs a separate Fedora WebKit build and is out of scope here.

Towards #37812
Towards microsoft/playwright-cli#309

yury-s added 4 commits May 13, 2026 16:04
- Add isDnfBasedDistroSync() in linuxUtils, also exposing id_like so
  Rocky/Alma/Oracle/Amazon Linux 2023 inherit the same path.
- validateDependenciesLinux now produces a "sudo dnf install ..." hint on
  dnf-based distros (instead of bare "Missing libraries" list) by querying
  `dnf repoquery --whatprovides <soname>` for each missing library.
- installDependenciesFedora ldds the installed browser dirs, resolves each
  missing soname to a Fedora package, and shells out to `dnf install -y`.
- Fix the chrome-linux/chrome-linux64 mismatch in chromium and chromium-
  headless-shell ldd directories: on linux-x64 the CFT layout uses
  chrome-linux64/ and chrome-headless-shell-linux64/, so the previous
  `['chrome-linux']` list silently no-op'd host validation on every x64
  Linux. Include both so arm64 (chrome-linux/) keeps working.
- Rename installDependenciesFedora to installDependenciesDnf to match
  isDnfBasedDistroSync / DNF_DISTRO_IDS and cover the RHEL family.
- Extract runPackageInstall shared by apt and dnf paths.
- Extract reportDnfResolution for the dry-run output.
- Parallelize per-browser ldd scans in installDependenciesDnf.
- Take a {lddDirectories, dlOpenLibraries} struct in
  _validateHostRequirements so each entry mentions its dirs once.
- Use getEmbedderName().embedderName instead of hand-rolled
  process.env.PW_LANG_NAME fallback.
…changes

Exercises the new dnf-based install-deps path against a stock fedora:latest
image whenever the browser revisions change.
Drop the explicit chromium/firefox/webkit/ffmpeg list — running `install`
and `install-deps` with no arguments installs the default set, which
matches what an end-user on Fedora is most likely to do.
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [chromium] › mcp/annotate.spec.ts:297 › should annotate via direct browser_annotate MCP call @mcp-windows-latest-chromium
❌ [webkit] › mcp/annotate.spec.ts:137 › should abort MCP annotation when last screenshot is removed @mcp-windows-latest-webkit

7084 passed, 1104 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 flaky ⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node20`

41785 passed, 850 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants