Update to p11-kit-0.18.1.

This commit is contained in:
ajacoutot 2013-05-07 06:38:59 +00:00
parent 92449198ae
commit a11e7a85f3
6 changed files with 13 additions and 143 deletions

View File

@ -1,13 +1,12 @@
# $OpenBSD: Makefile,v 1.20 2013/03/21 08:48:53 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.21 2013/05/07 06:38:59 ajacoutot Exp $
COMMENT= library for loading and enumurating of PKCS\#11 modules
DISTNAME= p11-kit-0.16.4
REVISION= 0
DISTNAME= p11-kit-0.18.1
CATEGORIES= security
SHARED_LIBS += p11-kit 0.0 # 0.0
SHARED_LIBS += p11-kit 0.1 # 0.0
HOMEPAGE= http://p11-glue.freedesktop.org/
@ -20,13 +19,16 @@ WANTLIB += c pthread tasn1
MASTER_SITES= ${HOMEPAGE}releases/
MODULES= devel/gettext
LIB_DEPENDS= security/libtasn1
CONFIGURE_STYLE=gnu
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--with-module-path=${PREFIX}/lib/pkcs11 \
--with-system-anchors=/etc/ssl/cert.pem
--with-trust-paths=/etc/ssl/cert.pem
# no translation yet
CONFIGURE_ARGS += --disable-nls

View File

@ -1,2 +1,2 @@
SHA256 (p11-kit-0.16.4.tar.gz) = /gyzhXUp7q+OdMxucE0///QUZEbxXBOePDi/Q4sT1wA=
SIZE (p11-kit-0.16.4.tar.gz) = 895224
SHA256 (p11-kit-0.18.1.tar.gz) = bofnK3doKIOE3iyhkps8tFUC6elE/AdajOXfjwjxqyk=
SIZE (p11-kit-0.18.1.tar.gz) = 961345

View File

@ -1,67 +0,0 @@
$OpenBSD: patch-common_compat_c,v 1.1 2013/03/19 16:07:49 ajacoutot Exp $
From 7c27e9fbbe86b3268065f248eab2d6964983a715 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Tue, 19 Mar 2013 13:50:32 +0000
Subject: trust: Don't use POSIX or GNU basename()
--- common/compat.c.orig Mon Mar 11 18:06:27 2013
+++ common/compat.c Tue Mar 19 14:55:13 2013
@@ -148,31 +148,39 @@ getprogname (void)
#endif /* HAVE_GETPROGNAME */
-#ifndef HAVE_BASENAME
-
char *
-basename (const char *name)
+p11_basename (const char *name)
{
- char *p;
#ifdef OS_WIN32
- char *p2;
+ static const char *delims = "/\\";
+#else
+ static const char *delims = "/";
#endif
- if (!name || name[0] == '\0')
- return ".";
+ const char *end;
+ const char *beg;
- p = strrchr (name, '/');
-#ifdef OS_WIN32
- p2 = strrchr (name, '\\');
- if (p2 > p)
- p = p2;
-#endif
- if (p != NULL)
- return p + 1;
- return (char *)name;
-}
+ if (name == NULL)
+ return NULL;
-#endif /* HAVE_BASENAME */
+ /* Any trailing slashes */
+ end = name + strlen (name);
+ while (end != name) {
+ if (!strchr (delims, *(end - 1)))
+ break;
+ end--;
+ }
+
+ /* Find the last slash after those */
+ beg = end;
+ while (beg != name) {
+ if (strchr (delims, *(beg - 1)))
+ break;
+ beg--;
+ }
+
+ return strndup (beg, end - beg);
+}
#ifdef OS_UNIX
#include <sys/stat.h>

View File

@ -1,40 +0,0 @@
$OpenBSD: patch-common_compat_h,v 1.1 2013/03/19 16:07:49 ajacoutot Exp $
From 7c27e9fbbe86b3268065f248eab2d6964983a715 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Tue, 19 Mar 2013 13:50:32 +0000
Subject: trust: Don't use POSIX or GNU basename()
--- common/compat.h.orig Mon Mar 11 18:06:27 2013
+++ common/compat.h Tue Mar 19 14:55:13 2013
@@ -72,12 +72,6 @@
const char * getprogname (void);
#endif
-#ifndef HAVE_BASENAME
-
-char * basename (const char *name);
-
-#endif /* HAVE_BASENAME */
-
#ifndef HAVE_MKSTEMP
int mkstemp (char *template);
@@ -219,6 +213,17 @@ p11_mmap * p11_mmap_open (const char *path,
void p11_mmap_close (p11_mmap *map);
#endif /* OS_UNIX */
+
+/*
+ * The semantics of both POSIX basename() and GNU asename() are so crappy that
+ * we just don't even bother. And what's worse is how it completely changes
+ * behavior if _GNU_SOURCE is defined. Nasty stuff.
+ */
+char * p11_basename (const char *name);
+
+/* ----------------------------------------------------------------------------
+ * MORE COMPAT
+ */
#ifdef HAVE_ERRNO_H
#include <errno.h>

View File

@ -1,26 +0,0 @@
$OpenBSD: patch-trust_parser_c,v 1.1 2013/03/19 16:07:49 ajacoutot Exp $
From 7c27e9fbbe86b3268065f248eab2d6964983a715 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Tue, 19 Mar 2013 13:50:32 +0000
Subject: trust: Don't use POSIX or GNU basename()
--- trust/parser.c.orig Tue Mar 12 08:59:08 2013
+++ trust/parser.c Tue Mar 19 16:56:20 2013
@@ -1009,7 +1009,7 @@ p11_parse_memory (p11_parser *parser,
return_val_if_fail (parser != NULL, P11_PARSE_FAILURE);
return_val_if_fail (parser->sink == NULL, P11_PARSE_FAILURE);
- base = basename (filename);
+ base = p11_basename (filename);
parser->basename = base;
parser->sink = sink;
parser->sink_data = sink_data;
@@ -1027,6 +1027,7 @@ p11_parse_memory (p11_parser *parser,
break;
}
+ free (base);
parser->basename = NULL;
parser->sink = NULL;
parser->sink_data = NULL;

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.7 2013/03/14 20:08:14 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.8 2013/05/07 06:39:00 ajacoutot Exp $
%%SHARED%%
@bin bin/p11-kit
include/p11-kit-1/
@ -11,6 +11,8 @@ include/p11-kit-1/p11-kit/uri.h
lib/libp11-kit.a
lib/libp11-kit.la
@lib lib/libp11-kit.so.${LIBp11-kit_VERSION}
lib/p11-kit/
lib/p11-kit/p11-kit-extract-trust
lib/pkcs11/
lib/pkgconfig/
lib/pkgconfig/p11-kit-1.pc
@ -60,4 +62,3 @@ share/gtk-doc/html/p11-kit/up.png
share/p11-kit/
share/p11-kit/modules/
share/p11-kit/modules/p11-kit-trust.module
share/p11-kit/p11-kit-extract-trust