I want to tell whether two tarball files contain identical files, in terms of file name and file content, not including meta-data like date, user, group.
Try also pkgdiff to visualize differences between packages (detects added/removed/renamed files and changed content, exist with zero code if unchanged):