All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 5/9] package/libnetconf2: add package
Date: Wed, 2 Oct 2019 09:28:59 +0200	[thread overview]
Message-ID: <20191002092859.4312bab1@windsurf.home> (raw)
In-Reply-To: <20191001143023.698-5-heiko.thiery@gmail.com>

Hello,

On Tue,  1 Oct 2019 16:30:18 +0200
heiko.thiery at gmail.com wrote:

> diff --git a/DEVELOPERS b/DEVELOPERS
> index a378ff2a61..527b8cccac 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1039,6 +1039,7 @@ F:	package/python-sip/
>  N:	Heiko Thiery <heiko.thiery@gmail.com>
>  F:	package/libredblack/
>  F:	package/libyang/
> +F:	package/libnetconf2/

Please keep entries sorted alphabetically.

>  
> diff --git a/package/libnetconf2/0001-Add-support-for-musl-libc.patch b/package/libnetconf2/0001-Add-support-for-musl-libc.patch
> new file mode 100644
> index 0000000000..e6d97ba90f
> --- /dev/null
> +++ b/package/libnetconf2/0001-Add-support-for-musl-libc.patch
> @@ -0,0 +1,60 @@
> +From 153fe40bd60499677e825e66501e8601536e0323 Mon Sep 17 00:00:00 2001
> +From: Rosen Penev <rosenp@gmail.com>
> +Date: Mon, 15 Jul 2019 18:15:28 -0700
> +Subject: [PATCH] Add support for musl libc
> +
> +musl does not support pthread_rwlockattr_setkind_np. Don't use it if it is
> +not available.

We need your Signed-off-by here. Also, where does this patch comes
from ? It should ideally be mentioned here as well.

> diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
> new file mode 100644
> index 0000000000..a991c78c05
> --- /dev/null
> +++ b/package/libnetconf2/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_LIBNETCONF2
> +	bool "libnetconf2 - NETCONF library"

Just:

	bool "libnetconf2"

> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_PACKAGE_LIBYANG
> +	select BR2_PACKAGE_LIBSSH
> +	select BR2_PACKAGE_LIBSSH_SERVER

libssh has a "depends on BR2_USE_MMU", so you need to replicate it here.

> +	help
> +	  libnetconf2 is a NETCONF library in C intended for building
> +	  NETCONF clients and servers.

Upstream URL should be added.

Also, you need a Config.in comment like this:

comment "libnetconf2 needs a toolchain w/ threads, dynamic library"
	depends on BR2_USE_MMU
	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS

> diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
> new file mode 100644
> index 0000000000..7bafe78324
> --- /dev/null
> +++ b/package/libnetconf2/libnetconf2.mk
> @@ -0,0 +1,28 @@
> +################################################################################
> +#
> +# libnetconf2
> +#
> +################################################################################
> +
> +LIBNETCONF2_VERSION = v0.12-r2
> +LIBNETCONF2_SITE = $(call github,CESNET,libnetconf2,$(LIBNETCONF2_VERSION))
> +LIBNETCONF2_INSTALL_STAGING = YES
> +LIBNETCONF2_LICENSE = BSD-3-Clause
> +LIBNETCONF2_LICENSE_FILES = LICENSE
> +LIBNETCONF2_DEPENDENCIES += libyang libssh
> +HOST_LIBNETCONF2_DEPENDENCIES += host-libyang host-libssh

Use = instead of +=

> +
> +LIBNETCONF2_CONF_OPTS += \

Ditto.

> +	-DENABLE_TLS=ON \
> +	-DENABLE_SSH=ON \

So SSH support is optional ? Why did you made it mandatory ?

> +	-DENABLE_BUILD_TESTS=OFF \
> +	-DENABLE_VALGRIND_TESTS=OFF
> +
> +HOST_LIBNETCONF2_CONF_OPTS += \
> +	-DENABLE_TLS=ON \
> +	-DENABLE_SSH=ON \
> +	-DENABLE_BUILD_TESTS=OFF \
> +	-DENABLE_VALGRIND_TESTS=OFF

Use = for those unconditional assignments.

> +
> +$(eval $(cmake-package))
> +$(eval $(host-cmake-package))

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-10-02  7:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 14:30 [Buildroot] [PATCH 1/9] package/libev: use host-autotools-package macro heiko.thiery at gmail.com
2019-10-01 14:30 ` [Buildroot] [PATCH 2/9] package/libssh: " heiko.thiery at gmail.com
2019-10-01 14:30 ` [Buildroot] [PATCH 3/9] package/libredblack: add package heiko.thiery at gmail.com
2019-10-02  7:20   ` Thomas Petazzoni
2019-10-04  8:49     ` Heiko Thiery
2019-10-01 14:30 ` [Buildroot] [PATCH 4/9] package/libyang: " heiko.thiery at gmail.com
2019-10-02  7:25   ` Thomas Petazzoni
2019-10-04  8:49     ` Heiko Thiery
2019-10-01 14:30 ` [Buildroot] [PATCH 5/9] package/libnetconf2: " heiko.thiery at gmail.com
2019-10-02  7:28   ` Thomas Petazzoni [this message]
2019-10-04  8:51     ` Heiko Thiery
2019-10-04  9:07       ` Thomas Petazzoni
2019-10-01 14:30 ` [Buildroot] [PATCH 6/9] package/sysrepo: " heiko.thiery at gmail.com
2019-10-02  9:34   ` Thomas Petazzoni
2019-10-04  8:52     ` Heiko Thiery
2019-10-01 14:30 ` [Buildroot] [PATCH 7/9] package/netopeer2server: " heiko.thiery at gmail.com
2019-10-01 14:30 ` [Buildroot] [PATCH 8/9] package/netopeer2cli: " heiko.thiery at gmail.com
2019-10-01 14:30 ` [Buildroot] [PATCH 9/9] package/netopeer2keystored: " heiko.thiery at gmail.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191002092859.4312bab1@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.