# # spec file for package claude-desktop # # Copyright (c) 2026 Jeroen van Erp # Packaging under the MIT License (see LICENSE at the repo root). # # All license terms are preserved from the original .deb payload. # claude-desktop is Anthropic's proprietary desktop app (-> LicenseRef- # SUSE-NonFree); it also ships LICENSES.chromium.html (Chromium, # BSD-3-Clause) and Apache-2.0 for the bundled virtiofsd. # # SHA256 of each upstream .deb, taken from Anthropic's apt Packages index # (dists/stable/main/binary-/Packages, field "SHA256:"). Bumped in # lockstep with Version by scripts/bump-version.sh. Verified in %%prep so a # changed-out-from-under-us payload fails the build instead of shipping. %global deb_sha256_amd64 41745b0914f0ff51631a1ff1bb403b836bf5c995845cca6742dd39bca3a2da14 %global deb_sha256_arm64 ad6f1da2a114215d2a73c53c1a99681f9c0bbe148b92f906d635b2efed835cdc # Debian and Node.js names of the architecture being built. %ifarch x86_64 %global deb_arch amd64 %global node_arch x64 %global deb_sha256 %{deb_sha256_amd64} %endif %ifarch aarch64 %global deb_arch arm64 %global node_arch arm64 %global deb_sha256 %{deb_sha256_arm64} %endif # The app bundles private copies of Chromium's libraries in its own # directory. Do not advertise them as system-wide Provides, and do not # require them from the system, where the bundled copies satisfy them. %global __provides_exclude_from ^/usr/lib/claude-desktop/.*$ %global __requires_exclude ^(libffmpeg\\.so|libEGL\\.so|libGLESv2\\.so|libvk_swiftshader\\.so|libvulkan\\.so).*$ Name: claude-desktop Version: 2.37337.1 # OBS supplies the real release (lp160.N.M); 0 is the openSUSE convention. Release: 0 Summary: Desktop application for Claude (Chat, Cowork, Code) License: LicenseRef-SUSE-NonFree AND BSD-3-Clause AND Apache-2.0 URL: https://claude.ai # Fetched at build time by the _service download_url services (see _service). # Kept as bare filenames so OBS does not treat the sources as stored blobs. # Each build unpacks only the .deb of its own architecture. Source0: claude-desktop_%{version}_amd64.deb Source1: claude-desktop_%{version}_arm64.deb ExclusiveArch: x86_64 aarch64 # Electron's chrome-sandbox is shipped NON-SUID (0755). Chromium prefers the # unprivileged-user-namespace sandbox and only falls back to the SUID helper # when userns is unavailable; openSUSE and Fedora enable unprivileged userns # by default (podman-rootless, flatpak). The sandbox stays fully active - this is not # --no-sandbox. Dropping the SUID bit also drops the SUSE permissions- # framework drop-in and rpmlint's SUID review flag. See README "Sandbox". BuildRequires: fdupes BuildRequires: desktop-file-utils # Mapping of the .deb's Depends onto RPM dependencies. Shared libraries are # required by SONAME, never by package name, so the same lines resolve on # every RPM distribution regardless of how it names its library packages. # # Libraries that a shipped ELF links (DT_NEEDED) are required automatically # by rpmbuild's automatic dependency generator. The ones below are in the # .deb's Depends but not DT_NEEDED by any shipped ELF (loaded at runtime with # dlopen(), or needed indirectly), so they are required explicitly: # libnotify4 -> libnotify.so.4 # libsecret-1-0 -> libsecret-1.so.0 # libxcb-dri3-0 -> libxcb-dri3.so.0 # libdrm2 -> libdrm.so.2 # libxtst6 -> libXtst.so.6 # libuuid1 -> libuuid.so.1 # Not libraries, so required by package name: # xdg-utils -> xdg-utils # xdg-desktop-portal-> xdg-desktop-portal # trash alt group -> gvfs (gvfs-trash) or kde-cli-tools6 (KIO trash); # keep gvfs as the portable one Requires: libnotify.so.4()(64bit) Requires: libsecret-1.so.0()(64bit) Requires: libxcb-dri3.so.0()(64bit) Requires: libdrm.so.2()(64bit) Requires: libXtst.so.6()(64bit) Requires: libuuid.so.1()(64bit) Requires: xdg-utils Requires: xdg-desktop-portal Requires: gvfs # Deb Recommends (audio + app indicator + certs + Cowork VM stack) Recommends: libpulse.so.0()(64bit) Recommends: libappindicator3.so.1()(64bit) Recommends: ca-certificates # Cowork VM stack, see # https://code.claude.com/docs/en/desktop-linux#cowork-requirements Suggests: virtiofsd %if 0%{?fedora} %ifarch x86_64 Suggests: qemu-system-x86-core Suggests: edk2-ovmf %endif %ifarch aarch64 Suggests: qemu-system-aarch64-core Suggests: edk2-aarch64 %endif %else Suggests: qemu %ifarch x86_64 Suggests: qemu-ovmf-x86_64 %endif %ifarch aarch64 Suggests: qemu-uefi-aarch64 %endif %endif %description Claude desktop application for Linux (beta). Provides Chat, Cowork and Claude Code in a native app. Upstream only ships .deb builds (amd64 and arm64); this package repackages the official .deb payload for RPM systems. Cowork additionally needs a KVM-capable machine, QEMU, OVMF and virtiofsd, plus the user in the KVM group. %prep # Integrity check: the .deb is fetched over TLS by the download_url service; # pin it to the checksum Anthropic publishes in their apt index as well. echo '%{deb_sha256} %{_sourcedir}/claude-desktop_%{version}_%{deb_arch}.deb' | sha256sum -c - # The .deb is an ar archive: debian-binary, control.tar.xz, data.tar.xz ar x %{_sourcedir}/claude-desktop_%{version}_%{deb_arch}.deb mkdir -p payload tar -xJf data.tar.xz -C payload %build # Nothing to compile: self-contained Electron payload. # Strip the two shipped objects that still carry debug info. strip --strip-unneeded payload/usr/lib/claude-desktop/libvulkan.so.1 strip --strip-unneeded payload/usr/lib/claude-desktop/resources/app.asar.unpacked/node_modules/node-pty/prebuilds/linux-%{node_arch}/pty.node %install install -dm 0755 %{buildroot}/usr/lib cp -a payload/usr/lib/claude-desktop %{buildroot}/usr/lib/ install -dm 0755 %{buildroot}/usr/bin ln -sf ../lib/claude-desktop/claude-desktop %{buildroot}/usr/bin/claude-desktop install -dm 0755 %{buildroot}/usr/share/applications cp -a payload/usr/share/applications/com.anthropic.Claude.desktop \ %{buildroot}/usr/share/applications/ # Upstream ships Categories=Utility;Development; - two "main" categories, # which desktop-file-validate/rpmlint reject (the entry would show up twice # in the menu). Collapse to a single main category. sed -i 's/^Categories=.*/Categories=Utility;/' \ %{buildroot}/usr/share/applications/com.anthropic.Claude.desktop desktop-file-validate %{buildroot}/usr/share/applications/com.anthropic.Claude.desktop install -dm 0755 %{buildroot}/usr/share/icons cp -a payload/usr/share/icons/hicolor %{buildroot}/usr/share/icons/ # The Electron payload ships many byte-identical files (icon light/dark # pairs, content-hashed JS chunks); hardlink them. Must be the %%fdupes # macro, not bare `fdupes`: the macro recurses, plain fdupes does not. %fdupes %{buildroot} # Ship chrome-sandbox NON-SUID (upstream .deb has it 4755). Chromium uses the # user-namespace sandbox when unprivileged userns is available (openSUSE and # Fedora default) and never touches this helper; the SUID path is a fallback only. # No SUID bit -> no permissions-framework drop-in, no rpmlint SUID review. chmod 0755 %{buildroot}/usr/lib/claude-desktop/chrome-sandbox # No %%post/%%postun: openSUSE and Fedora run update-desktop-database and # gtk-update-icon-cache from file triggers (desktop-file-utils, and gtk3 on # openSUSE or hicolor-icon-theme on Fedora) on /usr/share/applications and # /usr/share/icons. %files %defattr(-,root,root) /usr/bin/claude-desktop /usr/lib/claude-desktop /usr/share/applications/com.anthropic.Claude.desktop /usr/share/icons/hicolor %changelog * Wed Oct 14 2026 jeroen - 2.37337.1-0 - Update to upstream 2.37337.1 * Sat Oct 10 2026 jeroen - 2.31226.1-0 - Update to upstream 2.31226.1 * Fri Oct 09 2026 jeroen - 2.31226.0-0 - Update to upstream 2.31226.0 * Thu Oct 08 2026 jeroen - 2.26454.2-0 - Update to upstream 2.26454.2 * Wed Oct 07 2026 jeroen - 2.26454.0-0 - Update to upstream 2.26454.0 * Tue Oct 06 2026 jeroen - 2.19675.1-0 - Update to upstream 2.19675.1 * Tue Sep 29 2026 jeroen - 2.9939.4-0 - Update to upstream 2.9939.4 * Fri Sep 25 2026 jeroen - 2.7032.0-0 - Update to upstream 2.7032.0 * Wed Sep 23 2026 jeroen - 2.2553.13-0 - Update to upstream 2.2553.13 * Fri Sep 18 2026 jeroen - 2.2553.1-0 - Update to upstream 2.2553.1 * Thu Sep 17 2026 jeroen - 2.110.1-0 - Update to upstream 2.110.1 * Wed Sep 16 2026 jeroen - 2.110.0-0 - Update to upstream 2.110.0 * Mon Sep 14 2026 jeroen - 1.52386.6-0 - Update to upstream 1.52386.6 * Sat Sep 12 2026 jeroen - 1.52386.3-0 - Update to upstream 1.52386.3 * Wed Sep 09 2026 jeroen - 1.49585.0-0 - Update to upstream 1.49585.0 * Sat Sep 05 2026 jeroen - 1.46388.2-0 - Update to upstream 1.46388.2 * Thu Sep 03 2026 jeroen - 1.40609.1-0 - Initial packaging: repackage Anthropic's Claude Desktop .deb as an openSUSE RPM, built from git via OBS scmsync. Non-SUID chrome-sandbox (user-namespace sandbox), SHA256-verified payload, rpmlint clean.