tor-rpm-creation.txt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ## Instructions for building the official rpms.
  2. ##
  3. The process used to create the official rpms is as follows:
  4. Download and Extract the latest tor source code from https://www.torproject.org/.
  5. In the resulting directory:
  6. ./configure
  7. make dist-rpm
  8. You should have at least two, maybe three, rpms. There should be the binary
  9. i386.rpm, a src.rpm, and on redhat/centos machines, a debuginfo.rpm.
  10. ## Optional customization
  11. ##
  12. If you wish to further tune Tor binaries in rpm format beyond this list,
  13. see the GCC doc page for further options:
  14. http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/
  15. The tor.spec.in file contains the basic info needed to tune the binaries
  16. produced in rpm format. The key parameters to tune are located in the
  17. third section of the tor.spec.in file. Locate the section similar to
  18. this:
  19. ## Target a specific arch and OS
  20. #
  21. # default is i386 linux
  22. %define target gnu
  23. %define target_cpu i386
  24. %define target_os linux
  25. The three parameters: target, target_cpu, and target_os are used
  26. throughout the "make dist-rpm" process. They control the parameters
  27. passed to "configure" and the final tuning of the binaries produced.
  28. The default settings, as shown above, create binaries for the widest
  29. range of Intel x86 or x86-compatible architectures.
  30. The parameters can be set as follows:
  31. The "target" parameter:
  32. This should be "gnu", "redhat", or the short name of your linux distribution.
  33. Other possibilities are "mandrake" or "suse". This is passed to
  34. "configure" through the --host, --build, and --target parameters.
  35. Therefore, this "target" parameter must be a valid OS for "configure" as
  36. well.
  37. The "target_cpu" parameter:
  38. This parameter controls the optimization and tuning of your binaries via
  39. gcc and "configure". This parameter is passed to gcc via the -mtune= or
  40. -mcpu= options. The "configure" script will also receive this parameter
  41. through the --host, --build, and --target parameters. Therefore, this
  42. "target_cpu" parameter must be valid for both gcc and "configure". A
  43. few common options for this parameter may be "athlon64, i686, pentium4" or
  44. others.
  45. The "target_os" parameter:
  46. This parameter controls the target operating system. Normally, this is
  47. only "linux". If you wish to build rpms for a non-linux operating
  48. system, you can replace "linux" with your operating system.