%global debug_package %{nil} # /usr/share/code bundles its own Electron runtime plus private libraries. # Keep those out of the RPM dependency namespace; system libraries stay # explicitly required below. %global __provides_exclude ^lib(EGL|GLESv2|ffmpeg|vk_swiftshader|vulkan)\\.so # The tree bundles its own Node runtime; the only #!/usr/bin/env node # shebangs belong to bundled node_modules CLI helpers that run under the # bundled runtime, so keep that interpreter scrap out of the RPM dependency # namespace (mirrors cursor-bin). # Fedora libcurl exports unversioned symbols. Microsoft ships the same MSAL # library in its RPM with an unversioned libcurl dependency; the loader binds # all curl symbols successfully. Keep the actual libcurl dependency and filter # only Debian's symbol-version label, guarded by the native loader check below. %global __requires_exclude ^(lib(EGL|GLESv2|ffmpeg|vk_swiftshader|vulkan)\\.so|/usr/bin/node|libcurl\\.so\\.4\\(CURL_OPENSSL_4\\)) Name: visual-studio-code-bin Version: 1.142.0 Release: 1%{?dist} Summary: Editor for building and debugging modern web and cloud applications (official binary version) License: LicenseRef-VSCode URL: https://code.visualstudio.com/ %global omarchy_pkgs_commit d9ebd3f6e196ffb6fed494eb0d241e4d654b1f2a Source0: https://update.code.visualstudio.com/%{version}/linux-deb-x64/stable#/%{name}-%{version}.deb Source1: https://raw.githubusercontent.com/omacom/omarchy-pkgs/%{omarchy_pkgs_commit}/pkgbuilds/visual-studio-code-bin/visual-studio-code-bin.sh ExclusiveArch: x86_64 # Load the authentication runtime against Fedora libraries during the build. BuildRequires: python3 BuildRequires: libcurl BuildRequires: dbus-libs BuildRequires: libuuid BuildRequires: libX11 BuildRequires: webkit2gtk4.1 BuildRequires: gtk3 BuildRequires: libsoup3 BuildRequires: libsecret BuildRequires: openssl-libs BuildRequires: libstdc++ Requires: libcurl Provides: code = %{version}-%{release} Provides: vscode = %{version}-%{release} Requires: alsa-lib Requires: at-spi2-core Requires: cairo Requires: cups-libs Requires: dbus-libs Requires: expat Requires: glib2 Requires: glibc Requires: gnupg2 Requires: gtk3 Requires: hicolor-icon-theme Requires: libX11 Requires: libXcomposite Requires: libXdamage Requires: libXext Requires: libXfixes Requires: libXrandr Requires: libgcc Requires: libnotify Requires: libsecret Requires: libxcb Requires: libxkbcommon Requires: libxkbfile Requires: lsof Requires: mesa-libEGL Requires: mesa-libgbm Requires: nspr Requires: nss Requires: pango Requires: shared-mime-info Requires: systemd-libs Requires: xdg-utils %description Visual Studio Code is an editor for building and debugging modern web and cloud applications. This package repacks the official binary release, keeping its bundled Electron runtime, mirroring the upstream PKGBUILD. %prep # Upstream ships a Debian package, not a tarball, so there is no top # directory to autosetup; the data payload is unpacked with ar+tar. %setup -q -c -T -n %{name}-%{version} # Extract the deb payload, dropping Debian-only configuration, mirroring # the upstream PKGBUILD handling (cursor-bin drops its etc tree the same # way). ar p "%{SOURCE0}" data.tar.xz | tar -xJf - rm -rf etc # Fedora uses site-functions, not vendor-completions, for zsh completions. if [ -d usr/share/zsh/vendor-completions ]; then mv usr/share/zsh/vendor-completions usr/share/zsh/site-functions fi %build : %check python3 - <<'PY' import ctypes, os ctypes.CDLL(os.path.abspath("usr/share/code/resources/app/extensions/microsoft-authentication/dist/libmsalruntime.so"), mode=os.RTLD_NOW | os.RTLD_LOCAL) print("PASS: Microsoft authentication runtime loads against Fedora libraries") PY %install # Install verbatim from the unpacked payload, keeping the bundled Electron # runtime, mirroring the upstream PKGBUILD. cp -a usr %{buildroot}/ # Launcher, verbatim from the upstream package sources. install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/code # Fix the desktop entries, mirroring the upstream PKGBUILD. sed -i -e 's/^\(Exec=\)[^ ]*/\1code/g' %{buildroot}%{_datadir}/applications/*.desktop # Use Electron's unprivileged namespace sandbox (the upstream PKGBUILD # strips the setuid bit for the same reason). chmod 0755 %{buildroot}/usr/share/code/chrome-sandbox %files %license usr/share/code/resources/app/LICENSE.rtf /usr/share/code %{_bindir}/code %{_datadir}/applications/com.microsoft.VSCode.desktop %{_datadir}/applications/com.microsoft.VSCode.UrlHandler.desktop %{_datadir}/appdata/com.microsoft.VSCode.appdata.xml %{_datadir}/bash-completion/completions/code %{_datadir}/zsh/site-functions/_code %{_datadir}/mime/packages/code-workspace.xml %{_datadir}/pixmaps/vscode.png %changelog * Thu Oct 15 2026 kamm3r - 1.142.0-1 - Update to the release pinned in upstream d9ebd3f6. * Wed Oct 14 2026 kamm3r - 1.141.1-2 - Keep the Fedora curl dependency while excluding Debian's unavailable symbol label. - Verify all authentication runtime symbols resolve against Fedora libraries. * Wed Oct 14 2026 kamm3r - 1.141.1-1 - Update to the release pinned in upstream 430bdd13. * Sat Oct 10 2026 kamm3r - 1.141.0-1 - Update to the release pinned in upstream 8787c23f. * Tue Oct 06 2026 kamm3r - 1.140.0-1 - Update to the release pinned on upstream master. * Thu Oct 01 2026 kamm3r - 1.139.1-1 - Repackage the upstream Omarchy release for Fedora.