dev-zero    14/06/25 06:48:01

  Added:                ossp-uuid-1.6.2-hwaddr.patch
                        ossp-uuid-1.6.2-manfix.patch
                        ossp-uuid-1.6.2-fix-whatis-entries.patch
                        ossp-uuid-1.6.2-fix-data-uuid-from-string.patch
                        
ossp-uuid-1.6.2-uuid-preserve-m-option-status-in-v-option-handling.patch
  Removed:              ossp-uuid-1.6.2-gentoo.patch
  Log:
  Also build for php-5.5 (bug #491852), add various bug-fixes from Fedora and 
Ubuntu/Debian, fix Perl-bindings installation.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
0x1A5D023975B0583D!)

Revision  Changes    Path
1.1                  dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-hwaddr.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-hwaddr.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-hwaddr.patch?rev=1.1&content-type=text/plain

Index: ossp-uuid-1.6.2-hwaddr.patch
===================================================================
diff -urN uuid-1.6.2/configure uuid-1.6.2/configure
--- uuid-1.6.2/configure        2008-07-04 15:43:09.000000000 -0600
+++ uuid-1.6.2/configure        2012-06-06 19:19:41.659880386 -0600
@@ -14208,7 +14208,7 @@
 
 
 
-for ac_header in netdb.h ifaddrs.h net/if.h net/if_dl.h net/if_arp.h 
netinet/in.h arpa/inet.h
+for ac_header in netdb.h ifaddrs.h net/if.h net/if_dl.h net/if_arp.h 
netinet/in.h arpa/inet.h netpacket/packet.h
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
diff -urN uuid-1.6.2/uuid.c uuid-1.6.2/uuid.c
--- uuid-1.6.2/uuid.c   2008-03-07 03:49:59.000000000 -0700
+++ uuid-1.6.2/uuid.c   2012-06-06 15:50:30.060881473 -0600
@@ -72,6 +72,8 @@
 /* IEEE 802 MAC address octet length */
 #define IEEE_MAC_OCTETS 6
 
