Re: [UPDATE] net/mtr to 0.94

2021-09-02 Thread Frederic Cambus
On Wed, Sep 01, 2021 at 08:08:55PM +0100, Stuart Henderson wrote:

> > Here is a diff to update mtr to 0.94.
> > 
> > Notable changes:
> > 
> > - Drop upstream patches which are now part of the release
> > - Disable new optional dependency on devel/jansson to produce JSON output
> > - Switch from Gtk+2 to Gtk+3
> 
> Please remove MODPY_VERSION, the tests fail with 3.x just as well
> as they fail with 2.x ;)
> 
> --json in the old version used internal code that mostly worked but
> produced slightly buggy output. The new version cleaned that up by
> moving to external libjansson, so by using --without-jansson it removes
> a feature that was present before. Personally I would keep that support.

Right, thanks for pointing this out, I agree we should keep it.

Here is a new revision with the following changes:

- Add new dependency on devel/jansson
- Fix RCS ID marker: kpenBSD -> OpenBSD
- Drop MODPY_VERSION

Comments? OK?

Index: Makefile
===
RCS file: /cvs/ports/net/mtr/Makefile,v
retrieving revision 1.72
diff -u -p -r1.72 Makefile
--- Makefile23 Feb 2021 19:39:33 -  1.72
+++ Makefile2 Sep 2021 14:50:42 -
@@ -4,9 +4,8 @@ COMMENT=network diagnostic tool, simila
 
 GH_ACCOUNT=traviscross
 GH_PROJECT=mtr
-GH_TAGNAME=v0.93
+GH_TAGNAME=v0.94
 EPOCH= 0
-REVISION=  0
 
 CATEGORIES=net
 
@@ -16,13 +15,15 @@ HOMEPAGE=   https://www.bitwizard.nl/mtr/
 PERMIT_PACKAGE=yes
 
 # diff for pledge(), not yet enabled
-WANTLIB += c m curses
+WANTLIB += c m curses jansson
 
 FLAVORS=   gtk
 FLAVOR?=
 
 BUILD_DEPENDS= shells/bash-completion
 
+LIB_DEPENDS=   devel/jansson
+
 CONFIGURE_STYLE= autoreconf
 AUTORECONF=${WRKSRC}/bootstrap.sh
 AUTOCONF_VERSION= 2.69
@@ -31,18 +32,16 @@ AUTOMAKE_VERSION= 1.15
 CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib"
 
 MODULES=   lang/python # for tests only
-MODPY_VERSION =${MODPY_DEFAULT_VERSION_2}
 MODPY_BUILDDEP=No
 MODPY_RUNDEP=  No
 TEST_DEPENDS=  ${MODPY_RUN_DEPENDS}
 
 .if ${FLAVOR} == "gtk"
 CONFIGURE_ARGS+=   --with-gtk-prefix=${LOCALBASE}
-LIB_DEPENDS+=  x11/gtk+2
-WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
-WANTLIB += Xrandr Xrender atk-1.0 cairo fontconfig freetype gdk-x11-2.0
-WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0
-WANTLIB += intl pango-1.0 pangocairo-1.0 pangoft2-1.0 pthread z
+LIB_DEPENDS+=  x11/gtk+3
+WANTLIB += atk-1.0 cairo cairo-gobject gdk-3 gdk_pixbuf-2.0 gio-2.0
+WANTLIB += glib-2.0 gobject-2.0 gtk-3 harfbuzz intl pango-1.0
+WANTLIB += pangocairo-1.0 pthread
 .else
 CONFIGURE_ARGS+=   --without-glib \
--without-gtk
Index: distinfo
===
RCS file: /cvs/ports/net/mtr/distinfo,v
retrieving revision 1.19
diff -u -p -r1.19 distinfo
--- distinfo21 Aug 2019 15:23:42 -  1.19
+++ distinfo2 Sep 2021 14:50:42 -
@@ -1,2 +1,2 @@
-SHA256 (mtr-0.93.tar.gz) = OhqzMBBN3uMTWvPPpWe5YIABxd7svyAMCLVF7W16TI8=
-SIZE (mtr-0.93.tar.gz) = 142148
+SHA256 (mtr-0.94.tar.gz) = 6gNv3UXaSIwkFgP26lmga7z+bCYXfr00//VDNqRElLg=
+SIZE (mtr-0.94.tar.gz) = 143616
Index: patches/patch-packet_packet_c
===
RCS file: /cvs/ports/net/mtr/patches/patch-packet_packet_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-packet_packet_c
--- patches/patch-packet_packet_c   21 Aug 2019 15:23:42 -  1.3
+++ patches/patch-packet_packet_c   2 Sep 2021 14:50:42 -
@@ -1,4 +1,4 @@
-$kpenBSD: patch-packet_packet_c,v 1.2 2017/06/02 16:50:16 sthen Exp $
+$OpenBSD: patch-packet_packet_c,v 1.2 2017/06/02 16:50:16 sthen Exp $
 
 Index: packet/packet.c
 --- packet/packet.c.orig
