tor-rpm-creation.txt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ## Instructions for building the official rpms.
  2. ##
  3. These are instructions for building Tor binaries in the rpm format on
  4. various cpu architectures and operating systems. Each rpm will require
  5. glibc on the target system. It is believed that any rpm-based linux
  6. distribution should have semi-current glibc installed by default.
  7. If you run into a distribution that does not work with glibc, or does
  8. not contain it, please let us know the details.
  9. These are the exact steps used to build the official rpms of Tor.
  10. If you wish to further tune Tor binaries in rpm format beyond this list,
  11. see the GCC doc page for further options:
  12. http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/
  13. The tor.spec.in file contains the basic info needed to tune the binaries
  14. produced in rpm format. The key parameters to tune are located in the
  15. third section of the tor.spec.in file. Locate the section similar to
  16. this:
  17. ## Target a specific arch and OS
  18. #
  19. # default is i386 linux
  20. %define target gnu
  21. %define target_cpu i386
  22. %define target_os linux
  23. The three parameters: target, target_cpu, and target_os are used
  24. throughout the "make dist-rpm" process. They control the parameters
  25. passed to "configure" and the final tuning of the binaries produced.
  26. The default settings, as shown above, create binaries for the widest
  27. range of Intel x86 or x86-compatible architectures.
  28. The parameters can be set as follows:
  29. The "target" parameter:
  30. This should be "gnu", "redhat", or the short name of your linux distribution.
  31. Other possibilities are "mandrake" or "suse". This is passed to
  32. "configure" through the --host, --build, and --target parameters.
  33. Therefore, this "target" parameter must be a valid OS for "configure" as
  34. well.
  35. The "target_cpu" parameter:
  36. This parameter controls the optimization and tuning of your binaries via
  37. gcc and "configure". This parameter is passed to gcc via the -mtune= or
  38. -mcpu= options. The "configure" script will also receive this parameter
  39. through the --host, --build, and --target parameters. Therefore, this
  40. "target_cpu" parameter must be valid for both gcc and "configure". A
  41. few common options for this parameter may be "athlon64, i686, pentium4" or
  42. others.
  43. The "target_os" parameter:
  44. This parameter controls the target operating system. Normally, this is
  45. only "linux". If you wish to build rpms for a non-linux operating
  46. system, you can replace "linux" with your operating system.