Package Details: vscodium 1.96.0.24352-1

Git Clone URL: https://aur.archlinux.org/vscodium.git (read-only, click to copy)
Package Base: vscodium
Description: Free/Libre Open Source Software Binaries of VSCode (git build from latest release).
Upstream URL: https://github.com/VSCodium/vscodium.git
Licenses: MIT
Conflicts: codium, vscodium, vscodium-bin, vscodium-git
Provides: codium, vscodium
Submitter: cedricroijakkers
Maintainer: cedricroijakkers (daiyam)
Last Packager: daiyam
Votes: 72
Popularity: 0.95
First Submitted: 2021-04-10 15:12 (UTC)
Last Updated: 2024-12-17 23:35 (UTC)

Pinned Comments

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 Next › Last »

MithicSpirit commented on 2022-08-23 18:59 (UTC)

Can confirm that making the package is working fine for me in a clean chroot (other than the nvm bug that requires /sbin/init to exist).

cedricroijakkers commented on 2022-08-23 07:36 (UTC)

The build issues should be fixed now. I've managed to build the package on a few test machines. You might have to clean your AUR helper (yay, paru, ...) in order to make sure the build succeeds.

MithicSpirit commented on 2022-08-22 22:39 (UTC)

Currently fails due to lack of npm. Please add it to makedepends.

==> Starting build()...
Release version: 1.70.2.22230
From https://github.com/Microsoft/vscode.git
Got the MS tag: 1.70.2 version: e4503b30fc78200f846c62cf8091b76ff5547662
From https://github.com/Microsoft/vscode
 * branch            e4503b30fc78200f846c62cf8091b76ff5547662 -> FETCH_HEAD
