Github messages for voidlinux
 help / color / mirror / Atom feed
From: atk <atk@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] vscode: update to 1.74.0
Date: Thu, 08 Dec 2022 12:59:19 +0100	[thread overview]
Message-ID: <20221208115919.GiC2VMe21fLNsnrtHrMoXzRjfa1SMLPdeq_CycP0zsY@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40964@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

There is an updated pull request by atk against master on the void-packages repository

https://github.com/atk/void-packages vscode-1.74.0
https://github.com/void-linux/void-packages/pull/40964

vscode: update to 1.74.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40964.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vscode-1.74.0-40964.patch --]
[-- Type: text/x-diff, Size: 3513 bytes --]

From d545e3aa97d6dd0924a71517ff63d86da6f9d866 Mon Sep 17 00:00:00 2001
From: Alex Lohr <alexthkloss@web.de>
Date: Wed, 7 Dec 2022 22:49:33 +0100
Subject: [PATCH] vscode: update to 1.74.0

replace ripgrep patch for security reasons
---
 srcpkgs/vscode/patches/ripgrep.patch | 32 ----------------------------
 srcpkgs/vscode/template              | 14 ++++++++++--
 2 files changed, 12 insertions(+), 34 deletions(-)
 delete mode 100644 srcpkgs/vscode/patches/ripgrep.patch

diff --git a/srcpkgs/vscode/patches/ripgrep.patch b/srcpkgs/vscode/patches/ripgrep.patch
deleted file mode 100644
index f87bc5eaab5a..000000000000
--- a/srcpkgs/vscode/patches/ripgrep.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Ping atk if this needs updating.
-
-This prevents vscode from fetching prebuilt ripgrep from Microsoft
-during build, which unbreaks build on platforms where MS deos not
-ship a prebuilt ripgrep.
-
-diff --git a/package.json b/package.json
-index 39c3e9f5b10..198dbf3e421 100644
---- a/package.json
-+++ b/package.json
-@@ -62,7 +62,7 @@
-     "@microsoft/applicationinsights-web": "^2.6.4",
-     "@parcel/watcher": "2.0.5",
-     "@vscode/iconv-lite-umd": "0.7.0",
--    "@vscode/ripgrep": "^1.14.2",
-+    "@vscode/ripgrep": "https://github.com/atk/void-vscode-ripgrep.git",
-     "@vscode/sqlite3": "5.0.8",
-     "@vscode/sudo-prompt": "9.3.1",
-     "@vscode/vscode-languagedetection": "1.0.21",
-diff --git a/remote/package.json b/remote/package.json
-index 936aa5f5bab..152ba516795 100644
---- a/remote/package.json
-+++ b/remote/package.json
-@@ -6,7 +6,7 @@
-     "@microsoft/applicationinsights-web": "^2.6.4",
-     "@parcel/watcher": "2.0.5",
-     "@vscode/iconv-lite-umd": "0.7.0",
--    "@vscode/ripgrep": "^1.14.2",
-+    "@vscode/ripgrep": "https://github.com/atk/void-vscode-ripgrep.git",
-     "@vscode/vscode-languagedetection": "1.0.21",
-     "applicationinsights": "1.4.2",
-     "cookie": "^0.4.0",
diff --git a/srcpkgs/vscode/template b/srcpkgs/vscode/template
index 6e50274feaf3..d145b12e209b 100644
--- a/srcpkgs/vscode/template
+++ b/srcpkgs/vscode/template
@@ -1,6 +1,6 @@
 # Template file for 'vscode'
 pkgname=vscode
-version=1.73.1
+version=1.74.0
 revision=1
 _electronver=19.0.8
 _npmver=8.6.0
@@ -12,7 +12,7 @@ maintainer="shizonic <realtiaz@gmail.com>, Alex Lohr <alex.lohr@logmein.com>"
 license="MIT"
 homepage="https://code.visualstudio.com/"
 distfiles="https://github.com/microsoft/vscode/archive/refs/tags/${version}.tar.gz"
-checksum=fd0b6786968f19e52820d75abbc8ee9345b010d64f96b6c4d6766f9d8705a022
+checksum=171435a9e2736d323af78591593f8a59eac52d26e98ba817daa37261e835aa1f
 nocross=yes # x64 build does not cut it, it contains native code
 
 if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
@@ -35,6 +35,16 @@ do_configure() {
 
 	# set used electron version
 	vsed -e "s/^target .*/target \"${_electronver}\"/" -i .yarnrc
+
+	# @vscode/ripgrep attempts to install an own version of ripgrep and provides a path
+	# we want to use our own version instead, so all we need is the fixed path (/bin/rg)
+	# remove @vscode/ripgrep from all package.json files it is in:
+	_PACKAGE_PATTERN="\"@vscode.ripgrep\":"
+	grep -rl --exclude-dir=.git -E $_PACKAGE_PATTERN | xargs sed -i -E "/${_PACKAGE_PATTERN}/d"
+	# replace path import with fixed path:
+	_IMPORT_PATTERN="import.*from '@vscode.ripgrep';"
+	_IMPORT_REPLACEMENT="s/${_IMPORT_PATTERN}/const rgPath = '\/bin\/rg';/"
+	grep -rl --exclude-dir=.git -E "$_IMPORT_PATTERN" | xargs sed -i -E "$_IMPORT_REPLACEMENT"
 }
 
 do_build() {

  reply	other threads:[~2022-12-08 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 21:51 [PR PATCH] " atk
2022-12-08 11:59 ` atk [this message]
2022-12-08 12:04 ` atk
2022-12-08 12:49 ` crtxcr
2022-12-09  8:25 ` [PR PATCH] [Updated] " atk
2022-12-09  8:25 ` atk
2022-12-09 16:06 ` crtxcr
2022-12-12  7:26 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221208115919.GiC2VMe21fLNsnrtHrMoXzRjfa1SMLPdeq_CycP0zsY@z \
    --to=atk@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).