diff options
author | Nirbheek Chauhan <nirbheek@gentoo.org> | 2013-03-02 08:51:22 +0000 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@gentoo.org> | 2013-03-02 08:51:22 +0000 |
commit | 49d2bee451bc1ed1ae3819dd6ed38c4426b0f625 (patch) | |
tree | 7a816ade8c749be5c5dff3f7a63a3b1ab0bb98a0 /app-crypt/libsecret | |
parent | Initial commit (diff) | |
download | gentoo-2-49d2bee451bc1ed1ae3819dd6ed38c4426b0f625.tar.gz gentoo-2-49d2bee451bc1ed1ae3819dd6ed38c4426b0f625.tar.bz2 gentoo-2-49d2bee451bc1ed1ae3819dd6ed38c4426b0f625.zip |
Bump to 0.13, add a patch from git to fix SecretValue annotations
(Portage version: 2.2.0_alpha162/cvs/Linux x86_64, signed Manifest commit with key 560FDD64)
Diffstat (limited to 'app-crypt/libsecret')
-rw-r--r-- | app-crypt/libsecret/ChangeLog | 8 | ||||
-rw-r--r-- | app-crypt/libsecret/files/libsecret-0.13-fix-secretvalue-get.patch | 94 | ||||
-rw-r--r-- | app-crypt/libsecret/libsecret-0.13.ebuild | 76 |
3 files changed, 177 insertions, 1 deletions
diff --git a/app-crypt/libsecret/ChangeLog b/app-crypt/libsecret/ChangeLog index dc24132f03c4..c9cbfb7362ce 100644 --- a/app-crypt/libsecret/ChangeLog +++ b/app-crypt/libsecret/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-crypt/libsecret # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/libsecret/ChangeLog,v 1.13 2013/01/28 14:56:10 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-crypt/libsecret/ChangeLog,v 1.14 2013/03/02 08:51:22 nirbheek Exp $ + +*libsecret-0.13 (02 Mar 2013) + + 02 Mar 2013; Nirbheek Chauhan <nirbheek@gentoo.org> + +files/libsecret-0.13-fix-secretvalue-get.patch, +libsecret-0.13.ebuild: + Bump to 0.13, add a patch from git to fix SecretValue annotations 28 Jan 2013; Alexis Ballier <aballier@gentoo.org> libsecret-0.12.ebuild: keyword ~amd64-fbsd diff --git a/app-crypt/libsecret/files/libsecret-0.13-fix-secretvalue-get.patch b/app-crypt/libsecret/files/libsecret-0.13-fix-secretvalue-get.patch new file mode 100644 index 000000000000..daa54600245d --- /dev/null +++ b/app-crypt/libsecret/files/libsecret-0.13-fix-secretvalue-get.patch @@ -0,0 +1,94 @@ +From ddd9bdd2e9fcc6009e54a17751d1002a039d180a Mon Sep 17 00:00:00 2001 +From: Stef Walter <stefw@gnome.org> +Date: Mon, 25 Feb 2013 13:56:32 +0100 +Subject: [PATCH] Fix introspection for secret_value_get() to return a uint8 + +This works around a crash in pygobject. + +https://bugzilla.gnome.org/show_bug.cgi?id=694448 +--- + libsecret/secret-value.c | 4 ++-- + libsecret/tests/test-unstable.py | 34 +++++++++++++++++++++++++++++++--- + 2 files changed, 33 insertions(+), 5 deletions(-) + +diff --git a/libsecret/secret-value.c b/libsecret/secret-value.c +index 7bd7bc2..a6fc5b8 100644 +--- a/libsecret/secret-value.c ++++ b/libsecret/secret-value.c +@@ -151,13 +151,13 @@ secret_value_new_full (gchar *secret, + /** + * secret_value_get: + * @value: the value +- * @length: (out): the length of the secret ++ * @length: the length of the secret + * + * Get the secret data in the #SecretValue. The value is not necessarily + * null-terminated unless it was created with secret_value_new() or a + * null-terminated string was passed to secret_value_new_full(). + * +- * Returns: (array length=length): the secret data ++ * Returns: (array length=length) (element-type guint8): the secret data + */ + const gchar * + secret_value_get (SecretValue *value, +diff --git a/libsecret/tests/test-unstable.py b/libsecret/tests/test-unstable.py +index 7f611e7..2aa6d2b 100644 +--- a/libsecret/tests/test-unstable.py ++++ b/libsecret/tests/test-unstable.py +@@ -14,22 +14,50 @@ + import unittest + + from gi.repository import MockService as Mock +-from gi.repository import SecretUnstable as Secret, GLib ++from gi.repository import SecretUnstable, Secret, GLib ++ ++EXAMPLE_SCHEMA = Secret.Schema.new('org.mock.type.Store', ++ Secret.SchemaFlags.NONE, ++ { ++ 'number': Secret.SchemaAttributeType.INTEGER, ++ 'string': Secret.SchemaAttributeType.STRING, ++ 'even': Secret.SchemaAttributeType.BOOLEAN, ++ } ++) ++ ++attributes = { ++ 'number': '8', ++ 'string': 'eight', ++ 'even': 'true' ++} + + class TestStore(unittest.TestCase): + def setUp(self): + Mock.start("mock-service-normal.py") + + def tearDown(self): +- Secret.Service.disconnect() ++ SecretUnstable.Service.disconnect() + Mock.stop() + + def testSynchronous(self): +- service = Secret.Service.get_sync(Secret.ServiceFlags.NONE, None); ++ service = SecretUnstable.Service.get_sync(SecretUnstable.ServiceFlags.NONE, None); + path = service.read_alias_dbus_path_sync("default", None); + + # Just running this without error is good enough for us to test the unstable gir + self.assertNotEqual(path, None); + ++ def testValueGet(self): ++ Secret.password_store_sync(EXAMPLE_SCHEMA, attributes, Secret.COLLECTION_DEFAULT, ++ 'the label', 'the password', None) ++ ++ service = SecretUnstable.Service.get_sync(SecretUnstable.ServiceFlags.NONE, None) ++ items = service.search_sync(EXAMPLE_SCHEMA, { 'even': 'true' }, ++ SecretUnstable.SearchFlags.ALL | SecretUnstable.SearchFlags.LOAD_SECRETS, ++ None) ++ ++ item = items[0] ++ item_secret = item.get_secret() ++ self.assertEqual(item_secret.get(), "the password") ++ + if __name__ == '__main__': + unittest.main() +-- +1.7.12.4 + diff --git a/app-crypt/libsecret/libsecret-0.13.ebuild b/app-crypt/libsecret/libsecret-0.13.ebuild new file mode 100644 index 000000000000..3ffc19e8822c --- /dev/null +++ b/app-crypt/libsecret/libsecret-0.13.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/libsecret/libsecret-0.13.ebuild,v 1.1 2013/03/02 08:51:22 nirbheek Exp $ + +EAPI="5" +VALA_MIN_API_VERSION=0.18 +VALA_USE_DEPEND=vapigen + +inherit eutils gnome2 python vala virtualx + +DESCRIPTION="GObject library for accessing the freedesktop.org Secret Service API" +HOMEPAGE="https://live.gnome.org/Libsecret" + +LICENSE="LGPL-2.1+ Apache-2.0" # Apache-2.0 license is used for tests only +SLOT="0" +IUSE="+crypt debug +introspection test vala" +REQUIRED_USE="vala? ( introspection )" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd" + +COMMON_DEPEND=" + >=dev-libs/glib-2.32.0:2 + crypt? ( >=dev-libs/libgcrypt-1.2.2:= ) + introspection? ( >=dev-libs/gobject-introspection-1.29 )" +RDEPEND="${COMMON_DEPEND} + >=gnome-base/gnome-keyring-3" +# Add ksecrets to RDEPEND when it's added to portage +DEPEND="${COMMON_DEPEND} + dev-libs/libxslt + dev-util/gdbus-codegen + dev-util/gtk-doc-am + >=dev-util/intltool-0.35.0 + sys-devel/gettext + virtual/pkgconfig + test? ( + dev-python/mock + introspection? ( + =dev-lang/python-2* + >=dev-libs/gjs-1.32 + dev-python/pygobject:3 ) + ) + vala? ( $(vala_depend) )" + +pkg_setup() { + # python is only needed for tests + if use test && use introspection; then + python_set_active_version 2 + python_pkg_setup + fi +} + +src_prepare() { + DOCS="AUTHORS ChangeLog NEWS README" + G2CONF="${G2CONF} + --enable-manpages + --disable-strict + --disable-coverage + --disable-static + $(use_enable crypt gcrypt) + $(use_enable introspection) + $(use_enable vala)" + + # FIXME: disable failing test + sed -e '/test_get_sync);/d' \ + -e '/test_get_async);/d' \ + -i libsecret/tests/test-service.c || die + + # https://bugzilla.gnome.org/show_bug.cgi?id=694448 + epatch "${FILESDIR}/${P}-fix-secretvalue-get.patch" + + use vala && vala_src_prepare + gnome2_src_prepare +} + +src_test() { + Xemake check +} |