|
|
f05e346 |
Name: trojan
|
|
|
f05e346 |
Version: 1.16.0
|
|
|
be1c9a5 |
Release: 6%{?dist}
|
|
|
f05e346 |
Summary: An unidentifiable mechanism that helps you avoid censorship
|
|
|
f05e346 |
|
|
|
f05e346 |
#GPLv3+ with opelssl exceptions
|
|
|
f05e346 |
License: GPLv3+
|
|
|
f05e346 |
URL: https://github.com/trojan-gfw/%{name}
|
|
|
f05e346 |
Source0: %{URL}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
f05e346 |
# signature from release page
|
|
|
f05e346 |
Source1: %{URL}/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc
|
|
|
f05e346 |
# keyid obtained from upstream auther's GitHub profile
|
|
|
f05e346 |
Source2: https://pgp.key-server.io/0xA1DDD486533B0112
|
|
|
f05e346 |
|
|
|
3ff5885 |
# see: https://github.com/trojan-gfw/trojan/pull/473
|
|
|
3ff5885 |
# Changes/CMake to do out-of-source builds F33 make tests fail
|
|
|
3ff5885 |
# this is a workaround
|
|
|
3ff5885 |
Patch0: 0001-Avoid-a-race-condition-that-makes-the-test-to-fail.patch
|
|
|
3ff5885 |
|
|
|
f05e346 |
# for build
|
|
|
f05e346 |
BuildRequires: gcc
|
|
|
f05e346 |
BuildRequires: gcc-c++
|
|
|
f05e346 |
BuildRequires: make
|
|
|
f05e346 |
BuildRequires: cmake >= 3.7.2
|
|
|
f05e346 |
BuildRequires: boost-devel >= 1.66.0
|
|
|
f05e346 |
BuildRequires: openssl-devel >= 1.1.0
|
|
|
f05e346 |
BuildRequires: mariadb-devel
|
|
|
f05e346 |
%if 0%{?fedora} >= 30
|
|
|
f05e346 |
BuildRequires: systemd-rpm-macros
|
|
|
f05e346 |
%else
|
|
|
f05e346 |
BuildRequires: systemd
|
|
|
f05e346 |
%endif
|
|
|
f05e346 |
# for test
|
|
|
f05e346 |
BuildRequires: python3
|
|
|
f05e346 |
BuildRequires: nmap-ncat
|
|
|
f05e346 |
BuildRequires: curl
|
|
|
f05e346 |
BuildRequires: openssl
|
|
|
f05e346 |
#for verifying the tarball
|
|
|
f05e346 |
BuildRequires: gnupg2
|
|
|
f05e346 |
|
|
|
f05e346 |
|
|
|
f05e346 |
%description
|
|
|
f05e346 |
An unidentifiable mechanism that helps you avoid censorship.
|
|
|
f05e346 |
|
|
|
f05e346 |
Trojan features multiple protocols over TLS to avoid both
|
|
|
f05e346 |
active/passive detection and ISP QoS limitations.
|
|
|
f05e346 |
|
|
|
f05e346 |
Trojan is not a fixed program or protocol. It's an idea,
|
|
|
f05e346 |
an idea that imitating the most common service,
|
|
|
f05e346 |
to an extent that it behaves identically,
|
|
|
f05e346 |
could help you get across the Great FireWall permanently,
|
|
|
f05e346 |
without being identified ever.
|
|
|
f05e346 |
|
|
|
f05e346 |
|
|
|
f05e346 |
%prep
|
|
|
f05e346 |
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
|
|
3ff5885 |
%autosetup
|
|
|
f05e346 |
# change cipher list in shipped configuration file&example into PROFILE=SYSTEM
|
|
|
f05e346 |
sed -i '/"cipher"/c\ "cipher": "PROFILE=SYSTEM",' examples/*.json-example
|
|
|
f05e346 |
sed -i '/"cipher_tls13"/c\ "cipher_tls13": "PROFILE=SYSTEM",' examples/*.json-example
|
|
|
f05e346 |
|
|
|
f05e346 |
|
|
|
f05e346 |
%build
|
|
|
0eb03f0 |
%cmake
|
|
|
0eb03f0 |
%cmake_build
|
|
|
f05e346 |
|
|
|
f05e346 |
%install
|
|
|
0eb03f0 |
%cmake_install
|
|
|
f05e346 |
|
|
|
f05e346 |
%check
|
|
|
0eb03f0 |
%ctest
|
|
|
f05e346 |
|
|
|
f05e346 |
%post
|
|
|
f05e346 |
%systemd_post %{name}.service
|
|
|
f05e346 |
|
|
|
f05e346 |
%preun
|
|
|
f05e346 |
%systemd_preun %{name}.service
|
|
|
f05e346 |
|
|
|
f05e346 |
%postun
|
|
|
f05e346 |
%systemd_postun_with_restart %{name}.service
|
|
|
f05e346 |
|
|
|
f05e346 |
|
|
|
f05e346 |
%files
|
|
|
f05e346 |
%{_bindir}/%{name}
|
|
|
f05e346 |
%license LICENSE
|
|
|
f05e346 |
%dir %{_sysconfdir}/%{name}
|
|
|
f05e346 |
%dir %{_pkgdocdir}
|
|
|
f05e346 |
%config(noreplace) %{_sysconfdir}/%{name}/config.json
|
|
|
f05e346 |
%{_mandir}/man1/%{name}.1.*
|
|
|
f05e346 |
%{_pkgdocdir}/*
|
|
|
f05e346 |
%{_unitdir}/%{name}.service
|
|
|
f05e346 |
%{_unitdir}/%{name}@.service
|
|
|
f05e346 |
|
|
|
f05e346 |
|
|
|
f05e346 |
%changelog
|
|
|
be1c9a5 |
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-6
|
|
|
be1c9a5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
be1c9a5 |
|
|
|
1559d93 |
* Fri Jul 24 2020 Qiyu Yan <yanqiyu@fedoraproject.org> - 1.16.0-5
|
|
|
1559d93 |
- rebuilt with new CMake macros
|
|
|
1559d93 |
|
|
|
f05e346 |
* Sun Jun 14 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.16.0-4
|
|
|
f05e346 |
- Change due to review suggestions
|
|
|
f05e346 |
- see: https://bugzilla.redhat.com/show_bug.cgi?id=1846175
|
|
|
f05e346 |
|
|
|
f05e346 |
* Sat Jun 13 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.16.0-3
|
|
|
f05e346 |
- Do not patch source, instead, change shipped configuration file
|
|
|
f05e346 |
|
|
|
f05e346 |
* Sat Jun 13 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.16.0-2
|
|
|
f05e346 |
- GuideLine: Package must own all directories that it creates
|
|
|
f05e346 |
|
|
|
f05e346 |
* Fri Jun 12 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.16.0-1
|
|
|
f05e346 |
- Update to upstream and change due to suggestion by robinlee.sysu@gmail.com
|
|
|
f05e346 |
|
|
|
f05e346 |
* Fri Jun 12 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.15.1-5
|
|
|
f05e346 |
- Add CentOS 8 support (CentOS 7 will not be supported)
|
|
|
f05e346 |
|
|
|
f05e346 |
* Thu Jun 04 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.15.1-4
|
|
|
f05e346 |
- rebuilt
|
|
|
f05e346 |
|
|
|
f05e346 |
* Mon Jun 01 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.15.1-2
|
|
|
f05e346 |
- rebuilt
|
|
|
f05e346 |
|
|
|
f05e346 |
* Sun Nov 10 2019 Qiyu Yan <yanqiyu01@gmail.com> - 1.13.0-1
|
|
|
f05e346 |
- Initial release
|