diff mbox

libsecret: New package

Message ID 1376562685-17191-1-git-send-email-markos.chandras@imgtec.com
State Changes Requested, archived
Headers show

Commit Message

Markos Chandras Aug. 15, 2013, 10:31 a.m. UTC
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.

libsecret replaces libgnome-keyring.

https://wiki.gnome.org/Libsecret

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/Config.in              |  1 +
 package/libsecret/Config.in    | 20 ++++++++++++++++++++
 package/libsecret/libsecret.mk | 24 ++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 package/libsecret/Config.in
 create mode 100644 package/libsecret/libsecret.mk

Comments

Gustavo Zacarias Aug. 15, 2013, 10:41 a.m. UTC | #1
On 08/15/2013 07:31 AM, Markos Chandras wrote:

> +config BR2_PACKAGE_LIBSECRET
> +	bool "libsecret"
> +	select BR2_PACKAGE_LIBGLIB2
> +	help
> +	  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.
> +
> +	  https://wiki.gnome.org/Libsecret

You forgot to inherit LIBGLIB2 depends (WCHAR, THREADS) and add a
comment on why it's unavailable when both aren't available.
Other than that it looks good in principle (untested).
Regards.
Markos Chandras Aug. 15, 2013, 10:56 a.m. UTC | #2
On 15 August 2013 11:41, Gustavo Zacarias <gustavo@zacarias.com.ar> wrote:
> On 08/15/2013 07:31 AM, Markos Chandras wrote:
>
>> +config BR2_PACKAGE_LIBSECRET
>> +     bool "libsecret"
>> +     select BR2_PACKAGE_LIBGLIB2
>> +     help
>> +       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.
>> +
>> +       https://wiki.gnome.org/Libsecret
>
> You forgot to inherit LIBGLIB2 depends (WCHAR, THREADS) and add a
> comment on why it's unavailable when both aren't available.
> Other than that it looks good in principle (untested).
> Regards.

Hi Gustavo,

Thanks for the review.

Would it be better to replace 'select' with 'depend' to avoid
implicitly enabling these toolchain components?
Gustavo Zacarias Aug. 15, 2013, 11:04 a.m. UTC | #3
On 08/15/2013 07:56 AM, Markos Chandras wrote:
> Hi Gustavo,
> 
> Thanks for the review.
> 
> Would it be better to replace 'select' with 'depend' to avoid
> implicitly enabling these toolchain components?

Hi.
For libglib2 and other hard dependencies we usually just depend on the
toolchain components being available and select libglib2 like you did
with a nice comment when the toolchain isn't up to the requirements
saying so...

comment "libsecret requires a toolchain with X and Y support".
depends on !BR2_TOOLCHAIN_HAS_X || !BR2_TOOLCHAIN_HAS_Y
(with the appropiate labels of course!)

Only when there's a real choice (say, two different libglib2
implementations) a depend would be appropiate (xorg is a good example
since there's a choice between full and kdrive/tinyx, and it usually
requires extra configuration - drivers).

Enabling toolchain components is bad, if it did and you add a package as
a later thought after building your basic system you mess things up.

Regards.
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 7069d77..93e280d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -423,6 +423,7 @@  source "package/libassuan/Config.in"
 source "package/libmcrypt/Config.in"
 source "package/libmhash/Config.in"
 source "package/libnss/Config.in"
+source "package/libsecret/Config.in"
 source "package/libsha1/Config.in"
 source "package/nettle/Config.in"
 source "package/openssl/Config.in"
diff --git a/package/libsecret/Config.in b/package/libsecret/Config.in
new file mode 100644
index 0000000..93543c9
--- /dev/null
+++ b/package/libsecret/Config.in
@@ -0,0 +1,20 @@ 
+config BR2_PACKAGE_LIBSECRET
+	bool "libsecret"
+	select BR2_PACKAGE_LIBGLIB2
+	help
+	  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.
+
+	  https://wiki.gnome.org/Libsecret
+
+if BR2_PACKAGE_LIBSECRET
+
+config BR2_PACKAGE_LIBSECRET_CRYPTO
+	bool "Enable gcrypt and transport encryption"
+	select BR2_PACKAGE_LIBGCRYPT
+	help
+	  Enable gcrypt and transport encryption
+
+endif
diff --git a/package/libsecret/libsecret.mk b/package/libsecret/libsecret.mk
new file mode 100644
index 0000000..32bcc17
--- /dev/null
+++ b/package/libsecret/libsecret.mk
@@ -0,0 +1,24 @@ 
+################################################################################
+#
+# libsecret
+#
+################################################################################
+
+LIBSECRET_VERSION = 0.15
+LIBSECRET_SITE = http://ftp.gnome.org/pub/GNOME/sources/libsecret/$(LIBSECRET_VERSION)
+LIBSECRET_SOURCE = libsecret-$(LIBSECRET_VERSION).tar.xz
+LIBSECRET_LICENSE = LGPLv2.1+
+LIBSECRET_LICENSE_FILES = COPYING
+LIBSECRET_INSTALL_STAGING = YES
+
+LIBSECRET_DEPENDENCIES = libglib2
+LIBSECRET_CONF_OPT = --disable-manpages --disable-strict --disable-coverage --enable-vala=no
+
+ifeq ($(BR2_PACKAGE_LIBSECRET_CRYPTO),y)
+	LIBSECRET_DEPENDENCIES += libgcrypt
+	LIBSECRET_CONF_OPT += --enable-gcrypt
+else
+	LIBSECRET_CONF_OPT += --disable-gcrypt
+endif
+
+$(eval $(autotools-package))