/[packages]/cauldron/tor/current/SPECS/tor.spec
ViewVC logotype

Annotation of /cauldron/tor/current/SPECS/tor.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1730812 - (hide annotations) (download)
Tue Jun 15 08:10:02 2021 UTC (6 weeks, 1 day ago) by kekepower
File size: 4722 byte(s)
- Update to version 0.3.5.15

1 wally 913975 %define toruser toruser
2     %define torgroup toruser
3 boklm 73394
4 wally 730896 #comment out if not rc
5 wally 913860 #define prel rc
6 wally 730896
7 kekepower 1730812 %define rel 1
8 wally 730896
9 boklm 73394 Name: tor
10 wally 1358091 #
11     # Please stay at 0.3.5.x LTS branch!
12     #
13 kekepower 1730812 Version: 0.3.5.15
14 wally 893900 Release: %mkrel %{?prel:%prel.}%{rel}
15 boklm 73394 Summary: Anonymizing overlay network for TCP (The onion router)
16     URL: http://www.torproject.org/
17     Group: Networking/Other
18     License: BSD-like
19 wally 893900 Source0: http://www.torproject.org/dist/%{name}-%{version}%{?prel:-%prel}.tar.gz
20 wally 913975 Source2: tor.logrotate
21     Source3: tor.defaults-torrc
22     Source4: tor.tmpfiles.d
23     Source10: tor.service
24     Source11: tor@.service
25     Source12: tor-master.service
26     Source20: README
27    
28     # Patch from Fedora:
29     Patch0: tor-0.2.7.6-torrc-ControlSocket-and-CookieAuthFile.patch
30    
31 ovitters 1146787 BuildRequires: pkgconfig(openssl) >= 1.0.1
32     BuildRequires: pkgconfig(libevent) >= 2.0.10
33     BuildRequires: pkgconfig(zlib) >= 1.2
34 boklm 73394 BuildRequires: autoconf2.5
35 wally 913975 BuildRequires: asciidoc
36 ovitters 1146787 BuildRequires: pkgconfig(systemd)
37 wally 893900 Requires(post): systemd >= %{systemd_required_version}
38     Requires(post): rpm-helper >= 0.24.8-1
39     Requires(preun):rpm-helper >= 0.24.8-1
40     Requires: openssl >= 0.9.8
41     Requires: tsocks
42 boklm 73394
43     %description
44 wally 913975 The Tor network is a group of volunteer-operated servers that allows people to
45     improve their privacy and security on the Internet. Tor's users employ this
46     network by connecting through a series of virtual tunnels rather than making a
47     direct connection, thus allowing both organizations and individuals to share
48     information over public networks without compromising their privacy. Along the
49     same line, Tor is an effective censorship circumvention tool, allowing its
50     users to reach otherwise blocked destinations or content. Tor can also be used
51     as a building block for software developers to create new communication tools
52     with built-in privacy features.
53 boklm 73394
54 wally 913975 This package contains the Tor software that can act as either a server on the
55     Tor network, or as a client to connect to the Tor network.
56 boklm 73394
57     %prep
58 wally 875257 %autosetup -n %{name}-%{version}%{?prel:-%prel} -p1
59 wally 670544
60 boklm 73394 %build
61 wally 1480698 %configure \
62 wally 913975 --with-tor-user=%{toruser} \
63     --with-tor-group=%{torgroup} \
64     --enable-systemd
65 ovitters 1579992 %make_build
66 boklm 73394
67     %install
68 wally 893900 %make_install
69 boklm 73394
70 wally 670543 # config file
71 wally 913975 install -D -p -m 644 %{SOURCE3} %{buildroot}%{_datadir}/tor/defaults-torrc
72     mv %{buildroot}%{_sysconfdir}/%{name}/torrc.sample \
73 wally 670543 %{buildroot}%{_sysconfdir}/%{name}/torrc
74 boklm 73394
75 wally 913975 # README
76     install -D -p -m 644 %{SOURCE20} %{buildroot}%{_sysconfdir}/tor/README
77    
78 wally 670543 # logrotate config
79 wally 913975 install -D -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/tor
80 boklm 73394
81 wally 670543 # needed directories
82 wally 913975 mkdir -p -m 750 %{buildroot}%{_localstatedir}/lib/tor
83     mkdir -p -m 750 %{buildroot}%{_logdir}/tor
84 boklm 73394
85     # Bash completion
86 wally 670530 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
87 wally 913975 echo 'complete -F _command $filenames torify' > %{buildroot}%{_sysconfdir}/bash_completion.d/tor
88 boklm 73394
89 dmorgan 196574 # Systemd support
90 wally 913975 install -D -p -m 644 %{SOURCE10} %{buildroot}%_unitdir/tor.service
91     install -D -p -m 644 %{SOURCE11} %{buildroot}%_unitdir/tor@.service
92     install -D -p -m 644 %{SOURCE12} %{buildroot}%_unitdir/tor-master.service
93     install -D -p -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/tor.conf
94 dmorgan 196574
95 wally 913975 # Some mga specific changes
96     sed \
97     -i %{buildroot}%{_sysconfdir}/tor/README \
98     -i %{buildroot}%{_datadir}/tor/defaults-torrc \
99     -i %{buildroot}%{_sysconfdir}/logrotate.d/tor \
100     -i %{buildroot}%{_tmpfilesdir}/tor.conf \
101     -e 's|toranon|%{toruser}|g'
102    
103     # Handle docs in files section
104     rm -rf %{buildroot}%{_docdir}/
105    
106 boklm 73394 %pre
107 wally 913975 %_pre_useradd %{toruser} %{_localstatedir}/lib/%{name} /bin/false
108 boklm 73394
109     %post
110 colin 405136 %_tmpfilescreate %{name}
111 boklm 73394 %_post_service %{name}
112    
113     %preun
114 wally 913975 %_preun_service %{name}
115     %_preun_service %{name}-master
116    
117 wally 793903 if [ $1 -eq 0 ]; then
118 neoclust 1713058 rm -fR %{_localstatedir}/lib/%{name}/*
119 wally 793903 fi
120 boklm 73394
121 wally 913975 %postun
122     if [ $1 -ge 1 ]; then
123     # Use restart instead of try-restart, as tor-master may be "inactive" even
124     # when there are tor.service and tor@.service instances running.
125     systemctl restart tor-master.service >/dev/null 2>&1 || :
126     fi
127    
128 boklm 73394 %files
129 wally 913975 %doc README ChangeLog ReleaseNotes doc/HACKING doc/*.html
130 wally 875260 %license LICENSE
131 boklm 73394 %{_bindir}/tor
132 wally 913975 %{_bindir}/tor-gencert
133 wally 1353548 %{_bindir}/tor-print-ed-signing-cert
134 wally 913975 %{_bindir}/tor-resolve
135 boklm 73394 %{_bindir}/torify
136 wally 913975 %{_mandir}/man1/tor.1*
137     %{_mandir}/man1/tor-gencert.1*
138 wally 1353548 %{_mandir}/man1/tor-print-ed-signing-cert.1*
139 wally 913975 %{_mandir}/man1/tor-resolve.1*
140     %{_mandir}/man1/torify.1*
141     %dir %{_datadir}/tor
142     %{_datadir}/tor/defaults-torrc
143     %{_datadir}/tor/geoip
144     %{_datadir}/tor/geoip6
145     %{_tmpfilesdir}/tor.conf
146     %{_unitdir}/tor.service
147     %{_unitdir}/tor@.service
148     %{_unitdir}/tor-master.service
149    
150     %dir %{_sysconfdir}/tor
151     %{_sysconfdir}/tor/README
152     %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/tor/torrc
153     %config(noreplace) %{_sysconfdir}/logrotate.d/tor
154    
155     %attr(0750,%{toruser},root) %dir %dir %{_localstatedir}/lib/tor
156     %attr(0750,%{toruser},%{torgroup}) %dir %{_logdir}/tor
157    
158     %{_sysconfdir}/bash_completion.d/tor

  ViewVC Help
Powered by ViewVC 1.1.28