Skip to content

Commit

Permalink
feat: support Chromium installation on Debian 12 (#24090)
Browse files Browse the repository at this point in the history
This adds Chromium support for both x86 and arm64 versions of Debian 12.

References #24028
  • Loading branch information
aslushnikov authored Jul 7, 2023
1 parent 9af2b51 commit b9e68e2
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 1 deletion.
14 changes: 14 additions & 0 deletions packages/playwright-core/src/server/registry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ const DOWNLOAD_PATHS = {
'ubuntu22.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'debian11': 'builds/chromium/%s/chromium-linux.zip',
'debian11-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'debian12': 'builds/chromium/%s/chromium-linux.zip',
'debian12-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'mac10.13': 'builds/chromium/%s/chromium-mac.zip',
'mac10.14': 'builds/chromium/%s/chromium-mac.zip',
'mac10.15': 'builds/chromium/%s/chromium-mac.zip',
Expand All @@ -109,6 +111,8 @@ const DOWNLOAD_PATHS = {
'ubuntu22.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'debian11': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'debian11-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'debian12': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'debian12-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'mac10.13': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
'mac10.14': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
'mac10.15': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
Expand All @@ -132,6 +136,8 @@ const DOWNLOAD_PATHS = {
'ubuntu22.04-arm64': 'builds/chromium/%s/chromium-with-symbols-linux-arm64.zip',
'debian11': 'builds/chromium/%s/chromium-with-symbols-linux.zip',
'debian11-arm64': 'builds/chromium/%s/chromium-with-symbols-linux-arm64.zip',
'debian12': 'builds/chromium/%s/chromium-with-symbols-linux.zip',
'debian12-arm64': 'builds/chromium/%s/chromium-with-symbols-linux-arm64.zip',
'mac10.13': 'builds/chromium/%s/chromium-with-symbols-mac.zip',
'mac10.14': 'builds/chromium/%s/chromium-with-symbols-mac.zip',
'mac10.15': 'builds/chromium/%s/chromium-with-symbols-mac.zip',
Expand All @@ -155,6 +161,8 @@ const DOWNLOAD_PATHS = {
'ubuntu22.04-arm64': 'builds/firefox/%s/firefox-ubuntu-22.04-arm64.zip',
'debian11': 'builds/firefox/%s/firefox-debian-11.zip',
'debian11-arm64': 'builds/firefox/%s/firefox-debian-11-arm64.zip',
'debian12': undefined,
'debian12-arm64': undefined,
'mac10.13': 'builds/firefox/%s/firefox-mac-13.zip',
'mac10.14': 'builds/firefox/%s/firefox-mac-13.zip',
'mac10.15': 'builds/firefox/%s/firefox-mac-13.zip',
Expand All @@ -178,6 +186,8 @@ const DOWNLOAD_PATHS = {
'ubuntu22.04-arm64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-22.04-arm64.zip',
'debian11': 'builds/firefox-beta/%s/firefox-beta-debian-11.zip',
'debian11-arm64': 'builds/firefox-beta/%s/firefox-beta-debian-11-arm64.zip',
'debian12': undefined,
'debian12-arm64': undefined,
'mac10.13': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac10.14': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
'mac10.15': 'builds/firefox-beta/%s/firefox-beta-mac-13.zip',
Expand All @@ -201,6 +211,8 @@ const DOWNLOAD_PATHS = {
'ubuntu22.04-arm64': 'builds/webkit/%s/webkit-ubuntu-22.04-arm64.zip',
'debian11': 'builds/webkit/%s/webkit-debian-11.zip',
'debian11-arm64': 'builds/webkit/%s/webkit-debian-11-arm64.zip',
'debian12': undefined,
'debian12-arm64': undefined,
'mac10.13': undefined,
'mac10.14': 'builds/deprecated-webkit-mac-10.14/%s/deprecated-webkit-mac-10.14.zip',
'mac10.15': 'builds/deprecated-webkit-mac-10.15/%s/deprecated-webkit-mac-10.15.zip',
Expand All @@ -224,6 +236,8 @@ const DOWNLOAD_PATHS = {
'ubuntu22.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'debian11': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'debian11-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'debian12': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'debian12-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'mac10.13': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
'mac10.14': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
'mac10.15': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
Expand Down
83 changes: 82 additions & 1 deletion packages/playwright-core/src/server/registry/nativeDeps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,74 @@ export const deps: any = {
'libatomic.so.1': 'libatomic1',
'libevent-2.1.so.7': 'libevent-2.1-7',
}
}
},
'debian12': {
tools: [
'xvfb',
'fonts-noto-color-emoji',
'fonts-unifont',
'libfontconfig1',
'libfreetype6',
'xfonts-scalable',
'fonts-liberation',
'fonts-ipafont-gothic',
'fonts-wqy-zenhei',
'fonts-tlwg-loma-otf',
'fonts-freefont-ttf',
],
chromium: [
'libasound2',
'libatk-bridge2.0-0',
'libatk1.0-0',
'libatspi2.0-0',
'libcairo2',
'libcups2',
'libdbus-1-3',
'libdrm2',
'libgbm1',
'libglib2.0-0',
'libnspr4',
'libnss3',
'libpango-1.0-0',
'libx11-6',
'libxcb1',
'libxcomposite1',
'libxdamage1',
'libxext6',
'libxfixes3',
'libxkbcommon0',
'libxrandr2'
],
firefox: [],
webkit: [],
lib2package: {
'libasound.so.2': 'libasound2',
'libatk-1.0.so.0': 'libatk1.0-0',
'libatk-bridge-2.0.so.0': 'libatk-bridge2.0-0',
'libatspi.so.0': 'libatspi2.0-0',
'libcairo.so.2': 'libcairo2',
'libcups.so.2': 'libcups2',
'libdbus-1.so.3': 'libdbus-1-3',
'libdrm.so.2': 'libdrm2',
'libgbm.so.1': 'libgbm1',
'libgio-2.0.so.0': 'libglib2.0-0',
'libglib-2.0.so.0': 'libglib2.0-0',
'libgobject-2.0.so.0': 'libglib2.0-0',
'libnspr4.so': 'libnspr4',
'libnss3.so': 'libnss3',
'libnssutil3.so': 'libnss3',
'libpango-1.0.so.0': 'libpango-1.0-0',
'libsmime3.so': 'libnss3',
'libX11.so.6': 'libx11-6',
'libxcb.so.1': 'libxcb1',
'libXcomposite.so.1': 'libxcomposite1',
'libXdamage.so.1': 'libxdamage1',
'libXext.so.6': 'libxext6',
'libXfixes.so.3': 'libxfixes3',
'libxkbcommon.so.0': 'libxkbcommon0',
'libXrandr.so.2': 'libxrandr2',
}
},
};

deps['ubuntu20.04-arm64'] = {
Expand Down Expand Up @@ -868,3 +935,17 @@ deps['debian11-arm64'] = {
},
};

deps['debian12-arm64'] = {
tools: [...deps['debian12'].tools],
chromium: [...deps['debian12'].chromium],
firefox: [
...deps['debian12'].firefox,
],
webkit: [
...deps['debian12'].webkit,
],
lib2package: {
...deps['debian12'].lib2package,
},
};

3 changes: 3 additions & 0 deletions packages/playwright-core/src/utils/hostPlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export type HostPlatform = 'win64' |
'ubuntu20.04' | 'ubuntu20.04-arm64' |
'ubuntu22.04' | 'ubuntu22.04-arm64' |
'debian11' | 'debian11-arm64' |
'debian12' | 'debian12-arm64' |
'generic-linux' | 'generic-linux-arm64' |
'<unknown>';

Expand Down Expand Up @@ -69,6 +70,8 @@ export const hostPlatform = ((): HostPlatform => {
}
if (distroInfo?.id === 'debian' && distroInfo?.version === '11')
return ('debian11' + archSuffix) as HostPlatform;
if (distroInfo?.id === 'debian' && distroInfo?.version === '12')
return ('debian12' + archSuffix) as HostPlatform;
return ('generic-linux' + archSuffix) as HostPlatform;
}
if (platform === 'win32')
Expand Down

0 comments on commit b9e68e2

Please sign in to comment.