[arch-commits] Commit in iputils/repos (5 files)

Tobias Powalowski tpowa at archlinux.org
Sun Sep 6 15:33:51 UTC 2020


    Date: Sunday, September 6, 2020 @ 15:33:51
  Author: tpowa
Revision: 395523

archrelease: copy trunk to testing-x86_64

Added:
  iputils/repos/testing-x86_64/
  iputils/repos/testing-x86_64/PKGBUILD
    (from rev 395522, iputils/trunk/PKGBUILD)
  iputils/repos/testing-x86_64/fix-setuid-redeclared.patch
    (from rev 395522, iputils/trunk/fix-setuid-redeclared.patch)
  iputils/repos/testing-x86_64/iputils.install
    (from rev 395522, iputils/trunk/iputils.install)
  iputils/repos/testing-x86_64/tftp.xinetd
    (from rev 395522, iputils/trunk/tftp.xinetd)

-----------------------------+
 PKGBUILD                    |   33 ++++++++++++++++++++++++++++
 fix-setuid-redeclared.patch |   48 ++++++++++++++++++++++++++++++++++++++++++
 iputils.install             |    9 +++++++
 tftp.xinetd                 |   10 ++++++++
 4 files changed, 100 insertions(+)

Copied: iputils/repos/testing-x86_64/PKGBUILD (from rev 395522, iputils/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2020-09-06 15:33:51 UTC (rev 395523)
@@ -0,0 +1,33 @@
+# Maintainer: Stéphane Gaudreault <stephane at archlinux.org>
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+# Contributor: Aaron Griffin <aaron at archlinux.org>
+
+pkgname=iputils
+# Commit date + git rev-parse --short origin/master
+_rev=23c3782a
+pkgver=20200821
+pkgrel=1
+pkgdesc="Network monitoring tools, including ping"
+arch=('x86_64')
+license=('GPL')
+url="http://www.skbuff.net/iputils/"
+depends=('libcap' 'libidn2')
+makedepends=('perl-sgmls' 'git' 'docbook-xsl' 'meson' 'systemd')
+conflicts=('netkit-base' 'arping' 'netkit-tftpd')
+replaces=('netkit-base')
+source=("git+https://github.com/iputils/iputils.git#commit=${_rev}")
+sha1sums=('SKIP')
+
+build() {
+  mkdir -p build
+  cd build
+
+  arch-meson ../$pkgname -DBUILD_RARPD=true -DBUILD_TFTPD=true
+  ninja
+}
+
+package() {
+  cd build
+
+  DESTDIR="$pkgdir" ninja install
+}

Copied: iputils/repos/testing-x86_64/fix-setuid-redeclared.patch (from rev 395522, iputils/trunk/fix-setuid-redeclared.patch)
===================================================================
--- testing-x86_64/fix-setuid-redeclared.patch	                        (rev 0)
+++ testing-x86_64/fix-setuid-redeclared.patch	2020-09-06 15:33:51 UTC (rev 395523)
@@ -0,0 +1,48 @@
+From 18f9a84e0e702841d6cc4d5f593de4fbd1348e83 Mon Sep 17 00:00:00 2001
+From: Sami Kerola <kerolasa at 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 <kerolasa at 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 395522, iputils/trunk/iputils.install)
===================================================================
--- testing-x86_64/iputils.install	                        (rev 0)
+++ testing-x86_64/iputils.install	2020-09-06 15:33:51 UTC (rev 395523)
@@ -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 395522, iputils/trunk/tftp.xinetd)
===================================================================
--- testing-x86_64/tftp.xinetd	                        (rev 0)
+++ testing-x86_64/tftp.xinetd	2020-09-06 15:33:51 UTC (rev 395523)
@@ -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
+}


More information about the arch-commits mailing list