net-misc/lldpd-1.0.5-r1: Revbump, seccomp glibc-2.30, acct
authorPatrick McLean <patrick.mclean@sony.com>
Mon, 27 Apr 2020 21:10:41 +0000 (14:10 -0700)
committerPatrick McLean <chutzpah@gentoo.org>
Mon, 27 Apr 2020 21:11:19 +0000 (14:11 -0700)
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
net-misc/lldpd/files/lldpd-1.0.5-seccomp.patch [new file with mode: 0644]
net-misc/lldpd/lldpd-1.0.5-r1.ebuild [moved from net-misc/lldpd/lldpd-1.0.5.ebuild with 82% similarity]

diff --git a/net-misc/lldpd/files/lldpd-1.0.5-seccomp.patch b/net-misc/lldpd/files/lldpd-1.0.5-seccomp.patch
new file mode 100644 (file)
index 0000000..4ac67af
--- /dev/null
@@ -0,0 +1,31 @@
+diff --git a/src/daemon/priv-seccomp.c b/src/daemon/priv-seccomp.c
+index 5a6e2ae..5cef36f 100644
+--- a/src/daemon/priv-seccomp.c
++++ b/src/daemon/priv-seccomp.c
+@@ -148,6 +148,7 @@ priv_seccomp_init(int remote, int child)
+       if ((rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 0)) < 0 ||
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 0)) < 0 || /* write needed for */
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 0)) < 0 ||
++          (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(lseek), 0)) < 0 ||
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(openat), 0)) < 0 ||
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(lseek), 0)) < 0 ||
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(fcntl), 0)) < 0 ||
+@@ -163,6 +164,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(brk), 0)) < 0 || /* brk needed for newer libc */
+           (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 ||
+@@ -172,6 +174,10 @@ priv_seccomp_init(int remote, int child)
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(recvfrom), 0)) < 0 ||
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(readv), 0)) < 0 ||
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mprotect), 0)) < 0 ||
++          (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendmmsg), 0)) < 0 ||
++          (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(recvfrom), 0)) < 0 ||
++          (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(clock_gettime), 0)) < 0 ||
++          (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(gettimeofday), 0)) < 0 ||
+           /* The following are for resolving addresses */
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap), 0)) < 0 ||
+           (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(munmap), 0)) < 0 ||
similarity index 82%
rename from net-misc/lldpd/lldpd-1.0.5.ebuild
rename to net-misc/lldpd/lldpd-1.0.5-r1.ebuild
index 92e05bbf1444075d50f38dd891df1480d099937b..bdb15ea083d974fff4b2aee9e81de7ebbcb4fc4d 100644 (file)
@@ -3,49 +3,46 @@
 
 EAPI=7
 
-inherit eutils user systemd bash-completion-r1 autotools
+inherit 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"
+SLOT="0/4.8.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"
 RESTRICT="!test? ( test )"
 
-RDEPEND="dev-libs/libbsd
+RDEPEND="
+       acct-group/lldpd
+       acct-user/lldpd
+       dev-libs/libbsd
        >=dev-libs/libevent-2.0.5:=
        sys-libs/readline:0=
+       seccomp? ( sys-libs/libseccomp:= )
        snmp? ( net-analyzer/net-snmp[extensible(+)] )
        xml? ( dev-libs/libxml2:= )
-       seccomp? ( sys-libs/libseccomp:= )
-       zsh-completion? ( app-shells/zsh )"
+       zsh-completion? ( app-shells/zsh )
+"
 DEPEND="${RDEPEND}
-       test? ( dev-libs/check )"
+       test? ( dev-libs/check )
+"
 BDEPEND="virtual/pkgconfig
        doc? (
                graph? ( app-doc/doxygen[dot] )
                !graph? ( app-doc/doxygen )
-       )"
+       )
+"
 
 REQUIRED_USE="graph? ( doc )"
 
 PATCHES=(
-       "${FILESDIR}/lldpd-0.9.5-seccomp-add-socket-ops.patch"
-       "${FILESDIR}/lldpd-1.0.1-seccomp-add-brk.patch"
-       "${FILESDIR}/lldpd-1.0.2-seccomp-add-misc.patch"
+       "${FILESDIR}/lldpd-1.0.5-seccomp.patch"
 )
 
-pkg_setup() {
-       ebegin "Creating lldpd user and group"
-       enewgroup ${PN}
-       enewuser ${PN} -1 -1 -1 ${PN}
-       eend $?
-}
-
 src_prepare() {
        default