-
Notifications
You must be signed in to change notification settings - Fork 2
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
tar_hash mismatch: need to remove bad release from repo #163
Comments
It's worth mentioning as well that deployments of >=1.30 all update themselves fine without tar_hash mismatch errors. It's getting around the bad 1.29 that seems impossible. |
We also tried removing 1.28 from targets.json since the first patch error originates with that version, but then we get a "targets was signed by 0/1 keys" error with updates not possible:
|
@walt-jones Could you post the content of |
Sure @dennisvang: |
@dennisvang any luck finding a solution to this? |
@walt-jones sorry for the delay. Although I cannot be certain without more info, it looks like you've removed things in a way that is not supported.
How exactly did you do that? Did you use the commands provided by tufup, or did you edit the metadata manually? Also note that tufup only supports rollback of the latest release, using e.g. See #117 for more information. |
Thanks @dennisvang
We used the .bat to build a new .exe and then ran repo_add_bundle.py which prompted y/n to overwrite the version and we said "y". We did not otherwise modify the metadata or make any changes by hand... until we discovered the target verification errors and then tried to remove that version from all records in hopes we could somehow jump over it. Should we have used |
Hi @walt-jones, just to be clear, this is based on the tufup-example script repo_add_bundle.py? I wonder: Did you do this after Unfortunately this specific case seems to have slipped through the cracks, although I would have expected the condition in tufup/src/tufup/repo/__init__.py Lines 790 to 791 in 8dad64b
Yes, that would have been the best approach. In any case, looks like we need to improve both our tests and the docs, in this regard. |
@dennisvang Yes, it's a completely unmodified tufup-example script repo_add_bundle.py. We ran it twice for 1.29 which at the time was the latest version. We never decrement the version or try and retroactively patch. Anecdotally I can say that we've hit this issue before and since on another repository - our workflow now is never ever run repo_add_bundle.py more than once on the same version. It always seems to screw things up. Going forward we'll try tufup targets remove-latest. |
We had a bad release (1.29) that was added to the repo which we subsequently rebuilt and added again to the repo (still 1.29) to replace the bad version. Now we hit a "tar_hash mismatch" trying to update from versions <1.29 to the current version >1.30.
We tried removing the patch for 1.29, but then updates fail with a 404 not found on the 1.29 patch and we remain stuck on versions <1.29. We also tried removing 1.29 from targets.json but that gives us the same "tar_hash mismatch" error as if 1.29 was still in there.
How can we remove 1.29 from the repo and skip over it for updates?
2024/29/10 04:13:32+0000 518ms : DEBUG : client : _apply_updates : update failed: target renamed to C:\Windows\system32\config\systemprofile\AppData\Local\notactualltheapp\update_cache\targets\notactualltheapp-1.28.patch.failed 2024/29/10 04:13:32+0000 519ms : DEBUG : client : _apply_updates : update failed: target renamed to C:\Windows\system32\config\systemprofile\AppData\Local\notactualltheapp\update_cache\targets\notactualltheapp-1.29.patch.failed 2024/29/10 04:13:32+0000 519ms : DEBUG : client : _apply_updates : update failed: target renamed to C:\Windows\system32\config\systemprofile\AppData\Local\notactualltheapp\update_cache\targets\notactualltheapp-1.30.patch.failed 2024/29/10 04:13:32+0000 520ms : DEBUG : client : _apply_updates : update failed: target renamed to C:\Windows\system32\config\systemprofile\AppData\Local\notactualltheapp\update_cache\targets\notactualltheapp-1.31.patch.failed 2024/29/10 04:13:32+0000 521ms : DEBUG : client : _apply_updates : update failed: target renamed to C:\Windows\system32\config\systemprofile\AppData\Local\notactualltheapp\update_cache\targets\notactualltheapp-1.32.patch.failed 2024/29/10 04:13:32+0000 521ms : ERROR : client : _apply_updates : update aborted: verification failed: tar_hash mismatch
The text was updated successfully, but these errors were encountered: