# Generated from packaging/release.json by scripts/make-spec.py. # Do not edit this file directly; edit the manifest or the template and # regenerate it. CI fails when the committed spec does not match. # # Upstream: ffyfox/dsh-desktop-linux v0.2.3alpha2 (5bdbc532dfbb48298a305273d2a83b6ed6bd7a8c) %global appname deepseek-harness %global appdir /opt/DeepSeek Harness # The payload is a prebuilt Electron application. It must not be stripped, # byte-compiled, given build-ids or have dependencies generated from its # private runtime: doing so would modify the signed upstream content and # advertise bundled sonames to the rest of the distribution. %global debug_package %{nil} %global __os_install_post %{nil} %global __arch_install_post %{nil} %global _build_id_links none Name: %{appname} Version: 0.2.3~alpha.2 Release: 2%{?dist} Summary: DeepSeek Harness desktop application License: MIT AND BSD-2-Clause AND BSD-3-Clause AND Apache-2.0 AND ISC AND MPL-2.0 AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND GPL-2.0-or-later AND IJG AND OpenSSL AND Python-2.0 AND PSF-2.0 AND MIT-CMU AND 0BSD AND BlueOak-1.0.0 AND Unlicense AND CC0-1.0 AND OFL-1.1 AND Unicode-3.0 AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only) URL: https://github.com/anise0x7c/dsh-desktop-linux-copr Source0: https://github.com/ffyfox/dsh-desktop-linux/releases/download/v0.2.3alpha2/deepseek-harness-0.2.3-alpha.2-linux-x86_64-unsigned.rpm Source1: https://github.com/ffyfox/dsh-desktop-linux/releases/download/v0.2.3alpha2/deepseek-harness-0.2.3-alpha.2-linux-aarch64-unsigned.rpm ExclusiveArch: x86_64 aarch64 AutoReqProv: no BuildRequires: cpio BuildRequires: desktop-file-utils Requires: glibc Requires: libgcc Requires: at-spi2-core Requires: alsa-lib Requires: cairo Requires: cups-libs Requires: dbus-libs Requires: expat Requires: glib2 Requires: gtk3 Requires: libX11 Requires: libXcomposite Requires: libXdamage Requires: libXext Requires: libXfixes Requires: libXrandr Requires: libffi Requires: libnotify Requires: libuuid Requires: libxcb Requires: libxkbcommon Requires: mesa-libgbm Requires: nspr Requires: nss Requires: pango Requires: pcre2 Requires: systemd-libs Requires: xdg-utils Requires: zlib-ng-compat %description DeepSeek Harness desktop application. This package repackages the prebuilt Electron application published by the upstream project for Fedora. It keeps the application and its private Node.js and Python runtimes self-contained under /opt and only installs the desktop entry, icon and command-line launcher into the system. %prep %build # The payload is prebuilt; this section exists so the spec has the usual # structure and never compiles or patches upstream content. %install appdir_path="%{appdir}" workdir="%{_builddir}/payload" license_dir="%{buildroot}%{_licensedir}/%{appname}" rm -rf "$workdir" mkdir -p "$workdir" %ifarch x86_64 payload_rpm="%{SOURCE0}" %endif %ifarch aarch64 payload_rpm="%{SOURCE1}" %endif rpm2cpio "$payload_rpm" | cpio -idm --quiet --no-absolute-filenames -D "$workdir" # The archive must contain the expected application tree and nothing else at # the top level. cpio strips leading slashes; reject anything that could # have escaped the build directory. if [ ! -x "$workdir$appdir_path/%{appname}" ]; then echo "error: payload does not contain $appdir_path/%{appname}" >&2 exit 1 fi unexpected=$(find "$workdir" -mindepth 1 -maxdepth 1 ! -name opt ! -name usr -print -quit) if [ -n "$unexpected" ]; then echo "error: unexpected top-level payload entry: $unexpected" >&2 exit 1 fi special=$(find "$workdir" ! -type d ! -type f ! -type l -print -quit) if [ -n "$special" ]; then echo "error: payload contains a special file: $special" >&2 exit 1 fi while IFS= read -r link; do target=$(readlink -- "$link") || exit 1 case "$target" in /*) echo "error: payload contains an absolute symlink: $link -> $target" >&2 exit 1 ;; esac resolved=$(realpath -m -- "$(dirname -- "$link")/$target") case "$resolved" in "$workdir"/*) ;; *) echo "error: symlink escapes the payload: $link -> $target" >&2 exit 1 ;; esac done < <(find "$workdir" -type l) desktop_source="$workdir/usr/share/applications/%{appname}.desktop" icon_source="$workdir/usr/share/icons/hicolor/scalable/apps/%{appname}.svg" if [ ! -f "$desktop_source" ] || [ ! -f "$icon_source" ]; then echo "error: payload does not contain the expected desktop entry or icon" >&2 exit 1 fi if ! grep -q '^Exec="%{appdir}/%{appname}"' "$desktop_source"; then echo "error: desktop entry does not launch %{appdir}/%{appname}" >&2 exit 1 fi mkdir -p "%{buildroot}/opt" cp -a "$workdir$appdir_path" "%{buildroot}/opt/" install -Dp -m 0644 "$desktop_source" "%{buildroot}%{_datadir}/applications/%{appname}.desktop" install -Dp -m 0644 "$icon_source" "%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{appname}.svg" install -Dp -m 0644 "$workdir$appdir_path/LICENSE.electron.txt" "$license_dir/LICENSE.electron.txt" install -Dp -m 0644 "$workdir$appdir_path/LICENSES.chromium.html" "$license_dir/LICENSES.chromium.html" desktop-file-validate "%{buildroot}%{_datadir}/applications/%{appname}.desktop" mkdir -p "%{buildroot}%{_bindir}" ln -s "$appdir_path/%{appname}" "%{buildroot}%{_bindir}/%{appname}" # Keep upstream's mode, but never install a setuid helper: the sandbox is # usable through unprivileged user namespaces, and enabling setuid here would # silently widen privileges for every user of the machine. chmod 0755 "%{buildroot}$appdir_path/chrome-sandbox" if find "%{buildroot}$appdir_path" -perm /6000 -print -quit | grep -q .; then echo "error: payload contains setuid/setgid files" >&2 exit 1 fi # The installed payload must be byte-for-byte identical to the verified # upstream archive (apart from the explicit 0755 chmod above, which does not # change file contents). This catches accidental rewrites by later changes. # Record relative names so both passes use their staging tree, not /opt on # the build host. Keep pipefail local, and reject an empty checksum list. ( set -o pipefail || exit 1 cd "$workdir" || exit 1 find ".$appdir_path" -type f -print0 | LC_ALL=C sort -z | xargs -0 -r sha256sum -- ) > "%{_builddir}/payload.sha256" || exit 1 if [ ! -s "%{_builddir}/payload.sha256" ]; then echo "error: payload contains no regular files to verify" >&2 exit 1 fi ( cd "%{buildroot}" && sha256sum --check --quiet "%{_builddir}/payload.sha256" ) || exit 1 list_symlinks() { root="$1" find "$root" -type l | LC_ALL=C sort | while IFS= read -r link; do echo "${link#"$root"/} -> $(readlink -- "$link")" done } diff -u <(list_symlinks "$workdir$appdir_path") <(list_symlinks "%{buildroot}$appdir_path") %files %license %{_licensedir}/%{appname}/LICENSE.electron.txt %license %{_licensedir}/%{appname}/LICENSES.chromium.html %{_datadir}/applications/%{appname}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{appname}.svg %{_bindir}/%{appname} "%{appdir}" %posttrans # Upstream's packages create %{_bindir}/%{appname} from %post and remove it # unconditionally from %postun. During an upgrade the old %postun runs after # this package's files are installed and would leave the command missing, so # repair the entry at the end of the transaction. This also removes a stale # update-alternatives registration left behind by the upstream package. if command -v update-alternatives >/dev/null 2>&1; then update-alternatives --remove %{appname} "%{appdir}/%{appname}" >/dev/null 2>&1 || : fi if [ ! -e %{_bindir}/%{appname} ] && [ -x "%{appdir}/%{appname}" ]; then ln -s "%{appdir}/%{appname}" %{_bindir}/%{appname} fi exit 0 %changelog * Sun Nov 22 2026 anise_0x7c - 0.2.3~alpha.2-2 - Repackage upstream release v0.2.3alpha2 for Fedora.