Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/libnids: new package
Date: Mon, 22 Jun 2020 22:27:43 +0200	[thread overview]
Message-ID: <20200622222743.4643d71d@windsurf.home> (raw)
In-Reply-To: <20200622105359.31340-1-guillaume.bressaix@gmail.com>

Hello Guillaume,

On Mon, 22 Jun 2020 12:53:59 +0200
"Guillaume W. Bres" <guillaume.bressaix@gmail.com> wrote:

> Libnids is a C based networking library,
> part of networking intrusion detection tools.
> It can watch network traffic & provide informations.
> 
> Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>

I have applied your patch, with a number of changes. See below for
comments, and see the final commit at:

  https://git.buildroot.org/buildroot/commit/?id=b6ce06cd64b0d85c9065c60fad933c8585730320


> +config BR2_PACKAGE_LIBNIDS
> +	bool "libnids"
> +	depends on BR2_TOOLCHAIN_USES_GLIBC

glibc is not required: it builds fine with uclibc.

> +	select BR2_PACKAGE_LIBGLIB2

This dependency is not mandatory, so I dropped it. It should be easy to
re-add it with a follow-up patch.

> +	select BR2_PACKAGE_LIBNET

This dependency is not mandatory, so I dropped it. Re-adding it is
possible, but will need some tweaks in the configure.in script.

> +	select BR2_PACKAGE_LIBPCAP

This dependency is indeed mandatory.


> +LIBNIDS_VERSION = 1.24
> +LIBNIDS_SITE = https://sourceforge.net/projects/libnids/files/libnids/$(LIBNIDS_VERSION)
> +LIBNIDS_LICENSE = GPL-2.0
> +LIBNIDS_LICENSE_FILES = COPYING
> +LIBNIDS_INSTALL_STAGING = YES

You forgot the _DEPENDENCIES variable, so nothing ensured that your
dependencies are built before this package.

> +LIBNIDS_CONF_OPTS += \
> +	prefix="$(STAGING_DIR)/usr" \
> +	exec_prefix="$(STAGING_DIR)/usr"

So, I instead fixed this by:

 (1) Adding a patch for the configure.in script that changes the
 detection of libpcap to use pkg-config

 (2) Passing the appropriate install_prefix value at install time,
 since the hand-written Makefile.in use install_prefix and not DESTDIR

If you need the libglib and libnet optional dependencies, don't
hesitate to send follow-up patches to add support for them.

Thanks!

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

  reply	other threads:[~2020-06-22 20:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 10:53 [Buildroot] [PATCH 1/1] package/libnids: new package Guillaume W. Bres
2020-06-22 20:27 ` Thomas Petazzoni [this message]
2020-06-23  9:01   ` Guillaume Bres
2020-06-23  9:07     ` Guillaume Bres
2020-06-23 12:14       ` Guillaume Bres
2020-06-23 12:26         ` Thomas Petazzoni
2020-06-23 12:24     ` Thomas Petazzoni

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=20200622222743.4643d71d@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox