Tclkit and RPM

Arjen Markus (9 october 2009) I recently found out including Tclkit in an RPM distribution is not entirely trivial. The reason is:

  • The RPM package manager will, by default, strip any executable program
  • Tclkit is a somewhat special executable, as it is an ordinary executable file with an appended part that contains the database with all start-up scripts
  • The UNIX/Linux strip utility does not recognise this and strips off the second part
  • The result: the Tclkit executable is smaller and not very useable

The easiest way out of this is to force RPM not to apply stripping. You can do that via the .rpmmacros file. It should contain a line like:

%__spec_install_post /usr/lib/rpm/brp-strip /usr/bin/strip

I am not sure how this works, but that seems to be the solution.

Note: you can split the tclkit runtime executable into these two pieces using the mksplit subcommand of sdx.kit:

tclkit sdx.kit mksplit tclkit

This gives you the "head" and the "tail" of the full file.