diff --git a/iputils-ping-interrupt.diff b/iputils-ping-interrupt.diff deleted file mode 100644 index 0e308da..0000000 --- a/iputils-ping-interrupt.diff +++ /dev/null @@ -1,43 +0,0 @@ -From 41e442fea26f20ceb815306777d36361575825cc Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Mon, 26 Aug 2013 13:05:01 +0200 -Subject: Allow ping to be interrupted - -Signed-off-by: Hannes Reinecke ---- - ping.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/ping.c b/ping.c -index 06cc369..2c76677 100644 ---- a/ping.c -+++ b/ping.c -@@ -92,6 +92,7 @@ static unsigned short in_cksum(const unsigned short *addr, int len, unsigned sho - static void pr_icmph(uint8_t type, uint8_t code, uint32_t info, struct icmphdr *icp); - static int parsetos(char *str); - static int parseflow(char *str); -+static void doexit (int); - - static struct sockaddr_in source = { .sin_family = AF_INET }; - char *device; -@@ -543,6 +544,8 @@ int ping4_run(int argc, char **argv, struct addrinfo *ai, socket_st *sock) - options |= F_SOURCEROUTE; - } - } -+ set_signal(SIGINT, doexit); -+ - while (argc > 0) { - target = *argv; - -@@ -1619,3 +1622,8 @@ void ping4_install_filter(socket_st *sock) - if (setsockopt(sock->fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter))) - error(0, errno, _("WARNING: failed to install socket filter")); - } -+ -+static void doexit(int signo __attribute__((unused))) -+{ -+ exit (1); -+} --- -2.21.0 - diff --git a/iputils-sec-ping-unblock.diff b/iputils-sec-ping-unblock.diff deleted file mode 100644 index 1c12ecd..0000000 --- a/iputils-sec-ping-unblock.diff +++ /dev/null @@ -1,42 +0,0 @@ -From bf83678619dd0286f7a66f2ab02763751b0e8ca9 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Mon, 26 Aug 2013 13:02:36 +0200 -Subject: Block SIGALRM in ping.c -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -ping depends on SIGALRM to exit eventually, so we need to mask -it with UNBLOCK. - -Signed-off-by: Marcus Schäfer -Signed-off-by: Hannes Reinecke ---- - ping.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/ping.c b/ping.c -index 3debd82..06cc369 100644 ---- a/ping.c -+++ b/ping.c -@@ -452,6 +452,17 @@ main(int argc, char **argv) - - /* Create sockets */ - enable_capability_raw(); -+ -+ /* -+ * ping depend on SIGALARM to exit sometimes, -+ * but to popen, system, fork carry on parent signal handler -+ * so we mask it ourself. -+ */ -+ sigset_t s; -+ sigaddset(&s, SIGALRM); -+ sigprocmask(SIG_UNBLOCK, &s, NULL); -+ set_signal(SIGALRM, doexit); -+ - if (hints.ai_family != AF_INET6) - create_socket(&sock4, AF_INET, hints.ai_socktype, IPPROTO_ICMP, - hints.ai_family == AF_INET); --- -2.17.1 - diff --git a/iputils.changes b/iputils.changes index 2fae207..03161fb 100644 --- a/iputils.changes +++ b/iputils.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Aug 14 14:18:41 UTC 2020 - Petr Vorel + +- Remove 2 old patches (iputils-sec-ping-unblock.diff, iputils-ping-interrupt.diff) + Although not documented, they both belong to bsc#674304. Fix from 2011 was + resolved upstream in commit 810dd7f ("ping,ping6: Unmask signals on + start-up.") [1], released in s20121112. +- Use %autosetup -p1 + ------------------------------------------------------------------- Sun Jul 12 19:57:40 UTC 2020 - Andreas Stieger diff --git a/iputils.spec b/iputils.spec index 6b4c00d..0cfc222 100644 --- a/iputils.spec +++ b/iputils.spec @@ -25,8 +25,6 @@ Group: Productivity/Networking/Other URL: https://github.com/iputils/iputils Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz Source1: rarpd.service -Patch1: iputils-sec-ping-unblock.diff -Patch2: iputils-ping-interrupt.diff Patch3: arping-revert-partially-fix-sent-vs-received-package.patch Patch4: arping-fix-f-quit-on-first-reply-regression.patch BuildRequires: docbook5-xsl-stylesheets @@ -64,11 +62,7 @@ address resolution. These packets are sent by hosts at boot time to find out their IP addresses. %prep -%setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%autosetup -p1 %build # Export CFLAGS so we can also benefit from the ones the Makefile sets for us