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

Tobias Powalowski tpowa at gemini.archlinux.org
Wed Dec 22 10:11:19 UTC 2021


    Date: Wednesday, December 22, 2021 @ 10:11:19
  Author: tpowa
Revision: 432903

archrelease: copy trunk to testing-x86_64

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

-----------------------------+
 PKGBUILD                    |   34 +++++++++++++++++++++++++++++
 fix-setuid-redeclared.patch |   48 ++++++++++++++++++++++++++++++++++++++++++
 iputils.install             |   12 ++++++++++
 3 files changed, 94 insertions(+)

Copied: iputils/repos/testing-x86_64/PKGBUILD (from rev 432902, iputils/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2021-12-22 10:11:19 UTC (rev 432903)
@@ -0,0 +1,34 @@
+# 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=20211215
+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' 'iproute')
+conflicts=('netkit-base' 'arping')
+replaces=('netkit-base')
+source=("git+https://github.com/iputils/iputils.git#tag=${pkgver}?signed")
+validpgpkeys=('2016FEA4858B1C36B32E833AC0DEC2EE72F33A5F') # Petr Vorel
+sha1sums=('SKIP')
+
+build() {
+  mkdir -p build
+  cd build
+
+  arch-meson ../$pkgname -DBUILD_RARPD=true 
+  ninja
+}
+
+package() {
+  cd build
+
+  DESTDIR="$pkgdir" ninja install
+}

Copied: iputils/repos/testing-x86_64/fix-setuid-redeclared.patch (from rev 432902, iputils/trunk/fix-setuid-redeclared.patch)
===================================================================
--- testing-x86_64/fix-setuid-redeclared.patch	                        (rev 0)
+++ testing-x86_64/fix-setuid-redeclared.patch	2021-12-22 10:11:19 UTC (rev 432903)
@@ -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 432902, iputils/trunk/iputils.install)
===================================================================
--- testing-x86_64/iputils.install	                        (rev 0)
+++ testing-x86_64/iputils.install	2021-12-22 10:11:19 UTC (rev 432903)
@@ -0,0 +1,12 @@
+post_install() {
+  setcap cap_net_raw=ep usr/bin/ping  2>/dev/null || chmod +s usr/bin/ping 
+}
+
+post_upgrade() {
+  post_install "$1"
+  echo "With 20211215 tftpd is removed from package:"
+  echo "tftpd from tftp-hpa project [1] is more featureful (man tftpd(8)."
+  echo "Also dnsmasq supports secure read-only TFTP server (man dnsmasq(8)."
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list