| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 | ## Instructions for building the official rpms.##The process used to create the official rpms is as follows:You'll need to install libevent headers, usually located in package namedlibevent-devel. Alternatively, you could download latest libevent fromhttp://libevent.org/ but that shouldn't be necessary.Download and Extract the latest tor source code fromhttps://www.torproject.org/downloadIn the resulting directory:LIBS=-lrt ./configuremake dist-rpmYou should have at least two, maybe three, rpms.  There should be the binary(i686|x86_64).rpm, a src.rpm, and on redhat/centos machines, a debuginfo.rpm.The debuginfo rpms are created if package redhat-rpm-config is installed (caseof redhat distros).This step suffices unless you want to create RPMs for distros other than theone you used for building.## Instructions for building RPMs for multiple architectures or distributions## using 'mock' on Fedora or RHEL (and clones)Make sure you have mock installed and configured, see following HOWTOs for setup:https://fedoraproject.org/wiki/How_to_create_an_RPM_packagehttps://fedoraproject.org/wiki/Using_Mock_to_test_package_buildsTake the source RPM generated by previous step, and execute mock for everytarget architecture (the names come from files in /etc/mock, strip the .cfgextension in the -r parameter):mock --rebuild -r fedora-17-x86_64 tor-X.Y.Z.src.rpmBuilding for EL5 from newer distro (e.g. EL6 or Fedora 17) will fail due to bug(https://bugzilla.redhat.com/show_bug.cgi?id=490613).Here's a workaround:Before even building the source RPM, install fedora-packager and instructthe build system to use rpmbuild-md5 like this:dnf install fedora-packagerexport RPMBUILD=rpmbuild-md5Then proceed as usual to create the source RPM and binary RPMs:LIBS=-lrt ./configuremake dist-rpmmock --rebuild -r epel-5-x86_64 tor-X.Y.Z.src.rpm(Note: don't build under OpenVZ - it breaks unshare() syscall, which in turnbreaks mock. It could save you several hours.)
 |