MarisElsins / getMOSPatch

getMOSPatch V2 - Tool that helps downloading patches from My Oracle Support
58 stars 17 forks source link

Feature request: Optionally dump and verify checksums #28

Closed farblos closed 4 months ago

farblos commented 3 years ago

On the web front-end, MOS provides checksums of the patches available there.

If these are also available via the HTTP requests that getMOSPatch uses, it would be great to have options to:

  1. dump these as provided by MOS, preferrably in a format that one can feed to sha256sum -c or similar (<checksum> <filename>)

  2. cross-check the real checksums of the files downloaded from MOS against the checksums provided by MOS

For sceanrios where the patches get transferred through more hops after downloading them with getMOSPatch it would be great to have 2. and 1. even if 2. seems to cover 1.

Thanks!

farblos commented 3 years ago

As an example for above requests, I'd appreciate some output along the lines of the mock-up below:

[...]

Downloading all selected files:
 Downloading p6880880_122010_Linux-x86-64.zip: - 1MB at average speed of 12980KB116MB at average speed of 50115KB/s - DONE!  
 Downloading p6880880_112000_Linux-x86-64.zip: - 1MB at average speed of 14584KB118MB at average speed of 71943KB/s - DONE!  
 Downloading p6880880_200000_Linux-x86-64.zip: - 1MB at average speed of 15109KB115MB at average speed of 89852KB/s - DONE!  
 Downloading p6880880_190000_Linux-x86-64.zip: - 1MB at average speed of 14293KB115MB at average speed of 76820KB/s - DONE!  
 Downloading p6880880_180000_Linux-x86-64.zip: - 1MB at average speed of 14000KB115MB at average speed of 77361KB/s - DONE!  
 Downloading p6880880_121010_Linux-x86-64.zip: - 1MB at average speed of 15000KB115MB at average speed of 74314KB/s - DONE!  
 Downloading p6880880_101000_Linux-x86-64.zip: - 1MB at average speed of 15312KB25MB at average speed of 71841KB/s - DONE!  
 Downloading p6880880_139000_Generic.zip: - 1MB at average speed of 14884KB/s   48MB at average speed of 51137KB/s - DONE!  
 Downloading p6880880_132000_Generic.zip: - 1MB at average speed of 14486KB/s   3MB at average speed of 32958KB/s - DONE!  
 Downloading p6880880_111000_Linux-x86-64.zip: - 1MB at average speed of 14468KB52MB at average speed of 67737KB/s - DONE!  
 Downloading p6880880_131000_Generic.zip: - 1MB at average speed of 13890KB/s   3MB at average speed of 30184KB/s - DONE!  
 Downloading p6880880_102000_Linux-x86-64.zip: - 1MB at average speed of 14674KB26MB at average speed of 48603KB/s - DONE!  

Dowmloading and dumping MOS checksums:
085c8fcae31fd5db11e4ba2bc70c1785290c8fb09b6d774a513b3af3265a26d1  p6880880_101000_Linux-x86-64.zip
3771d2e18b78291d32703238d50c5217f71dffc0347b7b5423e80ffc16c1d9a6  p6880880_102000_Linux-x86-64.zip
8e299f41cebc2772d4d7ec70ac4c1a6ce6c793b451071c37ecc325ba2d63c437  p6880880_111000_Linux-x86-64.zip
67e37c5f1ce212d9a95cb521430c8e9932e596f2e663331199b8ea6104031734  p6880880_112000_Linux-x86-64.zip
68ef857a16a56e11dff0444e095ed6d61e95868c89a6c6be40243fb0dd4ee449  p6880880_121010_Linux-x86-64.zip
d68d8f716aa340d441f70044fe4a86eb792a74ecdfd988540b6c689a24c88ae8  p6880880_122010_Linux-x86-64.zip
f898b54711057c9ff27ffa01b1eea4bc34b3c6be4b4eb43608d2d5b0394de9b4  p6880880_131000_Generic.zip
9c1df7948ac7e2116d38d08a1ffd887cb43d3cd51efa85896a36a981d2f0c7e4  p6880880_132000_Generic.zip
e71857b8b5f4629fb1a18c17ce9b130c88a5f5ebf4bae72a87a4e1d175565319  p6880880_139000_Generic.zip
68ef857a16a56e11dff0444e095ed6d61e95868c89a6c6be40243fb0dd4ee449  p6880880_180000_Linux-x86-64.zip
68ef857a16a56e11dff0444e095ed6d61e95868c89a6c6be40243fb0dd4ee449  p6880880_190000_Linux-x86-64.zip
68ef857a16a56e11dff0444e095ed6d61e95868c89a6c6be40243fb0dd4ee449  p6880880_200000_Linux-x86-64.zip

Verifying MOS checksums:
 Verifying p6880880_122010_Linux-x86-64.zip: - OK!
 Verifying p6880880_112000_Linux-x86-64.zip: - OK!
 Verifying p6880880_200000_Linux-x86-64.zip: - OK!
 Verifying p6880880_190000_Linux-x86-64.zip: - OK!
 Verifying p6880880_180000_Linux-x86-64.zip: - OK!
 Verifying p6880880_121010_Linux-x86-64.zip: - OK!
 Verifying p6880880_101000_Linux-x86-64.zip: - OK!
 Verifying p6880880_139000_Generic.zip: - OK!
 Verifying p6880880_132000_Generic.zip: - OK!
 Verifying p6880880_111000_Linux-x86-64.zip: - OK!
 Verifying p6880880_131000_Generic.zip: - OK!
 Verifying p6880880_102000_Linux-x86-64.zip: - OK!
All files verified successfully.
farblos commented 3 years ago

I have a working prototoype ... will add the bells and whistles and create a pull request ... hopefully soon.

gniltaws commented 3 years ago

Would/does this allow me to just get the md5 without downloading? (I'd like to be able to see if the patch has been updated before downloading.)

farblos commented 3 years ago

Just pushed the prototype in my branch mos-checksums.

It handles what @gniltaws has asked for:

java getMOSPatch patch=6880880 checksum=only platform=226P

It does not yet have checksum=test and checksumtype implemented.

Also, the jar is not included in this commit, pls compile yourself.

Feedback welcome.

MarisElsins commented 4 months ago

Very old issue, closing it. Sorry I had no time to address it.