[diffoscope] New feature discussion

Jean-Romain Garnier salsa at jean-romain.com
Fri Jul 3 21:04:51 UTC 2020


Hi,

I have recently spent a bit of time using diffoscope, and submitted a
few merge requests as a result. This led me to think about possible
features that could be added to diffoscope, but in my opinion they
require some discussion regarding their relevance and implementation
details.

I noticed that a few issues have been opened with either some pretty
specific needs (like #157
<https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/157>), or
that could be solved by quickly patching
a specific comparator file (like #16
<https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/16>, for
example by filtering all 0x...
values in Readelf).

Moreover, I would like to be able to use diffoscope to compare archives
for security purposes, e.g. to check whether fixes that a vendor has
announced have been applied. To do this, I have started modifying
diffoscope to filter out differences that are irrelevant for the analysis.
This use case is very different from the need to spot all differences
in the context of reproducible builds, so simply merging it upstream
doesn't seem straightforward.

One way of doing so could be to add command-line options to enable or
configure these new behaviors. However, adding (too many?) new options
could be seen as undesirable by the diffoscope project.

Another option could be to have a feature which enables loading
external "plugins" that tweak some of diffoscope's default behaviors.

Though having full-fledged plugins seems like a bit of a stretch,
perhaps having an option to insert a custom class at the top of the list
in the ComparatorManager could help with this use case and the
issues I mentioned.

This could allow users to have different behaviors for different
projects if need be, without patching diffoscope each time.

A followup "wish list" request would be to have a config file to save
all the diffoscope options, so each project can have its own
configuration, shared among maintainers.

Let me know if you have any feedback regarding those ideas, and I
could try to work on them if / once a more refined idea is found.

Thanks for your time and for making diffoscope happen!

Best,

Jean-Romain Garnier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20200703/baeb8d85/attachment.htm>


More information about the diffoscope mailing list