[csw-maintainers] Magic Cookie for catalogs

Ben Walton bwalton at opencsw.org
Sun Oct 2 16:44:25 CEST 2011


Excerpts from Maciej (Matchek) Bliziński's message of Sun Oct 02 09:42:06 -0400 2011:

> I tried to think of a coherent scheme and couldn't.

The goal is detecting stale catalogs, right?  If so, we need two
things.

1. The ability to locate catalogs by some unique string.
2. The ability to see if it's stale when we locate it.

The first can be accomplished by some embeded hash.  We could use the
md5sum of a package that is glacial (CSWcommon) or one that we change
with some defined frequency (maybe CSWpki if we start rotating keys
for every named release?).

Once we can locate the catalogs, the embedded time stamp should be
enough to detect a mirror that is not pulling frequently enough.

Alternately, we could use two md5sums to detect stale catalogs.  The
first should be an old md5sum (CSWcommon) and the second a newly
added/updated package md5sum.  The second could be determined
dynamically at the time of the check by comparing REV= stamps and
picking something that is within the time window of what we'd consider
a current mirror.  A fresh mirror should have both of these hashes.  A
stale mirror would have only one.

Would this work?

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302



More information about the maintainers mailing list