tor-rpm-creation.txt 2.3 KB

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