A common idiom for distribution packages is to have an outer shell with metadata, and an inner payload of a compressed archive of files to install. For example, a .deb package is
- foo.deb
control.tar.gz
debian-binary
data.tar.xz
Where control.tar contains the metadata files and data.tar contains the payload. For .deb files, the metadata is
control - general info
md5sums - a list of every file in the payload with its md5 hash
- install and uninstall scripts
Alternatives
- We could read the tarball which is input to a .deb and compute the md5 file
- We could have the tar writer calculate the sums and write them as an additional output
- We could create a rule that takes pkg_* targets as inputs and calculates the md5.
The best choice is probably the first, because that is where we have built the map of sources to their destination paths. The md5 files would use destination paths.
A common idiom for distribution packages is to have an outer shell with metadata, and an inner payload of a compressed archive of files to install. For example, a .deb package is
control.tar.gzdebian-binarydata.tar.xzWhere control.tar contains the metadata files and data.tar contains the payload. For .deb files, the metadata is
control- general infomd5sums- a list of every file in the payload with its md5 hashAlternatives
The best choice is probably the first, because that is where we have built the map of sources to their destination paths. The md5 files would use destination paths.