# The upstream .deb version appends a trailing ".0" to the version number. %global deb_version %{version}.0 # Preserve upstream binaries exactly as shipped; do not strip debug symbols. %global debug_package %{nil} %global __strip /bin/true Name: cloudflare-warp Version: 2026.4.1390 Release: 1%{?dist} Summary: Cloudflare WARP Client # Source is an x86_64 Debian binary package; no cross-arch build is possible. ExclusiveArch: x86_64 License: LicenseRef-Cloudflare-WARP URL: https://1.1.1.1 Source0: https://pkg.cloudflareclient.com/pool/noble/main/c/cloudflare-warp/cloudflare-warp_%{deb_version}_amd64.deb # ar(1) unpacks the outer .deb (an ar archive). # tar(1) unpacks the inner data archive (gz/xz/zst — GNU tar auto-detects). # patchelf removes stale CI RPATHs baked into the upstream Flutter binaries. BuildRequires: binutils BuildRequires: patchelf BuildRequires: tar BuildRequires: systemd-rpm-macros # Runtime dependencies — mapped from the PKGBUILD Arch names to Fedora names. # Packages not yet in Fedora's main repos may require an additional COPR. Requires: at-spi2-core Requires: cairo Requires: dbus Requires: fontconfig Requires: gdk-pixbuf2 Requires: glib2 Requires: glibc Requires: gtk3 Requires: harfbuzz Requires: hicolor-icon-theme Requires: libayatana-appindicator-gtk3 Requires: libayatana-indicator-gtk3 Requires: libcurl Requires: libdbusmenu-glib Requires: libepoxy Requires: libgcc Requires: libsoup3 Requires: libstdc++ Requires: nftables Requires: nspr Requires: nss Requires: pango Requires: webkit2gtk4.1 Requires: zlib # Provide the individual tool names so other packages can depend on them. Provides: warp-cli = %{version}-%{release} Provides: warp-diag = %{version}-%{release} Provides: warp-svc = %{version}-%{release} %description Cloudflare WARP replaces your default connection with a fast, private connection powered by Cloudflare's network. Includes warp-cli for command-line management, warp-svc as the system daemon, and the warp-taskbar tray applet for graphical sessions. %prep # -c creates the %{name}-%{version} build directory and cd's into it # -T inhibits automatic extraction of Source0 (unpacked manually below) %setup -c -T # A .deb file is an ar(1) archive whose members include: # debian-binary — format version string # control.tar.* — package metadata and maintainer scripts # data.tar.* — the actual installed files (gz, xz, or zst) ar x %{SOURCE0} # GNU tar auto-detects compression, so this handles all three variants. mkdir build tar xf data.tar.* -C build/ %build # Nothing to build; this spec repackages a pre-built upstream .deb. %install # --- Main directory trees from the deb payload --- cp -a build/etc %{buildroot}/ cp -a build/usr %{buildroot}/ # The deb ships some files under top-level /bin and /lib (legacy Debian # paths). Relocate them into /usr, mirroring what the PKGBUILD does with # cp -R "${srcdir}/build/"{bin,lib} "${pkgdir}/usr" if [ -d build/bin ]; then cp -a build/bin/. %{buildroot}%{_bindir}/ fi if [ -d build/lib ]; then cp -a build/lib/. %{buildroot}%{_prefix}/lib/ fi # Guarantee the config directory exists even if upstream ships it empty. install -d %{buildroot}%{_sysconfdir}/cloudflare-warp # --- Strip upstream CI-baked RPATHs --- # Cloudflare builds the Flutter UI plugins and crashpad_handler in GitHub # Actions and Azure Pipelines. Those runners leave their workspace paths # baked into RUNPATH entries of the resulting ELF files: # # /__w/1/s/app/apps/shared_client/linux/flutter/ephemeral (GH Actions) # /__t/jdk17/lib/server (Azure JDK) # # These paths do not exist on the target system and cause rpmbuild's # check-rpaths to fail with error 0x0002 (invalid RUNPATH). # crashpad_handler additionally has an all-colons empty RUNPATH (0x0010). # # The libraries find their runtime dependencies through the system linker # cache and dlopen — not via RPATH — so stripping these entries is safe. find %{buildroot}%{_prefix}/lib/warp/lib/ \ \( -name '*.so' -o -name 'crashpad_handler' \) \ -exec patchelf --remove-rpath {} + # --- Patch warp-svc.service --- # Upstream wrote ExecStart against the legacy /bin path; redirect to /usr/bin. sed -i 's|ExecStart=/bin/warp-svc|ExecStart=/usr/bin/warp-svc|' \ %{buildroot}%{_unitdir}/warp-svc.service # --- Patch warp-taskbar.service --- # Relocate ExecStart and relax the session dependency: BindsTo is a hard # dependency that stops the unit the moment graphical-session.target stops; # PartOf is softer and avoids unnecessary service churn during session # transitions. sed -i \ -e 's|ExecStart=/bin/warp-taskbar|ExecStart=/usr/bin/warp-taskbar|' \ -e 's|BindsTo=graphical-session.target|PartOf=graphical-session.target|' \ %{buildroot}%{_userunitdir}/warp-taskbar.service %files %{_bindir}/warp-cli %{_bindir}/warp-diag %{_bindir}/warp-svc %{_bindir}/warp-taskbar %{_prefix}/lib/warp/ %{_unitdir}/warp-svc.service %{_userunitdir}/warp-taskbar.service %{_datadir}/applications/com.cloudflare.warp.desktop %{_datadir}/icons/hicolor/*/apps/com.cloudflare.warp* %{_datadir}/dbus-1/system.d/com.cloudflare.warp.conf %dir %{_sysconfdir}/cloudflare-warp %changelog * Mon Jun 01 2026 Package Maintainer - 2026.4.1390-1 - Initial RPM; converted from Arch Linux PKGBUILD (cloudflare-warp-bin) - Source from official upstream Debian/Ubuntu package for Noble (24.04) - Relocate /bin and /lib payload into /usr per FHS - Patch service units: fix ExecStart paths, relax BindsTo → PartOf - Strip CI-baked invalid RPATHs from Flutter plugin .so files and crashpad_handler