1 |
commit: 668e273da4478211bc826d68b43ff56d67d36109 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 2 22:42:48 2016 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 2 22:42:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=668e273d |
7 |
|
8 |
net-misc/lldpd: Version bump to 0.9.5 |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
net-misc/lldpd/Manifest | 1 + |
13 |
.../files/lldpd-0.9.5-seccomp-add-mprotect.patch | 12 +++ |
14 |
net-misc/lldpd/lldpd-0.9.5.ebuild | 105 +++++++++++++++++++++ |
15 |
3 files changed, 118 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/lldpd/Manifest b/net-misc/lldpd/Manifest |
18 |
index d0703ec..003cb86 100644 |
19 |
--- a/net-misc/lldpd/Manifest |
20 |
+++ b/net-misc/lldpd/Manifest |
21 |
@@ -3,3 +3,4 @@ DIST lldpd-0.7.13.tar.gz 1523864 SHA256 bbba3ef922f6b6cc6d2c0f008066dc8827505576 |
22 |
DIST lldpd-0.9.1.tar.gz 1600504 SHA256 16ad6d513a6a0c6c201ce4941693c0e9d6fce83bbfa3733620354d1ac9a60908 SHA512 3a6ea3051ceac689a65045c06dac4f788071291f6ab826286de54175cad48143daadb13f44a2d7ff8a97269ec7c1bf9dc337d929b8cbf256fe135d33f965b3ad WHIRLPOOL b71310da3e7626893fb00b8fc5553c80bb4dbabdabe9cabe028cb72767cfe2f0a46a6c3d09c15fc7cb1b7379b73a8eb9a9e6683ace25492f76a032834db13ce0 |
23 |
DIST lldpd-0.9.3.tar.gz 1601102 SHA256 cfa8a3245dd71efc1f5de064a72576a7c1afaaf0ccb5833238398b6dc612b127 SHA512 0d40d77bfde78f9ceece56968981f3a36bd7e683b12de05e84e5da0409b8e0d06062e5d665942637a66164af0254a6ac3d1a327aab3bcb48ec91ecfdd2693283 WHIRLPOOL c7be527cf48bd5623ad9b7b3ae684a5e223114d7ff57a71a33623e3e445f6bbb612a6db5353844644c6340f039bdf7caf435b7ae19cf231ae54acf1dad72b62a |
24 |
DIST lldpd-0.9.4.tar.gz 1604103 SHA256 eb1f5beff2ff5c13c5e0342b5b9da815ed4a63866262445e1168a79ee65c9079 SHA512 c9313d94044da1bd760f63a60c8215f69742d5e91ef3d43427571870e04254e9c251e40f69861f9bc27828f6905919582d965b6c796c4febbf4b1b2f87e91b9c WHIRLPOOL 8306400224a4a9726f08d79004fe1f82675ceddbafb53f4e40fc538e2eed0d63028a9e0fd5ca00918ce008f131b2a8cf3f50a396eafd820dbc8e05ac43d0422d |
25 |
+DIST lldpd-0.9.5.tar.gz 1614052 SHA256 e9585c52f14808f03f6b6c3a9163c95b542a47b18abe002992b155d143a1a247 SHA512 ca1a0d07bab50e3d697bfe4e6d00a150b17255de5a4a4a9ec8b7d45b2b03ce70a2bfb3452562ffdc3e7542a854cb30e6412d5a3eb919ad9e8b1064fde1b344df WHIRLPOOL 6a8e31a180488f0f2c6bf9272ecdaa7acf4e7b325ef5aad63d52685a239dd60295ddce33941af778891c3112721ee5e45cc5bcb9b98caee14ffee04ea847eef6 |
26 |
|
27 |
diff --git a/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-mprotect.patch b/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-mprotect.patch |
28 |
new file mode 100644 |
29 |
index 00000000..dbb4c79 |
30 |
--- /dev/null |
31 |
+++ b/net-misc/lldpd/files/lldpd-0.9.5-seccomp-add-mprotect.patch |
32 |
@@ -0,0 +1,12 @@ |
33 |
+diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c |
34 |
+index 4f9e6e6..97f4233 100644 |
35 |
+--- a/src/daemon/priv-seccomp.c |
36 |
++++ b/src/daemon/priv-seccomp.c |
37 |
+@@ -166,6 +166,7 @@ priv_seccomp_init(int remote, int child) |
38 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(poll), 0)) < 0 || |
39 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(recvmsg), 0)) < 0 || |
40 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(readv), 0)) < 0 || |
41 |
++ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mprotect), 0)) < 0 || |
42 |
+ /* The following are for resolving addresses */ |
43 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap), 0)) < 0 || |
44 |
+ (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(munmap), 0)) < 0 || |
45 |
|
46 |
diff --git a/net-misc/lldpd/lldpd-0.9.5.ebuild b/net-misc/lldpd/lldpd-0.9.5.ebuild |
47 |
new file mode 100644 |
48 |
index 00000000..27c5d99 |
49 |
--- /dev/null |
50 |
+++ b/net-misc/lldpd/lldpd-0.9.5.ebuild |
51 |
@@ -0,0 +1,105 @@ |
52 |
+# Copyright 1999-2016 Gentoo Foundation |
53 |
+# Distributed under the terms of the GNU General Public License v2 |
54 |
+# $Id$ |
55 |
+ |
56 |
+EAPI=6 |
57 |
+ |
58 |
+inherit eutils user systemd bash-completion-r1 autotools |
59 |
+ |
60 |
+DESCRIPTION="Implementation of IEEE 802.1ab (LLDP)" |
61 |
+HOMEPAGE="https://vincentbernat.github.com/lldpd/" |
62 |
+SRC_URI="http://media.luffy.cx/files/${PN}/${P}.tar.gz" |
63 |
+ |
64 |
+LICENSE="ISC" |
65 |
+SLOT="0" |
66 |
+KEYWORDS="~amd64 ~x86" |
67 |
+IUSE="cdp doc +dot1 +dot3 edp fdp graph jansson +lldpmed old-kernel |
68 |
+ sanitizers seccomp sonmp snmp static-libs readline xml zsh-completion" |
69 |
+ |
70 |
+RDEPEND="dev-libs/libbsd |
71 |
+ >=dev-libs/libevent-2.0.5 |
72 |
+ snmp? ( net-analyzer/net-snmp[extensible(+)] ) |
73 |
+ xml? ( dev-libs/libxml2 ) |
74 |
+ jansson? ( dev-libs/jansson ) |
75 |
+ seccomp? ( sys-libs/libseccomp ) |
76 |
+ zsh-completion? ( app-shells/zsh )" |
77 |
+DEPEND="${RDEPEND} |
78 |
+ virtual/pkgconfig |
79 |
+ doc? ( |
80 |
+ graph? ( app-doc/doxygen[dot] ) |
81 |
+ !graph? ( app-doc/doxygen ) |
82 |
+ )" |
83 |
+ |
84 |
+REQUIRED_USE="graph? ( doc )" |
85 |
+ |
86 |
+PATCHES=( |
87 |
+ "${FILESDIR}/${PN}-0.7.11-zsh-completion-dir.patch" |
88 |
+ "${FILESDIR}/${P}-seccomp-add-mprotect.patch" |
89 |
+) |
90 |
+ |
91 |
+pkg_setup() { |
92 |
+ ebegin "Creating lldpd user and group" |
93 |
+ enewgroup ${PN} |
94 |
+ enewuser ${PN} -1 -1 -1 ${PN} |
95 |
+ eend $? |
96 |
+} |
97 |
+ |
98 |
+src_prepare() { |
99 |
+ default |
100 |
+ |
101 |
+ eautoreconf |
102 |
+ elibtoolize |
103 |
+} |
104 |
+ |
105 |
+src_configure() { |
106 |
+ econf \ |
107 |
+ --without-embedded-libevent \ |
108 |
+ --with-privsep-user=${PN} \ |
109 |
+ --with-privsep-group=${PN} \ |
110 |
+ --with-privsep-chroot=/run/${PN} \ |
111 |
+ --with-lldpd-ctl-socket=/run/${PN}.socket \ |
112 |
+ --with-lldpd-pid-file=/run/${PN}.pid \ |
113 |
+ --docdir=/usr/share/doc/${PF} \ |
114 |
+ $(use_enable cdp) \ |
115 |
+ $(use_enable doc doxygen-man) \ |
116 |
+ $(use_enable doc doxygen-pdf) \ |
117 |
+ $(use_enable doc doxygen-html) \ |
118 |
+ $(use_enable dot1) \ |
119 |
+ $(use_enable dot3) \ |
120 |
+ $(use_enable edp) \ |
121 |
+ $(use_enable fdp) \ |
122 |
+ $(use_enable graph doxygen-dot) \ |
123 |
+ $(use_with jansson json) \ |
124 |
+ $(use_enable lldpmed) \ |
125 |
+ $(use_enable old-kernel oldies) \ |
126 |
+ $(use_enable sonmp) \ |
127 |
+ $(use_enable static-libs static) \ |
128 |
+ $(use_with readline) \ |
129 |
+ $(use_enable sanitizers) \ |
130 |
+ $(use_with seccomp) \ |
131 |
+ $(use_with snmp) \ |
132 |
+ $(use_with xml) |
133 |
+} |
134 |
+ |
135 |
+src_compile() { |
136 |
+ emake |
137 |
+ use doc && emake doxygen-doc |
138 |
+} |
139 |
+ |
140 |
+src_install() { |
141 |
+ emake DESTDIR="${D}" install |
142 |
+ prune_libtool_files |
143 |
+ |
144 |
+ newinitd "${FILESDIR}"/${PN}-initd-5 ${PN} |
145 |
+ newconfd "${FILESDIR}"/${PN}-confd-1 ${PN} |
146 |
+ newbashcomp src/client/completion/lldpcli lldpcli |
147 |
+ |
148 |
+ use doc && dodoc -r doxygen/html |
149 |
+ |
150 |
+ insinto /etc |
151 |
+ doins "${FILESDIR}/lldpd.conf" |
152 |
+ keepdir /etc/${PN}.d |
153 |
+ |
154 |
+ systemd_dounit "${FILESDIR}"/${PN}.service |
155 |
+ systemd_newtmpfilesd "${FILESDIR}"/tmpfilesd ${PN}.conf |
156 |
+} |