diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-07 07:31:59 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-07 07:31:59 +0000 |
commit | b89039c5688ab75fffa3d806119eb053cc326660 (patch) | |
tree | 4f81cc86bdbf24a6bf6ea840db44c2ca4b21cf23 | |
parent | fa9c0e08315a612470ef72ca5ac658663634f408 (diff) |
automatic import of vscodium
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | no-exec-git.patch | 4 | ||||
-rw-r--r-- | ripgrep.patch | 152 | ||||
-rw-r--r-- | sources | 8 | ||||
-rw-r--r-- | use-local-vsix.patch | 94 | ||||
-rw-r--r-- | vscodium.spec | 41 | ||||
-rw-r--r-- | yarn-offline.patch | 34 |
7 files changed, 329 insertions, 10 deletions
@@ -1,2 +1,8 @@ /1.91.0.24190.tar.gz /1.91.0.tar.gz +/1.91.1.24193.tar.gz +/1.91.1.tar.gz +/ms-vscode.js-debug-companion.1.1.2.vsix +/ms-vscode.js-debug.1.91.0.vsix +/ms-vscode.vscode-js-profile-table.1.0.9.vsix +/vendor.tar diff --git a/no-exec-git.patch b/no-exec-git.patch index 3d8f178..018d738 100644 --- a/no-exec-git.patch +++ b/no-exec-git.patch @@ -1,5 +1,5 @@ ---- vscode/build/npm/postinstall.js.orig 2024-06-30 09:06:24.691697715 +0800 -+++ vscode/build/npm/postinstall.js 2024-06-30 09:06:31.281781750 +0800 +--- vscode/build/npm/postinstall.js.orig 2024-08-07 09:57:47.195493488 +0800 ++++ vscode/build/npm/postinstall.js 2024-08-07 10:04:11.865697996 +0800 @@ -131,6 +131,3 @@ yarnInstall(dir, opts); diff --git a/ripgrep.patch b/ripgrep.patch new file mode 100644 index 0000000..486d1fd --- /dev/null +++ b/ripgrep.patch @@ -0,0 +1,152 @@ +diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js +index c6202c70883..f18f3dbec3c 100644 +--- vscode/build/gulpfile.vscode.js ++++ vscode/build/gulpfile.vscode.js +@@ -279,7 +279,6 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op + .pipe(jsFilter.restore) + .pipe(createAsar(path.join(process.cwd(), 'node_modules'), [ + '**/*.node', +- '**/@vscode/ripgrep/bin/*', + '**/node-pty/build/Release/*', + '**/node-pty/lib/worker/conoutSocketWorker.js', + '**/node-pty/lib/shared/conout.js', +diff --git a/build/lib/policies.js b/build/lib/policies.js +index 466295b8ad5..c4e1fce12fe 100644 +--- vscode/build/lib/policies.js ++++ vscode/build/lib/policies.js +@@ -8,7 +8,7 @@ const child_process_1 = require("child_process"); + const fs_1 = require("fs"); + const path = require("path"); + const byline = require("byline"); +-const ripgrep_1 = require("@vscode/ripgrep"); ++const rgPath = '/usr/bin/rg'; + const Parser = require("tree-sitter"); + const { typescript } = require('tree-sitter-typescript'); + const product = require('../../product.json'); +@@ -340,7 +340,7 @@ function getPolicies(moduleName, node) { + async function getFiles(root) { + return new Promise((c, e) => { + const result = []; +- const rg = (0, child_process_1.spawn)(ripgrep_1.rgPath, ['-l', 'registerConfiguration\\(', '-g', 'src/**/*.ts', '-g', '!src/**/test/**', root]); ++ const rg = (0, child_process_1.spawn)(rgPath, ['-l', 'registerConfiguration\\(', '-g', 'src/**/*.ts', '-g', '!src/**/test/**', root]); + const stream = byline(rg.stdout.setEncoding('utf8')); + stream.on('data', path => result.push(path)); + stream.on('error', err => e(err)); +@@ -523,4 +523,4 @@ if (require.main === module) { + process.exit(1); + }); + } +-//# sourceMappingURL=policies.js.map +\ No newline at end of file ++//# sourceMappingURL=policies.js.map +diff --git a/build/lib/policies.ts b/build/lib/policies.ts +index 68f6989f27a..1802c43acfb 100644 +--- vscode/build/lib/policies.ts ++++ vscode/build/lib/policies.ts +@@ -7,7 +7,7 @@ import { spawn } from 'child_process'; + import { promises as fs } from 'fs'; + import * as path from 'path'; + import * as byline from 'byline'; +-import { rgPath } from '@vscode/ripgrep'; ++const rgPath = '/usr/bin/rg'; + import * as Parser from 'tree-sitter'; + const { typescript } = require('tree-sitter-typescript'); + const product = require('../../product.json'); +diff --git a/package.json b/package.json +index 2103fe1fe1a..fcb42f433a0 100644 +--- vscode/package.json ++++ vscode/package.json +@@ -74,7 +74,6 @@ + "@vscode/iconv-lite-umd": "0.7.0", + "@vscode/policy-watcher": "^1.1.4", + "@vscode/proxy-agent": "^0.21.0", +- "@vscode/ripgrep": "^1.15.9", + "@vscode/spdlog": "^0.15.0", + "@vscode/sqlite3": "5.1.6-vscode", + "@vscode/sudo-prompt": "9.3.1", +diff --git a/src/vs/workbench/services/search/node/ripgrepFileSearch.ts b/src/vs/workbench/services/search/node/ripgrepFileSearch.ts +index f833061c553..de0a5fa7df2 100644 +--- vscode/src/vs/workbench/services/search/node/ripgrepFileSearch.ts ++++ vscode/src/vs/workbench/services/search/node/ripgrepFileSearch.ts +@@ -12,7 +12,7 @@ import { isMacintosh as isMac } from 'vs/base/common/platform'; + import * as strings from 'vs/base/common/strings'; + import { IFileQuery, IFolderQuery } from 'vs/workbench/services/search/common/search'; + import { anchorGlob } from 'vs/workbench/services/search/node/ripgrepSearchUtils'; +-import { rgPath } from '@vscode/ripgrep'; ++const rgPath = '/usr/bin/rg'; + + // If @vscode/ripgrep is in an .asar file, then the binary is unpacked. + const rgDiskPath = rgPath.replace(/\bnode_modules\.asar\b/, 'node_modules.asar.unpacked'); +diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts b/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts +index 4740a661119..8bcabe088e2 100644 +--- vscode/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts ++++ vscode/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts +@@ -16,7 +16,7 @@ import { Progress } from 'vs/platform/progress/common/progress'; + import { IExtendedExtensionSearchOptions, SearchError, SearchErrorCode, serializeSearchError } from 'vs/workbench/services/search/common/search'; + import { Range, TextSearchComplete, TextSearchContext, TextSearchMatch, TextSearchOptions, TextSearchPreviewOptions, TextSearchQuery, TextSearchResult } from 'vs/workbench/services/search/common/searchExtTypes'; + import { AST as ReAST, RegExpParser, RegExpVisitor } from 'vscode-regexpp'; +-import { rgPath } from '@vscode/ripgrep'; ++const rgPath = '/usr/bin/rg'; + import { anchorGlob, createTextSearchResult, IOutputChannel, Maybe } from './ripgrepSearchUtils'; + import type { RipgrepTextSearchOptions } from 'vs/workbench/services/search/common/searchExtTypesInternal'; + +diff --git a/remote/package.json b/remote/package.json +index 5b0e80182ea..a88c2f5d41d 100644 +--- vscode/remote/package.json ++++ vscode/remote/package.json +@@ -9,7 +9,6 @@ + "@vscode/deviceid": "^0.1.1", + "@vscode/iconv-lite-umd": "0.7.0", + "@vscode/proxy-agent": "^0.21.0", +- "@vscode/ripgrep": "^1.15.9", + "@vscode/spdlog": "^0.15.0", + "@vscode/vscode-languagedetection": "1.0.21", + "@vscode/windows-process-tree": "^0.6.0", +diff --git a/yarn.lock b/yarn.lock +index 71aef4295fa..7b74e981e61 100644 +--- vscode/yarn.lock ++++ vscode/yarn.lock +@@ -1584,15 +1584,6 @@ + optionalDependencies: + "@vscode/windows-ca-certs" "^0.3.1" + +-"@vscode/ripgrep@^1.15.9": +- version "1.15.9" +- resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.15.9.tgz#92279f7f28e1e49ad9a89603e10b17a4c7f9f5f1" +- integrity sha512-4q2PXRvUvr3bF+LsfrifmUZgSPmCNcUZo6SbEAZgArIChchkezaxLoIeQMJe/z3CCKStvaVKpBXLxN3Z8lQjFQ== +- dependencies: +- https-proxy-agent "^7.0.2" +- proxy-from-env "^1.1.0" +- yauzl "^2.9.2" +- + "@vscode/spdlog@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@vscode/spdlog/-/spdlog-0.15.0.tgz#37896541410ff036dc01c54e16bf131c522a057e" +@@ -1620,7 +1611,6 @@ + resolved "https://registry.yarnpkg.com/@vscode/telemetry-extractor/-/telemetry-extractor-1.10.2.tgz#b1ec2296dac1923d400bf98b3242d9b7d792fe83" + integrity sha512-hn+KDSwIRj7LzDSFd9HALkc80UY1g16nQgWztHml+nxAZU3Hw/EoWEEDxOncvDYq9YcV+tX/cVHrVjbNL2Dg0g== + dependencies: +- "@vscode/ripgrep" "^1.15.9" + command-line-args "^5.2.1" + ts-morph "^19.0.0" + +diff --git a/remote/yarn.lock b/remote/yarn.lock +index c8e84fc81e1..41219df5f33 100644 +--- vscode/remote/yarn.lock ++++ vscode/remote/yarn.lock +@@ -80,15 +80,6 @@ + optionalDependencies: + "@vscode/windows-ca-certs" "^0.3.1" + +-"@vscode/ripgrep@^1.15.9": +- version "1.15.9" +- resolved "https://registry.yarnpkg.com/@vscode/ripgrep/-/ripgrep-1.15.9.tgz#92279f7f28e1e49ad9a89603e10b17a4c7f9f5f1" +- integrity sha512-4q2PXRvUvr3bF+LsfrifmUZgSPmCNcUZo6SbEAZgArIChchkezaxLoIeQMJe/z3CCKStvaVKpBXLxN3Z8lQjFQ== +- dependencies: +- https-proxy-agent "^7.0.2" +- proxy-from-env "^1.1.0" +- yauzl "^2.9.2" +- + "@vscode/spdlog@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@vscode/spdlog/-/spdlog-0.15.0.tgz#37896541410ff036dc01c54e16bf131c522a057e" @@ -1,2 +1,6 @@ -098e00cf8a151a985e51b120feb156de 1.91.0.24190.tar.gz -ebcb1ddcc63d7d28bd7f1bdd5e73f0a3 1.91.0.tar.gz +2137f14aa13c236274a22a59195d7045 1.91.1.24193.tar.gz +91f4991ce2f25cb7c0f7ff96594ffae3 1.91.1.tar.gz +fc7948ed0db659ff470c8bad56d1f383 ms-vscode.js-debug-companion.1.1.2.vsix +07bc5ee6c37573883f2754929a6e23a8 ms-vscode.js-debug.1.91.0.vsix +881ce6fabad3eea0296c144eed369d3d ms-vscode.vscode-js-profile-table.1.0.9.vsix +826bd1515e378aa4da70044ee5e2e5ac vendor.tar diff --git a/use-local-vsix.patch b/use-local-vsix.patch new file mode 100644 index 0000000..0719d4a --- /dev/null +++ b/use-local-vsix.patch @@ -0,0 +1,94 @@ +--- patches/ext-from-gh.patch ++++ patches/ext-from-gh.patch +@@ -7,7 +7,7 @@ index 1b0adc4..b595123 100644 + - const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl; + - return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension)) + - .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`)); +-+ return ext.fromGithub(extension).pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`)); +++ return ext.fromLocalVsix(extension).pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`)); + } + diff --git a/build/lib/builtInExtensions.ts b/build/lib/builtInExtensions.ts + index fefed43..4ae553e 100644 +@@ -18,5 +18,5 @@ index fefed43..4ae553e 100644 + - const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl; + - return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension)) + - .pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`)); +-+ return ext.fromGithub(extension).pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`)); +++ return ext.fromLocalVsix(extension).pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`)); + } + +--- vscode/build/lib/extensions.js ++++ vscode/build/lib/extensions.js +@@ -4,6 +4,7 @@ + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + Object.defineProperty(exports, "__esModule", { value: true }); ++exports.fromLocalVsix = fromLocalVsix; + exports.fromMarketplace = fromMarketplace; + exports.fromGithub = fromGithub; + exports.packageLocalExtensionsStream = packageLocalExtensionsStream; +@@ -21,6 +22,7 @@ const path = require("path"); + const File = require("vinyl"); + const stats_1 = require("./stats"); + const util2 = require("./util"); ++const vinylFs = require("vinyl-fs"); + const vzip = require('gulp-vinyl-zip'); + const filter = require("gulp-filter"); + const rename = require("gulp-rename"); +@@ -193,6 +195,20 @@ function fromLocalNormal(extensionPath) { + .catch(err => result.emit('error', err)); + return result.pipe((0, stats_1.createStatsStream)(path.basename(extensionPath))); + } ++function fromLocalVsix({ name, version, metadata }) { ++ const json = require('gulp-json-editor'); ++ fancyLog('Processing extension from local directory:', ansiColors.yellow(`${name}@${version}`), '...'); ++ const packageJsonFilter = filter('package.json', { restore: true }); ++ return vinylFs.src(`${root}/../${name}.${version}.vsix`) ++ .pipe(buffer()) ++ .pipe(vzip.src()) ++ .pipe(filter('extension/**')) ++ .pipe(rename(p => p.dirname = p.dirname.replace(/^extension\/?/, ''))) ++ .pipe(packageJsonFilter) ++ .pipe(buffer()) ++ .pipe(json({ __metadata: metadata })) ++ .pipe(packageJsonFilter.restore); ++} + const userAgent = 'VSCode Build'; + const baseHeaders = { + 'X-Market-Client-Id': 'VSCode Build', + +--- vscode/build/lib/extensions.ts.orig ++++ vscode/build/lib/extensions.ts +@@ -13,6 +13,7 @@ import { Stream } from 'stream'; + import * as File from 'vinyl'; + import { createStatsStream } from './stats'; + import * as util2 from './util'; ++import * as vinylFs from 'vinyl-fs'; + const vzip = require('gulp-vinyl-zip'); + import filter = require('gulp-filter'); + import rename = require('gulp-rename'); +@@ -214,6 +215,24 @@ function fromLocalNormal(extensionPath: string): Stream { + return result.pipe(createStatsStream(path.basename(extensionPath))); + } + ++export function fromLocalVsix({ name, version, metadata }: IExtensionDefinition): Stream { ++ const json = require('gulp-json-editor') as typeof import('gulp-json-editor'); ++ ++ fancyLog('Processing extension from local directory:', ansiColors.yellow(`${name}@${version}`), '...'); ++ ++ const packageJsonFilter = filter('package.json', { restore: true }); ++ ++ return vinylFs.src(`${root}/../${name}.${version}.vsix`) ++ .pipe(buffer()) ++ .pipe(vzip.src()) ++ .pipe(filter('extension/**')) ++ .pipe(rename(p => p.dirname = p.dirname!.replace(/^extension\/?/, ''))) ++ .pipe(packageJsonFilter) ++ .pipe(buffer()) ++ .pipe(json({ __metadata: metadata })) ++ .pipe(packageJsonFilter.restore); ++} ++ + const userAgent = 'VSCode Build'; + const baseHeaders = { + 'X-Market-Client-Id': 'VSCode Build', diff --git a/vscodium.spec b/vscodium.spec index aa065a1..f128cf7 100644 --- a/vscodium.spec +++ b/vscodium.spec @@ -1,21 +1,34 @@ %global debug_package %{nil} -%define vscode_version 1.91.0 +%define vscode_version 1.91.1 + +%define jsdebugcompanion_version 1.1.2 +%define jsdebug_version 1.91.0 +%define vscodejsprofiletable_version 1.0.9 Name: vscodium -Version: %{vscode_version}.24190 +Version: %{vscode_version}.24193 Release: 1 Summary: Free/Libre Open Source Software Binaries of VS Code License: MIT URL: https://github.com/VSCodium/vscodium -Source0: https://github.com/VSCodium/vscodium/archive/%{version}.tar.gz -Source1: https://github.com/microsoft/vscode/archive/%{vscode_version}.tar.gz + +Source0: https://github.com/VSCodium/vscodium/archive/refs/tags/%{version}.tar.gz +Source1: https://github.com/microsoft/vscode/archive/refs/tags/%{vscode_version}.tar.gz + +Source2: https://github.com/microsoft/vscode-js-debug-companion/releases/download/v%{jsdebugcompanion_version}/ms-vscode.js-debug-companion.%{jsdebugcompanion_version}.vsix +Source3: https://github.com/microsoft/vscode-js-debug/releases/download/v%{jsdebug_version}/ms-vscode.js-debug.%{jsdebug_version}.vsix +Source4: https://github.com/microsoft/vscode-js-profile-visualizer/releases/download/v%{vscodejsprofiletable_version}/ms-vscode.vscode-js-profile-table.%{vscodejsprofiletable_version}.vsix +Source5: vendor.tar Patch0: no-exec-git.patch +Patch1: use-local-vsix.patch +Patch2: yarn-offline.patch +Patch3: ripgrep.patch Requires: glibc nodejs fontconfig libXtst cairo alsa-lib nss libnotify libxcb libxkbfile libsecret -BuildRequires: gcc g++ make pkg-config npm libxcb-devel libxkbfile-devel krb5-devel libsecret-devel yarnpkg git python3 jq +BuildRequires: gcc g++ make pkg-config libxcb-devel libxkbfile-devel krb5-devel libsecret-devel nodejs-yarn git python3 jq nodejs-devel %description VSCodium is a community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code. @@ -23,10 +36,24 @@ VSCodium is a community-driven, freely-licensed binary distribution of Microsoft %prep %setup -q -tar -xzf %{SOURCE1} -C %{_builddir}/%{name}-%{version} + +tar -xvf %{SOURCE1} -C %{_builddir}/%{name}-%{version} mv %{_builddir}/%{name}-%{version}/vscode-%{vscode_version} %{_builddir}/%{name}-%{version}/vscode +cp %{SOURCE2} %{_builddir}/%{name}-%{version} +cp %{SOURCE3} %{_builddir}/%{name}-%{version} +cp %{SOURCE4} %{_builddir}/%{name}-%{version} + %patch 0 +%patch 1 +%patch 2 +%patch 3 + +mkdir -p %{_builddir}/%{name}-%{version}/vendor +tar -xvf %{SOURCE5} -C %{_builddir}/%{name}-%{version}/vendor + +yarn config set yarn-offline-mirror %{_builddir}/%{name}-%{version}/vendor +echo "yarn-offline-mirror %{_builddir}/%{name}-%{version}/vendor" >> %{_builddir}/%{name}-%{version}/vscode/.yarnrc %build @@ -43,6 +70,8 @@ export VSCODE_SKIP_NODE_VERSION_CHECK="yes" export SHOULD_BUILD_REH="no" export OS_NAME="linux" +export ELECTRON_MIRROR="https://mirrors.huaweicloud.com/electron/" + UNAME_ARCH=$( uname -m ) if [[ "${UNAME_ARCH}" == "arm64" ]]; then diff --git a/yarn-offline.patch b/yarn-offline.patch new file mode 100644 index 0000000..965109b --- /dev/null +++ b/yarn-offline.patch @@ -0,0 +1,34 @@ +--- prepare_vscode.sh ++++ prepare_vscode.sh +@@ -78,9 +78,9 @@ if [[ "${OS_NAME}" == "linux" ]]; then + export npm_config_arm_version=7 + fi + +- CHILD_CONCURRENCY=1 yarn --frozen-lockfile --check-files --network-timeout 180000 ++ CHILD_CONCURRENCY=1 yarn --frozen-lockfile --check-files --offline + elif [[ "${OS_NAME}" == "osx" ]]; then +- CHILD_CONCURRENCY=1 yarn --frozen-lockfile --network-timeout 180000 ++ CHILD_CONCURRENCY=1 yarn --frozen-lockfile --offline + + yarn postinstall + else +@@ -105,7 +105,7 @@ else + export npm_config_arm_version=7 + fi + +- CHILD_CONCURRENCY=1 yarn --frozen-lockfile --check-files --network-timeout 180000 ++ CHILD_CONCURRENCY=1 yarn --frozen-lockfile --check-files --offline + fi + + setpath() { +--- vscode/build/npm/postinstall.js.orig 2024-08-07 09:57:47.195493488 +0800 ++++ vscode/build/npm/postinstall.js 2024-08-07 10:02:27.794019375 +0800 +@@ -42,7 +42,7 @@ + const raw = process.env['npm_config_argv'] || '{}'; + const argv = JSON.parse(raw); + const original = argv.original || []; +- const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile' || arg === '--check-files'); ++ const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile' || arg === '--check-files').concat(['--offline']); + + if (opts.ignoreEngines) { + args.push('--ignore-engines'); |