Skip to contentSkip to conversation

lldpd: Update to version 1.0.1

PATCH New Trent Piepho 2 participants 2 messages Nov 22, 2018 – Nov 23, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lldpd: Update to version 1.0.1

Drop patches for atom glue and remove CXX compiler check as they are applied upstream.

Replace patch to disable libbsd with upstream patch to accomplish the same thing using --without-libbsd.

Enable support for readline when that package is enabled.

Enable lldpd's systemd unit file.

---
 ...ity-to-disable-libbsd-with-without-libbsd.patch | 104 +++++++++++++++++++++
 ...generation-of-atom-glue-compatible-with-o.patch |  43 ---------
 .../0002-configure-do-not-check-for-libbsd.patch   |  61 ------------
 ...03-configure-remove-check-on-CXX-compiler.patch |  35 -------
 package/lldpd/lldpd.hash                           |   2 +-
 package/lldpd/lldpd.mk                             |  11 ++-
 6 files changed, 114 insertions(+), 142 deletions(-)
 create mode 100644 package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch
 delete mode 100644 package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch
 delete mode 100644 package/lldpd/0002-configure-do-not-check-for-libbsd.patch
 delete mode 100644 package/lldpd/0003-configure-remove-check-on-CXX-compiler.patch
package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch new file +104 -0
new file mode 100644
index 0000000000..ad1085bf05
@@ -0,0 +1,104 @@
+From ff3dcc4ad71c1105bd8ea11afe7e07efd48c038d Mon Sep 17 00:00:00 2001
+From: Vincent Bernat <[email protected]>
+Date: Tue, 25 Sep 2018 10:57:49 +0200
+Subject: [PATCH] build: ability to disable libbsd with --without-libbsd
+
+This is useful when user wants to ensure reproducibility of the build
+whatever libbsd is present or not.
+---
+ configure.ac  | 59 +++++++++++++++++++++++++++++++++++++++--------------------
+ src/marshal.h |  1 +
+ 2 files changed, 40 insertions(+), 20 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9b40473..589cd96 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -173,26 +173,44 @@ AC_FUNC_REALLOC
+ AC_FUNC_FORK
+ 
+ # Some functions can be in libbsd
+-PKG_CHECK_MODULES([libbsd], [libbsd-overlay], [
+-  _save_CFLAGS="$CFLAGS"
+-  _save_LIBS="$LIBS"
+-  CFLAGS="$CFLAGS $libbsd_CFLAGS"
+-  LIBS="$LIBS $libbsd_LIBS"
+-  AC_MSG_CHECKING([if libbsd can be linked correctly])
+-  AC_TRY_LINK([
+-@%:@include <sys/time.h>
+-@%:@include <sys/types.h>
+-],[],
+-    [
+-      AC_MSG_RESULT(yes)
+-      LLDP_CFLAGS="$LLDP_CFLAGS $libbsd_CFLAGS"
+-      LLDP_LDFLAGS="$LLDP_LDFLAGS $libbsd_LIBS"
+-    ],[
+-      AC_MSG_RESULT(no)
+-      CFLAGS="$_save_CFLAGS"
+-      LIBS="$_save_LIBS"
+-    ])
+-], [:])
++AC_ARG_WITH([libbsd],
++  AS_HELP_STRING(
++    [--with-libbsd],
++    [Use libbsd @<:@default=auto@:>@]),
++  [],
++  [with_libbsd=auto])
++if test x"$with_libbsd" != x"no"; then
++  PKG_CHECK_MODULES([libbsd], [libbsd-overlay], [
++    _save_CFLAGS="$CFLAGS"
++    _save_LIBS="$LIBS"
++    CFLAGS="$CFLAGS $libbsd_CFLAGS"
++    LIBS="$LIBS $libbsd_LIBS"
++    AC_MSG_CHECKING([if libbsd can be linked correctly])
++    AC_TRY_LINK([
++  @%:@include <sys/time.h>
++  @%:@include <sys/types.h>
++  ],[],
++      [
++        AC_MSG_RESULT(yes)
++        LLDP_CFLAGS="$LLDP_CFLAGS $libbsd_CFLAGS"
++        LLDP_LDFLAGS="$LLDP_LDFLAGS $libbsd_LIBS"
++        with_libbsd=yes
++      ],[
++        AC_MSG_RESULT(no)
++        CFLAGS="$_save_CFLAGS"
++        LIBS="$_save_LIBS"
++        if test x"$with_libbsd" = x"yes"; then
++           AC_MSG_FAILURE([*** no libbsd support found])
++        fi
++        with_libbsd=no
++      ])
++  ], [
++    if test x"$with_libbsd" = x"yes"; then
++       AC_MSG_FAILURE([*** no libbsd support found])
++    fi
++    with_libbsd=no
++  ])
++fi
+ 
+ # setproctitle may have an _init function
+ AC_REPLACE_FUNCS([setproctitle])
+@@ -412,6 +430,7 @@ cat <<EOF
+   XML output.....: ${with_xml-no}
+   Oldies support.: $enable_oldies
+   seccomp........: ${with_seccomp-no}
++  libbsd.........: ${with_libbsd-no}
+ 
+  Privilege separation:
+   Enabled........: $enable_privsep
+diff --git a/src/marshal.h b/src/marshal.h
+index b0e8032..0a782d5 100644
+--- a/src/marshal.h
++++ b/src/marshal.h
+@@ -19,6 +19,7 @@
+ #define _MARSHAL_H
+ 
+ #include <stddef.h>
++#include <stdint.h>
+ #include <sys/types.h>
+ 
+ struct marshal_info;
+-- 
+2.14.4
+
package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch deleted +0 -43