+static unsigned char mac_unset[IEEE_MAC_OCTETS] = {BM_OCTET(1,0,0,0,0,0,0,0), 
0x00, 0x00, 0x00, 0x00, 0x00};
+
 /* UUID binary representation according to UUID standards */
 typedef struct {
     uuid_uint32_t  time_low;                  /* bits  0-31 of time field */
@@ -967,7 +969,7 @@
      *  GENERATE NODE
      */
 
-    if ((mode & UUID_MAKE_MC) || (uuid->mac[0] & BM_OCTET(1,0,0,0,0,0,0,0))) {
+    if ((mode & UUID_MAKE_MC) || !memcmp(uuid->mac, mac_unset, 
IEEE_MAC_OCTETS)) {
         /* generate random IEEE 802 local multicast MAC address */
         if (prng_data(uuid->prng, (void *)&(uuid->obj.node), 
sizeof(uuid->obj.node)) != PRNG_RC_OK)
             return UUID_RC_INT;
diff -urN uuid-1.6.2/uuid_mac.c uuid-1.6.2/uuid_mac.c
--- uuid-1.6.2/uuid_mac.c       2008-03-07 03:49:59.000000000 -0700
+++ uuid-1.6.2/uuid_mac.c       2012-06-06 19:30:49.050879930 -0600
@@ -76,6 +76,9 @@
 #ifdef HAVE_IFADDRS_H
 #include <ifaddrs.h>
 #endif
+#ifdef HAVE_NETPACKET_PACKET_H
+#include <netpacket/packet.h>
+#endif
 
 /* own headers (part (1/2) */
 #include "uuid_mac.h"
@@ -87,6 +90,10 @@
 #define TRUE (/*lint -save -e506*/ !FALSE /*lint -restore*/)
 #endif
 
+#if !defined(min)
+#define min(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
 /* return the Media Access Control (MAC) address of
    the FIRST network interface card (NIC) */
 int mac_address(unsigned char *data_ptr, size_t data_len)
@@ -95,28 +102,41 @@
     if (data_ptr == NULL || data_len < MAC_LEN)
         return FALSE;
 
-#if defined(HAVE_IFADDRS_H) && defined(HAVE_NET_IF_DL_H) && 
defined(HAVE_GETIFADDRS)
+#if defined(HAVE_IFADDRS_H) && (defined(HAVE_NET_IF_DL_H) || 
defined(HAVE_NETPACKET_PACKET_H)) && defined(HAVE_GETIFADDRS)
     /* use getifaddrs(3) on BSD class platforms (xxxBSD, MacOS X, etc) */
     {
         struct ifaddrs *ifap;
         struct ifaddrs *ifap_head;
+#if defined(HAVE_NET_IF_DL_H)
         const struct sockaddr_dl *sdl;
         unsigned char *ucp;
-        int i;
+#else
+       const struct sockaddr_ll *sll;
+#endif
 
         if (getifaddrs(&ifap_head) < 0)
             return FALSE;
         for (ifap = ifap_head; ifap != NULL; ifap = ifap->ifa_next) {
+#if defined(HAVE_NET_IF_DL_H)
             if (ifap->ifa_addr != NULL && ifap->ifa_addr->sa_family == 
AF_LINK) {
                 sdl = (const struct sockaddr_dl *)(void *)ifap->ifa_addr;
                 ucp = (unsigned char *)(sdl->sdl_data + sdl->sdl_nlen);
                 if (sdl->sdl_alen > 0) {
-                    for (i = 0; i < MAC_LEN && i < sdl->sdl_alen; i++, ucp++)
-                        data_ptr[i] = (unsigned char)(*ucp & 0xff);
+                    memcpy(data_ptr, ucp, min(sdl->sdl_alen, MAC_LEN));
                     freeifaddrs(ifap_head);
                     return TRUE;
                 }
             }
+#else
+            if (ifap->ifa_addr != NULL && ifap->ifa_addr->sa_family == 
AF_PACKET) {
+                sll = (const struct sockaddr_ll *)(void *)ifap->ifa_addr;
+                if (sll->sll_hatype == ARPHRD_ETHER) {
+                    memcpy(data_ptr, sll->sll_addr, min(sll->sll_halen, 
MAC_LEN));
+                    freeifaddrs(ifap_head);
+                    return TRUE;
+                }
+            }
+#endif
         }
         freeifaddrs(ifap_head);
     }
diff -urN uuid-1.6.2/config.h.in uuid-1.6.2/config.h.in
--- uuid-1.6.2/config.h.in      2008-07-04 15:43:10.000000000 -0600
+++ uuid-1.6.2/config.h.in      2012-06-06 21:59:03.370227352 -0600
@@ -75,6 +75,9 @@
 /* Define to 1 if you have the <netinet/in.h> header file. */
 #undef HAVE_NETINET_IN_H
 
+/* Define to 1 if you have the <netpacket/packet.h> header file. */
+#undef HAVE_NETPACKET_PACKET_H
+
 /* Define to 1 if you have the <net/if_arp.h> header file. */
 #undef HAVE_NET_IF_ARP_H
 



1.1                  dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-manfix.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-manfix.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-manfix.patch?rev=1.1&content-type=text/plain

Index: ossp-uuid-1.6.2-manfix.patch
===================================================================
diff -up uuid-1.6.2/uuid.1.manfix uuid-1.6.2/uuid.1
--- uuid-1.6.2/uuid.1.manfix    2013-05-30 15:56:38.630003125 +0200
+++ uuid-1.6.2/uuid.1   2013-05-30 16:00:57.145127756 +0200
@@ -238,6 +238,9 @@ value representation of a \s-1UUID\s0. E
 .IP "\fB\-o\fR \fIfilename\fR" 3
 .IX Item "-o filename"
 Write output to \fIfilename\fR instead of to \fIstdout\fR.
+.IP "\fB\-r\fR" 3
+.IX Item "-r"
+This is equivalent to \fB-F BIN\fR.
 .IP "\fB\-d\fR" 3
 .IX Item "-d"
 Decode a given \s-1UUID\s0 (given as a command line argument or if the command



1.1                  
dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-fix-whatis-entries.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-fix-whatis-entries.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-fix-whatis-entries.patch?rev=1.1&content-type=text/plain

Index: ossp-uuid-1.6.2-fix-whatis-entries.patch
===================================================================
From: Marco Nenciarini <[email protected]>
Date: Tue, 2 Feb 2010 12:16:49 +0100
Subject: [PATCH] Fix whatis entries

Fix whatis entry of uuid.1, uuid.3ossp and uuid++.3ossp manpages
---
 uuid++.pod   |    2 +-
 uuid.pod     |    2 +-
 uuid_cli.pod |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/uuid++.pod b/uuid++.pod
index 8b5a4b1..89c5efb 100644
--- a/uuid++.pod
+++ b/uuid++.pod
@@ -31,7 +31,7 @@
 
 =head1 NAME
 
-B<OSSP uuid> - B<Universally Unique Identifier> (C++ API)
+B<uuid++> - B<Universally Unique Identifier> (C++ API)
 
 =head1 VERSION
 
diff --git a/uuid.pod b/uuid.pod
index 4ad3742..0179a46 100644
--- a/uuid.pod
+++ b/uuid.pod
@@ -31,7 +31,7 @@
 
 =head1 NAME
 
-B<OSSP uuid> - B<Universally Unique Identifier>
+B<uuid> - B<Universally Unique Identifier>
 
 =head1 VERSION
 
diff --git a/uuid_cli.pod b/uuid_cli.pod
index ddec6bb..df9dc83 100644
--- a/uuid_cli.pod
+++ b/uuid_cli.pod
@@ -31,7 +31,7 @@
 
 =head1 NAME
 
-B<OSSP uuid> - B<Universally Unique Identifier Command-Line Tool>
+B<uuid> - B<Universally Unique Identifier Command-Line Tool>
 
 =head1 VERSION
 
-- 



1.1                  
dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-fix-data-uuid-from-string.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-fix-data-uuid-from-string.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-fix-data-uuid-from-string.patch?rev=1.1&content-type=text/plain

Index: ossp-uuid-1.6.2-fix-data-uuid-from-string.patch
===================================================================
Description: Support dash-less args to from_string.
Author: Tim Retout <[email protected]>
Bug-Debian: http://bugs.debian.org/635607

The module Data::GUID depends on Data::UUID supporting this behaviour.

--- a/perl/uuid_compat.pm
+++ b/perl/uuid_compat.pm
@@ -93,7 +93,9 @@
     $uuid->import('str',
           $str =~ /^0x/
         ? join '-', unpack('x2 a8 a4 a4 a4 a12', $str)
-        : $str
+        : $str =~ /-/
+        ? $str
+        : join '-', unpack('A8 A4 A4 A4 A12', $str)
     );
     return $uuid->export('bin');
 }
--- a/perl/uuid_compat.ts
+++ b/perl/uuid_compat.ts
@@ -28,7 +28,7 @@
 ##  uuid_compat.ts: Data::UUID Backward Compatibility Perl API (Perl test 
suite part)
 ##
 
-use Test::More tests => 14;
+use Test::More tests => 16;
 
 BEGIN {
     use_ok('Data::UUID');
@@ -53,3 +53,5 @@
 ok($uuid8 = $ug->from_string("6ba7b811-9dad-11d1-80b4-00c04fd430c8"));
 ok($ug->compare($uuid7, $uuid8) == 0);
 
+ok($uuid9 = $ug->from_string("6ba7b8119dad11d180b400c04fd430c8"));
+ok($ug->compare($uuid7, $uuid9) == 0);



1.1                  
dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-uuid-preserve-m-option-status-in-v-option-handling.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-uuid-preserve-m-option-status-in-v-option-handling.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ossp-uuid/files/ossp-uuid-1.6.2-uuid-preserve-m-option-status-in-v-option-handling.patch?rev=1.1&content-type=text/plain

Index: ossp-uuid-1.6.2-uuid-preserve-m-option-status-in-v-option-handling.patch
===================================================================
From: Marco Nenciarini <[email protected]>
Date: Wed, 27 Jan 2010 19:46:21 +0100
Subject: [PATCH] uuid: preserve -m option status in -v option handling

Bug: 531396
---
 uuid_cli.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/uuid_cli.c b/uuid_cli.c
index d1b0b11..14a67fe 100644
--- a/uuid_cli.c
+++ b/uuid_cli.c
@@ -140,11 +140,12 @@ int main(int argc, char *argv[])
                 i = strtol(optarg, &p, 10);
                 if (*p != '\0')
                     usage("invalid argument to option 'v'");
+                version &= 
~(UUID_MAKE_V1|UUID_MAKE_V3|UUID_MAKE_V4|UUID_MAKE_V5);
                 switch (i) {
-                    case 1: version = UUID_MAKE_V1; break;
-                    case 3: version = UUID_MAKE_V3; break;
-                    case 4: version = UUID_MAKE_V4; break;
-                    case 5: version = UUID_MAKE_V5; break;
+                    case 1: version |= UUID_MAKE_V1; break;
+                    case 3: version |= UUID_MAKE_V3; break;
+                    case 4: version |= UUID_MAKE_V4; break;
+                    case 5: version |= UUID_MAKE_V5; break;
                     default:
                         usage("invalid version on option 'v'");
                         break;
@@ -213,10 +214,10 @@ int main(int argc, char *argv[])
     }
     else {
         /* encoding */
-        if (   (version == UUID_MAKE_V1 && argc != 0)
-            || (version == UUID_MAKE_V3 && argc != 2)
-            || (version == UUID_MAKE_V4 && argc != 0)
-            || (version == UUID_MAKE_V5 && argc != 2))
+        if (   (version & UUID_MAKE_V1 && argc != 0)
+            || (version & UUID_MAKE_V3 && argc != 2)
+            || (version & UUID_MAKE_V4 && argc != 0)
+            || (version & UUID_MAKE_V5 && argc != 2))
             usage("invalid number of arguments");
         if ((rc = uuid_create(&uuid)) != UUID_RC_OK)
             error(1, "uuid_create: %s", uuid_error(rc));
@@ -232,7 +233,7 @@ int main(int argc, char *argv[])
                 if ((rc = uuid_load(uuid, "nil")) != UUID_RC_OK)
                     error(1, "uuid_load: %s", uuid_error(rc));
             }
-            if (version == UUID_MAKE_V3 || version == UUID_MAKE_V5) {
+            if (version & UUID_MAKE_V3 || version & UUID_MAKE_V5) {
                 if ((rc = uuid_create(&uuid_ns)) != UUID_RC_OK)
                     error(1, "uuid_create: %s", uuid_error(rc));
                 if ((rc = uuid_load(uuid_ns, argv[0])) != UUID_RC_OK) {
-- 




Reply via email to