aboutsummaryrefslogtreecommitdiff
path: root/doc/tor-rpm-creation.txt
blob: eb22c2225a12966099ad7d71f106abfe6e91e4c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Instructions for building the official rpms.
##
The process used to create the official rpms is as follows:

Download latest stable libevent from
http://libevent.org/

The first step of compiling libevent is to configure it as follows:
./configure --enable-static --disable-shared 

Complete the "make" and "make install".  You will need to be root,
or sudo -s, to complete the "make install".

Check for a successful universal binary of libevent.a in, by default,
/usr/local/lib by using the following command:
	"file /usr/local/lib/libevent.a"

Download and Extract the latest tor source code from
https://www.torproject.org/download

In the resulting directory:
LIBS=-lrt ./configure
make dist-rpm

You should have at least two, maybe three, rpms.  There should be the binary
i386.rpm, a src.rpm, and on redhat/centos machines, a debuginfo.rpm.


## Instructions for building RPMs for multiple architectures or distributions
## using 'mock'

Make sure you have mock installed and configured, see following HOWTOs for setup:
https://fedoraproject.org/wiki/How_to_create_an_RPM_package
https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds

Take the source RPM generated by previous step, and execute mock for every
target architecture (the names come from files in /etc/mock, strip the .cfg
extension in the -r parameter):

mock --rebuild -r fedora-17-x86_64 tor-X.Y.Z.src.rpm

(Note: don't build under OpenVZ - it breaks unshare() syscall, which in turn
breaks mock. It could save you several hours.)