When building packages for internal company projects, sometimes we loose track of the package source and only have the binary .deb. Even worse, the package builder may install it onto a production system but forget to drop it in yum and later leave the company. Some point in the future we need to build a new server and want to ensure that the .deb we found in the engineer's home directory exactly matches the one on existing servers. Is there a way to find out if the .deb is the exact same one?
On rpm based systems I would do the following
old-server$ rpm -qi foo
new-server$ rpm -qi -p foo-1.2.3.rpm
and compare the size, build date, build host and if they match, then I know I have the exact rpm I need.
Is there an equivalent way of doing this on dpkg based systems?
I see that dpkg-query can return an MD5 of some data, but the manual page says it's related to dselect and I'm unable to get any data from it.