Name: littlesnitch Version: 1.0.9 Release: 100.1%{?dist} Summary: Little Snitch for Linux monitors and controls outgoing network connections using eBPF License: GPL-2.0-only AND LicenseRef-proprietary URL: https://obdev.at/products/littlesnitch-linux/index.html BuildRequires: curl BuildRequires: bsdtar BuildRequires: zstd Provides: littlesnitch = %{version}-%{release} Conflicts: littlesnitch-bin %description Little Snitch for Linux monitors and controls outgoing network connections using eBPF. This package repackages the upstream statically linked binary package. %prep case "%{_target_cpu}" in x86_64) upstream_arch="x86_64" ;; aarch64) upstream_arch="aarch64" ;; riscv64) upstream_arch="riscv64" ;; ppc64le) upstream_arch="ppc64le" ;; *) echo "Unsupported architecture: %{_target_cpu}"; exit 1 ;; esac filename="$(curl -sL https://www.obdev.at/products/littlesnitch-linux/download.html | grep -oP "littlesnitch-[0-9.\-]+-${upstream_arch}\.pkg\.tar\.zst" | head -n1)" if [ -z "$filename" ]; then echo "Could not determine upstream filename for $upstream_arch." exit 1 fi curl -fL "https://obdev.at/downloads/littlesnitch-linux/$filename" -o "$filename" bsdtar -xf "$filename" %build # Upstream binary package. %install install -dm755 %{buildroot}%{_prefix} cp -a usr/. %{buildroot}%{_prefix}/ if [ -d etc ]; then install -dm755 %{buildroot}%{_sysconfdir} cp -a etc/. %{buildroot}%{_sysconfdir}/ fi # Build an RPM file list without owning top-level system directories # like /usr/bin, /usr/lib, /etc/init.d. rm -f %{name}.files find %{buildroot}%{_prefix} \ -mindepth 1 \ \( -type f -o -type l \) \ -print \ | sed "s|^%{buildroot}||" \ > %{name}.files if [ -d %{buildroot}%{_sysconfdir} ]; then find %{buildroot}%{_sysconfdir} \ -mindepth 1 \ \( -type f -o -type l \) \ -print \ | sed "s|^%{buildroot}|%config(noreplace) |" \ >> %{name}.files fi echo "Packaged files:" cat %{name}.files %post -p /bin/bash echo "=================================================================" echo " Little Snitch daemon installed successfully! " echo " " echo " To activate the network monitor, run the following command " echo " as root or with sudo: " echo " " # Init system detection for conditional instructions if [ -d /run/systemd/system ]; then echo " systemctl enable --now littlesnitch.service " elif [ -f /sbin/openrc-run ] || [ -d /run/openrc ]; then echo " rc-update add littlesnitch default " echo " rc-service littlesnitch start " else echo " Please configure your init system to start the daemon. " fi echo "=================================================================" %preun -p /bin/bash if [ "$1" -eq 0 ]; then echo ":: Stopping Little Snitch daemon..." # Conditionally stop and disable the service based on the init system if [ -d /run/systemd/system ]; then systemctl disable --now littlesnitch.service || true elif [ -f /sbin/openrc-run ] || [ -d /run/openrc ]; then rc-service littlesnitch stop || true rc-update del littlesnitch default || true fi fi %posttrans -p /bin/bash if [ -d /run/systemd/system ]; then systemctl try-restart littlesnitch.service || true elif [ -f /sbin/openrc-run ] || [ -d /run/openrc ]; then rc-service littlesnitch restart || true fi %files -f %{name}.files %changelog * Sat Jun 20 2026 Sl (Shahaf Levi) - 1.0.9-1 - Initial COPR package for Slash