[gentoo-commits] repo/gentoo:master commit in: net-analyzer/mtr/, net-analyzer/mtr/files/

2023-07-28 Thread Sam James
commit: a951a89289d8b3d8129f02141e38f5413a55902f
Author: Sam James  gentoo  org>
AuthorDate: Fri Jul 28 13:41:50 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jul 28 13:41:50 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a951a892

net-analyzer/mtr: backport F_S=3 fix

Closes: https://bugs.gentoo.org/911389
Signed-off-by: Sam James  gentoo.org>

 .../mtr/files/mtr-0.95-fortify-source-3.patch  | 34 ++
 .../mtr/{mtr-.ebuild => mtr-0.95-r1.ebuild}|  9 +++---
 net-analyzer/mtr/mtr-.ebuild   |  9 +++---
 3 files changed, 44 insertions(+), 8 deletions(-)

diff --git a/net-analyzer/mtr/files/mtr-0.95-fortify-source-3.patch 
b/net-analyzer/mtr/files/mtr-0.95-fortify-source-3.patch
new file mode 100644
index ..0c3d593915e4
--- /dev/null
+++ b/net-analyzer/mtr/files/mtr-0.95-fortify-source-3.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/911389
+https://github.com/traviscross/mtr/pull/468
+https://github.com/traviscross/mtr/commit/a1548b40c0dcf6dd44c5e6906f829e249428436b
+
+From 5908af4c19188cb17b62f23368b6ef462831a0cb Mon Sep 17 00:00:00 2001
+From: Marcus Meissner 
+Date: Tue, 11 Apr 2023 16:05:36 +0200
+Subject: [PATCH] fixed the sizes passed into snprintf
+
+--- a/ui/report.c
 b/ui/report.c
