[arch-commits] Commit in mtr/repos (6 files)
Evangelos Foutras
foutrelis at archlinux.org
Wed Oct 1 12:32:07 UTC 2014
Date: Wednesday, October 1, 2014 @ 14:32:07
Author: foutrelis
Revision: 223720
archrelease: copy trunk to extra-i686, extra-x86_64
Added:
mtr/repos/extra-i686/PKGBUILD
(from rev 223719, mtr/trunk/PKGBUILD)
mtr/repos/extra-i686/mtr-0.85-grace-period.patch
(from rev 223719, mtr/trunk/mtr-0.85-grace-period.patch)
mtr/repos/extra-x86_64/PKGBUILD
(from rev 223719, mtr/trunk/PKGBUILD)
mtr/repos/extra-x86_64/mtr-0.85-grace-period.patch
(from rev 223719, mtr/trunk/mtr-0.85-grace-period.patch)
Deleted:
mtr/repos/extra-i686/PKGBUILD
mtr/repos/extra-x86_64/PKGBUILD
------------------------------------------+
/PKGBUILD | 100 +++++++++++++++++++++++++++++
extra-i686/PKGBUILD | 42 ------------
extra-i686/mtr-0.85-grace-period.patch | 71 ++++++++++++++++++++
extra-x86_64/PKGBUILD | 42 ------------
extra-x86_64/mtr-0.85-grace-period.patch | 71 ++++++++++++++++++++
5 files changed, 242 insertions(+), 84 deletions(-)
Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2014-10-01 12:31:50 UTC (rev 223719)
+++ extra-i686/PKGBUILD 2014-10-01 12:32:07 UTC (rev 223720)
@@ -1,42 +0,0 @@
-# $Id$
-# Maintainer : Ionut Biru <ibiru at archlinux.org>
-# Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
-
-pkgbase=mtr
-pkgname=(mtr mtr-gtk)
-pkgver=0.85
-pkgrel=1
-arch=('i686' 'x86_64')
-license=('GPL')
-makedepends=('ncurses' 'gtk2')
-source=(ftp://ftp.bitwizard.nl/mtr/$pkgbase-$pkgver.tar.gz)
-url=""ba1e111d270178eb1d65e51ebf6503f
-md5sums=('aba1e111d270178eb1d65e51ebf6503f')
-
-build() {
- cp -r $pkgbase-$pkgver $pkgbase-cli
- cd mtr-cli
- ./configure --prefix=/usr --without-gtk --sbindir=/usr/bin
- make
-
- cd "$srcdir/$pkgbase-$pkgver"
- ./configure --prefix=/usr --sbindir=/usr/bin
- make
-}
-
-package_mtr() {
- pkgdesc="Combines the functionality of traceroute and ping into one tool (CLI version)"
- depends=('ncurses' 'glib2')
- cd mtr-cli
- make DESTDIR="$pkgdir" install
-}
-
-package_mtr-gtk() {
- pkgdesc="Combines the functionality of traceroute and ping into one tool (GTK version)"
- depends=('ncurses' "gtk2")
- conflicts=("mtr")
- provides=("mtr=$pkgver")
-
- cd $pkgbase-$pkgver
- make DESTDIR="$pkgdir" install
-}
Copied: mtr/repos/extra-i686/PKGBUILD (from rev 223719, mtr/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD (rev 0)
+++ extra-i686/PKGBUILD 2014-10-01 12:32:07 UTC (rev 223720)
@@ -0,0 +1,50 @@
+# $Id$
+# Maintainer : Ionut Biru <ibiru at archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
+
+pkgbase=mtr
+pkgname=(mtr mtr-gtk)
+pkgver=0.85
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://www.bitwizard.nl/mtr/"
+license=('GPL')
+makedepends=('ncurses' 'gtk2')
+source=(ftp://ftp.bitwizard.nl/mtr/$pkgbase-$pkgver.tar.gz
+ mtr-0.85-grace-period.patch)
+md5sums=('5e665c617e5659b6ec3e201ee7488eb1'
+ 'c5d16e124a4734adeaaf3e0b83ef40fb')
+
+prepare() {
+ cd "$srcdir/$pkgbase-$pkgver"
+
+ patch -Np1 -i ../mtr-0.85-grace-period.patch
+}
+
+build() {
+ cp -r $pkgbase-$pkgver $pkgbase-cli
+ cd mtr-cli
+ ./configure --prefix=/usr --without-gtk --sbindir=/usr/bin
+ make
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ ./configure --prefix=/usr --sbindir=/usr/bin
+ make
+}
+
+package_mtr() {
+ pkgdesc="Combines the functionality of traceroute and ping into one tool (CLI version)"
+ depends=('ncurses' 'glib2')
+ cd mtr-cli
+ make DESTDIR="$pkgdir" install
+}
+
+package_mtr-gtk() {
+ pkgdesc="Combines the functionality of traceroute and ping into one tool (GTK version)"
+ depends=('ncurses' "gtk2")
+ conflicts=("mtr")
+ provides=("mtr=$pkgver")
+
+ cd $pkgbase-$pkgver
+ make DESTDIR="$pkgdir" install
+}
Copied: mtr/repos/extra-i686/mtr-0.85-grace-period.patch (from rev 223719, mtr/trunk/mtr-0.85-grace-period.patch)
===================================================================
--- extra-i686/mtr-0.85-grace-period.patch (rev 0)
+++ extra-i686/mtr-0.85-grace-period.patch 2014-10-01 12:32:07 UTC (rev 223720)
@@ -0,0 +1,71 @@
+From 6ce1601b27fdd95b44ed65d7fd83604860276d63 Mon Sep 17 00:00:00 2001
+From: Michal Sekletar <sekletar.m at gmail.com>
+Date: Tue, 17 Sep 2013 16:11:20 +0200
+Subject: [PATCH] core: introduce grace period
+
+In report mode we break out from select loop immediately after we reach
+maximum count of iterations. But we should wait for packets which are still on
+the way.
+
+In order to fix the issue we introduce grace period during which we don't send
+out more packets but we just wait for responses which might be still on the way.
+
+resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1009051
+---
+ select.c | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/select.c b/select.c
+index 29088fd..31bfd5f 100644
+--- a/select.c
++++ b/select.c
+@@ -45,6 +45,8 @@ static struct timeval intervaltime;
+ int display_offset = 0;
+
+
++#define GRACETIME (5 * 1000*1000)
++
+ void select_loop(void) {
+ fd_set readfd;
+ fd_set writefd;
+@@ -57,8 +59,12 @@ void select_loop(void) {
+ int NumPing = 0;
+ int paused = 0;
+ struct timeval lasttime, thistime, selecttime;
++ struct timeval startgrace;
+ int dt;
+ int rv;
++ int graceperiod = 0;
++
++ memset(&startgrace, 0, sizeof(startgrace));
+
+ gettimeofday(&lasttime, NULL);
+
+@@ -124,10 +130,24 @@ void select_loop(void) {
+ (thistime.tv_sec == lasttime.tv_sec + intervaltime.tv_sec &&
+ thistime.tv_usec >= lasttime.tv_usec + intervaltime.tv_usec)) {
+ lasttime = thistime;
+- if(NumPing >= MaxPing && (!Interactive || ForceMaxPing))
++
++ if (!graceperiod) {
++ if (NumPing >= MaxPing && (!Interactive || ForceMaxPing)) {
++ graceperiod = 1;
++ startgrace = thistime;
++ }
++
++ /* do not send out batch when we've already initiated grace period */
++ if (!graceperiod && net_send_batch())
++ NumPing++;
++ }
++ }
++
++ if (graceperiod) {
++ dt = (thistime.tv_usec - startgrace.tv_usec) +
++ 1000000 * (thistime.tv_sec - startgrace.tv_sec);
++ if (dt > GRACETIME)
+ return;
+- if (net_send_batch())
+- NumPing++;
+ }
+
+ selecttime.tv_usec = (thistime.tv_usec - lasttime.tv_usec);
Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2014-10-01 12:31:50 UTC (rev 223719)
+++ extra-x86_64/PKGBUILD 2014-10-01 12:32:07 UTC (rev 223720)
@@ -1,42 +0,0 @@
-# $Id$
-# Maintainer : Ionut Biru <ibiru at archlinux.org>
-# Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
-
-pkgbase=mtr
-pkgname=(mtr mtr-gtk)
-pkgver=0.85
-pkgrel=1
-arch=('i686' 'x86_64')
-license=('GPL')
-makedepends=('ncurses' 'gtk2')
-source=(ftp://ftp.bitwizard.nl/mtr/$pkgbase-$pkgver.tar.gz)
-url=""ba1e111d270178eb1d65e51ebf6503f
-md5sums=('aba1e111d270178eb1d65e51ebf6503f')
-
-build() {
- cp -r $pkgbase-$pkgver $pkgbase-cli
- cd mtr-cli
- ./configure --prefix=/usr --without-gtk --sbindir=/usr/bin
- make
-
- cd "$srcdir/$pkgbase-$pkgver"
- ./configure --prefix=/usr --sbindir=/usr/bin
- make
-}
-
-package_mtr() {
- pkgdesc="Combines the functionality of traceroute and ping into one tool (CLI version)"
- depends=('ncurses' 'glib2')
- cd mtr-cli
- make DESTDIR="$pkgdir" install
-}
-
-package_mtr-gtk() {
- pkgdesc="Combines the functionality of traceroute and ping into one tool (GTK version)"
- depends=('ncurses' "gtk2")
- conflicts=("mtr")
- provides=("mtr=$pkgver")
-
- cd $pkgbase-$pkgver
- make DESTDIR="$pkgdir" install
-}
Copied: mtr/repos/extra-x86_64/PKGBUILD (from rev 223719, mtr/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD (rev 0)
+++ extra-x86_64/PKGBUILD 2014-10-01 12:32:07 UTC (rev 223720)
@@ -0,0 +1,50 @@
+# $Id$
+# Maintainer : Ionut Biru <ibiru at archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
+
+pkgbase=mtr
+pkgname=(mtr mtr-gtk)
+pkgver=0.85
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://www.bitwizard.nl/mtr/"
+license=('GPL')
+makedepends=('ncurses' 'gtk2')
+source=(ftp://ftp.bitwizard.nl/mtr/$pkgbase-$pkgver.tar.gz
+ mtr-0.85-grace-period.patch)
+md5sums=('5e665c617e5659b6ec3e201ee7488eb1'
+ 'c5d16e124a4734adeaaf3e0b83ef40fb')
+
+prepare() {
+ cd "$srcdir/$pkgbase-$pkgver"
+
+ patch -Np1 -i ../mtr-0.85-grace-period.patch
+}
+
+build() {
+ cp -r $pkgbase-$pkgver $pkgbase-cli
+ cd mtr-cli
+ ./configure --prefix=/usr --without-gtk --sbindir=/usr/bin
+ make
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ ./configure --prefix=/usr --sbindir=/usr/bin
+ make
+}
+
+package_mtr() {
+ pkgdesc="Combines the functionality of traceroute and ping into one tool (CLI version)"
+ depends=('ncurses' 'glib2')
+ cd mtr-cli
+ make DESTDIR="$pkgdir" install
+}
+
+package_mtr-gtk() {
+ pkgdesc="Combines the functionality of traceroute and ping into one tool (GTK version)"
+ depends=('ncurses' "gtk2")
+ conflicts=("mtr")
+ provides=("mtr=$pkgver")
+
+ cd $pkgbase-$pkgver
+ make DESTDIR="$pkgdir" install
+}
Copied: mtr/repos/extra-x86_64/mtr-0.85-grace-period.patch (from rev 223719, mtr/trunk/mtr-0.85-grace-period.patch)
===================================================================
--- extra-x86_64/mtr-0.85-grace-period.patch (rev 0)
+++ extra-x86_64/mtr-0.85-grace-period.patch 2014-10-01 12:32:07 UTC (rev 223720)
@@ -0,0 +1,71 @@
+From 6ce1601b27fdd95b44ed65d7fd83604860276d63 Mon Sep 17 00:00:00 2001
+From: Michal Sekletar <sekletar.m at gmail.com>
+Date: Tue, 17 Sep 2013 16:11:20 +0200
+Subject: [PATCH] core: introduce grace period
+
+In report mode we break out from select loop immediately after we reach
+maximum count of iterations. But we should wait for packets which are still on
+the way.
+
+In order to fix the issue we introduce grace period during which we don't send
+out more packets but we just wait for responses which might be still on the way.
+
+resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1009051
+---
+ select.c | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/select.c b/select.c
+index 29088fd..31bfd5f 100644
+--- a/select.c
++++ b/select.c
+@@ -45,6 +45,8 @@ static struct timeval intervaltime;
+ int display_offset = 0;
+
+
++#define GRACETIME (5 * 1000*1000)
++
+ void select_loop(void) {
+ fd_set readfd;
+ fd_set writefd;
+@@ -57,8 +59,12 @@ void select_loop(void) {
+ int NumPing = 0;
+ int paused = 0;
+ struct timeval lasttime, thistime, selecttime;
++ struct timeval startgrace;
+ int dt;
+ int rv;
++ int graceperiod = 0;
++
++ memset(&startgrace, 0, sizeof(startgrace));
+
+ gettimeofday(&lasttime, NULL);
+
+@@ -124,10 +130,24 @@ void select_loop(void) {
+ (thistime.tv_sec == lasttime.tv_sec + intervaltime.tv_sec &&
+ thistime.tv_usec >= lasttime.tv_usec + intervaltime.tv_usec)) {
+ lasttime = thistime;
+- if(NumPing >= MaxPing && (!Interactive || ForceMaxPing))
++
++ if (!graceperiod) {
++ if (NumPing >= MaxPing && (!Interactive || ForceMaxPing)) {
++ graceperiod = 1;
++ startgrace = thistime;
++ }
++
++ /* do not send out batch when we've already initiated grace period */
++ if (!graceperiod && net_send_batch())
++ NumPing++;
++ }
++ }
++
++ if (graceperiod) {
++ dt = (thistime.tv_usec - startgrace.tv_usec) +
++ 1000000 * (thistime.tv_sec - startgrace.tv_sec);
++ if (dt > GRACETIME)
+ return;
+- if (net_send_batch())
+- NumPing++;
+ }
+
+ selecttime.tv_usec = (thistime.tv_usec - lasttime.tv_usec);
More information about the arch-commits
mailing list