Skip to content
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

Merged
merged 7 commits into from Mar 12, 2014
Merged

Prefix the updateinfo file with its hash #35

merged 7 commits into from Mar 12, 2014

Commits on Mar 4, 2014

  1. 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 committed Mar 4, 2014
    Configuration menu
    Copy the full SHA
    146f35e View commit details
    Browse the repository at this point in the history
  2. 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 committed Mar 4, 2014
    Configuration menu
    Copy the full SHA
    213179a View commit details
    Browse the repository at this point in the history
  3. 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 committed Mar 4, 2014
    Configuration menu
    Copy the full SHA
    2a6fc20 View commit details
    Browse the repository at this point in the history
  4. 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 committed Mar 4, 2014
    Configuration menu
    Copy the full SHA
    37ac331 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2014

  1. 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 committed Mar 12, 2014
    Configuration menu
    Copy the full SHA
    6a45da5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8193e7c View commit details
    Browse the repository at this point in the history
  3. 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 committed Mar 12, 2014
    Configuration menu
    Copy the full SHA
    66e9f90 View commit details
    Browse the repository at this point in the history