summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/lldpd/Manifest1
-rw-r--r--net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch12
-rw-r--r--net-misc/lldpd/lldpd-0.9.8.ebuild103
3 files changed, 116 insertions, 0 deletions
diff --git a/net-misc/lldpd/Manifest b/net-misc/lldpd/Manifest
index 9263268f7145..43f2f00ec9dd 100644
--- a/net-misc/lldpd/Manifest
+++ b/net-misc/lldpd/Manifest
@@ -1,2 +1,3 @@
DIST lldpd-0.9.3.tar.gz 1601102 SHA256 cfa8a3245dd71efc1f5de064a72576a7c1afaaf0ccb5833238398b6dc612b127 SHA512 0d40d77bfde78f9ceece56968981f3a36bd7e683b12de05e84e5da0409b8e0d06062e5d665942637a66164af0254a6ac3d1a327aab3bcb48ec91ecfdd2693283 WHIRLPOOL c7be527cf48bd5623ad9b7b3ae684a5e223114d7ff57a71a33623e3e445f6bbb612a6db5353844644c6340f039bdf7caf435b7ae19cf231ae54acf1dad72b62a
DIST lldpd-0.9.7.tar.gz 1619527 SHA256 b9360355c30a3c06fd5c0a6e658f2ad8bf77037d5a17c6fcabf20e62882e0db8 SHA512 6b087de11b54c3f731498081680c836a28b882b7e925150d8ca3a582538f6a9c294d1e94b8e906a7cbb40e9663eedb33699eddb870c186da4d88cf3a88238ae2 WHIRLPOOL 88d8a7d8cb937602a99a8f9c01f2309890546adb1d5dc6fc86ae76b90314e9e41b78b1051547f8d38220b36ba04b4bfadf08d47c03084431d7536a6c7bf50482
+DIST lldpd-0.9.8.tar.gz 1620806 SHA256 9ee494e91bc33938575b2c09b26188c486ef8eac6e2155d250c189cc4e988c4f SHA512 d3822d4dbb91cd10e678aacd176c83117d8682cfaf928eab8a0363ef40ca54a6f2d88759f219d0e524da88ad6e283d3c4f33a4e5d01761c5d23b02d7ee1083d6 WHIRLPOOL d1f140a63b5b0b1a62e415d5ec442c9a9f845148c15658136b0aa22e7e22aa1d4c72b8895e29614973b39e9244a6b927a8404e6fd97d50a23738f80835f89e0f
diff --git a/net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch b/net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch
new file mode 100644
index 000000000000..55ed4b6f8e38
--- /dev/null
+++ b/net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch
@@ -0,0 +1,12 @@
+diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c
+index 1905236..7d911bc 100644
+--- a/src/daemon/priv-seccomp.c
++++ b/src/daemon/priv-seccomp.c
+@@ -161,6 +161,7 @@ priv_seccomp_init(int remote, int child)
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendmmsg), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(wait4), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(stat), 0)) < 0 ||
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(getpid), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(rt_sigreturn), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(close), 0)) < 0 ||
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendto), 0)) < 0 ||
diff --git a/net-misc/lldpd/lldpd-0.9.8.ebuild b/net-misc/lldpd/lldpd-0.9.8.ebuild
new file mode 100644
index 000000000000..1d0988803acf
--- /dev/null
+++ b/net-misc/lldpd/lldpd-0.9.8.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils user systemd bash-completion-r1 autotools
+
+DESCRIPTION="Implementation of IEEE 802.1ab (LLDP)"
+HOMEPAGE="https://vincentbernat.github.com/lldpd/"
+SRC_URI="http://media.luffy.cx/files/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cdp doc +dot1 +dot3 edp fdp graph +lldpmed old-kernel sanitizers
+ seccomp sonmp snmp static-libs test readline xml zsh-completion"
+
+RDEPEND="dev-libs/libbsd
+ >=dev-libs/libevent-2.0.5:=
+ snmp? ( net-analyzer/net-snmp[extensible(+)] )
+ xml? ( dev-libs/libxml2 )
+ seccomp? ( sys-libs/libseccomp )
+ zsh-completion? ( app-shells/zsh )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ graph? ( app-doc/doxygen[dot] )
+ !graph? ( app-doc/doxygen )
+ )
+ test? ( dev-libs/check )"
+
+REQUIRED_USE="graph? ( doc )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.9.5-seccomp-add-socket-ops.patch"
+ "${FILESDIR}/${PN}-0.9-add-getpid-to-seccomp.patch"
+)
+
+pkg_setup() {
+ ebegin "Creating lldpd user and group"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+ eend $?
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --without-embedded-libevent \
+ --with-privsep-user=${PN} \
+ --with-privsep-group=${PN} \
+ --with-privsep-chroot=/run/${PN} \
+ --with-lldpd-ctl-socket=/run/${PN}.socket \
+ --with-lldpd-pid-file=/run/${PN}.pid \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable cdp) \
+ $(use_enable doc doxygen-man) \
+ $(use_enable doc doxygen-pdf) \
+ $(use_enable doc doxygen-html) \
+ $(use_enable dot1) \
+ $(use_enable dot3) \
+ $(use_enable edp) \
+ $(use_enable fdp) \
+ $(use_enable graph doxygen-dot) \
+ $(use_enable lldpmed) \
+ $(use_enable old-kernel oldies) \
+ $(use_enable sonmp) \
+ $(use_enable static-libs static) \
+ $(use_with readline) \
+ $(use_enable sanitizers) \
+ $(use_with seccomp) \
+ $(use_with snmp) \
+ $(use_with xml)
+}
+
+src_compile() {
+ emake
+ use doc && emake doxygen-doc
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+
+ newinitd "${FILESDIR}"/${PN}-initd-5 ${PN}
+ newconfd "${FILESDIR}"/${PN}-confd-1 ${PN}
+ newbashcomp src/client/completion/lldpcli lldpcli
+
+ use doc && dodoc -r doxygen/html
+
+ insinto /etc
+ doins "${FILESDIR}/lldpd.conf"
+ keepdir /etc/${PN}.d
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/tmpfilesd ${PN}.conf
+}