Add a way to generate random package contents.

Compile but not plugged to the test suits yet.