Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] Added lldpad (LLDP Agent Daemon) package.
@ 2018-01-12 10:35 Laurent Charpentier
  2018-01-12 10:45 ` Yegor Yefremov
  2018-01-12 10:52 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Laurent Charpentier @ 2018-01-12 10:35 UTC (permalink / raw)
  To: buildroot

The lldpad package comes with utilities to manage an LLDP interface with
support for reading and configuring TLVs. TLVs and interfaces are individual
controlled allowing flexible configuration for TX only, RX only, or TX/RX
modes per TLV.

http://open-lldp.org/

Signed-off-by: Laurent Charpentier <laurent_pubs@yahoo.com>
---
 package/Config.in                                  |  1 +
 .../open-lldp/0001-lldpad-vdptool-getline.patch    | 10 +++++++++
 package/open-lldp/Config.in                        | 11 +++++++++
 package/open-lldp/open-lldp.hash                   |  2 ++
 package/open-lldp/open-lldp.mk                     | 26 ++++++++++++++++++++++
 5 files changed, 50 insertions(+)
 create mode 100644 package/open-lldp/0001-lldpad-vdptool-getline.patch
 create mode 100644 package/open-lldp/Config.in
 create mode 100644 package/open-lldp/open-lldp.hash
 create mode 100644 package/open-lldp/open-lldp.mk

diff --git a/package/Config.in b/package/Config.in
index 01f4095be5..37e1e753e3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1760,6 +1760,7 @@ endif
 	source "package/odhcp6c/Config.in"
 	source "package/odhcploc/Config.in"
 	source "package/olsr/Config.in"
+	source "package/open-lldp/Config.in"
 	source "package/open-plc-utils/Config.in"
 	source "package/openntpd/Config.in"
 	source "package/openobex/Config.in"
diff --git a/package/open-lldp/0001-lldpad-vdptool-getline.patch b/package/open-lldp/0001-lldpad-vdptool-getline.patch
new file mode 100644
index 0000000000..ac2e62ff16
--- /dev/null
+++ b/package/open-lldp/0001-lldpad-vdptool-getline.patch
@@ -0,0 +1,10 @@
+--- open-lldp-036e314/vdptool.c 2015-08-24 19:31:59.000000000 +0200
++++ open-lldp-036e314_patched/vdptool.c 2018-01-10 10:16:24.096431555 +0100
+@@ -36,6 +36,7 @@
+  * set and query VSI profile settings.
+  */
+
++#define _GNU_SOURCE
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <unistd.h>
diff --git a/package/open-lldp/Config.in b/package/open-lldp/Config.in
new file mode 100644
index 0000000000..84b24702c7
--- /dev/null
+++ b/package/open-lldp/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_OPEN_LLDP
+        bool "open-lldp"
+        select BR2_PACKAGE_LIBCONFIG
+        select BR2_PACKAGE_LIBNL
+        select BR2_PACKAGE_LIBTOOL
+        select BR2_PACKAGE_READLINE
+        help
+	  This package contains the Linux user space daemon and configuration
+	  tool for Intel LLDP Agent with Enhanced Ethernet support for the
+	  Data Center.
+
diff --git a/package/open-lldp/open-lldp.hash b/package/open-lldp/open-lldp.hash
new file mode 100644
index 0000000000..6fef5b2999
--- /dev/null
+++ b/package/open-lldp/open-lldp.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 217124f24ac57d3191ab33c53fccf5d7319e83f9029610be3c3cb71392480a2a  open-lldp-036e314.tar.gz
diff --git a/package/open-lldp/open-lldp.mk b/package/open-lldp/open-lldp.mk
new file mode 100644
index 0000000000..5a69595b4f
--- /dev/null
+++ b/package/open-lldp/open-lldp.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# open-lldp
+#
+################################################################################
+
+OPEN_LLDP_VERSION = 036e314
+OPEN_LLDP_SITE = git://open-lldp.org/open-lldp.git
+OPEN_LLDP_SITE_METHOD = git
+OPEN_LLDP_DEPENDENCIES = libconfig host-pkgconf libtool
+OPEN_LLDP_LICENSE = GPL-2.0
+OPEN_LLDP_LICENSE_FILES = README
+
+OPEN_LLDP_AUTORECONF = YES
+OPEN_LLDP_INSTALL_STAGING = YES
+
+OPEN_LLDP_CONF_OPTS = \
+        --disable-static
+
+define OPEN_LLDP_BOOTSTRAP
+        (cd $(@D) && ./bootstrap.sh)
+endef
+
+OPEN_LLDP_PRE_CONFIGURE_HOOKS += OPEN_LLDP_BOOTSTRAP
+
+$(eval $(autotools-package))
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] Added lldpad (LLDP Agent Daemon) package.
  2018-01-12 10:35 [Buildroot] [PATCH 1/1] Added lldpad (LLDP Agent Daemon) package Laurent Charpentier
@ 2018-01-12 10:45 ` Yegor Yefremov
  2018-01-12 10:52 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Yegor Yefremov @ 2018-01-12 10:45 UTC (permalink / raw)
  To: buildroot

