keyutils: new package

Submitted by Jarkko Sakkinen on Oct. 24, 2012, 8:58 p.m.

Details

Message ID 1351112292-5617-1-git-send-email-jarkko.sakkinen@iki.fi
State Superseded
Headers show

Commit Message

Jarkko Sakkinen Oct. 24, 2012, 8:58 p.m.
Linux key management utilities

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
---
 package/Config.in            |    1 +
 package/keyutils/Config.in   |    7 +++++++
 package/keyutils/keyutils.mk |   28 ++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 package/keyutils/Config.in
 create mode 100644 package/keyutils/keyutils.mk

Comments

Yann E. MORIN Oct. 24, 2012, 9:06 p.m.
Jarkko, All,

On Wednesday 24 October 2012 Jarkko Sakkinen wrote:
> Linux key management utilities

There are two memleaks known in keyutils.

I'm about to post a patch series that includes keyutils
with patches to fix the memleaks.

[--SNIP--]
> diff --git a/package/keyutils/keyutils.mk b/package/keyutils/keyutils.mk
> new file mode 100644
> index 0000000..82b1f58
> --- /dev/null
> +++ b/package/keyutils/keyutils.mk
> @@ -0,0 +1,28 @@
> +#############################################################
> +#
> +# keyutils
> +#
> +#############################################################
> +
> +KEYUTILS_VERSION = 1.5.5
> +KEYUTILS_SITE = http://people.redhat.com/dhowells/keyutils/
> +KEYUTILS_SOURCE = keyutils-$(KEYUTILS_VERSION).tar.bz2
> +
> +define KEYUTILS_BUILD_CMDS
> +	$(MAKE) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" \
> +		CC="$(TARGET_CC)" -C $(@D)
> +endef

I have:
define KEYUTILS_BUILD_CMDS
        $(KEYUTILS_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
endef

Which includes all our CFLAGS, while doing the way you did overrides the
CFLAGS in keytuils' Makefile, and breaks (at least for me on one arch).

Regards,
Yann E. MORIN.
Yann E. MORIN Oct. 24, 2012, 10:27 p.m.
Jarkko, All,

On Wednesday 24 October 2012 Yann E. MORIN wrote:
> On Wednesday 24 October 2012 Jarkko Sakkinen wrote:
> > Linux key management utilities
> 
> There are two memleaks known in keyutils.
> 
> I'm about to post a patch series that includes keyutils
> with patches to fix the memleaks.

Also, the install rule needs to be fixed. See:
  http://lists.busybox.net/pipermail/buildroot/2012-October/060377.html

Regards,
Yann E. MORIN.
Jarkko Sakkinen Oct. 25, 2012, 5:23 a.m.
On Thu, Oct 25, 2012 at 12:06 AM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Jarkko, All,
>
> On Wednesday 24 October 2012 Jarkko Sakkinen wrote:
>> Linux key management utilities
>
> There are two memleaks known in keyutils.
>
> I'm about to post a patch series that includes keyutils
> with patches to fix the memleaks.

Ok, great. I'll look forward to that.

>
> [--SNIP--]
>> diff --git a/package/keyutils/keyutils.mk b/package/keyutils/keyutils.mk
>> new file mode 100644
>> index 0000000..82b1f58
>> --- /dev/null
>> +++ b/package/keyutils/keyutils.mk
>> @@ -0,0 +1,28 @@
>> +#############################################################
>> +#
>> +# keyutils
>> +#
>> +#############################################################
>> +
>> +KEYUTILS_VERSION = 1.5.5
>> +KEYUTILS_SITE = http://people.redhat.com/dhowells/keyutils/
>> +KEYUTILS_SOURCE = keyutils-$(KEYUTILS_VERSION).tar.bz2
>> +
>> +define KEYUTILS_BUILD_CMDS
>> +     $(MAKE) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" \
>> +             CC="$(TARGET_CC)" -C $(@D)
>> +endef
>
> I have:
> define KEYUTILS_BUILD_CMDS
>         $(KEYUTILS_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
> endef
>
> Which includes all our CFLAGS, while doing the way you did overrides the
> CFLAGS in keytuils' Makefile, and breaks (at least for me on one arch).
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

/Jarkko

Patch hide | download patch | download mbox

diff --git a/package/Config.in b/package/Config.in
index 1650c71..00d242d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -715,6 +715,7 @@  source "package/supervisor/Config.in"
 source "package/systemd/Config.in"
 source "package/util-linux/Config.in"
 source "package/dsp-tools/Config.in"
+source "package/keyutils/Config.in"
 endmenu
 
 menu "Text editors and viewers"
diff --git a/package/keyutils/Config.in b/package/keyutils/Config.in
new file mode 100644
index 0000000..2296e5b
--- /dev/null
+++ b/package/keyutils/Config.in
@@ -0,0 +1,7 @@ 
+config BR2_PACKAGE_KEYUTILS
+	bool "keyutils"
+	help
+	  Linux key management utilities
+
+	  http://people.redhat.com/dhowells/keyutils/
+
diff --git a/package/keyutils/keyutils.mk b/package/keyutils/keyutils.mk
new file mode 100644
index 0000000..82b1f58
--- /dev/null
+++ b/package/keyutils/keyutils.mk
@@ -0,0 +1,28 @@ 
+#############################################################
+#
+# keyutils
+#
+#############################################################
+
+KEYUTILS_VERSION = 1.5.5
+KEYUTILS_SITE = http://people.redhat.com/dhowells/keyutils/
+KEYUTILS_SOURCE = keyutils-$(KEYUTILS_VERSION).tar.bz2
+
+define KEYUTILS_BUILD_CMDS
+	$(MAKE) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" \
+		CC="$(TARGET_CC)" -C $(@D)
+endef
+
+define KEYUTILS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/keyctl $(TARGET_DIR)/bin/keyctl
+endef
+
+define KEYUTILS_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/bin/keyctl
+endef
+
+define KEYUTILS_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))