Index: patches/patch-packet_probe_c
===
RCS file: patches/patch-packet_probe_c
diff -N patches/patch-packet_probe_c
--- patches/patch-packet_probe_c21 Aug 2019 15:23:42 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,28 +0,0 @@
-$OpenBSD: patch-packet_probe_c,v 1.1 2019/08/21 15:23:42 sthen Exp $
-
-From 9fe183d61f5382bd6dae1df1db6439a27e8edde2 Mon Sep 17 00:00:00 2001
-From: Chongyu Zhu 
-Date: Tue, 6 Aug 2019 23:01:57 +0800
-Subject: [PATCH] probe: fix find_source_addr
-
-Index: packet/probe.c
 packet/probe.c.orig
-+++ packet/probe.c
-@@ -323,7 +323,7 @@ int find_source_addr(
-anything to the port.
-  */
- *sockaddr_port_offset(&dest_with_port) = htons(1);
--len = sockaddr_addr_size(&dest_with_port);
-+len = sockaddr_size(&dest_with_port);
- 
- sock = socket(destaddr->ss_family, SOCK_DGRAM, IPPROTO_UDP);
- if (sock == -1) {
-@@ -364,7 +364,7 @@ int find_source_addr(
-Zero the port, as we may later use this address to finding, and
-we don't want to use the port from the socket we just created.
-  */
--*so

Re: [UPDATE] net/mtr to 0.94

2021-09-01 Thread Stuart Henderson
On 2021/09/01 16:00, Frederic Cambus wrote:
> Hi ports@,
> 
> Here is a diff to update mtr to 0.94.
> 
> Notable changes:
> 
> - Drop upstream patches which are now part of the release
> - Disable new optional dependency on devel/jansson to produce JSON output
> - Switch from Gtk+2 to Gtk+3
> 
> Comments? OK?

Please remove MODPY_VERSION, the tests fail with 3.x just as well
as they fail with 2.x ;)

--json in the old version used internal code that mostly worked but
produced slightly buggy output. The new version cleaned that up by
moving to external libjansson, so by using --without-jansson it removes
a feature that was present before. Personally I would keep that support.



[UPDATE] net/mtr to 0.94

2021-09-01 Thread Frederic Cambus
Hi ports@,

Here is a diff to update mtr to 0.94.

Notable changes:

- Drop upstream patches which are now part of the release
- Disable new optional dependency on devel/jansson to produce JSON output
- Switch from Gtk+2 to Gtk+3

Comments? OK?

Index: Makefile
===
RCS file: /cvs/ports/net/mtr/Makefile,v
retrieving revision 1.72
diff -u -p -r1.72 Makefile
--- Makefile23 Feb 2021 19:39:33 -  1.72
+++ Makefile1 Sep 2021 13:56:52 -
@@ -4,9 +4,8 @@ COMMENT=network diagnostic tool, simila
 
 GH_ACCOUNT=traviscross
 GH_PROJECT=mtr
-GH_TAGNAME=v0.93
+GH_TAGNAME=v0.94
 EPOCH= 0
-REVISION=  0
 
 CATEGORIES=net
 
@@ -38,15 +37,16 @@ TEST_DEPENDS=   ${MODPY_RUN_DEPENDS}
 
 .if ${FLAVOR} == "gtk"
 CONFIGURE_ARGS+=   --with-gtk-prefix=${LOCALBASE}
-LIB_DEPENDS+=  x11/gtk+2
-WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
-WANTLIB += Xrandr Xrender atk-1.0 cairo fontconfig freetype gdk-x11-2.0
-WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0
-WANTLIB += intl pango-1.0 pangocairo-1.0 pangoft2-1.0 pthread z
+LIB_DEPENDS+=  x11/gtk+3
+WANTLIB += atk-1.0 cairo cairo-gobject gdk-3 gdk_pixbuf-2.0 gio-2.0
+WANTLIB += glib-2.0 gobject-2.0 gtk-3 harfbuzz intl pango-1.0
+WANTLIB += pangocairo-1.0 pthread
 .else
 CONFIGURE_ARGS+=   --without-glib \
--without-gtk
 .endif
+
+CONFIGURE_ARGS+=   --without-jansson
 
 pre-test:
ln -fs ${MODPY_BIN} ${WRKDIR}/bin/python
Index: distinfo
===
RCS file: /cvs/ports/net/mtr/distinfo,v
retrieving revision 1.19
diff -u -p -r1.19 distinfo
--- distinfo21 Aug 2019 15:23:42 -  1.19
+++ distinfo1 Sep 2021 13:56:52 -
@@ -1,2 +1,2 @@
-SHA256 (mtr-0.93.tar.gz) = OhqzMBBN3uMTWvPPpWe5YIABxd7svyAMCLVF7W16TI8=
-SIZE (mtr-0.93.tar.gz) = 142148
+SHA256 (mtr-0.94.tar.gz) = 6gNv3UXaSIwkFgP26lmga7z+bCYXfr00//VDNqRElLg=
+SIZE (mtr-0.94.tar.gz) = 143616
Index: patches/patch-packet_probe_c
===
RCS file: patches/patch-packet_probe_c
diff -N patches/patch-packet_probe_c
--- patches/patch-packet_probe_c21 Aug 2019 15:23:42 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,28 +0,0 @@
-$OpenBSD: patch-packet_probe_c,v 1.1 2019/08/21 15:23:42 sthen Exp $
-
-From 9fe183d61f5382bd6dae1df1db6439a27e8edde2 Mon Sep 17 00:00:00 2001
-From: Chongyu Zhu 
-Date: Tue, 6 Aug 2019 23:01:57 +0800
-Subject: [PATCH] probe: fix find_source_addr
-
-Index: packet/probe.c
 packet/probe.c.orig
-+++ packet/probe.c
-@@ -323,7 +323,7 @@ int find_source_addr(
-anything to the port.
-  */
- *sockaddr_port_offset(&dest_with_port) = htons(1);
--len = sockaddr_addr_size(&dest_with_port);
-+len = sockaddr_size(&dest_with_port);
- 
- sock = socket(destaddr->ss_family, SOCK_DGRAM, IPPROTO_UDP);
- if (sock == -1) {
-@@ -364,7 +364,7 @@ int find_source_addr(
-Zero the port, as we may later use this address to finding, and
-we don't want to use the port from the socket we just created.
-  */
--*sockaddr_port_offset(&srcaddr) = 0;
-+*sockaddr_port_offset(srcaddr) = 0;
- 
- return 0;
- }
Index: patches/patch-packet_probe_unix_c
===
RCS file: /cvs/ports/net/mtr/patches/patch-packet_probe_unix_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-packet_probe_unix_c
--- patches/patch-packet_probe_unix_c   21 Aug 2019 15:23:42 -  1.1
+++ patches/patch-packet_probe_unix_c   1 Sep 2021 13:56:52 -
@@ -3,7 +3,7 @@ $OpenBSD: patch-packet_probe_unix_c,v 1.
 Index: packet/probe_unix.c
 --- packet/probe_unix.c.orig
 +++ packet/probe_unix.c
-@@ -129,7 +129,7 @@ void check_length_order(
+@@ -137,7 +137,7 @@ void check_length_order(
  ssize_t bytes_sent;
  int packet_size;
  
@@ -12,21 +12,12 @@ Index: packet/probe_unix.c
  /*  Linux will accept either byte order and check below fails to work
   *  in some cases due to sendto() returning EPERM. */
  return;
-@@ -797,7 +797,7 @@ void receive_replies_from_recv_socket(
+@@ -805,7 +805,7 @@ void receive_replies_from_recv_socket(
+ }
  }
- #endif
  
 -#ifdef SO_PROTOCOL
 +#if defined(SO_PROTOCOL) && defined(HAVE_LINUX_ERRQUEUE_H)
  if (icmp_connrefused_received) {
  /* using ICMP type ICMP_ECHOREPLY is not a bug, it is an
 indication of successfully reaching dst host.
-@@ -818,7 +818,7 @@ void receive_replies_from_recv_socket(
- /* ICMP packets received from raw socket */
- handle_received_packet(net_state, &remote_addr, packet,
-packet_length, ×tamp);
--#ifdef SO_PROTOCOL
-+#if defined(SO_PROTOCOL) && defined(HAVE_LINUX_ERRQUEUE_H)
- }
- #endif
- }
Index:

Re: [update] net/mtr

2013-11-19 Thread David Hill
On Tue, Nov 19, 2013 at 04:25:56PM +0100, Jakob Schlyter wrote:
> On 18 nov 2013, at 15:00, Stuart Henderson  wrote:
> 
> > Thanks - Jakob, do you want to stay listed as maintainer of mtr?
> 
> No, please drop me - I'm a lousy maintainer anyway.
> 
>   jakob
>

I'll take maintainership if no one else wants it.

Index: Makefile
===
RCS file: /cvs/ports/net/mtr/Makefile,v
retrieving revision 1.55
diff -u -p -r1.55 Makefile
--- Makefile5 Oct 2013 11:50:00 -   1.55
+++ Makefile19 Nov 2013 15:38:58 -
@@ -1,12 +1,11 @@
 # $OpenBSD: Makefile,v 1.55 2013/10/05 11:50:00 sthen Exp $
 
-COMMENT=   Matt's traceroute - network diagnostic tool#'
+COMMENT=   Matt's traceroute - network diagnostic tool
 
-DISTNAME=  mtr-0.82
-REVISION=  2
+DISTNAME=  mtr-0.85
 CATEGORIES=net
 
-MAINTAINER= Jakob Schlyter 
+MAINTAINER=David Hill 
 
 HOMEPAGE=  http://www.bitwizard.nl/mtr/
 
@@ -34,7 +33,8 @@ WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gi
 WANTLIB += gtk-x11-2.0 pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1
 WANTLIB += png pthread pthread-stubs xcb xcb-render xcb-shm z
 .else
-CONFIGURE_ARGS+=   --without-gtk
+CONFIGURE_ARGS+=   --without-glib \
+   --without-gtk
 .endif
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/net/mtr/distinfo,v
retrieving revision 1.14
diff -u -p -r1.14 distinfo
--- distinfo29 May 2012 23:43:47 -  1.14
+++ distinfo19 Nov 2013 15:38:58 -
@@ -1,5 +1,2 @@
-MD5 (mtr-0.82.tar.gz) = EGAepUP9o+UVRcS84ZW2TA==
-RMD160 (mtr-0.82.tar.gz) = 3WCJYQcOF+s7TReuxMZn0LR06RM=
-SHA1 (mtr-0.82.tar.gz) = 8TGd4nMk2FiYqd8KKTpDi7qqErU=
-SHA256 (mtr-0.82.tar.gz) = 87RXyWI64DVlaIp//UnUhDpeJQXMrzuo2fvYbjzptqA=
-SIZE (mtr-0.82.tar.gz) = 270245
+SHA256 (mtr-0.85.tar.gz) = bWNy4V3Tdj1r6u6KIfAebpGG+vbtIPawUpkOGiv6Gcs=
+SIZE (mtr-0.85.tar.gz) = 217868
Index: patches/patch-gtk_c
===
RCS file: /cvs/ports/net/mtr/patches/patch-gtk_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-gtk_c
--- patches/patch-gtk_c 1 Apr 2013 14:08:26 -   1.3
+++ patches/patch-gtk_c 19 Nov 2013 15:38:58 -
@@ -3,8 +3,8 @@ $OpenBSD: patch-gtk_c,v 1.3 2013/04/01 1
 Fix 64-bit issue.
 Fix with newer glib.
 
 gtk.c.orig Mon Feb 14 08:50:59 2011
-+++ gtk.c  Mon Apr  1 14:50:24 2013
+--- gtk.c.orig Mon Apr 29 14:22:05 2013
 gtk.c  Sun Nov 17 16:44:55 2013
 @@ -21,6 +21,7 @@
  
  #include 
@@ -13,7 +13,7 @@ Fix with newer glib.
  #include 
  #include 
  #include 
-@@ -70,6 +71,7 @@ void gtk_do_init(int *argc, char ***argv) 
+@@ -69,6 +70,7 @@ void gtk_do_init(int *argc, char ***argv) 
static int done = 0;
  
if(!done) {
Index: patches/patch-report_c
===
RCS file: patches/patch-report_c
diff -N patches/patch-report_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-report_c  19 Nov 2013 15:38:58 -
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- report.c.orig  Mon May 13 11:22:54 2013
 report.c   Sun Nov 17 16:45:59 2013
+@@ -343,10 +343,10 @@ void csv_close(time_t now)
+ if(!ipinfo_no) {
+   char* fmtinfo = fmt_ipinfo(addr);
+   if (fmtinfo != NULL) fmtinfo = trim(fmtinfo);
+-  printf("MTR.%s;%lu;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", Hostname,
++  printf("MTR.%s;%lld;%s;%s;%d;%s;%s;%d", MTR_VERSION, (long long)now, 
"OK", Hostname,
+  at+1, name, fmtinfo, last);
+ } else {
+-  printf("MTR.%s;%lu;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", Hostname,
++  printf("MTR.%s;%lld;%s;%s;%d;%s;%d", MTR_VERSION, (long long)now, "OK", 
Hostname,
+  at+1, name, last);
+ }
+ 



Re: [update] net/mtr

2013-11-19 Thread Jakob Schlyter
On 18 nov 2013, at 15:00, Stuart Henderson  wrote:

> Thanks - Jakob, do you want to stay listed as maintainer of mtr?

No, please drop me - I'm a lousy maintainer anyway.

jakob



Re: [update] net/mtr

2013-11-18 Thread Antoine Jacoutot
On Mon, Nov 18, 2013 at 05:21:37PM +0100, Alexander Hall wrote:
> 
> 
> j...@wxcvbn.org wrote:
> >"Alexey E. Suslikov"  writes:
> >
> >> David Hill  mindcry.org> writes:
> >>
> >>>  COMMENT= Matt's traceroute - network diagnostic tool#'
> >>
> >> the end of COMMENT line looks strange to me.
> >
> >It's just here to please syntax hilighting in the text editor.
> >''make show=COMMENT''
> 
> I do understand the reason, and I don't do ports, but if I did, I wouldn't 
> find the insufficiency of $EDITOR a valid reason to add random chars here and 
> there. 

I fully agree.

-- 
Antoine



Re: [update] net/mtr

2013-11-18 Thread Alexander Hall


j...@wxcvbn.org wrote:
>"Alexey E. Suslikov"  writes:
>
>> David Hill  mindcry.org> writes:
>>
>>>  COMMENT=   Matt's traceroute - network diagnostic tool#'
>>
>> the end of COMMENT line looks strange to me.
>
>It's just here to please syntax hilighting in the text editor.
>''make show=COMMENT''

I do understand the reason, and I don't do ports, but if I did, I wouldn't find 
the insufficiency of $EDITOR a valid reason to add random chars here and there. 

/Alexander



Re: [update] net/mtr

2013-11-18 Thread Jérémie Courrèges-Anglas
"Alexey E. Suslikov"  writes:

> David Hill  mindcry.org> writes:
>
>>  COMMENT=Matt's traceroute - network diagnostic tool#'
>
> the end of COMMENT line looks strange to me.

It's just here to please syntax hilighting in the text editor.
''make show=COMMENT''

-- 
jca | PGP : 0x06A11494 / 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494



Re: [update] net/mtr

2013-11-18 Thread Alexey E. Suslikov
David Hill  mindcry.org> writes:

>  COMMENT= Matt's traceroute - network diagnostic tool#'

the end of COMMENT line looks strange to me.



Re: [update] net/mtr

2013-11-18 Thread Stuart Henderson
On 2013/11/18 08:55, David Hill wrote:
> New diff, thanks to krw@ and sthen@ for pointing out the missing cast.

Thanks - Jakob, do you want to stay listed as maintainer of mtr?



Re: [update] net/mtr

2013-11-18 Thread David Hill
On Mon, Nov 18, 2013 at 10:31:54AM +, Stuart Henderson wrote:
> On 2013/11/17 17:01, David Hill wrote:
> > update net/mtr to 0.85.  Add --without-glib to prevent picking it up.
> > Add patch to use %lld for time_t.
> 
> ah good, this works better than the previous updates I tried which
> had problems with, iirc, the new IPv6 nameserver support.
> 
> > +   if (fmtinfo != NULL) fmtinfo = trim(fmtinfo);
> > +-  printf("MTR.%s;%lu;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", 
> > Hostname,
> > ++  printf("MTR.%s;%lld;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", 
> > Hostname,
> > +  at+1, name, fmtinfo, last);
> ..
> > +-  printf("MTR.%s;%lu;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", 
> > Hostname,
> > ++  printf("MTR.%s;%lld;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", 
> > Hostname,
> > +  at+1, name, last);
> 
> these aren't quite correct, now should be cast to (long long) as was done
> in the diff which was committed upstream
> 
> https://github.com/traviscross/mtr/commit/57f2d65e8fd5.patch
> 
>

New diff, thanks to krw@ and sthen@ for pointing out the missing cast.

Index: Makefile
===
RCS file: /cvs/ports/net/mtr/Makefile,v
retrieving revision 1.55
diff -u -p -r1.55 Makefile
--- Makefile5 Oct 2013 11:50:00 -   1.55
+++ Makefile18 Nov 2013 13:54:34 -
@@ -2,8 +2,7 @@
 
 COMMENT=   Matt's traceroute - network diagnostic tool#'
 
-DISTNAME=  mtr-0.82
-REVISION=  2
+DISTNAME=  mtr-0.85
 CATEGORIES=net
 
 MAINTAINER= Jakob Schlyter 
@@ -34,7 +33,8 @@ WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gi
 WANTLIB += gtk-x11-2.0 pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1
 WANTLIB += png pthread pthread-stubs xcb xcb-render xcb-shm z
 .else
-CONFIGURE_ARGS+=   --without-gtk
+CONFIGURE_ARGS+=   --without-glib \
+   --without-gtk
 .endif
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/net/mtr/distinfo,v
retrieving revision 1.14
diff -u -p -r1.14 distinfo
--- distinfo29 May 2012 23:43:47 -  1.14
+++ distinfo18 Nov 2013 13:54:34 -
@@ -1,5 +1,2 @@
-MD5 (mtr-0.82.tar.gz) = EGAepUP9o+UVRcS84ZW2TA==
-RMD160 (mtr-0.82.tar.gz) = 3WCJYQcOF+s7TReuxMZn0LR06RM=
-SHA1 (mtr-0.82.tar.gz) = 8TGd4nMk2FiYqd8KKTpDi7qqErU=
-SHA256 (mtr-0.82.tar.gz) = 87RXyWI64DVlaIp//UnUhDpeJQXMrzuo2fvYbjzptqA=
-SIZE (mtr-0.82.tar.gz) = 270245
+SHA256 (mtr-0.85.tar.gz) = bWNy4V3Tdj1r6u6KIfAebpGG+vbtIPawUpkOGiv6Gcs=
+SIZE (mtr-0.85.tar.gz) = 217868
Index: patches/patch-gtk_c
===
RCS file: /cvs/ports/net/mtr/patches/patch-gtk_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-gtk_c
--- patches/patch-gtk_c 1 Apr 2013 14:08:26 -   1.3
+++ patches/patch-gtk_c 18 Nov 2013 13:54:34 -
@@ -3,8 +3,8 @@ $OpenBSD: patch-gtk_c,v 1.3 2013/04/01 1
 Fix 64-bit issue.
 Fix with newer glib.
 
 gtk.c.orig Mon Feb 14 08:50:59 2011
-+++ gtk.c  Mon Apr  1 14:50:24 2013
+--- gtk.c.orig Mon Apr 29 14:22:05 2013
 gtk.c  Sun Nov 17 16:44:55 2013
 @@ -21,6 +21,7 @@
  
  #include 
@@ -13,7 +13,7 @@ Fix with newer glib.
  #include 
  #include 
  #include 
-@@ -70,6 +71,7 @@ void gtk_do_init(int *argc, char ***argv) 
+@@ -69,6 +70,7 @@ void gtk_do_init(int *argc, char ***argv) 
static int done = 0;
  
if(!done) {
Index: patches/patch-report_c
===
RCS file: patches/patch-report_c
diff -N patches/patch-report_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-report_c  18 Nov 2013 13:54:34 -
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- report.c.orig  Mon May 13 11:22:54 2013
 report.c   Sun Nov 17 16:45:59 2013
+@@ -343,10 +343,10 @@ void csv_close(time_t now)
+ if(!ipinfo_no) {
+   char* fmtinfo = fmt_ipinfo(addr);
+   if (fmtinfo != NULL) fmtinfo = trim(fmtinfo);
+-  printf("MTR.%s;%lu;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", Hostname,
++  printf("MTR.%s;%lld;%s;%s;%d;%s;%s;%d", MTR_VERSION, (long long)now, 
"OK", Hostname,
+  at+1, name, fmtinfo, last);
+ } else {
+-  printf("MTR.%s;%lu;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", Hostname,
++  printf("MTR.%s;%lld;%s;%s;%d;%s;%d", MTR_VERSION, (long long)now, "OK", 
Hostname,
+  at+1, name, last);
+ }
+ 



Re: [update] net/mtr

2013-11-18 Thread Stuart Henderson
On 2013/11/17 17:01, David Hill wrote:
> update net/mtr to 0.85.  Add --without-glib to prevent picking it up.
> Add patch to use %lld for time_t.

ah good, this works better than the previous updates I tried which
had problems with, iirc, the new IPv6 nameserver support.

> +   if (fmtinfo != NULL) fmtinfo = trim(fmtinfo);
> +-  printf("MTR.%s;%lu;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", 
> Hostname,
> ++  printf("MTR.%s;%lld;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", 
> Hostname,
> +  at+1, name, fmtinfo, last);
..
> +-  printf("MTR.%s;%lu;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", Hostname,
> ++  printf("MTR.%s;%lld;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", Hostname,
> +  at+1, name, last);

these aren't quite correct, now should be cast to (long long) as was done
in the diff which was committed upstream

https://github.com/traviscross/mtr/commit/57f2d65e8fd5.patch




[update] net/mtr

2013-11-17 Thread David Hill
update net/mtr to 0.85.  Add --without-glib to prevent picking it up.
Add patch to use %lld for time_t.

- David

Index: Makefile
===
RCS file: /cvs/ports/net/mtr/Makefile,v
retrieving revision 1.55
diff -u -p -r1.55 Makefile
--- Makefile5 Oct 2013 11:50:00 -   1.55
+++ Makefile17 Nov 2013 21:59:24 -
@@ -2,8 +2,7 @@
 
 COMMENT=   Matt's traceroute - network diagnostic tool#'
 
-DISTNAME=  mtr-0.82
-REVISION=  2
+DISTNAME=  mtr-0.85
 CATEGORIES=net
 
 MAINTAINER= Jakob Schlyter 
@@ -34,7 +33,8 @@ WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gi
 WANTLIB += gtk-x11-2.0 pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1
 WANTLIB += png pthread pthread-stubs xcb xcb-render xcb-shm z
 .else
-CONFIGURE_ARGS+=   --without-gtk
+CONFIGURE_ARGS+=   --without-glib \
+   --without-gtk
 .endif
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/net/mtr/distinfo,v
retrieving revision 1.14
diff -u -p -r1.14 distinfo
--- distinfo29 May 2012 23:43:47 -  1.14
+++ distinfo17 Nov 2013 21:59:24 -
@@ -1,5 +1,2 @@
-MD5 (mtr-0.82.tar.gz) = EGAepUP9o+UVRcS84ZW2TA==
-RMD160 (mtr-0.82.tar.gz) = 3WCJYQcOF+s7TReuxMZn0LR06RM=
-SHA1 (mtr-0.82.tar.gz) = 8TGd4nMk2FiYqd8KKTpDi7qqErU=
-SHA256 (mtr-0.82.tar.gz) = 87RXyWI64DVlaIp//UnUhDpeJQXMrzuo2fvYbjzptqA=
-SIZE (mtr-0.82.tar.gz) = 270245
+SHA256 (mtr-0.85.tar.gz) = bWNy4V3Tdj1r6u6KIfAebpGG+vbtIPawUpkOGiv6Gcs=
+SIZE (mtr-0.85.tar.gz) = 217868
Index: patches/patch-gtk_c
===
RCS file: /cvs/ports/net/mtr/patches/patch-gtk_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-gtk_c
--- patches/patch-gtk_c 1 Apr 2013 14:08:26 -   1.3
+++ patches/patch-gtk_c 17 Nov 2013 21:59:24 -
@@ -3,8 +3,8 @@ $OpenBSD: patch-gtk_c,v 1.3 2013/04/01 1
 Fix 64-bit issue.
 Fix with newer glib.
 
 gtk.c.orig Mon Feb 14 08:50:59 2011
-+++ gtk.c  Mon Apr  1 14:50:24 2013
+--- gtk.c.orig Mon Apr 29 14:22:05 2013
 gtk.c  Sun Nov 17 16:44:55 2013
 @@ -21,6 +21,7 @@
  
  #include 
@@ -13,7 +13,7 @@ Fix with newer glib.
  #include 
  #include 
  #include 
-@@ -70,6 +71,7 @@ void gtk_do_init(int *argc, char ***argv) 
+@@ -69,6 +70,7 @@ void gtk_do_init(int *argc, char ***argv) 
static int done = 0;
  
if(!done) {
Index: patches/patch-report_c
===
RCS file: patches/patch-report_c
diff -N patches/patch-report_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-report_c  17 Nov 2013 21:59:24 -
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- report.c.orig  Mon May 13 11:22:54 2013
 report.c   Sun Nov 17 16:45:59 2013
+@@ -343,10 +343,10 @@ void csv_close(time_t now)
+ if(!ipinfo_no) {
+   char* fmtinfo = fmt_ipinfo(addr);
+   if (fmtinfo != NULL) fmtinfo = trim(fmtinfo);
+-  printf("MTR.%s;%lu;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", Hostname,
++  printf("MTR.%s;%lld;%s;%s;%d;%s;%s;%d", MTR_VERSION, now, "OK", 
Hostname,
+  at+1, name, fmtinfo, last);
+ } else {
+-  printf("MTR.%s;%lu;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", Hostname,
++  printf("MTR.%s;%lld;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", Hostname,
+  at+1, name, last);
+ }
+ 



UPDATE: net/mtr

2009-03-08 Thread Benoit Lecocq
Hi,

This is a trivial diff for the latest version of mtr 0.75.

Tested on amd64.

--
Benoit Lecocq
Index: Makefile
===
RCS file: /cvs/ports/net/mtr/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile8 Mar 2009 18:15:45 -   1.37
+++ Makefile9 Mar 2009 05:54:06 -
@@ -2,8 +2,8 @@
 
 COMMENT=   Matt's traceroute - network diagnostic tool
 
-DISTNAME=  mtr-0.74
-PKGNAME=   ${DISTNAME}p1
+DISTNAME=  mtr-0.75
+PKGNAME=   ${DISTNAME}
 CATEGORIES=net
 
 MAINTAINER= Jakob Schlyter 
Index: distinfo
===
RCS file: /cvs/ports/net/mtr/distinfo,v
retrieving revision 1.11
diff -u -r1.11 distinfo
--- distinfo22 Aug 2008 00:08:57 -  1.11
+++ distinfo9 Mar 2009 05:54:06 -
@@ -1,5 +1,5 @@
-MD5 (mtr-0.74.tar.gz) = C8FgHJvG8qSvWMa1uspGaA==
-RMD160 (mtr-0.74.tar.gz) = OLuivugPKuUYA1ThjwJdcVBvNzk=
-SHA1 (mtr-0.74.tar.gz) = MwOPAocoJ6wPPxDUt6htAsdkWaU=
-SHA256 (mtr-0.74.tar.gz) = cqAQleYjtVpSI6Z9jeunWVMEv+I9iNa2bT53hOSnGD8=
-SIZE (mtr-0.74.tar.gz) = 178587
+MD5 (mtr-0.75.tar.gz) = I7rKUtCSLC7Lp+ugUxeGjA==
+RMD160 (mtr-0.75.tar.gz) = 199BwMm0V+7/QDTJvC8BRWuPbGg=
+SHA1 (mtr-0.75.tar.gz) = 2dP4SeMt2oqlp6KXwlBT5dhQSyc=
+SHA256 (mtr-0.75.tar.gz) = HRpd5rIzKJvxeiHjv4PILbR9IrsmmvmGIpt4honh8PM=
+SIZE (mtr-0.75.tar.gz) = 179376


UPDATE: net/mtr

2006-02-01 Thread David Hill
Updates mtr to 0.69 which has ipv6 support.

patches fix duplicate entries for multi-path routers and actually make
ipv6 work on BSD.

David

Index: ports/net/mtr/Makefile
===
RCS file: /cvs/ports/net/mtr/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- ports/net/mtr/Makefile  23 Mar 2005 19:45:31 -  1.29
+++ ports/net/mtr/Makefile  1 Feb 2006 22:43:33 -
@@ -2,7 +2,7 @@
 
 COMMENT=   "Matt's traceroute - network diagnostic tool"
 
-VERSION=   0.67
+VERSION=   0.69
 DISTNAME=  mtr-${VERSION}
 CATEGORIES=net
 
Index: ports/net/mtr/distinfo
===
RCS file: /cvs/ports/net/mtr/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- ports/net/mtr/distinfo  5 Jan 2005 17:14:48 -   1.6
+++ ports/net/mtr/distinfo  1 Feb 2006 22:43:33 -
@@ -1,4 +1,4 @@
-MD5 (mtr-0.67.tar.gz) = 76347197775ac604d7150ea01502a1df
-RMD160 (mtr-0.67.tar.gz) = 2bd87ddb09a4c2aaf0f78156d8d8f272b4060f29
-SHA1 (mtr-0.67.tar.gz) = 23fe652ebe25fe86fcb421e78eb76917248b9c94
-SIZE (mtr-0.67.tar.gz) = 131393
+MD5 (mtr-0.69.tar.gz) = 58904d6d8d70114195cdeb653d56914c
+RMD160 (mtr-0.69.tar.gz) = e95e0f27253d8d94587b429cbb65311035e93c2e
+SHA1 (mtr-0.69.tar.gz) = 3fd0fa148b349d1966e0d79af0ffb84ecc7bed4b
+SIZE (mtr-0.69.tar.gz) = 183216
Index: ports/net/mtr/patches/patch-dns.c
===
RCS file: ports/net/mtr/patches/patch-dns.c
diff -N ports/net/mtr/patches/patch-dns.c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ ports/net/mtr/patches/patch-dns.c   1 Feb 2006 22:43:33 -
@@ -0,0 +1,29 @@
+--- dns.c.orig Wed Feb  1 17:38:28 2006
 dns.c  Wed Feb  1 17:39:26 2006
+@@ -437,7 +437,7 @@
+ }
+ 
+ 
+-int longipstr(char *s, ip_t *dst)
++int longipstr(char *s, ip_t *dst, int af)
+ {
+ #ifdef ENABLE_IPV6
+   return inet_pton( af, s, dst );
+@@ -488,7 +488,7 @@
+   strerror(errno));
+ exit(-1);
+   }
+-  longipstr( "127.0.0.1", &localhost );
++  longipstr( "127.0.0.1", &localhost, AF_INET );
+   aseed = time(NULL) ^ (time(NULL) << 3) ^ (dword)getpid();
+   for (i = 0;i < BashSize;i++) {
+ idbash[i] = NULL;
+@@ -1228,7 +1228,7 @@
+   if ( addrcmp( (void *) &(_res.nsaddr_list[i].sin_addr),
+ (void *) &(from4->sin_addr), (int) AF_INET ) == 0 ||
+addrcmp( (void *) &(_res.nsaddr_list[i].sin_addr),
+-(void *) &unspec_addr, (int) AF_INET ) != 0 ) /* 
0.0.0.0 replies as 127.0.0.1 */
++(void *) &unspec_addr, (int) AF_INET ) == 0 ) /* 
0.0.0.0 replies as 127.0.0.1 */
+ break;
+ } else
+   for (i = 0;i < _res.nscount;i++)
Index: ports/net/mtr/patches/patch-net.c
===
RCS file: ports/net/mtr/patches/patch-net.c
diff -N ports/net/mtr/patches/patch-net.c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ ports/net/mtr/patches/patch-net.c   1 Feb 2006 22:43:33 -
@@ -0,0 +1,28 @@
+--- net.c.orig Wed Feb  1 17:37:38 2006
 net.c  Wed Feb  1 17:38:17 2006
+@@ -277,7 +277,7 @@
+   exit( EXIT_FAILURE);
+ }
+ echotype = ICMP6_ECHO_REQUEST;
+-salen = sizeof (struct sockaddr_storage);
++salen = sizeof (struct sockaddr_in6);
+ break;
+ #endif
+   }
+@@ -305,7 +305,6 @@
+ rv = sendto(sendsock, packet, abs(packetsize), 0, 
+   remotesockaddr, salen);
+ if (rv >= 0) {
+-  fprintf (stderr, "You've got a broken (FreeBSD?) system\n");
+   BSDfix = 1;
+ }
+   }
+@@ -346,7 +345,7 @@
+ addrcpy( (void *) &(host[index].addrs[0]), addr, af );
+   } else {
+ for( i=0; i