-
Notifications
You must be signed in to change notification settings - Fork 196
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
Use sha1 updateinfo checksumming on EL5 #42
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add mail headers prefixed with "X-Bodhi" to allow easier filtering of Bodhi's notification emails.
Create initial message ID header and reference it in later e-mails in 'References' and 'In-Reply-To' headers.
Mention the age and sort by it in digest mail, fixes ticket:639.
Import exceptions from sqlite3 when the import from sqlite does not work. Seems to be needed with Python 2.7 / Fedora 17.
Send e-mail with last manual comment before sending notification on automatic status changes, fixes ticket:645.
These are recreated every time one runs "python setup.py <command>" and they generate new diffs/commits every time something (e.g a dependency) changes.
This aligns the dependencies in the setup.py file to what is listed in the spec file. Nose and WebTest are required only for the unit tests though, so they can be in tests_require. All of this helps setting up a new virtualenv for Bodhi.
These two lines evaluate equivalent conditions: elif tg_errors.has_key('captcha'): if 'captcha' in tg_errors: Therefore, having them one after the other is useless: the second one will always be True if the first one was. That means we can use only one fo them, reindent the whole block, and drop the condition which will always be False: elif tg_errors.has_key('captcha'): if 'captcha' in tg_errors: ... else: # This can never be True
We can never go through that block, because if tg_errors does have a 'author' key, then we'd have been through the previous one, and we wouldn't have checked whether it had a 'captcha' key.
Many of these could not be fixed, as they appear in SQLObject queries, where using is instead of == breaks the filtering.
A couple of PEP 8 fixes
This is similar to what is done with other Yum repository metadata. It is not just about consistency though, it fixes real issues. For example, at work, we use the Amazon CDN to implement mirroring of our Yum repositories. All files are cached on the CDN for the default duration (i think it's 24 hours), except repomd.xml which is never cached. This works great for RPMS (they never change once published) and all the metadata files (their names are prefixed with their hash, and as such the CDN sees them as different files). However, we keep running into trouble with updateinfo.xml.gz: the CDN keeps distributing the old file even though a new one was generated. Because the updateinfo metadata can be quite big, we'd rather prefix its name with a hash (like other Yum repository metadata), and let the CDN handle it, rather than telling the CDN to never cache it, which would put more load on our primary repository server.
All other Yum repository metadata are already using this stronger hash, so let's be consistent and more secure.
If someone tries to uncomment these for debugging purpose, they might not realize that they don't reflect reality any more, and might waste lots of time trying to figure out what is going on.
Now that we prefix the file name with its hash, each written file will have a different name. As a result, we need to remove the previous versions when we load it, otherwise we end up accumulating updateinfo.xml.gz metadata files.
The RPM API does not seem to always return a list for the changelog timestamp(s). Bodhi has some code trying to identify that and treat it accordingly. However, it was based on the identified cases where this happened (there is only one changelog text) instead of just being based on whether or not the changelog was a list. It seems that this behaviour in the RPM Python API, as I'm now seeing cases where Bodhi thinks the timestamp is not in a list, when it actually is. This commit fixes this.
Now that we prefix the updateinfo metadata with its hash, the Bodhi masher must be taught to find it. The bonus point of using a glob is that it even handles migration from non-prefixed to prefixed file name. :)
This assertion was failing due to a syntax error in my masher/updateinfo code. Adding this message allowed me to find it quickly, and it could be useful in the future.
Fix changelog handling
Prefix the updateinfo file with its hash
Disable karma automatism on AutoQA test failures (fixes #36)
…373) Yum on Python2.4 supports the sha256 checksum type only if python-hashlib is available, but there is not a hard requirement on it.
Oops, wrong branches |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://bugzilla.redhat.com/show_bug.cgi?id=1080373
pull #35