-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Try decompression methods when file checksum fails #140
base: master
Are you sure you want to change the base?
Conversation
Hi @aptsurfer Why would you want to try to decompress something when the checksum fails ?
|
I guess it goes back to the problem I was having in #128: I was downloading bundles whose integrity was correct, but apt-offline reported all the checksums as not having been matched. It turns out that the checksums refer to the decompressed version of the file. This is why I am decompressing the files if the checksum fails--upon doing so, the checksum matches and all is good. Testing shows that the filename passed into the function call does not have an extension, so I figured I had to resort to brute force. I am using the latest version of Debian (10.7.0) as the offline system with only the default (DVD 1) packages installed, and Ubuntu 18.04 as the system that downloads packages. I guess I could look further into the code, but if you need another test case, just reference the files back in #128 (comment) Let me know what a better way of doing this would be. |
So lately, the checksum validation in For some context, have a read of this bug report. So how I haven't been able to reproduce your problem on my setup but I will see if I can reproduce it some time. But the issue you are describing, if common, should have shown up in my usage, which hasn't been the case. So the integrity checksum for package indices is maintained on the remote apt repository server. For example, in here: http://ftp.debian.org/debian/dists/buster/InRelease Here's a snippet from the above:
So it has the checksum listed for both, uncompressed data as well as the compressed data (depending on what compression type the remote server provides support for). So |
Thank you kindly for still following this issue. I read both of those pages, and I think I've narrowed the problem down (as in the issue). And ultimately, here's the problem: apt-offline is trying to use the checksums of the uncompressed data while the files that are downloaded contain the compressed data. I have verified this to be true. The data is not being tampered with, it's just that the checksum to compare the data with should be different. (Looks like you just mentioned that in the issue. Hopefully we can narrow down what is wrong and find a better fix!) |
Fixes #128 by trying different decompression methods if the checksum match fails.
I am surprised that apt-offline doesn't decompress them automatically on my system.