From 36798c06b52032a4697c00bff0849769c2ef9455 Mon Sep 17 00:00:00 2001 From: Patrick McLean Date: Mon, 27 Apr 2020 14:10:41 -0700 Subject: [PATCH] net-misc/lldpd-1.0.5-r1: Revbump, seccomp glibc-2.30, acct Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Patrick McLean --- .../lldpd/files/lldpd-1.0.5-seccomp.patch | 31 +++++++++++++++++++ ...dpd-1.0.5.ebuild => lldpd-1.0.5-r1.ebuild} | 31 +++++++++---------- 2 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 net-misc/lldpd/files/lldpd-1.0.5-seccomp.patch rename net-misc/lldpd/{lldpd-1.0.5.ebuild => lldpd-1.0.5-r1.ebuild} (82%) 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 index 000000000000..4ac67afeec5f --- /dev/null +++ b/net-misc/lldpd/files/lldpd-1.0.5-seccomp.patch @@ -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 || diff --git a/net-misc/lldpd/lldpd-1.0.5.ebuild b/net-misc/lldpd/lldpd-1.0.5-r1.ebuild 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 92e05bbf1444..bdb15ea083d9 100644 --- a/net-misc/lldpd/lldpd-1.0.5.ebuild +++ b/net-misc/lldpd/lldpd-1.0.5-r1.ebuild @@ -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 -- 2.26.2