[Bug 28990] LibUUID dependency problematic for OSX and Windows

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 12 16:51:47 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=28990

--- Comment #5 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-07-12 07:51:47 PDT ---
(In reply to comment #4)
> Well if you look attentively, we use the random version from libuuid, not the
> time based one

A random UUID is not guaranteed to be unique, but it's much less likely to
collide than one generated from a general-purpose PRNG with a relatively small
amount of state. libuuid uses /dev/urandom or /dev/random, or the Windows
equivalent, as does ossp-uuid.

Similarly, RFC 4122 recommends using MD5 or SHA-1 as the PRNG; UUID libraries
do, but GLib doesn't.

> > Windows has API to create UUIDs
> > (<http://msdn.microsoft.com/en-us/library/Aa379205>, example usage
> > <http://wiki.tcl.tk/10554>), and I find it hard to believe that there isn't a
> > similarly good solution on Mac OS X, *BSD, etc. I'd accept patches to make
> > Gabble able to use a more portable UUID library on non-Linux Unixes.
> 
> Well even OSX have it's own UUID library, but they all use a different format.

Really? As I understand it, the de facto standard is the one used in RFC 4122
for the urn:uuid: URN namespace, i.e. aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
(where all the digits are lower-case hex); I'd expect any UUID library to be
able to produce this format, albeit possibly via a call to g_ascii_tolower().
libuuid's uuid_unparse_lower(), OSSP's UUID_FMT_STR,
/proc/sys/kernel/random/uuid, etc. produce this.

(For instance, COM's GUIDs are a UUID in the same hex representation, but with
upper-case digits, and wrapped in {} - translating one to the other is easy.)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list