Date: Monday, August 17, 2020 @ 09:24:00 Author: tpowa Revision: 394333
archrelease: copy trunk to testing-x86_64 Added: iputils/repos/testing-x86_64/ iputils/repos/testing-x86_64/PKGBUILD (from rev 394332, iputils/trunk/PKGBUILD) iputils/repos/testing-x86_64/fix-setuid-redeclared.patch (from rev 394332, iputils/trunk/fix-setuid-redeclared.patch) iputils/repos/testing-x86_64/iputils.install (from rev 394332, iputils/trunk/iputils.install) iputils/repos/testing-x86_64/tftp.xinetd (from rev 394332, iputils/trunk/tftp.xinetd) -----------------------------+ PKGBUILD | 53 ++++++++++++++++++++++++++++++++++++++++++ fix-setuid-redeclared.patch | 48 ++++++++++++++++++++++++++++++++++++++ iputils.install | 9 +++++++ tftp.xinetd | 10 +++++++ 4 files changed, 120 insertions(+) Copied: iputils/repos/testing-x86_64/PKGBUILD (from rev 394332, iputils/trunk/PKGBUILD) =================================================================== --- testing-x86_64/PKGBUILD (rev 0) +++ testing-x86_64/PKGBUILD 2020-08-17 09:24:00 UTC (rev 394333) @@ -0,0 +1,53 @@ +# Maintainer: Stéphane Gaudreault <steph...@archlinux.org> +# Maintainer: Tobias Powalowski <tp...@archlinux.org> +# Contributor: Aaron Griffin <aa...@archlinux.org> + +pkgname=iputils +# Commit date + git rev-parse --short origin/master +_rev=13e0084 +pkgver=20190709 +pkgrel=3 +pkgdesc="Network monitoring tools, including ping" +arch=('x86_64') +license=('GPL') +url="http://www.skbuff.net/iputils/" +depends=('openssl' 'libcap' 'libidn2') +optdepends=('xinetd: for tftpd') +makedepends=('perl-sgmls' 'git' 'docbook-xsl' 'meson') +conflicts=('netkit-base' 'arping' 'netkit-tftpd') +replaces=('netkit-base') +backup=(etc/xinetd.d/tftp) +install=${pkgname}.install +source=("git+https://github.com/iputils/iputils.git#commit=${_rev}" + tftp.xinetd + fix-setuid-redeclared.patch + https://github.com/iputils/iputils/commit/18f14be80466ddc8fb17a400be82764a779c8dcd.patch) +sha1sums=('SKIP' + 'fc2ae26f5609725e3f4aeaf4ab82dfa6d2e378fd' + 'ea7c400d1c397d514de718957c28730d87cef656' + 'cf00aff837580a9a9fea069d98ab1a89b353c714') + +prepare() { + cd $pkgname + patch -Np1 -i $srcdir/fix-setuid-redeclared.patch + #fix #66727 arping duplicate ip adress + patch -Np1 -i $srcdir/18f14be80466ddc8fb17a400be82764a779c8dcd.patch +} + +build() { + mkdir -p build + cd build + + arch-meson ../$pkgname -DBUILD_RARPD=true + ninja +} + +package() { + cd build + + DESTDIR="$pkgdir" ninja install + + # FS#24768 + install -dm755 "${pkgdir}"/etc/xinetd.d/ + install -m644 "${srcdir}"/tftp.xinetd "${pkgdir}"/etc/xinetd.d/tftp +} Copied: iputils/repos/testing-x86_64/fix-setuid-redeclared.patch (from rev 394332, iputils/trunk/fix-setuid-redeclared.patch) =================================================================== --- testing-x86_64/fix-setuid-redeclared.patch (rev 0) +++ testing-x86_64/fix-setuid-redeclared.patch 2020-08-17 09:24:00 UTC (rev 394333) @@ -0,0 +1,48 @@ +From 18f9a84e0e702841d6cc4d5f593de4fbd1348e83 Mon Sep 17 00:00:00 2001 +From: Sami Kerola <kerol...@iki.fi> +Date: Sat, 28 Dec 2019 17:16:27 +0000 +Subject: [PATCH] ninfod: change variable name to avoid colliding with function + name + +The sys/capability.h header has 'extern int cap_setuid(uid_t uid);' +function prototype. + +Addresses: https://github.com/iputils/iputils/issues/246 +Signed-off-by: Sami Kerola <kerol...@iki.fi> +--- + ninfod/ninfod.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c +index 26112d0..95583de 100644 +--- a/ninfod/ninfod.c ++++ b/ninfod/ninfod.c +@@ -455,7 +455,7 @@ static void do_daemonize(void) + /* --------- */ + #ifdef HAVE_LIBCAP + static const cap_value_t cap_net_raw = CAP_NET_RAW; +-static const cap_value_t cap_setuid = CAP_SETUID; ++static const cap_value_t cap_setuserid = CAP_SETUID; + static cap_flag_value_t cap_ok; + #else + static uid_t euid; +@@ -487,7 +487,7 @@ static void limit_capabilities(void) + + cap_get_flag(cap_cur_p, CAP_SETUID, CAP_PERMITTED, &cap_ok); + if (cap_ok != CAP_CLEAR) +- cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET); ++ cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuserid, CAP_SET); + + if (cap_set_proc(cap_p) < 0) { + DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno)); +@@ -520,8 +520,8 @@ static void drop_capabilities(void) + + /* setuid / setuid */ + if (cap_ok != CAP_CLEAR) { +- cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET); +- cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuid, CAP_SET); ++ cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuserid, CAP_SET); ++ cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuserid, CAP_SET); + + if (cap_set_proc(cap_p) < 0) { + DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno)); Copied: iputils/repos/testing-x86_64/iputils.install (from rev 394332, iputils/trunk/iputils.install) =================================================================== --- testing-x86_64/iputils.install (rev 0) +++ testing-x86_64/iputils.install 2020-08-17 09:24:00 UTC (rev 394333) @@ -0,0 +1,9 @@ +post_install() { + setcap cap_net_raw=ep usr/bin/ping 2>/dev/null || chmod +s usr/bin/ping +} + +post_upgrade() { + post_install "$1" +} + +# vim:set ts=2 sw=2 et: Copied: iputils/repos/testing-x86_64/tftp.xinetd (from rev 394332, iputils/trunk/tftp.xinetd) =================================================================== --- testing-x86_64/tftp.xinetd (rev 0) +++ testing-x86_64/tftp.xinetd 2020-08-17 09:24:00 UTC (rev 394333) @@ -0,0 +1,10 @@ +service tftp +{ + socket_type = dgram + protocol = udp + wait = yes + user = nobody + server = /usr/sbin/tftpd + server_args = /var/tftpboot + disable = yes +}