[packages] lldpd: update to 0.6.0, remove default/obsolete CONFIGURE_{ARGS,VARS}, use PKG_INSTALL
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32494 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
1b7c8efb40
commit
a67bc086dd
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2008-2011 OpenWrt.org
|
||||
# Copyright (C) 2008-2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -8,12 +8,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lldpd
|
||||
PKG_VERSION:=0.3
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=0.6.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.luffy.cx/lldpd/
|
||||
PKG_MD5SUM:=317e1144ec7d2781ff123ec16845a2fc
|
||||
PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd
|
||||
PKG_MD5SUM:=77279577e3b6d85a33dc0afe7c960b27
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -21,36 +24,25 @@ define Package/lldpd
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Routing and Redirection
|
||||
TITLE:=Link Layer Discovery Protocol damon
|
||||
URL:=https://trac.luffy.cx/lldpd/
|
||||
TITLE:=Link Layer Discovery Protocol daemon
|
||||
URL:=https://github.com/vincentbernat/lldpd/wiki
|
||||
DEPENDS:=+libevent2
|
||||
endef
|
||||
|
||||
define Package/lldpd/description
|
||||
LLDP (Link Layer Discovery Protocol) is an industry standard protocol designed
|
||||
to supplant proprietary Link-Layer protocols such as
|
||||
Extreme's EDP (Extreme Discovery Protocol) and
|
||||
CDP (Cisco Discovery Protocol).
|
||||
The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver
|
||||
Link-Layer notifications to adjacent network devices.
|
||||
LLDP (Link Layer Discovery Protocol) is an industry standard protocol designed
|
||||
to supplant proprietary Link-Layer protocols such as
|
||||
Extreme's EDP (Extreme Discovery Protocol) and
|
||||
CDP (Cisco Discovery Protocol).
|
||||
The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver
|
||||
Link-Layer notifications to adjacent network devices.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-cdp \
|
||||
--enable-fdp \
|
||||
--enable-edp \
|
||||
--enable-lldpmed \
|
||||
--enable-dot1 \
|
||||
--enable-dot3 \
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
ac_cv_lib_nl_nl_connect=no
|
||||
|
||||
define Package/lldpd/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lldpd $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lldpctl $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lldp{ctl,d} $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd
|
||||
$(INSTALL_DATA) ./files/lldpd.config $(1)/etc/config/lldpd
|
||||
endef
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2008-2011 OpenWrt.org
|
||||
# Copyright (C) 2008-2012 OpenWrt.org
|
||||
|
||||
START=90
|
||||
|
||||
@ -27,8 +27,12 @@ start() {
|
||||
[ $enable_edp -gt 0 ] && append args '-e'
|
||||
|
||||
service_start /usr/sbin/lldpd $args \
|
||||
${lldp_location:+ -L "$lldp_location"} \
|
||||
${lldp_class:+ -M $lldp_class}
|
||||
|
||||
[ -n "$lldp_location" ] && {
|
||||
sleep 1
|
||||
/usr/sbin/lldpctl -L "$lldp_location" > /dev/null 2>&1
|
||||
}
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
diff -urb lldpd-0.3.orig/src/priv.c lldpd-0.3/src/priv.c
|
||||
--- lldpd-0.3.orig/src/priv.c 2008-12-30 07:35:28.000000000 +0100
|
||||
+++ lldpd-0.3/src/priv.c 2008-12-30 07:40:55.000000000 +0100
|
||||
@@ -522,12 +522,14 @@
|
||||
--- a/src/priv.c
|
||||
+++ b/src/priv.c
|
||||
@@ -518,12 +518,14 @@ priv_init(char *chrootdir)
|
||||
fatal("[priv]: unable to create socket pair for privilege separation");
|
||||
|
||||
/* Get users */
|
||||
@ -16,26 +15,26 @@ diff -urb lldpd-0.3.orig/src/priv.c lldpd-0.3/src/priv.c
|
||||
|
||||
/* Spawn off monitor */
|
||||
if ((monitored = fork()) < 0)
|
||||
@@ -535,17 +537,17 @@
|
||||
switch (monitored) {
|
||||
case 0:
|
||||
/* We are in the children, drop privileges */
|
||||
- if (chroot(chrootdir) == -1)
|
||||
- fatal("[priv]: unable to chroot");
|
||||
- if (chdir("/") != 0)
|
||||
+ /*if (chroot(chrootdir) == -1)
|
||||
+ fatal("[priv]: unable to chroot");*/
|
||||
+ if (chdir("/tmp") != 0)
|
||||
fatal("[priv]: unable to chdir");
|
||||
gidset[0] = gid;
|
||||
- if (setresgid(gid, gid, gid) == -1)
|
||||
+ /*if (setresgid(gid, gid, gid) == -1)
|
||||
fatal("[priv]: setresgid() failed");
|
||||
if (setgroups(1, gidset) == -1)
|
||||
fatal("[priv]: setgroups() failed");
|
||||
if (setresuid(uid, uid, uid) == -1)
|
||||
- fatal("[priv]: setresuid() failed");
|
||||
+ fatal("[priv]: setresuid() failed");*/
|
||||
@@ -534,17 +536,17 @@ priv_init(char *chrootdir)
|
||||
if (RUNNING_ON_VALGRIND)
|
||||
LLOG_WARNX("[priv]: running on valgrind, keep privileges");
|
||||
else {
|
||||
- if (chroot(chrootdir) == -1)
|
||||
- fatal("[priv]: unable to chroot");
|
||||
- if (chdir("/") != 0)
|
||||
+ /*if (chroot(chrootdir) == -1)
|
||||
+ fatal("[priv]: unable to chroot");*/
|
||||
+ if (chdir("/tmp") != 0)
|
||||
fatal("[priv]: unable to chdir");
|
||||
gidset[0] = gid;
|
||||
- if (setresgid(gid, gid, gid) == -1)
|
||||
+ /*if (setresgid(gid, gid, gid) == -1)
|
||||
fatal("[priv]: setresgid() failed");
|
||||
if (setgroups(1, gidset) == -1)
|
||||
fatal("[priv]: setgroups() failed");
|
||||
if (setresuid(uid, uid, uid) == -1)
|
||||
- fatal("[priv]: setresuid() failed");
|
||||
+ fatal("[priv]: setresuid() failed");*/
|
||||
}
|
||||
remote = pair[0];
|
||||
close(pair[1]);
|
||||
priv_ping();
|
||||
|
10
net/lldpd/patches/002-no-stack-protector.patch
Normal file
10
net/lldpd/patches/002-no-stack-protector.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -48,7 +48,6 @@ AX_CFLAGS_GCC_OPTION([-Wformat])
|
||||
AX_CFLAGS_GCC_OPTION([-Wformat-security])
|
||||
AX_CFLAGS_GCC_OPTION([-Wcast-align])
|
||||
AX_CFLAGS_GCC_OPTION([-Winline])
|
||||
-AX_CFLAGS_GCC_OPTION([-fstack-protector])
|
||||
AX_CFLAGS_GCC_OPTION([-D_FORTIFY_SOURCE=2])
|
||||
AX_CFLAGS_GCC_OPTION([-Wdeclaration-after-statement])
|
||||
AX_CFLAGS_GCC_OPTION([-Wno-unused-parameter])
|
Loading…
x
Reference in New Issue
Block a user