Replaced the old MD5 method with checkmd5.#61
Replaced the old MD5 method with checkmd5.#61chkboom wants to merge 3 commits intoMX-Linux:masterfrom
Conversation
|
I'm not going to do the commit right now as we have three people building isos at the moment. but I posted a link to the commit in teh forum. https://forum.mxlinux.org/viewtopic.php?p=727033#p727033 |
|
The log and progress indication are nice, however the performance is about half of md5sum on my system, I get about 25 sec. for md5sum -c and about 50 sec. for checkmd5 for the full MX ISO. |
|
If there is sufficient interest, I am willing to continue working on the tool. I'll have to do some profiling to see where the performance is being hit. |
|
Not sure you can get close to md5sum GNU tool... I thought it might be something simple like over logging stuff to the terminal but even with the option to update the terminal once per each percentage point (forgot what's the switch for that) it doesn't make much of difference. |
|
I discovered that to be an I/O related issue. After calling posix_fadvise() to prepare for sequential I/O, the performance has improved and is now close to md5sum: For a ~10GB file full of random numbers: There may be more room for improvement, but for now this seems acceptable. |
Sorry, only members of the team can approve PRs.
This replaces the old method of checking MD5 sums with a new utility, checkmd5. This offers a number of advantages compared to the previous md5sum method.
First, it provides progress indication (percentage) and allows the user to cancel the check, whereas the previous method had no way of cancelling a check or knowing its progress.
Also, the checkmd5 utility now stores the log in /var/log/live/checkmd5.log which is machine-readable, non-translated and contains the following:
Any other applications (eg. the installer, or perhaps even QSI) can use this log, and even tack its contents to its own logs so that those who provide support can tell if the checks passed or failed.
Previously with the md5sum method, there was no logging or any means of checking whether the integrity check passed, failed, or if the user chose to skip the check.