+@@ -140,7 +140,7 @@ void report_close(
+ continue;
+ 
+ snprintf(fmt, sizeof(fmt), "%%%ds", data_fields[j].length);
+-snprintf(buf + len, sizeof(buf), fmt, data_fields[j].title);
++snprintf(buf + len, sizeof(buf) - len, fmt, data_fields[j].title);
+ len += data_fields[j].length;
+ }
+ printf("%s\n", buf);
+@@ -172,10 +172,10 @@ void report_close(
+ 
+ /* 1000.0 is a temporary hack for stats usec to ms, impacted 
net_loss. */
+ if (strchr(data_fields[j].format, 'f')) {
+-snprintf(buf + len, sizeof(buf), data_fields[j].format,
++snprintf(buf + len, sizeof(buf) - len, data_fields[j].format,
+  data_fields[j].net_xxx(at) / 1000.0);
+ } else {
+-snprintf(buf + len, sizeof(buf), data_fields[j].format,
++snprintf(buf + len, sizeof(buf) - len, data_fields[j].format,
+  data_fields[j].net_xxx(at));
+ }
+ len += data_fields[j].length;
+

diff --git a/net-analyzer/mtr/mtr-.ebuild 
b/net-analyzer/mtr/mtr-0.95-r1.ebuild
similarity index 84%
copy from net-analyzer/mtr/mtr-.ebuild
copy to net-analyzer/mtr/mtr-0.95-r1.ebuild
index 42b6aeb30b04..a2c2010db273 100644
--- a/net-analyzer/mtr/mtr-.ebuild
+++ b/net-analyzer/mtr/mtr-0.95-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools bash-completion-r1 fcaps
 
@@ -13,7 +13,7 @@ if [[ ${PV} == ** ]] ; then
inherit git-r3
 else
SRC_URI="https://github.com/traviscross/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
-   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+   KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv 
~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
 fi
 
 LICENSE="GPL-2"
@@ -28,7 +28,7 @@ RDEPEND="
x11-libs/gtk+:3
)
jansson? ( dev-libs/jansson:= )
-   ncurses? ( sys-libs/ncurses:0= )
+   ncurses? ( sys-libs/ncurses:= )
 "
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
@@ -38,6 +38,7 @@ FILECAPS=( cap_net_raw usr/sbin/mtr-packet )
 
 PATCHES=(
"${FILESDIR}"/${PN}-0.88-tinfo.patch
+   "${FILESDIR}"/${P}-fortify-source-3.patch
 )
 
 src_prepare() {

diff --git a/net-analyzer/mtr/mtr-.ebuild b/net-analyzer/mtr/mtr-.ebuild
index 42b6aeb30b04..a2c2010db273 100644
--- a/net-analyzer/mtr/mtr-.ebuild
+++ b/net-analyzer/mtr/mtr-.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools bash-completion-r1 fcaps
 
@@ -13,7 +13,7 @@ if [[ ${PV} == ** ]] ; then
inherit git-r3
 else
SRC_URI="https://github.com/traviscross/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
-   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+   KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv 
~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
 fi
 
 LICENSE="GPL-2"
@@ -28,7 +28,7 @@ RDEPEND="
x11-libs/gtk+:3
)
jansson? ( dev-libs/jansson:= )
-   ncurses? ( sys-libs/ncurses:0= )
+   ncurses? ( sys-libs/ncurses:= )
 "
 DEPEND="${RDEPEND}"
 

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/mtr/, net-analyzer/mtr/files/

2020-12-19 Thread Sam James
commit: 3aaadef8745a7250dc238ec8cd5daad45d73179d
Author: Sam James  gentoo  org>
AuthorDate: Sun Dec 20 06:25:27 2020 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Dec 20 06:25:27 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3aaadef8

net-analyzer/mtr: cleanup old

Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2
Signed-off-by: Sam James  gentoo.org>

 net-analyzer/mtr/Manifest  |  2 -
 net-analyzer/mtr/files/mtr-0.80-impl-dec.patch | 12 -
 net-analyzer/mtr/files/mtr-0.87-ipv6.patch | 59 
 net-analyzer/mtr/files/mtr-0.87-tinfo.patch| 11 -
 net-analyzer/mtr/mtr-0.87.ebuild   | 51 -
 net-analyzer/mtr/mtr-0.93-r2.ebuild| 62 --
 6 files changed, 197 deletions(-)

diff --git a/net-analyzer/mtr/Manifest b/net-analyzer/mtr/Manifest
index a1baea181ad..69472acc09a 100644
--- a/net-analyzer/mtr/Manifest
+++ b/net-analyzer/mtr/Manifest
@@ -1,3 +1 @@
-DIST mtr-0.87.tar.gz 184645 BLAKE2B 
e96535b0bd46ee63c5e6110ee465195a9ead6ff7c7ea3629b2668631f25e9181cf4236ba0e2cfc0517e7c70683bbb6347d9c26a2b09701d89e225c27aa2faae4
 SHA512 
172ba2f78a6ee4deb427ac2fb00dff16843215dbd23663fbe41fcc957ffe278b408a73a0c7e1c05788b235e2d03fb53f9971b8b82d4de2f95edcaa9f2cff3cf9
-DIST mtr-0.93.tar.gz 291015 BLAKE2B 
6ac0e21f9e06fbfee9e9ada4cddb6cd9685ae669a05d1ed257a2c238ab78ac16e1a1e152ef1359ca530b0eced14c9333df2b691c27cbc29173c843ebc64eaaa9
 SHA512 
046e98a661bd6248ce819411ceb6e2b875b92877de38523594898df507836c113573cf40d7d4cc548370f515abe99e0aa4d8b3ba44ad54dd00f8e93c8a96c021
 DIST mtr-0.94.tar.gz 143616 BLAKE2B 
e9b4619a85a515d729f0987d5882fb91e4bfa3be82476efbfdb832d0b13ed334be1c1a1bcf8ab4ca820002e79ca4a24d0b50f2739d9284b7dec0b8852a1a91e0
 SHA512 
0e58bd79562ff80f9308135562ab22aa1f1eea686aefd3aef07bac05e661e34b60fde7c66c96bf4f0919f546376fbd6106ecd8fa92328c24f6f903097496bf11

diff --git a/net-analyzer/mtr/files/mtr-0.80-impl-dec.patch 
b/net-analyzer/mtr/files/mtr-0.80-impl-dec.patch
deleted file mode 100644
index 5b41a54c744..000
--- a/net-analyzer/mtr/files/mtr-0.80-impl-dec.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/gtk.c b/gtk.c
-index e42f4f6..333d7c8 100644
 a/gtk.c
-+++ b/gtk.c
-@@ -24,6 +24,7 @@
- #include 
- #include 
- #include 
-+#include 
- 
- #ifndef NO_GTK
- #include 

diff --git a/net-analyzer/mtr/files/mtr-0.87-ipv6.patch 
b/net-analyzer/mtr/files/mtr-0.87-ipv6.patch
deleted file mode 100644
index 32a62853387..000
--- a/net-analyzer/mtr/files/mtr-0.87-ipv6.patch
+++ /dev/null
@@ -1,59 +0,0 @@
 a/net.c
-+++ b/net.c
-@@ -320,9 +320,13 @@
-   struct sockaddr_storage local;
-   struct sockaddr_storage remote;
-   struct sockaddr_in *local4 = (struct sockaddr_in *) 
-+#ifdef ENABLE_IPV6
-   struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) 
-+#endif
-   struct sockaddr_in *remote4 = (struct sockaddr_in *) 
-+#ifdef ENABLE_IPV6
-   struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) 
-+#endif
-   socklen_t len;
- 
-   ttl = index + 1;
-@@ -437,9 +441,13 @@
-   struct sockaddr_storage local;
-   struct sockaddr_storage remote;
-   struct sockaddr_in *local4 = (struct sockaddr_in *) 
-+#ifdef ENABLE_IPV6
-   struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) 
-+#endif
-   struct sockaddr_in *remote4 = (struct sockaddr_in *) 
-+#ifdef ENABLE_IPV6
-   struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) 
-+#endif
-   socklen_t len;
- 
-   ttl = index + 1;
-@@ -726,8 +734,12 @@
- 
-   /* sendto() assumes packet length includes the IPv4 header but not the 
-  IPv6 header. */
-+#ifdef ENABLE_IPV6
-   spacketsize = abs(packetsize)   -
-   ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) );
-+#else
-+  spacketsize = abs(packetsize);
-+#endif
-   rv = sendto(sendsock, packet, spacketsize, 0, remotesockaddr, salen);
-   if (first && (rv < 0) && ((errno == EINVAL) || (errno == EMSGSIZE))) {
- /* Try the first packet again using host byte order. */
-@@ -1535,11 +1547,15 @@
-   struct sockaddr_in name_struct;
- #endif
-   struct sockaddr_in *  sa4;
-+#ifdef ENABLE_IPV6
-   struct sockaddr_in6 * sa6;
-+#endif
-   struct sockaddr * name = (struct sockaddr *) _struct;
-   struct sockaddr_storage remote;
-   struct sockaddr_in *remote4 = (struct sockaddr_in *) 
-+#ifdef ENABLE_IPV6
-   struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) 
-+#endif
-   socklen_t len;
-   int s;
- 