Hi Laurent,

On Fri, Jan 12, 2018 at 11:35 AM, Laurent Charpentier
<laurent_pubs@yahoo.com> wrote:
> The lldpad package comes with utilities to manage an LLDP interface with
> support for reading and configuring TLVs. TLVs and interfaces are individual
> controlled allowing flexible configuration for TX only, RX only, or TX/RX
> modes per TLV.
>
> http://open-lldp.org/
>
> Signed-off-by: Laurent Charpentier <laurent_pubs@yahoo.com>
> ---
>  package/Config.in                                  |  1 +
>  .../open-lldp/0001-lldpad-vdptool-getline.patch    | 10 +++++++++
>  package/open-lldp/Config.in                        | 11 +++++++++
>  package/open-lldp/open-lldp.hash                   |  2 ++
>  package/open-lldp/open-lldp.mk                     | 26 ++++++++++++++++++++++

Please also add an entry to the DEVELOPERS file.

>  5 files changed, 50 insertions(+)
>  create mode 100644 package/open-lldp/0001-lldpad-vdptool-getline.patch
>  create mode 100644 package/open-lldp/Config.in
>  create mode 100644 package/open-lldp/open-lldp.hash
>  create mode 100644 package/open-lldp/open-lldp.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 01f4095be5..37e1e753e3 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1760,6 +1760,7 @@ endif
>         source "package/odhcp6c/Config.in"
>         source "package/odhcploc/Config.in"
>         source "package/olsr/Config.in"
> +       source "package/open-lldp/Config.in"
>         source "package/open-plc-utils/Config.in"
>         source "package/openntpd/Config.in"
>         source "package/openobex/Config.in"
> diff --git a/package/open-lldp/0001-lldpad-vdptool-getline.patch b/package/open-lldp/0001-lldpad-vdptool-getline.patch
> new file mode 100644
> index 0000000000..ac2e62ff16
> --- /dev/null
> +++ b/package/open-lldp/0001-lldpad-vdptool-getline.patch
> @@ -0,0 +1,10 @@
> +--- open-lldp-036e314/vdptool.c 2015-08-24 19:31:59.000000000 +0200
> ++++ open-lldp-036e314_patched/vdptool.c 2018-01-10 10:16:24.096431555 +0100
> +@@ -36,6 +36,7 @@
> +  * set and query VSI profile settings.
> +  */
> +
> ++#define _GNU_SOURCE
> + #include <stdlib.h>
> + #include <stdio.h>
> + #include <unistd.h>

The patch should be git formatted, have a proper commit log and your
Signed-off-by tag.

> diff --git a/package/open-lldp/Config.in b/package/open-lldp/Config.in
> new file mode 100644
> index 0000000000..84b24702c7
> --- /dev/null
> +++ b/package/open-lldp/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_OPEN_LLDP
> +        bool "open-lldp"
> +        select BR2_PACKAGE_LIBCONFIG
> +        select BR2_PACKAGE_LIBNL
> +        select BR2_PACKAGE_LIBTOOL
> +        select BR2_PACKAGE_READLINE
> +        help
> +         This package contains the Linux user space daemon and configuration
> +         tool for Intel LLDP Agent with Enhanced Ethernet support for the
> +         Data Center.
> +

