Import libsecret-0.1.

libsecret is a library for storing and retrieving passwords and other
secrets. It communicates with the "Secret Service" using DBus.
gnome-keyring and ksecretservice are both implementations of a Secret
Service.

It is a replacement for libgnome-keyring. Nothing will use it as yet,
but it's better to have it in-tree now to start fixing portability
issues with upstream. It will also ease our work on the next major
release of GNOME.
This commit is contained in:
ajacoutot 2012-03-30 14:29:58 +00:00
parent e7c392b56d
commit 9aa17355a0
12 changed files with 254 additions and 0 deletions

View File

@ -0,0 +1,40 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
COMMENT= library for storing and retrieving passwords and secrets
GNOME_PROJECT= libsecret
GNOME_VERSION= 0.1
SHARED_LIBS += secret-0 0.0 # 0.0
HOMEPAGE= https://live.gnome.org/Libsecret
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += c ffi gcrypt gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0
WANTLIB += gpg-error gthread-2.0 pcre pthread z
MODULES= devel/gettext \
lang/python \
x11/gnome
MODGNOME_TOOLS= goi
MODPY_BUILDDEP= No
MODPY_RUNDEP= No
LIB_DEPENDS= devel/glib2 \
security/libgcrypt
# Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
REGRESS_IS_INTERACTIVE= X11
REGRESS_DEPENDS= ${MODPY_RUN_DEPENDS}
pre-configure:
${SUBST_CMD} ${WRKSRC}/library/tests/mock-service.c \
${WRKSRC}/library/tests/Makefile.in
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (gnome/libsecret-0.1.tar.xz) = Tc1zn7Uu4hLwqeKmW9U0iQ==
RMD160 (gnome/libsecret-0.1.tar.xz) = 1+5GuTZ/DgfFDoxNTEf1DBjHswI=
SHA1 (gnome/libsecret-0.1.tar.xz) = JFxbbpHHeB1TZ3bTZzvLRvTgC2E=
SHA256 (gnome/libsecret-0.1.tar.xz) = DiYMbOc3L31CnV/4cEhYVLgJuYlyir/ZtnQXGtpSBuo=
SIZE (gnome/libsecret-0.1.tar.xz) = 418612

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-library_secret-item_c,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
From 3fcfe9234eed97121b321b5a7d1fcf5ae9e498ba Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Fri, 30 Mar 2012 11:53:44 +0000
Subject: Remove multiple typedef definitions
--- library/secret-item.c.orig Sat Mar 24 11:32:16 2012
+++ library/secret-item.c Fri Mar 30 14:05:28 2012
@@ -73,10 +73,10 @@ enum {
};
/* Thread safe: no changes between construct and finalize */
-typedef struct _SecretItemPrivate {
+struct _SecretItemPrivate {
SecretService *service;
GCancellable *cancellable;
-} SecretItemPrivate;
+};
static GInitableIface *secret_item_initable_parent_iface = NULL;

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-library_secret-prompt_c,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
From 271c4556bd2913dfa5ade5033d89a3939ccb4619 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Fri, 30 Mar 2012 12:59:04 +0000
Subject: More build fixes for openbsd
--- library/secret-prompt.c.orig Sat Mar 24 07:46:47 2012
+++ library/secret-prompt.c Fri Mar 30 15:16:31 2012
@@ -53,12 +53,12 @@
* The class for #SecretPrompt.
*/
-typedef struct _SecretPromptPrivate {
+struct _SecretPromptPrivate {
/* Locked by mutex */
GMutex mutex;
gint prompted;
GVariant *last_result;
-} SecretPromptPrivate;
+};
G_DEFINE_TYPE (SecretPrompt, secret_prompt, G_TYPE_DBUS_PROXY);

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-library_secret-schemas_c,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
From 46b6ece9492d02bbbddc9cc7f6917b12ca6ea189 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Fri, 30 Mar 2012 11:56:20 +0000
Subject: Add missing 'authtype' attribute to the 'network' schema
--- library/secret-schemas.c.orig Mon Mar 19 18:57:42 2012
+++ library/secret-schemas.c Fri Mar 30 14:09:49 2012
@@ -24,6 +24,7 @@ static const SecretSchema network_schema = {
{ "protocol", SECRET_SCHEMA_ATTRIBUTE_STRING },
{ "port", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
{ "server", SECRET_SCHEMA_ATTRIBUTE_STRING },
+ { "authtype", SECRET_SCHEMA_ATTRIBUTE_STRING },
{ "NULL", 0 },
}
};

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-library_secret-service_c,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
From 271c4556bd2913dfa5ade5033d89a3939ccb4619 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Fri, 30 Mar 2012 12:59:04 +0000
Subject: More build fixes for openbsd
--- library/secret-service.c.orig Sat Mar 24 11:35:55 2012
+++ library/secret-service.c Fri Mar 30 15:16:31 2012
@@ -108,7 +108,7 @@ enum {
PROP_COLLECTIONS
};
-typedef struct _SecretServicePrivate {
+struct _SecretServicePrivate {
/* No change between construct and finalize */
GCancellable *cancellable;
SecretServiceFlags init_flags;
@@ -117,7 +117,7 @@ typedef struct _SecretServicePrivate {
GMutex mutex;
gpointer session;
GHashTable *collections;
-} SecretServicePrivate;
+};
G_LOCK_DEFINE (service_instance);
static gpointer service_instance = NULL;

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-library_secret-unstable_h,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
From 1f5d6567cf15bd3764e3ba58b6877ad63a51cfec Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Fri, 30 Mar 2012 11:56:16 +0000
Subject: Add secret-schemas.h to the 'stable' API
--- library/secret-unstable.h.orig Mon Mar 19 19:10:15 2012
+++ library/secret-unstable.h Fri Mar 30 14:09:47 2012
@@ -27,7 +27,6 @@
#include <secret/secret-enum-types.h>
#include <secret/secret-item.h>
#include <secret/secret-prompt.h>
-#include <secret/secret-schemas.h>
#include <secret/secret-service.h>
#include <secret/secret-value.h>

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-library_secret_h,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
From 1f5d6567cf15bd3764e3ba58b6877ad63a51cfec Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@gnome.org>
Date: Fri, 30 Mar 2012 11:56:16 +0000
Subject: Add secret-schemas.h to the 'stable' API
--- library/secret.h.orig Mon Mar 19 19:09:54 2012
+++ library/secret.h Fri Mar 30 14:09:47 2012
@@ -19,6 +19,7 @@
#include <secret/secret-password.h>
#include <secret/secret-schema.h>
+#include <secret/secret-schemas.h>
#include <secret/secret-types.h>
#undef __SECRET_INSIDE_HEADER__

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-library_tests_Makefile_in,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
--- library/tests/Makefile.in.orig Fri Mar 30 15:32:54 2012
+++ library/tests/Makefile.in Fri Mar 30 15:33:06 2012
@@ -807,7 +807,7 @@ test-js:
@for js in $(JS_TESTS); do echo "TEST: $$js"; $(JS_ENV) gjs $(srcdir)/$$js; done
test-py:
- @for py in $(PY_TESTS); do echo "TEST: $$py"; $(PY_ENV) python $(srcdir)/$$py; done
+ @for py in $(PY_TESTS); do echo "TEST: $$py"; $(PY_ENV) ${MODPY_BIN} $(srcdir)/$$py; done
test: test-c test-py test-js

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-library_tests_mock-service_c,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
--- library/tests/mock-service.c.orig Fri Mar 30 15:19:58 2012
+++ library/tests/mock-service.c Fri Mar 30 15:20:14 2012
@@ -36,7 +36,7 @@ mock_service_start (const gchar *mock_script,
gint polled;
gchar *argv[] = {
- "python", (gchar *)mock_script,
+ "${MODPY_BIN}", (gchar *)mock_script,
"--name", MOCK_SERVICE_NAME,
"--ready", ready,
NULL

View File

@ -0,0 +1,4 @@
libsecret is a library for storing and retrieving passwords and other
secrets. It communicates with the "Secret Service" using DBus.
gnome-keyring and ksecretservice are both implementations of a Secret
Service.

View File

@ -0,0 +1,57 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/03/30 14:29:58 ajacoutot Exp $
@bin bin/secret-tool
include/secret-0/
include/secret-0/secret/
include/secret-0/secret/secret-collection.h
include/secret-0/secret/secret-enum-types.h
include/secret-0/secret/secret-item.h
include/secret-0/secret/secret-password.h
include/secret-0/secret/secret-prompt.h
include/secret-0/secret/secret-schema.h
include/secret-0/secret/secret-schemas.h
include/secret-0/secret/secret-service.h
include/secret-0/secret/secret-types.h
include/secret-0/secret/secret-unstable.h
include/secret-0/secret/secret-value.h
include/secret-0/secret/secret.h
lib/girepository-1.0/
lib/girepository-1.0/Secret-0.typelib
lib/libsecret-0.a
lib/libsecret-0.la
@lib lib/libsecret-0.so.${LIBsecret-0_VERSION}
lib/pkgconfig/libsecret-0.pc
share/gir-1.0/
share/gir-1.0/Secret-0.gir
share/gtk-doc/html/libsecret-0/
share/gtk-doc/html/libsecret-0/SecretCollection.html
share/gtk-doc/html/libsecret-0/SecretError.html
share/gtk-doc/html/libsecret-0/SecretItem.html
share/gtk-doc/html/libsecret-0/SecretPrompt.html
share/gtk-doc/html/libsecret-0/SecretService.html
share/gtk-doc/html/libsecret-0/SecretValue.html
share/gtk-doc/html/libsecret-0/annotation-glossary.html
share/gtk-doc/html/libsecret-0/c-examples.html
share/gtk-doc/html/libsecret-0/c-lookup-example.html
share/gtk-doc/html/libsecret-0/c-remove-example.html
share/gtk-doc/html/libsecret-0/c-store-example.html
share/gtk-doc/html/libsecret-0/complete.html
share/gtk-doc/html/libsecret-0/examples.html
share/gtk-doc/html/libsecret-0/home.png
share/gtk-doc/html/libsecret-0/index.html
share/gtk-doc/html/libsecret-0/index.sgml
share/gtk-doc/html/libsecret-0/js-examples.html
share/gtk-doc/html/libsecret-0/js-lookup-example.html
share/gtk-doc/html/libsecret-0/js-remove-example.html
share/gtk-doc/html/libsecret-0/js-store-example.html
share/gtk-doc/html/libsecret-0/left.png
share/gtk-doc/html/libsecret-0/libsecret-0.devhelp2
share/gtk-doc/html/libsecret-0/libsecret-Password-storage.html
share/gtk-doc/html/libsecret-0/libsecret-SecretSchema.html
share/gtk-doc/html/libsecret-0/${MODPY_PY_PREFIX}examples.html
share/gtk-doc/html/libsecret-0/${MODPY_PY_PREFIX}lookup-example.html
share/gtk-doc/html/libsecret-0/${MODPY_PY_PREFIX}remove-example.html
share/gtk-doc/html/libsecret-0/${MODPY_PY_PREFIX}store-example.html
share/gtk-doc/html/libsecret-0/right.png
share/gtk-doc/html/libsecret-0/simple.html
share/gtk-doc/html/libsecret-0/style.css
share/gtk-doc/html/libsecret-0/up.png