Note: switching to 'FETCH_HEAD'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at e4503b3 Fix Debugger Restart Bug (#158184)
version.sh: line 7: npm: command not found
==> ERROR: A failure occurred in build().

(can send rest of logs if desired)

P.S.: please test making packages in a clean chroot or virtual machine before pushing to the AUR. The devtools package has some utilities to make doing so easier.

jonathon commented on 2022-08-19 09:36 (UTC)

One person's "nit picking" is another's "iterative improvement".

But here's another: in your linked diff you missed the .git from the end of the source repo urls.

svallinn commented on 2022-08-18 21:38 (UTC) (edited on 2022-08-19 14:10 (UTC) by svallinn)

Here's the "final version" of the patch

I say final because I'm personally not doing any more changes

There's a whole lot of nitpicking in the comments, but don't worry, I tried to appease all of you

(no need to be cautious, it's just a PrivateBin instance -> https://privatebin.info/directory)

NOTE: Don't copy the text, click the "Save Paste" instead; that way trailing whitespace is preserved (there's a new line at the end of the file that is not reflected in the browser)

https://0.0g.gg/?f91e383298836c80#4yBqasNd77rJzPvjsnB4W8Vhep2fk2x5BHBkg4BdibvS

jonathon commented on 2022-08-18 20:36 (UTC) (edited on 2022-08-18 20:36 (UTC) by jonathon)

There's no need to have a git repo URL as a separate variable - it can be included in the source array (as in my diff). In any event, local variables should be prepended with an underscore (so _microsoft_url rather than microsoft_url).

willemw commented on 2022-08-18 19:22 (UTC)

command -v does not need the 2>&1 part.

_pkgver is only used once. You might as well remove the _pkgver variable and do the substitution inline (in source).

url still ends on .git which should be removed (url points to an HTML page).

(Not really necessary: I have seen some packages that put the word "git" into the variable name to make it clear it points to a git repo. So here, for example, _microsoft_giturl, or something like that. Extra/user-defined variables usually start with an _.)

eclairevoyant commented on 2022-08-18 18:44 (UTC) (edited on 2022-08-18 18:48 (UTC) by eclairevoyant)

@svallinn Might be cleaner if we can also fix the misaligned spaces from the PKGBUILD as part of your patch, I pasted the relevant lines here after fixing them.

-        # Install the correct version of NodeJS (read from .nvmrc)
-       nvm install $(cat .nvmrc)
-    # Install the correct version of NodeJS (read from .nvmrc)
+    nvm install "$(cat .nvmrc)"
     nvm use

     # Check if the correct version of node is being used
     if [[ "$(node --version)" != "$(cat .nvmrc)" ]]
     then
-       echo "Using the wrong version of NodeJS! Expected ["$(cat .nvmrc)"] but using ["$(node --version)"]."
-       exit 1
+        echo "Using the wrong version of NodeJS! Expected [$(cat .nvmrc)] but using [$(node --version)]."
+        exit 1
     fi

svallinn commented on 2022-08-18 15:10 (UTC) (edited on 2022-08-18 20:03 (UTC) by svallinn)

EDIT: This won't apply, because the code blocks don't persist whitespace properly here. I'll make it available on a pastebin shortly.

Here's my suggested diff for PKGBUILD. Pretty much includes everyone's suggestions, plus a RELEASE_VERSION env variable that fixes the broken extensions' issue that was related to eclairevoyant's comment.

diff --git a/PKGBUILD b/PKGBUILD
index a703b6e..399e0cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,15 +4,14 @@
 pkgname=vscodium
 # Make sure the pkgver matches the git tags in vscodium and vscode git repo's!
 pkgver='1.70.2.22230'
+_pkgver="${pkgver%.*}"
 pkgrel=1
 pkgdesc="Free/Libre Open Source Software Binaries of VSCode (git build from latest release)."
 arch=('x86_64' 'aarch64' 'armv7h')
 # The vscodium repo that will be checked out.
 url='https://github.com/VSCodium/vscodium.git'
 # The vscode repo that will also be checked out.
-microsofturl='https://github.com/microsoft/vscode.git'
-# The tag of Microsoft that will be checked out, will be determined automatically, just like VSCodium itself does, with the following url
-stableversionurl='https://update.code.visualstudio.com/api/update/darwin/stable/lol'
+microsoft_url='https://github.com/microsoft/vscode.git'
 license=('MIT')

 depends=(
@@ -46,7 +45,7 @@ makedepends=(
 )
 source=(
     "git+${url}#tag=${pkgver}"
-    "git+${microsofturl}#tag="$(curl ${stableversionurl} 2>/dev/null | jq -r '.name')
+    "git+${microsoft_url}#tag=${_pkgver}"
     'vscodium.desktop'
 )
 sha256sums=(
@@ -98,19 +97,19 @@ build() {
     export SKIP_LINUX_PACKAGES="True"

     # Deactivate any pre-loaded nvm, and make sure we use our own in the current source directory
-    which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload
+    command -v nvm >/dev/null 2>&1 && nvm deactivate && nvm unload
     export NVM_DIR="${srcdir}/.nvm"
     source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]

-   # Install the correct version of NodeJS (read from .nvmrc)
-   nvm install $(cat .nvmrc)
+    # Install the correct version of NodeJS (read from .nvmrc)
+    nvm install $(cat .nvmrc)
     nvm use

     # Check if the correct version of node is being used
     if [[ "$(node --version)" != "$(cat .nvmrc)" ]]
     then
-       echo "Using the wrong version of NodeJS! Expected ["$(cat .nvmrc)"] but using ["$(node --version)"]."
-       exit 1
+        echo "Using the wrong version of NodeJS! Expected ["$(cat .nvmrc)"] but using ["$(node --version)"]."
+        exit 1
     fi

     # Build!
@@ -118,14 +117,14 @@ build() {
 }

 package() {
-    install -d -m755 ${pkgdir}/usr/bin
-    install -d -m755 ${pkgdir}/usr/share/{${pkgname},applications,pixmaps}
-    install -d -m755 ${pkgdir}/usr/share/licenses/${pkgname}
-    cp -r ${srcdir}/vscodium/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}
-    cp -r ${srcdir}/vscodium/VSCode-linux-${_vscode_arch}/* ${pkgdir}/usr/share/${pkgname}
-    ln -s /usr/share/${pkgname}/bin/codium ${pkgdir}/usr/bin/codium
-    ln -s /usr/share/${pkgname}/bin/codium ${pkgdir}/usr/bin/vscodium
-    install -D -m644 vscodium.desktop ${pkgdir}/usr/share/applications/vscodium.desktop
-    install -D -m644 ${srcdir}/vscodium/VSCode-linux-${_vscode_arch}/resources/app/resources/linux/code.png \
-            ${pkgdir}/usr/share/pixmaps/vscodium.png
+    install -d -m755 "${pkgdir}"/usr/bin
+    install -d -m755 "${pkgdir}"/usr/share/{"${pkgname}",applications,pixmaps}
+    install -d -m755 "${pkgdir}"/usr/share/licenses/"${pkgname}"
+    cp -r "${srcdir}"/vscodium/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"
+    cp -r "${srcdir}"/vscodium/VSCode-linux-"${_vscode_arch}"/* "${pkgdir}"/usr/share/"${pkgname}"
+    ln -s /usr/share/"${pkgname}"/bin/codium "${pkgdir}"/usr/bin/codium
+    ln -s /usr/share/"${pkgname}"/bin/codium "${pkgdir}"/usr/bin/vscodium
+    install -D -m644 vscodium.desktop "${pkgdir}"/usr/share/applications/vscodium.desktop
+    install -D -m644 "${srcdir}"/vscodium/VSCode-linux-"${_vscode_arch}"/resources/app/resources/linux/code.png \
+            "${pkgdir}"/usr/share/pixmaps/vscodium.png
 }

willemw commented on 2022-08-18 11:49 (UTC)

makedepends packages are only for inside build(), not in, for example, source:

PKGBUILD: line 51: jq: command not found

You can specify the download path directly in source instead of moving the folder in prepare():

"$pkgname/vscode::git+https://github.com/microsoft/vscode.git#tag=${pkgver%.*}"

It is probably safe to remove the version number from glibc.

$srcdir, $pkgdir and the first $(cat .nvmrc) should be double-quoted.

The echo "Using the wrong version of NodeJS... line has double-quotes inside double-quotes. The inner quotes can be removed.

(Use command -v instead of which.)