Projects URL missing.

> diff --git a/package/open-lldp/open-lldp.hash b/package/open-lldp/open-lldp.hash
> new file mode 100644
> index 0000000000..6fef5b2999
> --- /dev/null
> +++ b/package/open-lldp/open-lldp.hash
> @@ -0,0 +1,2 @@
> +# Locally computed
> +sha256 217124f24ac57d3191ab33c53fccf5d7319e83f9029610be3c3cb71392480a2a  open-lldp-036e314.tar.gz

checksum for licence file (README) is missing.

> diff --git a/package/open-lldp/open-lldp.mk b/package/open-lldp/open-lldp.mk
> new file mode 100644
> index 0000000000..5a69595b4f
> --- /dev/null
> +++ b/package/open-lldp/open-lldp.mk
> @@ -0,0 +1,26 @@
> +################################################################################
> +#
> +# open-lldp
> +#
> +################################################################################
> +
> +OPEN_LLDP_VERSION = 036e314
> +OPEN_LLDP_SITE = git://open-lldp.org/open-lldp.git
> +OPEN_LLDP_SITE_METHOD = git
> +OPEN_LLDP_DEPENDENCIES = libconfig host-pkgconf libtool

What about libnl?

> +OPEN_LLDP_LICENSE = GPL-2.0
> +OPEN_LLDP_LICENSE_FILES = README
> +
> +OPEN_LLDP_AUTORECONF = YES
> +OPEN_LLDP_INSTALL_STAGING = YES
> +
> +OPEN_LLDP_CONF_OPTS = \
> +        --disable-static
> +
> +define OPEN_LLDP_BOOTSTRAP
> +        (cd $(@D) && ./bootstrap.sh)
> +endef

Why is this needed? Isn't OPEN_LLDP_AUTORECONF = YES sufficient?

Yegor

