tor-rpm-creation.txt 1.8 KB

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