Skip to contentSkip to conversation

open-lldp: new package

PATCH Superseded Laurent Charpentier 2 participants 3 messages Jan 15, 2018

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 open-lldp: new package

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/

---
 DEVELOPERS                                         |  3 +++
 package/Config.in                                  |  1 +
 .../open-lldp/0001-lldpad-vdptool-getline.patch    | 10 +++++++++
 package/open-lldp/Config.in                        | 12 +++++++++++
 package/open-lldp/open-lldp.hash                   |  2 ++
 package/open-lldp/open-lldp.mk                     | 25 ++++++++++++++++++++++
 6 files changed, 53 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
DEVELOPERS +3 -0
index bbe9d405c1..56dae14fb1 100644
@@ -929,6 +929,9 @@ F:	package/qt5/
 N:	Julien Floret <[email protected]>
 F:	package/lldpd/
 
+N:	Laurent Charpentier <[email protected]>
+F:	package/open-lldp/
+
 N:	Julien Viard de Galbert <[email protected]>
 F:	package/dieharder/
 F:	package/easy-rsa/
package/Config.in +1 -0
index 01f4095be5..37e1e753e3 100644
@@ -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"
package/open-lldp/0001-lldpad-vdptool-getline.patch new file +10 -0
new file mode 100644
index 0000000000..ac2e62ff16
@@ -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>
package/open-lldp/Config.in new file +12 -0
new file mode 100644
index 0000000000..79eefee71b
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_OPEN_LLDP
+	bool "open-lldp"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libnl
+	select BR2_PACKAGE_LIBCONFIG
+	select BR2_PACKAGE_LIBNL
+	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.
+
+	  http://open-lldp.org/
package/open-lldp/open-lldp.hash new file +2 -0
new file mode 100644
index 0000000000..6fef5b2999
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 217124f24ac57d3191ab33c53fccf5d7319e83f9029610be3c3cb71392480a2a  open-lldp-036e314.tar.gz
package/open-lldp/open-lldp.mk new file +25 -0
new file mode 100644
index 0000000000..d062b6795b
@@ -0,0 +1,25 @@
+################################################################################
+#
+# open-lldp
+#
+################################################################################
+
+OPEN_LLDP_VERSION = 036e314bd93602f7388262cc37faf8b626980af1
+OPEN_LLDP_SITE = git://open-lldp.org/open-lldp.git
+OPEN_LLDP_SITE_METHOD = git
+OPEN_LLDP_DEPENDENCIES = readline libnl libconfig
+OPEN_LLDP_LICENSE = GPL-2.0
+OPEN_LLDP_LICENSE_FILES = COPYING
+
+# Fetching from git, need to generate configure/Makefile.in
+OPEN_LLDP_AUTORECONF = YES
+
+# Run the bootstrap.sh command.
+# (from the 'lldpad Application Install' section of the README file)
+define OPEN_LLDP_BOOTSTRAP
+	(cd $(@D) && ./bootstrap.sh)
+endef
+
+OPEN_LLDP_PRE_CONFIGURE_HOOKS += OPEN_LLDP_BOOTSTRAP
+
+$(eval $(autotools-package))
Signature · 1 line
2.14.3
#1 lore raw

PATCH v2 2/2 open-lldp: new package

- Removed call to bootstrap.sh. However the m4 directory needs to be created for autoconf.
- Added hash for COPYING.
- Fixed gcc compile errors (inline functions).

---
 .../open-lldp/0001-lldpad-vdptool-getline.patch    | 10 ---
 ...1-vdptool-fixed-compile-error-for-getline.patch | 27 ++++++++
 ...-functions-work-with-both-gnu11-and-gnu89.patch | 73 ++++++++++++++++++++++
 package/open-lldp/open-lldp.hash                   |  4 +-
 package/open-lldp/open-lldp.mk                     |  7 +--
 5 files changed, 106 insertions(+), 15 deletions(-)
 delete mode 100644 package/open-lldp/0001-lldpad-vdptool-getline.patch
 create mode 100644 package/open-lldp/0001-vdptool-fixed-compile-error-for-getline.patch
 create mode 100644 package/open-lldp/0002-get-inline-functions-work-with-both-gnu11-and-gnu89.patch
