1 |
commit: bd72cd05304156a4a52c43db54eb05fa10e57e1b |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 11 18:21:35 2017 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 11 18:22:09 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd72cd05 |
7 |
|
8 |
net-misc/lldpd: Version bump to 0.9.8, add patch to whitelist getpid |
9 |
|
10 |
Gentoo-Bug: 630584 |
11 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
12 |
|
13 |
net-misc/lldpd/Manifest | 1 + |
14 |
.../files/lldpd-0.9-add-getpid-to-seccomp.patch | 12 +++ |
15 |
net-misc/lldpd/lldpd-0.9.8.ebuild | 103 +++++++++++++++++++++ |
16 |
3 files changed, 116 insertions(+) |
17 |
|
18 |
diff --git a/net-misc/lldpd/Manifest b/net-misc/lldpd/Manifest |
19 |
index 9263268f714..43f2f00ec9d 100644 |
20 |
--- a/net-misc/lldpd/Manifest |
21 |
+++ b/net-misc/lldpd/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST lldpd-0.9.3.tar.gz 1601102 SHA256 cfa8a3245dd71efc1f5de064a72576a7c1afaaf0ccb5833238398b6dc612b127 SHA512 0d40d77bfde78f9ceece56968981f3a36bd7e683b12de05e84e5da0409b8e0d06062e5d665942637a66164af0254a6ac3d1a327aab3bcb48ec91ecfdd2693283 WHIRLPOOL c7be527cf48bd5623ad9b7b3ae684a5e223114d7ff57a71a33623e3e445f6bbb612a6db5353844644c6340f039bdf7caf435b7ae19cf231ae54acf1dad72b62a |
24 |
DIST lldpd-0.9.7.tar.gz 1619527 SHA256 b9360355c30a3c06fd5c0a6e658f2ad8bf77037d5a17c6fcabf20e62882e0db8 SHA512 6b087de11b54c3f731498081680c836a28b882b7e925150d8ca3a582538f6a9c294d1e94b8e906a7cbb40e9663eedb33699eddb870c186da4d88cf3a88238ae2 WHIRLPOOL 88d8a7d8cb937602a99a8f9c01f2309890546adb1d5dc6fc86ae76b90314e9e41b78b1051547f8d38220b36ba04b4bfadf08d47c03084431d7536a6c7bf50482 |
25 |
+DIST lldpd-0.9.8.tar.gz 1620806 SHA256 9ee494e91bc33938575b2c09b26188c486ef8eac6e2155d250c189cc4e988c4f SHA512 d3822d4dbb91cd10e678aacd176c83117d8682cfaf928eab8a0363ef40ca54a6f2d88759f219d0e524da88ad6e283d3c4f33a4e5d01761c5d23b02d7ee1083d6 WHIRLPOOL d1f140a63b5b0b1a62e415d5ec442c9a9f845148c15658136b0aa22e7e22aa1d4c72b8895e29614973b39e9244a6b927a8404e6fd97d50a23738f80835f89e0f |
26 |
|
27 |
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 |
28 |
new file mode 100644 |
29 |
index 00000000000..55ed4b6f8e3 |
30 |
--- /dev/null |
31 |
+++ b/net-misc/lldpd/files/lldpd-0.9-add-getpid-to-seccomp.patch |
32 |
@@ -0,0 +1,12 @@ |
33 |
+diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c |
34 |
+index 1905236..7d911bc 100644 |
35 |
+--- a/src/daemon/priv-seccomp.c |
36 |
++++ b/src/daemon/priv-seccomp.c |
37 |
+@@ -161,6 +161,7 @@ priv_seccomp_init(int remote, int child) |
38 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendmmsg), 0)) < 0 || |
39 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(wait4), 0)) < 0 || |
40 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(stat), 0)) < 0 || |
41 |
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(getpid), 0)) < 0 || |
42 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(rt_sigreturn), 0)) < 0 || |
43 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(close), 0)) < 0 || |
44 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendto), 0)) < 0 || |
45 |
|
46 |
diff --git a/net-misc/lldpd/lldpd-0.9.8.ebuild b/net-misc/lldpd/lldpd-0.9.8.ebuild |
47 |
new file mode 100644 |
48 |
index 00000000000..1d0988803ac |
49 |
--- /dev/null |
50 |
+++ b/net-misc/lldpd/lldpd-0.9.8.ebuild |
51 |
@@ -0,0 +1,103 @@ |
52 |
+# Copyright 1999-2017 Gentoo Foundation |
53 |
+# Distributed under the terms of the GNU General Public License v2 |
54 |
+ |
55 |
+EAPI=6 |
56 |
+ |
57 |
+inherit eutils user systemd bash-completion-r1 autotools |
58 |
+ |
59 |
+DESCRIPTION="Implementation of IEEE 802.1ab (LLDP)" |
60 |
+HOMEPAGE="https://vincentbernat.github.com/lldpd/" |
61 |
+SRC_URI="http://media.luffy.cx/files/${PN}/${P}.tar.gz" |
62 |
+ |
63 |
+LICENSE="ISC" |
64 |
+SLOT="0" |
65 |
+KEYWORDS="~amd64 ~x86" |
66 |
+IUSE="cdp doc +dot1 +dot3 edp fdp graph +lldpmed old-kernel sanitizers |
67 |
+ seccomp sonmp snmp static-libs test readline xml zsh-completion" |
68 |
+ |
69 |
+RDEPEND="dev-libs/libbsd |
70 |
+ >=dev-libs/libevent-2.0.5:= |
71 |
+ snmp? ( net-analyzer/net-snmp[extensible(+)] ) |
72 |
+ xml? ( dev-libs/libxml2 ) |
73 |
+ seccomp? ( sys-libs/libseccomp ) |
74 |
+ zsh-completion? ( app-shells/zsh )" |
75 |
+DEPEND="${RDEPEND} |
76 |
+ virtual/pkgconfig |
77 |
+ doc? ( |
78 |
+ graph? ( app-doc/doxygen[dot] ) |
79 |
+ !graph? ( app-doc/doxygen ) |
80 |
+ ) |
81 |
+ test? ( dev-libs/check )" |
82 |
+ |
83 |
+REQUIRED_USE="graph? ( doc )" |
84 |
+ |
85 |
+PATCHES=( |
86 |
+ "${FILESDIR}/${PN}-0.9.5-seccomp-add-socket-ops.patch" |
87 |
+ "${FILESDIR}/${PN}-0.9-add-getpid-to-seccomp.patch" |
88 |
+) |
89 |
+ |
90 |
+pkg_setup() { |
91 |
+ ebegin "Creating lldpd user and group" |
92 |
+ enewgroup ${PN} |
93 |
+ enewuser ${PN} -1 -1 -1 ${PN} |
94 |
+ eend $? |
95 |
+} |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ default |
99 |
+ |
100 |
+ eautoreconf |
101 |
+ elibtoolize |
102 |
+} |
103 |
+ |
104 |
+src_configure() { |
105 |
+ econf \ |
106 |
+ --without-embedded-libevent \ |
107 |
+ --with-privsep-user=${PN} \ |
108 |
+ --with-privsep-group=${PN} \ |
109 |
+ --with-privsep-chroot=/run/${PN} \ |
110 |
+ --with-lldpd-ctl-socket=/run/${PN}.socket \ |
111 |
+ --with-lldpd-pid-file=/run/${PN}.pid \ |
112 |
+ --docdir=/usr/share/doc/${PF} \ |
113 |
+ $(use_enable cdp) \ |
114 |
+ $(use_enable doc doxygen-man) \ |
115 |
+ $(use_enable doc doxygen-pdf) \ |
116 |
+ $(use_enable doc doxygen-html) \ |
117 |
+ $(use_enable dot1) \ |
118 |
+ $(use_enable dot3) \ |
119 |
+ $(use_enable edp) \ |
120 |
+ $(use_enable fdp) \ |
121 |
+ $(use_enable graph doxygen-dot) \ |
122 |
+ $(use_enable lldpmed) \ |
123 |
+ $(use_enable old-kernel oldies) \ |
124 |
+ $(use_enable sonmp) \ |
125 |
+ $(use_enable static-libs static) \ |
126 |
+ $(use_with readline) \ |
127 |
+ $(use_enable sanitizers) \ |
128 |
+ $(use_with seccomp) \ |
129 |
+ $(use_with snmp) \ |
130 |
+ $(use_with xml) |
131 |
+} |
132 |
+ |
133 |
+src_compile() { |
134 |
+ emake |
135 |
+ use doc && emake doxygen-doc |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ emake DESTDIR="${D}" install |
140 |
+ prune_libtool_files |
141 |
+ |
142 |
+ newinitd "${FILESDIR}"/${PN}-initd-5 ${PN} |
143 |
+ newconfd "${FILESDIR}"/${PN}-confd-1 ${PN} |
144 |
+ newbashcomp src/client/completion/lldpcli lldpcli |
145 |
+ |
146 |
+ use doc && dodoc -r doxygen/html |
147 |
+ |
148 |
+ insinto /etc |
149 |
+ doins "${FILESDIR}/lldpd.conf" |
150 |
+ keepdir /etc/${PN}.d |
151 |
+ |
152 |
+ systemd_dounit "${FILESDIR}"/${PN}.service |
153 |
+ systemd_newtmpfilesd "${FILESDIR}"/tmpfilesd ${PN}.conf |
154 |
+} |