# # spec file for package perl-Data-UUID # # Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: perl-Data-UUID Version: 1.226 Release: 1.103 %define cpan_name Data-UUID Summary: Globally/Universally Unique Identifiers (GUIDs/UUIDs) License: BSD-3-Clause Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros %{perl_requires} %description This module provides a framework for generating v3 UUIDs (Universally Unique Identifiers, also known as GUIDs (Globally Unique Identifiers). A UUID is 128 bits long, and is guaranteed to be different from all other UUIDs/GUIDs generated until 3400 CE. UUIDs were originally used in the Network Computing System (NCS) and later in the Open Software Foundation's (OSF) Distributed Computing Environment. Currently many different technologies rely on UUIDs to provide unique identity for various software components. Microsoft COM/DCOM for instance, uses GUIDs very extensively to uniquely identify classes, applications and components across network-connected systems. The algorithm for UUID generation, used by this extension, is described in the Internet Draft "UUIDs and GUIDs" by Paul J. Leach and Rich Salz. (See RFC 4122.) It provides reasonably efficient and reliable framework for generating UUIDs and supports fairly high allocation rates -- 10 million per second per machine -- and therefore is suitable for identifying both extremely short-lived and very persistent objects on a given system as well as across the network. This modules provides several methods to create a UUID. In all methods, '' is a UUID and '' is a free form string. # creates binary (16 byte long binary value) UUID. $ug->create(); $ug->create_bin(); # creates binary (16-byte long binary value) UUID based on particular # namespace and name string. $ug->create_from_name(, ); $ug->create_from_name_bin(, ); # creates UUID string, using conventional UUID string format, # such as: 4162F712-1DD2-11B2-B17E-C09EFE1DC403 # Note that digits A-F are capitalized, which is contrary to rfc4122 $ug->create_str(); $ug->create_from_name_str(, ); # creates UUID string as a hex string, # such as: 0x4162F7121DD211B2B17EC09EFE1DC403 # Note that digits A-F are capitalized, which is contrary to rfc4122 $ug->create_hex(); $ug->create_from_name_hex(, ); # creates UUID string as a Base64-encoded string $ug->create_b64(); $ug->create_from_name_b64(, ); Binary UUIDs can be converted to printable strings using following methods: # convert to conventional string representation $ug->to_string(); # convert to hex string (using upper, rather than lower, case letters) $ug->to_hexstring(); # convert to Base64-encoded string $ug->to_b64string(); Conversely, string UUIDs can be converted back to binary form: # recreate binary UUID from string $ug->from_string(); $ug->from_hexstring(); # recreate binary UUID from Base64-encoded string $ug->from_b64string(); Finally, two binary UUIDs can be compared using the following method: # returns -1, 0 or 1 depending on whether uuid1 less # than, equals to, or greater than uuid2 $ug->compare(, ); Examples: use Data::UUID; # this creates a new UUID in string form, based on the standard namespace # UUID NameSpace_URL and name "www.mycompany.com" $ug = Data::UUID->new; print $ug->create_from_name_str(NameSpace_URL, "www.mycompany.com"); %prep %setup -q -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README %license LICENSE %changelog * Mon Apr 13 2020 - updated to 1.226 see /usr/share/doc/packages/perl-Data-UUID/Changes 1.226 2020-04-12 - set umask before fopen in destructor (thanks, Rafaël Garcia-Suarez) 1.225 2020-04-12 - pointless accidental release * Wed Mar 13 2019 Stephan Kulow - updated to 1.224 see /usr/share/doc/packages/perl-Data-UUID/Changes 1.224 2019-03-02 - No changes since 1.223 1.223 2019-02-14 (TRIAL) - Use File::Spec to get tmpdir instead of hardcoding (thanks, Desmond Daignault) 1.222 2018-04-29 (TRIAL) - Properly quote C strings passed in DEFINE (thanks, Salvador Fadiño) - Fix memory leak by decreasing reference count (thanks, Daniel Spang) * Sun Aug 23 2015 coolo@suse.com - updated to 1.221 see /usr/share/doc/packages/perl-Data-UUID/Changes 1.221 2015-08-10 - documentation improvements * Sun Feb 8 2015 coolo@suse.com - updated to 1.220 - improve chances it'll work on Android (thanks, Brian Fraser) * Fri Oct 4 2013 darin@darins.net - Fix the license * Fri Oct 4 2013 darin@darins.net - update to 1.219 - cygwin fixes (thanks, Reini Urban!) - Skip t/threads.t unless perl version is 5.13.4 or greater (thanks, VPIT) - compile with strict C89 compilers (thanks, VPIT) - more bugfixes (thanks, VPIT) * Thu Mar 31 2011 coolo@novell.com - update to 1.217 - documentation fixes - minor portability tweak to UUID.xs (thanks, Florian Ragwitz) * Wed Dec 1 2010 coolo@novell.com - switch to perl_requires macro * Tue Jul 20 2010 chris@computersalat.de - update to 1.215 - no changes, released as non-trial - Use gv_stashpv instead of gv_stashpvs (Florian Ragwitz) - Pass along the interpreter to ptable_store, if needed (Florian Ragwitz) - fix MANIFEST (thanks for noticing, Florian Ragwitz) - add a uniqueness test to threads.t (thanks, SCHWERN!) - thread safety, added by Florian Ragwitz - recreated by cpanspec 1.78 * Wed Apr 7 2010 chris@computersalat.de - update to 1.203 - avoid interactive configuration (thanks, DAXIM) - fix perl-macros deps * Sun Jan 10 2010 jengelh@medozas.de - enable parallel build * Sat Jul 25 2009 chris@computersalat.de - spec mods * removed ^---------- * removed ^#--------- * Fri Jul 24 2009 coolo@novell.com - merge factory changes * Sun Jun 21 2009 chris@computersalat.de - update to 1.202 - 1.202 Mon Jun 15 18:42:19 EDT 2009 - localize changes to $! (thanks, Jesse Vincent!) - 201 Sat Apr 18 14:09 2009 - replace Data-UUID's own md5 with Digest::MD5 (thanks, RUZ!) - apply patch from tokuhirom to avoid segmentation violation - added perl-macros o autogen filelist with perl_gen_filelist - spec mods o added header o fixed deps * Thu Mar 19 2009 lrupp@suse.de - initial version 1.149 * Fri Jan 5 2007 lmuelle@suse.de - Update to version 0.148. + more Win32 fixes by Alexandr Ciornii. + packaging improvements. * Wed Sep 20 2006 lmuelle@suse.de - Update to version 0.145. + Win32 compatibility/compilation improvements (rt #21486). * Mon Sep 18 2006 lmuelle@suse.de - Update to version 0.143. - more tick-tracking fixes (rt #21486) -- thanks MERIJNB! - fix incorrect initialization of tick-tracking (rt #2481) - partial fix for compilation under MSVC (thanks Alex Ciornii!) - added use strict - added tests to shut up stupid Kwalitee tests - fixed compilation errors on Mac OS X: bugs 12389, 15829 - avoid hanging under CPAN tools by using EUMM prompt(): bug 8046 (thanks, Schwern) - fix problems with "long" type on 64 big platforms: bug 14163 (thanks, Kevin Rosenberg) - improve compilation on Cygwin: bug 7088 (thanks, maxb) - improve compilation on Win32: bug 14082 (thanks, Christopher Laco) - fixed link to UUID draft: bug 12169 (thanks, kcivey) - fixed UUID collision on SMP machines: bug 15042 (thanks, Chia-liang Kao) - reformatted POD documentation as per David Wheeler - added ref. links to articles on database keys reengineering problem * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Wed Feb 16 2005 schwab@suse.de - Don't remove BuildRoot in %%install. * Tue Feb 15 2005 lmuelle@suse.de - Initial SuSE package.