diff --git a/net-analyzer/mtr/files/mtr-0.87-tinfo.patch 
b/net-analyzer/mtr/files/mtr-0.87-tinfo.patch
deleted file mode 100644
index 4dbdef1cc2f..000
--- a/net-analyzer/mtr/files/mtr-0.87-tinfo.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/configure.ac
-+++ b/configure.ac
-@@ -25,6 +25,8 @@
-   AC_DEFINE(NO_CURSES, 1, [Define if you don't have the curses libraries 
available.])
-   CURSES_OBJ=)
- 
-+AC_SEARCH_LIBS(raw, [ncurses curses cursesX tinfo])
-+
- AC_CHECK_LIB(ncurses, use_default_colors, 
-   

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/mtr/, net-analyzer/mtr/files/

2017-01-15 Thread Jeroen Roovers
commit: 8fab9ae188879d604935d56ea95594a96df535b5
Author: Jeroen Roovers  gentoo  org>
AuthorDate: Sun Jan 15 11:04:28 2017 +
Commit: Jeroen Roovers  gentoo  org>
CommitDate: Sun Jan 15 11:04:28 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fab9ae1

net-analyzer/mtr: Fix tinfo patch, add USE=ncurses.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 net-analyzer/mtr/files/mtr--tinfo.patch | 16 
 net-analyzer/mtr/mtr-.ebuild| 17 -
 2 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/net-analyzer/mtr/files/mtr--tinfo.patch 
b/net-analyzer/mtr/files/mtr--tinfo.patch
new file mode 100644
index ..92e261c
--- /dev/null
+++ b/net-analyzer/mtr/files/mtr--tinfo.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac
 b/configure.ac
+@@ -101,8 +101,11 @@
+   # (On Solaris 11.3, ncurses builds and links for us, but curses does not.)
+   [AC_SEARCH_LIBS(
+ [initscr], [ncurses curses],
+-[AC_DEFINE([HAVE_CURSES], [1], [Define if a curses library available])],
+-[with_ncurses=no])
++  AC_SEARCH_LIBS(
++  [raw], [ncurses curses cursesX tinfo],
++  [AC_DEFINE([HAVE_CURSES], [1], [Define if a curses library available])],
++  [with_ncurses=no]),
++  [with_ncurses=no])
+ ])
+ AM_CONDITIONAL([WITH_CURSES], [test "x$with_ncurses" = xyes])
+ 

