-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Hash Checking #94
Conversation
Thanks @hammy3502 for contributing and welcome to the development side of things :) I like your idea to add sha256 sum checking to this tool but I don't like how you did it. The empty field, the button and the icon are a bit confusing in my opinion. Some ISOs don't even have a sum to check against.. I would suggest to simply just calculate the sum without asking anything and display it there instead. |
It would need to be done async, with a spinner spinning while it's calculating. |
Sounds good, @clefebvre ! I'll have something like that ready, but do you have an ideal placement you'd want for the text in the window (the same spot it's in now, next to the cancel button, inside the details area, etc.)? Thank you so much! :) |
I moved the hash checking to an expander and made it so it automatically calculates when an ISO is selected, however I'm currently running into an issue where when attempting to exit, Python will wait until the hashing operation is done before quitting out. There isn't an easy way to check mid hash-calculation if we should exit, and multiprocessing runs in a separate process, so it can't access GLib to do an |
@hammy3502 @clefebvre how about something like that? Simply that the positive check is shown in green, but that it is not an exclusionary requirement for burn the iso image [in the case of isos without sum]. |
I haven't followed this but I'd suggest staying away from the colored text. That sort of thing can lead to readability issues when people use different themes. |
Considering what @JosephMcc says it is better to show something more transversal like a message ... "Checksums match" / "Hash matched". |
@haggen88 I personally really like the idea you have (and I originally had something somewhat similar implemented), though based on what I interpreted from @clefebvre , I've changed it to just display the hash inside of an expander (similar to the "Details" expander). Maybe there could be a compromise and I can add a field to check the hash inside the expander, so people only interact with SHA256-related things when they want to. Would love to here people's thoughts on the compromise mentioned above. |
@hammy3502 could you show a picture of what you have so far please? |
@haggen88 Here's what it looks like before the feedback from @clefebvre As you can probably tell, the "after" version isn't entirely polished just yet, but that's just because I'm waiting on feedback before making any further changes. |
@hammy3502 my opinion:
I understand Clem's approach to use 'USB Image Writer' with isos without checksum, but my idea was to be able to integrate the Hash comparison, but that this function is not mandatory to burn an iso [or maybe it would be more comfortable to integrate it as another mintstick mode ??]. In my opinion the second option is missing an option like the one highlighted in this image: Best regards |
@haggen88 I totally agree with you there, hence my interest in hearing feedback from both you and from Clem on the compromise I mentioned above.*
To clarify a bit more, the field inside the expander would basically just be the field and button from the first screenshot. Cheers for the response! :) *EDIT: My sincerest apologies if this sentence came off as condescending or something similar, that wasn't my intention at all. |
@hammy3502
No problem, I did not perceive it as such.
Shouldn't the field say "Paste SHA-256" instead of 'Check SHA-256'? [is a more enlightening text]. Regards |
@haggen88 I know you sent it a couple times in the screenshot, but I don't see much of a need for a paste button (after all, CTRL+V and Right click --> Paste both exist). The Check SHA256 button is what starts the calculation to calculate the hash before we match it with whatever the use put into the box. Maybe instead of a button we could add some alt text (I think that's what it's called, but I mean the gray text that you put in an input field that isn't actually there, but just provides a "hint") that says to CTRL+V or Right click --> Paste the hash. If you feel there's some advantage to having a paste button though, I'd love to hear about why that is! |
@haggen88 I gotcha. It definitely would make sense to change that text, and I'll definitely do so if we end up going down that route (still waiting on feedback from Clem) |
My apologies for the tag, but I can't really proceed on this issue without feedback from you @clefebvre (since you seem to be the maintainer who's looking at this issue) . More specifically, I mentioned in #94 (comment) that we could put the SHA256 section in an expander instead of just calculating the sum and displaying it (as then, the user would need to compare all the characters of the hash to any hash they may already have). This way, users who have no need for hash checking can effectively ignore it. If you'd want to proceed with just displaying the hash text still though, I can finish that up. |
ping @clefebvre |
@hammy3502 sorry for the delay. If you right-click an .iso file in Nemo, you can choose It produces a small dialog window with the hash inside of it. I think we should improve this instead and simply link to it from mintstick. In mintstick, we can just add a third button at the bottom to "Check SHA256 sum". Insensitive by default unless/until a file is selected (like the Write button). Clicking on it just calls In mintsystem, we can really improve the feature. Here we've got an entire window or dialog to play with. Beside just letting the user to paste a sum and compare it, I'd love it if it could also do authenticity checks, either from a pasted signature, or just simply from the ones we already trust. |
That sounds great to me, and I'd be happy to do the work for both Would we want to keep using |
Changes should be done to |
This commit adds to the USB Image Writer (
mintstick -m iso
) the ability to check the SHA256 of an opened file, as requested in #84 . This is my first contribution to Linux Mint as a whole, so any and all feedback is greatly appreciated! I'm sure it isn't perfect in its current state, though I'm absolutely willing to learn to improve this contribution! 🙂