package/open-lldp/0001-lldpad-vdptool-getline.patch deleted +0 -10
deleted file mode 100644
index ac2e62ff16..0000000000
@@ -1,10 +0,0 @@
---- 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>
package/open-lldp/0001-vdptool-fixed-compile-error-for-getline.patch new file +27 -0
new file mode 100644
index 0000000000..c20267786e
@@ -0,0 +1,27 @@
+From 3c7887bb8a61a3b49a2989329c756a038023c544 Mon Sep 17 00:00:00 2001
+From: Laurent Charpentier <[email protected]>
+Date: Fri, 12 Jan 2018 12:25:41 +0100
+Subject: [PATCH] vdptool: fixed compile error for getline()
+
+vdptool.c was generating an error: implicit declaration for the getline() function.
+
+Signed-off-by: Laurent Charpentier <[email protected]>
+---
+ vdptool.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/vdptool.c b/vdptool.c
+index b805372..4930f6a 100644
+--- a/vdptool.c
++++ b/vdptool.c
+@@ -36,6 +36,7 @@
+  * set and query VSI profile settings.
+  */
+ 
++#define _GNU_SOURCE
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-- 
+2.14.3
+
package/open-lldp/0002-get-inline-functions-work-with-both-gnu11-and-gnu89.patch new file +73 -0

73 lines not on this page · raw message

package/open-lldp/open-lldp.hash +3 -1
index 6fef5b2999..623d354aed 100644
@@ -1,2 +1,4 @@
 # Locally computed
-sha256 217124f24ac57d3191ab33c53fccf5d7319e83f9029610be3c3cb71392480a2a  open-lldp-036e314.tar.gz
+sha256 f2c8a3307970374b01ad832ea18cf6d9abce6f00b3d8aed9305aa1428ad8252d  open-lldp-036e314bd93602f7388262cc37faf8b626980af1.tar.gz
+# Locally computed
+sha256 67af5abeb092213cd9c53781503320f635ba28b641e0c3f24d367e8e93a9839b  COPYING
package/open-lldp/open-lldp.mk +3 -4
index d062b6795b..76dda52085 100644
@@ -6,7 +6,6 @@
 
 OPEN_LLDP_VERSION = 036e314bd93602f7388262cc37faf8b626980af1
 OPEN_LLDP_SITE = git://open-lldp.org/open-lldp.git
-OPEN_LLDP_SITE_METHOD = git
 OPEN_LLDP_DEPENDENCIES = readline libnl libconfig
 OPEN_LLDP_LICENSE = GPL-2.0
 OPEN_LLDP_LICENSE_FILES = COPYING
@@ -14,10 +13,10 @@ OPEN_LLDP_LICENSE_FILES = COPYING
 # Fetching from git, need to generate configure/Makefile.in
 OPEN_LLDP_AUTORECONF = YES
 
-# Run the bootstrap.sh command.
-# (from the 'lldpad Application Install' section of the README file)
+# Create the m4 directory (missing from the archive).
+# This is required for autoconf.
 define OPEN_LLDP_BOOTSTRAP
-	(cd $(@D) && ./bootstrap.sh)
+	mkdir -p $(@D)/m4
 endef
 
 OPEN_LLDP_PRE_CONFIGURE_HOOKS += OPEN_LLDP_BOOTSTRAP
Signature · 1 line
2.14.3
#2 lore raw

PATCH v2 2/2 open-lldp: new package

Hello,

Thanks for this new iteration, things are getting better!

Quoted 5 lines · Laurent Charpentier

- Removed call to bootstrap.sh. However the m4 directory needs to be created for autoconf.
- Added hash for COPYING.
- Fixed gcc compile errors (inline functions).

You shouldn't have two patches, but just one. Please use "git rebase -i" to squash your two patches into one.

Thanks!

Thomas

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