diff --git a/net-analyzer/mtr/mtr-.ebuild b/net-analyzer/mtr/mtr-.ebuild
index 0bc99ab..797b07c 100644
--- a/net-analyzer/mtr/mtr-.ebuild
+++ b/net-analyzer/mtr/mtr-.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -13,14 +13,14 @@ SRC_URI="mirror://gentoo/gtk-2.0-for-mtr.m4.bz2"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS=""
-IUSE="gtk ipv6"
+IUSE="gtk ipv6 ncurses"
 
 RDEPEND="
-   sys-libs/ncurses:0=
gtk? (
dev-libs/glib:2
x11-libs/gtk+:2
)
+   ncurses? ( sys-libs/ncurses:0= )
 "
 DEPEND="
${RDEPEND}
@@ -31,7 +31,7 @@ DEPEND="
 DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO )
 FILECAPS=( cap_net_raw /usr/sbin/mtr )
 PATCHES=(
-   "${FILESDIR}"/${PN}-0.80-impl-dec.patch
+   "${FILESDIR}"/${PN}--tinfo.patch
 )
 
 src_unpack() {
@@ -40,22 +40,21 @@ src_unpack() {
 }
 
 src_prepare() {
-   default
-
# Keep this comment and following mv, even in case ebuild does not need
# it: kept gtk-2.0.m4 in SRC_URI but you'll have to mv it before 
autoreconf
mv "${WORKDIR}"/gtk-2.0-for-mtr.m4 gtk-2.0.m4 || die #222909
 
-   eapply_user
+   default
 
AT_M4DIR="." eautoreconf
 }
 
 src_configure() {
# In the source's configure script -lresolv is commented out. 
Apparently it
-   # is needed for 64bit macos still.
+   # is still needed for 64-bit MacOS.
[[ ${CHOST} == *-darwin* ]] && append-libs -lresolv
econf \
$(use_enable ipv6) \
-   $(use_with gtk)
+   $(use_with gtk) \
+   $(use_with ncurses)
 }



[gentoo-commits] repo/gentoo:master commit in: net-analyzer/mtr/, net-analyzer/mtr/files/

2017-01-15 Thread Jeroen Roovers
commit: 3f82d04cf9765dfaa28c8dcb5281284ef4cc854f
Author: Jeroen Roovers  gentoo  org>
AuthorDate: Sun Jan 15 10:51:41 2017 +
Commit: Jeroen Roovers  gentoo  org>
CommitDate: Sun Jan 15 10:51:41 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f82d04c

net-analyzer/mtr: Rename patches to match version.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 net-analyzer/mtr/files/{mtr--ipv6.patch => mtr-0.87-ipv6.patch}   | 0
 net-analyzer/mtr/files/{mtr--tinfo.patch => mtr-0.87-tinfo.patch} | 0
 net-analyzer/mtr/mtr-0.87.ebuild  | 4 ++--
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-analyzer/mtr/files/mtr--ipv6.patch 
b/net-analyzer/mtr/files/mtr-0.87-ipv6.patch
similarity index 100%
rename from net-analyzer/mtr/files/mtr--ipv6.patch
rename to net-analyzer/mtr/files/mtr-0.87-ipv6.patch

diff --git a/net-analyzer/mtr/files/mtr--tinfo.patch 
b/net-analyzer/mtr/files/mtr-0.87-tinfo.patch
similarity index 100%
rename from net-analyzer/mtr/files/mtr--tinfo.patch
rename to net-analyzer/mtr/files/mtr-0.87-tinfo.patch

diff --git a/net-analyzer/mtr/mtr-0.87.ebuild b/net-analyzer/mtr/mtr-0.87.ebuild
index 2d44c3b..6fe4e08 100644
--- a/net-analyzer/mtr/mtr-0.87.ebuild
+++ b/net-analyzer/mtr/mtr-0.87.ebuild
@@ -31,8 +31,8 @@ DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO )
 FILECAPS=( cap_net_raw /usr/sbin/mtr )
 PATCHES=(
"${FILESDIR}"/${PN}-0.80-impl-dec.patch
-   "${FILESDIR}"/${PN}--ipv6.patch
-   "${FILESDIR}"/${PN}--tinfo.patch
+   "${FILESDIR}"/${PN}-0.87-ipv6.patch
+   "${FILESDIR}"/${PN}-0.87-tinfo.patch
 )
 
 src_prepare() {