tor-rpm-creation.txt (2015B)
1 ## Instructions for building the official rpms. 2 ## 3 The process used to create the official rpms is as follows: 4 5 You'll need to install libevent headers, usually located in package named 6 libevent-devel. Alternatively, you could download latest libevent from 7 https://libevent.org/ but that shouldn't be necessary. 8 9 Download and Extract the latest tor source code from 10 https://www.torproject.org/download 11 12 In the resulting directory: 13 LIBS=-lrt ./configure 14 make dist-rpm 15 16 You should have at least two, maybe three, rpms. There should be the binary 17 (i686|x86_64).rpm, a src.rpm, and on redhat/centos machines, a debuginfo.rpm. 18 The debuginfo rpms are created if package redhat-rpm-config is installed (case 19 of redhat distros). 20 21 This step suffices unless you want to create RPMs for distros other than the 22 one you used for building. 23 24 25 ## Instructions for building RPMs for multiple architectures or distributions 26 ## using 'mock' on Fedora or RHEL (and clones) 27 28 Make sure you have mock installed and configured, see following HOWTOs for setup: 29 https://fedoraproject.org/wiki/How_to_create_an_RPM_package 30 https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds 31 32 Take the source RPM generated by previous step, and execute mock for every 33 target architecture (the names come from files in /etc/mock, strip the .cfg 34 extension in the -r parameter): 35 36 mock --rebuild -r fedora-17-x86_64 tor-X.Y.Z.src.rpm 37 38 Building for EL5 from newer distro (e.g. EL6 or Fedora 17) will fail due to bug 39 (https://bugzilla.redhat.com/show_bug.cgi?id=490613). 40 Here's a workaround: 41 42 Before even building the source RPM, install fedora-packager and instruct 43 the build system to use rpmbuild-md5 like this: 44 45 dnf install fedora-packager 46 export RPMBUILD=rpmbuild-md5 47 48 Then proceed as usual to create the source RPM and binary RPMs: 49 50 LIBS=-lrt ./configure 51 make dist-rpm 52 mock --rebuild -r epel-5-x86_64 tor-X.Y.Z.src.rpm 53 54 55 (Note: don't build under OpenVZ - it breaks unshare() syscall, which in turn 56 breaks mock. It could save you several hours.)