]> git.pld-linux.org Git - packages/iputils.git/commitdiff
- added libcap patch (fixes build with libcap >= 2.29)
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Mar 2020 19:16:29 +0000 (20:16 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Mar 2020 19:16:29 +0000 (20:16 +0100)
- updated dependencies, package translations and systemd units

iputils-libcap.patch [new file with mode: 0644]
iputils.spec

diff --git a/iputils-libcap.patch b/iputils-libcap.patch
new file mode 100644 (file)
index 0000000..1eea353
--- /dev/null
@@ -0,0 +1,31 @@
+--- iputils-s20190709/ninfod/ninfod.c.orig     2019-07-09 22:55:49.000000000 +0200
++++ iputils-s20190709/ninfod/ninfod.c  2020-03-22 19:07:16.416656926 +0100
+@@ -454,7 +454,7 @@
+ /* --------- */
+ #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_setuid_val =  CAP_SETUID; 
+ static cap_flag_value_t cap_ok;
+ #else
+ static uid_t euid;
+@@ -486,7 +486,7 @@
+       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_setuid_val, CAP_SET);
+       if (cap_set_proc(cap_p) < 0) {
+               DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno));
+@@ -519,8 +519,8 @@
+       /* 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_setuid_val, CAP_SET);
++              cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuid_val, CAP_SET);
+               if (cap_set_proc(cap_p) < 0) {
+                       DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno));
index 31c8a5884198151d3b3e17ac6ac7e3413193d75a..04bfcda0306cd26bfffea64eb23a414eb1850327 100644 (file)
@@ -1,4 +1,3 @@
-#
 Summary:       Utilities for IPv4/IPv6 networking
 Summary(pl.UTF-8):     Użytki przeznaczone dla pracy z siecią IPv4/IPv6
 Summary(ru.UTF-8):     Набор базовых сетевых утилит (ping, tracepath etc.)
@@ -9,19 +8,23 @@ Release:      1
 Epoch:         2
 License:       BSD
 Group:         Networking/Admin
+#Source0Download: https://github.com/iputils/iputils/releases
+#TODO:         https://github.com/iputils/iputils/archive/%{version}/%{name}-%{version}.tar.gz
 Source0:       https://github.com/iputils/iputils/archive/%{version}.tar.gz
 # Source0-md5: d8d1d5af83aeae946ae909ddc0041cca
+Patch0:                %{name}-libcap.patch
 URL:           https://github.com/iputils/iputils
 BuildRequires: docbook-dtd31-sgml
 BuildRequires: docbook-utils >= 0.6.10
+BuildRequires: gcc >= 5:3.2
+BuildRequires: gettext-tools
 BuildRequires: libcap-devel
 BuildRequires: libgcrypt-devel
+BuildRequires: libgpg-error-devel
 BuildRequires: libidn2-devel
-BuildRequires: libmnl-devel
 BuildRequires: linux-libc-headers
-BuildRequires: meson
-BuildRequires: openssl-devel
-BuildRequires: sysfsutils-devel
+BuildRequires: meson >= 0.39
+BuildRequires: ninja >= 1.5
 Requires:      arping
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -83,27 +86,29 @@ pakiety ARP z użyciem podanego adresu źródłowego.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %meson build \
-  --bindir=%{_sbindir} \
-  -DBUILD_NINFOD=true \
-  -DUSE_CAP=true \
-  -DUSE_GETTEXT=true \
-  -DUSE_IDN=true \
-  -DUSE_CRYPTO=gcrypt \
-  -DBUILD_ARPING=true \
-  -DBUILD_CLOCKDIFF=true \
-  -DBUILD_PING=true \
-  -DBUILD_RARPD=true \
-  -DBUILD_RDISC=true \
-  -DBUILD_TFTPD=false \
-  -DBUILD_TRACEPATH=true \
-  -DBUILD_TRACEROUTE6=true \
-  -DBUILD_MANS=true \
-  -DENABLE_RDISC_SERVER=true \
-  -DBUILD_NINFOD=true \
-  -DNINFOD_MESSAGES=true
+       --bindir=%{_sbindir} \
+       -DBUILD_NINFOD=true \
+       -DUSE_CAP=true \
+       -DUSE_GETTEXT=true \
+       -DUSE_IDN=true \
+       -DUSE_CRYPTO=gcrypt \
+       -DBUILD_ARPING=true \
+       -DBUILD_CLOCKDIFF=true \
+       -DBUILD_PING=true \
+       -DBUILD_RARPD=true \
+       -DBUILD_RDISC=true \
+       -DBUILD_TFTPD=false \
+       -DBUILD_TRACEPATH=true \
+       -DBUILD_TRACEROUTE6=true \
+       -DBUILD_MANS=true \
+       -DENABLE_RDISC_SERVER=true \
+       -DBUILD_NINFOD=true \
+       -DNINFOD_MESSAGES=true \
+       -Dsystemdunitdir=%{systemdunitdir}
 
 %ninja_build -C build
 
@@ -113,8 +118,8 @@ install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,/bin,/sbin}
 
 %ninja_install -C build
 
-mv $RPM_BUILD_ROOT{%{_sbindir}/ping,/bin}
-mv $RPM_BUILD_ROOT{%{_sbindir}/arping,/sbin}
+%{__mv} $RPM_BUILD_ROOT{%{_sbindir}/ping,/bin}
+%{__mv} $RPM_BUILD_ROOT{%{_sbindir}/arping,/sbin}
 
 ln -s ping $RPM_BUILD_ROOT/bin/ping4
 ln -s ping $RPM_BUILD_ROOT/bin/ping6
@@ -126,10 +131,12 @@ echo ".so ping.8" > $RPM_BUILD_ROOT%{_mandir}/man8/ping6.8
 echo ".so tracepath.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tracepath4.8
 echo ".so tracepath.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tracepath6.8
 
+%find_lang %{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc README.md
 %attr(4754,root,adm) %{_sbindir}/clockdiff
@@ -148,6 +155,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/tracepath4.8*
 %{_mandir}/man8/tracepath6.8*
 %{_mandir}/man8/traceroute6.8*
+%{systemdunitdir}/ninfod.service
+%{systemdunitdir}/rarpd@.service
+%{systemdunitdir}/rdisc.service
 
 %files -n ping
 %defattr(644,root,root,755)
This page took 0.147395 seconds and 4 git commands to generate.