<div dir="ltr"><div dir="ltr"><font size="3" face="Calibri,Arial,Helvetica,sans-serif" color="black"><span style="font-size:12pt;background-color:white" dir="ltr"><div style="margin-top:0px;margin-bottom:0px">Hi,<br>
<br>
</div>
<div style="margin-top:0px;margin-bottom:0px">I have recently spent a bit of time using diffoscope, and submitted a<br>
few merge requests as a result. This led me to think about possible<br>
features that could be added to diffoscope, but in my opinion they<br>
require some discussion regarding their relevance and implementation<br>
details.<br>
<br>
I noticed that a few issues have been opened with either some pretty<br>
specific needs (like <a href="https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/157" target="_blank">#157</a>), or that could be solved by quickly patching<br>
a specific comparator file (like <a href="https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/16" target="_blank">#16</a>, for example by filtering all 0x...<br>
values in <font face="Courier New,monospace">Readelf</font>).<br>
<br>
Moreover, I would like to be able to use diffoscope to compare archives<br>
for security purposes, e.g. to check whether fixes that a vendor has<br>
announced have been applied. To do this, I have started modifying<br>
diffoscope to filter out differences that are irrelevant for the analysis.<br>
</div>
<div style="margin-top:0px;margin-bottom:0px">This use case is very different from the need to spot all differences<br>
in the context of reproducible builds, so simply merging it upstream<br>
doesn't seem straightforward.<br>
<br>
</div>
<div style="margin-top:0px;margin-bottom:0px">One way of doing so could be to add command-line options to enable or<br>
configure these new behaviors. However, adding (too many?) new options<br>
could be seen as undesirable by the diffoscope project.<br>
<br>
</div>
<div style="margin-top:0px;margin-bottom:0px">Another optionĀ could be to have a feature which enables loading<br>
external "plugins" that tweak some of diffoscope's default behaviors.<br>
<br>
</div>
<div style="margin-top:0px;margin-bottom:0px">Though having full-fledged plugins seems like a bit of a stretch,<br>
perhaps having an option to insert a custom class at the top of the list<br>
in the <font face="Courier New,monospace">ComparatorManager</font> could help with this use case and the<br>
issues I mentioned.<br>
<br>
This could allow users to have different behaviors for different<br>
projects if need be, without patching diffoscope each time.<br>
<br>
A followup "wish list" request would be to have a config file to save<br>
all the diffoscope options, so each project can have its own<br>
configuration, shared among maintainers.<br>
<br>
Let me know if you have any feedback regarding those ideas, and I<br>
could try to work on them if / once a more refined idea is found.<br>
<br>
Thanks for your time and for making diffoscope happen!<br>
<br>
Best,<br>
<br>
Jean-Romain Garnier</div></span></font></div></div>