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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefix the updateinfo file with its hash #35
Commits on Mar 4, 2014
-
updateinfo: Prefix the file name with its hash
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.
Mathieu Bridon committedMar 4, 2014 Configuration menu - View commit details
-
Copy full SHA for 146f35e - Browse repository at this point
Copy the full SHA 146f35eView commit details -
updateinfo: While we're at it, move to sha256
All other Yum repository metadata are already using this stronger hash, so let's be consistent and more secure.
Mathieu Bridon committedMar 4, 2014 Configuration menu - View commit details
-
Copy full SHA for 213179a - Browse repository at this point
Copy the full SHA 213179aView commit details -
updateinfo: Remove misleading comments
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.
Mathieu Bridon committedMar 4, 2014 Configuration menu - View commit details
-
Copy full SHA for 2a6fc20 - Browse repository at this point
Copy the full SHA 2a6fc20View commit details -
updateinfo: Remove previous cached updateinfo
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.
Mathieu Bridon committedMar 4, 2014 Configuration menu - View commit details
-
Copy full SHA for 37ac331 - Browse repository at this point
Copy the full SHA 37ac331View commit details
Commits on Mar 12, 2014
-
masher: Find the old updateinfo files
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. :)
Mathieu Bridon committedMar 12, 2014 Configuration menu - View commit details
-
Copy full SHA for 6a45da5 - Browse repository at this point
Copy the full SHA 6a45da5View commit details -
tests: Teach the metadata tests about the new updateinfo name
Mathieu Bridon committedMar 12, 2014 Configuration menu - View commit details
-
Copy full SHA for 8193e7c - Browse repository at this point
Copy the full SHA 8193e7cView commit details -
tests: Add a message on the assertion error
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.
Mathieu Bridon committedMar 12, 2014 Configuration menu - View commit details
-
Copy full SHA for 66e9f90 - Browse repository at this point
Copy the full SHA 66e9f90View commit details