43 lines not on this page · raw message

package/lldpd/0002-configure-do-not-check-for-libbsd.patch deleted +0 -61

61 lines not on this page · raw message

package/lldpd/0003-configure-remove-check-on-CXX-compiler.patch deleted +0 -35
deleted file mode 100644
index 880f603f71..0000000000
@@ -1,35 +0,0 @@
-From d28b3bfa1b224f7770004dddf4dfaf10ad7ad6c9 Mon Sep 17 00:00:00 2001
-From: Damien Riegel <[email protected]>
-Date: Mon, 18 Dec 2017 14:37:08 -0500
-Subject: [PATCH] configure: remove check on CXX compiler
-
-lldpd fails to build if the toolchain doesn't have a C++ compiler
-because configure fails with the following error:
-
-  checking how to run the C++ preprocessor... /lib/cpp
-  configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
-  configure: error: C++ preprocessor "/lib/cpp" fails sanity check
-
-Since "8d92800b: build: cleaner way to not alter CFLAGS/CPPFLAGS/LDFLAGS",
-it seems that the dependency on C++ is not required anymore, so there
-is no reason to keep this restriction. Dropping AC_PROG_CXX allows to
-build with a toolchain that doesn't have C++ just fine.
----
- configure.ac | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0edceb1..5afe8f2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -48,7 +48,6 @@ AC_PROG_CC_C99
- if test x"$ac_cv_prog_cc_c99" = x"no"; then
-   AC_MSG_FAILURE([*** C99 support is mandatory])
- fi
--AC_PROG_CXX
- AM_PROG_CC_C_O
- AC_PROG_LIBTOOL
- AC_PROG_LN_S
--- 
-2.15.1
-
package/lldpd/lldpd.hash +1 -1
index fc3d21f487..1785197737 100644
@@ -1,2 +1,2 @@
 # Locally computed
-sha256 eb1f5beff2ff5c13c5e0342b5b9da815ed4a63866262445e1168a79ee65c9079  lldpd-0.9.4.tar.gz
+sha256 450b622aac7ae1758f1ef82f3b7b94ec47f2ff33abfb0e6ac82555b9ee55f151  lldpd-1.0.1.tar.gz
package/lldpd/lldpd.mk +9 -2
index 2bdda0213e..939cd128fa 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LLDPD_VERSION = 0.9.4
+LLDPD_VERSION = 1.0.1
 LLDPD_SITE = http://media.luffy.cx/files/lldpd
 LLDPD_DEPENDENCIES = host-pkgconf libevent
 LLDPD_LICENSE = ISC
@@ -28,14 +28,15 @@ endif
 LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
 
 LLDPD_CONF_OPTS = \
-	--without-readline \
 	--without-embedded-libevent \
 	--without-snmp \
 	--without-xml \
 	--without-json \
 	--without-seccomp \
+	--without-libbsd \
 	--disable-hardening \
 	--disable-privsep \
+	$(if $(BR2_PACKAGE_READLINE),--with-readline,--without-readline) \
 	$(if $(BR2_PACKAGE_LLDPD_CDP),--enable-cdp,--disable-cdp) \
 	$(if $(BR2_PACKAGE_LLDPD_FDP),--enable-fdp,--disable-fdp) \
 	$(if $(BR2_PACKAGE_LLDPD_EDP),--enable-edp,--disable-edp) \
@@ -50,4 +51,10 @@ define LLDPD_INSTALL_INIT_SYSV
 		$(TARGET_DIR)/etc/init.d/S60lldpd
 endef
 
+define LLDPD_INSTALL_INIT_SYSTEMD
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -sf ../../../../usr/lib/systemd/system/lldpd.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lldpd.service
+endef
+
 $(eval $(autotools-package))
Signature · 1 line
2.14.4
#1 lore raw

PATCH 1/1 lldpd: Update to version 1.0.1

Hello,

Quoted 11 lines · Trent Piepho

Drop patches for atom glue and remove CXX compiler check as they are applied upstream.

Replace patch to disable libbsd with upstream patch to accomplish the same thing using --without-libbsd.

Enable support for readline when that package is enabled.

Enable lldpd's systemd unit file.

Quoted 12 lines
---
 ...ity-to-disable-libbsd-with-without-libbsd.patch | 104 +++++++++++++++++++++
 ...generation-of-atom-glue-compatible-with-o.patch |  43 ---------
 .../0002-configure-do-not-check-for-libbsd.patch   |  61 ------------
 ...03-configure-remove-check-on-CXX-compiler.patch |  35 -------
 package/lldpd/lldpd.hash                           |   2 +-
 package/lldpd/lldpd.mk                             |  11 ++-
 6 files changed, 114 insertions(+), 142 deletions(-)
 create mode 100644 package/lldpd/0001-build-ability-to-disable-libbsd-with-without-libbsd.patch
 delete mode 100644 package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch
 delete mode 100644 package/lldpd/0002-configure-do-not-check-for-libbsd.patch
 delete mode 100644 package/lldpd/0003-configure-remove-check-on-CXX-compiler.patch

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com