# Not using %%gometa, which would define this. %global gobuilddir %{_builddir}/_gobuild Name: snowflake Version: 2.15.3 Release: 1%{?dist} Summary: WebRTC pluggable transport for Tor # Snowflake is BSD-3-Clause. The vendored Go modules (go_vendor_license # report, Fedora 44, 2026-10-30) cover the whole Go module, including the # broker and server that are not packaged; %%check verifies the expression. License: BSD-3-Clause AND 0BSD AND Apache-2.0 AND BSD-2-Clause AND CC0-1.0 AND ISC AND MIT URL: https://snowflake.torproject.org/ %global forgeurl https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake Source0: %{forgeurl}/-/archive/v%{version}/snowflake-v%{version}.tar.gz#/%{name}-%{version}.tar.gz # go_vendor_archive create --config go-vendor-tools.toml \ # -O snowflake-%%{version}-vendor.tar.bz2 snowflake-v%%{version} Source1: %{name}-%{version}-vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: snowflake-proxy.sysconfig ExclusiveArch: %{golang_arches} BuildRequires: golang >= 1.26.10 BuildRequires: go-rpm-macros BuildRequires: go-vendor-tools BuildRequires: systemd-rpm-macros %global _description %{expand: Snowflake is a pluggable transport that lets Tor users in censored networks reach the Tor network through short-lived WebRTC connections to volunteer proxies. To a censor the traffic looks like an ordinary video call, and the proxies change too often to block one by one.} %description %{_description} %package client Summary: Snowflake pluggable transport client for Tor %description client %{_description} This package contains snowflake-client, which Tor runs as a ClientTransportPlugin. Tor Browser, OnionShare and other Tor clients use it from $PATH. %package proxy Summary: Volunteer proxy that relays Snowflake users to Tor %{?systemd_requires} %description proxy %{_description} This package contains snowflake-proxy, a standalone proxy that lets censored users reach Tor through your connection, and a systemd service to run it. It does not make your machine a Tor relay or exit: traffic is passed on to Tor's Snowflake bridges, not to the destinations users visit. %prep %autosetup -n snowflake-v%{version} tar -xf %{SOURCE1} # Debian's path, and only half right even there (/etc/default). sed -i 's|^EnvironmentFile=-/etc/defaults/snowflake-proxy$|EnvironmentFile=-%{_sysconfdir}/sysconfig/snowflake-proxy|' \ debian/snowflake-proxy.service grep -q '^EnvironmentFile=-%{_sysconfdir}/sysconfig/snowflake-proxy$' debian/snowflake-proxy.service %generate_buildrequires %go_vendor_license_buildrequires -c %{SOURCE2} %build %global gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/snowflake-client ./client %gobuild -o %{gobuilddir}/bin/snowflake-proxy ./proxy %install install -Dpm 0755 %{gobuilddir}/bin/snowflake-client %{buildroot}%{_bindir}/snowflake-client install -Dpm 0755 %{gobuilddir}/bin/snowflake-proxy %{buildroot}%{_bindir}/snowflake-proxy install -Dpm 0644 doc/snowflake-client.1 %{buildroot}%{_mandir}/man1/snowflake-client.1 install -Dpm 0644 doc/snowflake-proxy.1 %{buildroot}%{_mandir}/man1/snowflake-proxy.1 install -Dpm 0644 debian/snowflake-proxy.service %{buildroot}%{_unitdir}/snowflake-proxy.service install -Dpm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/snowflake-proxy %go_vendor_license_install -c %{SOURCE2} %check %go_vendor_license_check -c %{SOURCE2} BSD-3-Clause AND 0BSD AND Apache-2.0 AND BSD-2-Clause AND CC0-1.0 AND ISC AND MIT %{buildroot}%{_bindir}/snowflake-client -version 2>&1 | grep -F 'snowflake-client %{version}' %{buildroot}%{_bindir}/snowflake-proxy -version 2>&1 | grep -F 'snowflake-proxy %{version}' GO111MODULE=on GOFLAGS=-mod=vendor go test ./client/... ./proxy/... ./common/... %post proxy %systemd_post snowflake-proxy.service %preun proxy %systemd_preun snowflake-proxy.service %postun proxy %systemd_postun_with_restart snowflake-proxy.service %files client -f %{go_vendor_license_filelist} %doc README.md ChangeLog client/README.md client/torrc %{_bindir}/snowflake-client %{_mandir}/man1/snowflake-client.1* %files proxy -f %{go_vendor_license_filelist} %doc README.md ChangeLog proxy/README.md %{_bindir}/snowflake-proxy %{_mandir}/man1/snowflake-proxy.1* %{_unitdir}/snowflake-proxy.service %config(noreplace) %{_sysconfdir}/sysconfig/snowflake-proxy %changelog * Fri Oct 30 2026 Morgan Hough - 2.15.3-1 - Initial package