> +
> +OPEN_LLDP_PRE_CONFIGURE_HOOKS += OPEN_LLDP_BOOTSTRAP
> +
> +$(eval $(autotools-package))
> --
> 2.14.3
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] Added lldpad (LLDP Agent Daemon) package.
  2018-01-12 10:35 [Buildroot] [PATCH 1/1] Added lldpad (LLDP Agent Daemon) package Laurent Charpentier
  2018-01-12 10:45 ` Yegor Yefremov
@ 2018-01-12 10:52 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-01-12 10:52 UTC (permalink / raw)
  To: buildroot

Hello Laurent,

Thanks for this new version! Much easier to review.

First minor comment, the commit title should be:

	open-lldp: new package

On Fri, 12 Jan 2018 11:35:08 +0100, Laurent Charpentier wrote:
> The lldpad package comes with utilities to manage an LLDP interface with
> support for reading and configuring TLVs. TLVs and interfaces are individual
> controlled allowing flexible configuration for TX only, RX only, or TX/RX
> modes per TLV.
> 
> http://open-lldp.org/
> 
> Signed-off-by: Laurent Charpentier <laurent_pubs@yahoo.com>
> ---
>  package/Config.in                                  |  1 +
>  .../open-lldp/0001-lldpad-vdptool-getline.patch    | 10 +++++++++
>  package/open-lldp/Config.in                        | 11 +++++++++
>  package/open-lldp/open-lldp.hash                   |  2 ++
>  package/open-lldp/open-lldp.mk                     | 26 ++++++++++++++++++++++

Please add an entry in the DEVELOPERS file for this package. This will
allow you to be notified when patches are submitted for this package,
and when there are build failures occurring due to this package.

> diff --git a/package/open-lldp/0001-lldpad-vdptool-getline.patch b/package/open-lldp/0001-lldpad-vdptool-getline.patch
> new file mode 100644
> index 0000000000..ac2e62ff16
> --- /dev/null
> +++ b/package/open-lldp/0001-lldpad-vdptool-getline.patch

All patches should have a description and a Signed-off-by line. In
addition, since this project is hosted in Git upstream, we would like
patches to be formatted with "git format-patch -N".

> diff --git a/package/open-lldp/Config.in b/package/open-lldp/Config.in
> new file mode 100644
> index 0000000000..84b24702c7
> --- /dev/null
> +++ b/package/open-lldp/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_OPEN_LLDP
> +        bool "open-lldp"
> +        select BR2_PACKAGE_LIBCONFIG
> +        select BR2_PACKAGE_LIBNL

libnl depends on threads, so you need to replicate the threads
dependency, and add a Config.in comment about it.

> +        select BR2_PACKAGE_LIBTOOL

Not needed, you don't need libtool for the target.

> +        select BR2_PACKAGE_READLINE
> +        help
> +	  This package contains the Linux user space daemon and configuration
> +	  tool for Intel LLDP Agent with Enhanced Ethernet support for the
> +	  Data Center.

Indentation for the help text is one tab + two spaces. Also, we like to
have the URL to the upstream project in the help text, after one blank
line.

These minor details are verified by the ./utils/check-package. I would
recommend you to run this script on your package.

> +OPEN_LLDP_VERSION = 036e314

Please use a full hash.

> +OPEN_LLDP_SITE = git://open-lldp.org/open-lldp.git<
> +OPEN_LLDP_SITE_METHOD = git
> +OPEN_LLDP_DEPENDENCIES = libconfig host-pkgconf libtool

I'm pretty sure libtool is not needed on the target.

What about readline? You select it in the Config.in, but you don't
depend on it. Is it just a runtime dependency (seems unlikely).

> +OPEN_LLDP_LICENSE = GPL-2.0
> +OPEN_LLDP_LICENSE_FILES = README

COPYING is a better license file.

> +OPEN_LLDP_AUTORECONF = YES

We like to have a comment above autoreconf to explain why it is needed.
In your case, something like:

# Fetching from git, need to generate configure/Makefile.in

> +OPEN_LLDP_INSTALL_STAGING = YES
> +
> +OPEN_LLDP_CONF_OPTS = \
> +        --disable-static

This should not be needed, the autotools-package infrastructure is
already passing --{enable,disable}-{shared,static} depending on the
Buildroot configuration.

> +define OPEN_LLDP_BOOTSTRAP
> +        (cd $(@D) && ./bootstrap.sh)
> +endef
> +
> +OPEN_LLDP_PRE_CONFIGURE_HOOKS += OPEN_LLDP_BOOTSTRAP

Why do you need this? <pkg>_AUTORECONF should be sufficient.

Also, could you test your package with ./utils/test-pkg ? This would
test it with a wide variety of toolchains/architectures, which will
allow to detect build issues before they arrive on our autobuilder
infrastructure.

Could you take into account those comments (most of them are really
trivial) and submit an updated version?

Thanks a lot for your contribution!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] Added lldpad (LLDP Agent Daemon) package.
@ 2018-01-12 11:00 Laurent Charpentier
  0 siblings, 0 replies; 4+ messages in thread
From: Laurent Charpentier @ 2018-01-12 11:00 UTC (permalink / raw)
  To: buildroot

The lldpad package comes with utilities to manage an LLDP interface with
support for reading and configuring TLVs. TLVs and interfaces are individual
controlled allowing flexible configuration for TX only, RX only, or TX/RX
modes per TLV.

http://open-lldp.org/

Signed-off-by: Laurent Charpentier <laurent_pubs@yahoo.com>
---
 package/Config.in                                  |  1 +
 .../open-lldp/0001-lldpad-vdptool-getline.patch    | 10 +++++++++
 package/open-lldp/Config.in                        | 11 +++++++++
 package/open-lldp/open-lldp.hash                   |  2 ++
 package/open-lldp/open-lldp.mk                     | 26 ++++++++++++++++++++++
 5 files changed, 50 insertions(+)
 create mode 100644 package/open-lldp/0001-lldpad-vdptool-getline.patch
 create mode 100644 package/open-lldp/Config.in
 create mode 100644 package/open-lldp/open-lldp.hash
 create mode 100644 package/open-lldp/open-lldp.mk

diff --git a/package/Config.in b/package/Config.in
index 01f4095be5..37e1e753e3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1760,6 +1760,7 @@ endif
 	source "package/odhcp6c/Config.in"
 	source "package/odhcploc/Config.in"
 	source "package/olsr/Config.in"
+	source "package/open-lldp/Config.in"
 	source "package/open-plc-utils/Config.in"
 	source "package/openntpd/Config.in"
 	source "package/openobex/Config.in"
diff --git a/package/open-lldp/0001-lldpad-vdptool-getline.patch b/package/open-lldp/0001-lldpad-vdptool-getline.patch
new file mode 100644
index 0000000000..ac2e62ff16
--- /dev/null
+++ b/package/open-lldp/0001-lldpad-vdptool-getline.patch
@@ -0,0 +1,10 @@
+--- open-lldp-036e314/vdptool.c 2015-08-24 19:31:59.000000000 +0200
++++ open-lldp-036e314_patched/vdptool.c 2018-01-10 10:16:24.096431555 +0100
+@@ -36,6 +36,7 @@
+  * set and query VSI profile settings.
+  */
+
++#define _GNU_SOURCE
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <unistd.h>
diff --git a/package/open-lldp/Config.in b/package/open-lldp/Config.in
new file mode 100644
index 0000000000..84b24702c7
--- /dev/null
+++ b/package/open-lldp/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_OPEN_LLDP
+        bool "open-lldp"
+        select BR2_PACKAGE_LIBCONFIG
+        select BR2_PACKAGE_LIBNL
+        select BR2_PACKAGE_LIBTOOL
+        select BR2_PACKAGE_READLINE
+        help
+	  This package contains the Linux user space daemon and configuration
+	  tool for Intel LLDP Agent with Enhanced Ethernet support for the
+	  Data Center.
+
diff --git a/package/open-lldp/open-lldp.hash b/package/open-lldp/open-lldp.hash
new file mode 100644
index 0000000000..6fef5b2999
--- /dev/null
+++ b/package/open-lldp/open-lldp.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 217124f24ac57d3191ab33c53fccf5d7319e83f9029610be3c3cb71392480a2a  open-lldp-036e314.tar.gz
diff --git a/package/open-lldp/open-lldp.mk b/package/open-lldp/open-lldp.mk
new file mode 100644
index 0000000000..5a69595b4f
--- /dev/null
+++ b/package/open-lldp/open-lldp.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# open-lldp
+#
+################################################################################
+
+OPEN_LLDP_VERSION = 036e314
+OPEN_LLDP_SITE = git://open-lldp.org/open-lldp.git
+OPEN_LLDP_SITE_METHOD = git
+OPEN_LLDP_DEPENDENCIES = libconfig host-pkgconf libtool
+OPEN_LLDP_LICENSE = GPL-2.0
+OPEN_LLDP_LICENSE_FILES = README
+
+OPEN_LLDP_AUTORECONF = YES
+OPEN_LLDP_INSTALL_STAGING = YES
+
+OPEN_LLDP_CONF_OPTS = \
+        --disable-static
+
+define OPEN_LLDP_BOOTSTRAP
+        (cd $(@D) && ./bootstrap.sh)
+endef
+
+OPEN_LLDP_PRE_CONFIGURE_HOOKS += OPEN_LLDP_BOOTSTRAP
+
+$(eval $(autotools-package))
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-12 11:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-12 10:35 [Buildroot] [PATCH 1/1] Added lldpad (LLDP Agent Daemon) package Laurent Charpentier
2018-01-12 10:45 ` Yegor Yefremov
2018-01-12 10:52 ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2018-01-12 11:00 Laurent Charpentier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox