# rpmlint filters for claude-desktop.
#
# This package repackages Anthropic's prebuilt, proprietary Electron .deb.
# The findings below are inherent to shipping that upstream binary as-is and
# cannot be fixed without rebuilding upstream (which we cannot). Each is
# deliberately allowed; anything NOT listed here (e.g. invalid-desktopfile)
# is intentionally left visible as a real signal.

# Upstream ships this helper as a prebuilt static binary; we cannot relink it.
addFilter("statically-linked-binary")

# The spec intentionally disables stripping (%%define __strip /bin/true) because
# these are prebuilt, upstream-signed blobs; stripping is neither wanted nor safe.
addFilter("unstripped-binary-or-object")

# Prebuilt upstream binary; we do not control its compiler/linker flags.
addFilter("position-independent-executable-suggested")

# Chromium sandbox / node-pty internals. The spec already drops the setuid bit
# on chrome-sandbox (namespace sandbox is used instead); the flag is about code
# inside the prebuilt binaries, which we cannot change.
addFilter("missing-call-to-setgroups-before-setuid")

# gethostbyname lives inside the bundled Chromium; not our code.
addFilter("binary-or-shlib-calls-gethostbyname")

# rpmlint's advice here ("let rpm find the library dependencies by itself") only
# holds for libraries that are linked, which the ELF dependency generator picks
# up on its own. These two are dlopen'd at runtime by the bundled Electron and
# are invisible to it, so the Requires must be explicit or the app silently
# loses notifications / credential storage.
addFilter("explicit-lib-dependency (libnotify4|libsecret-1-0)")
