Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/chaosreader/files/, net-analyzer/chaosreader/
Date: Wed, 27 Feb 2019 04:25:51
Message-Id: 1551241285.36fd5fe247af567f69cf4acc7c0fcba176b626e7.bman@gentoo
1 commit: 36fd5fe247af567f69cf4acc7c0fcba176b626e7
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Thu Feb 21 18:07:51 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 27 04:21:25 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36fd5fe2
7
8 net-analyzer/chaosreader: version bump (0.96), EAPI7
9
10 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
11 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
12
13 net-analyzer/chaosreader/Manifest | 1 +
14 net-analyzer/chaosreader/chaosreader-0.96.ebuild | 28 ++++++++++++++++++++++
15 .../files/chaosreader-0.96-chunkcheck.patch | 27 +++++++++++++++++++++
16 .../files/chaosreader-0.96-divisionbyzero.patch | 18 ++++++++++++++
17 .../files/chaosreader-0.96-zombies.patch | 11 +++++++++
18 5 files changed, 85 insertions(+)
19
20 diff --git a/net-analyzer/chaosreader/Manifest b/net-analyzer/chaosreader/Manifest
21 index abd523f211f..a52d4d09f5f 100644
22 --- a/net-analyzer/chaosreader/Manifest
23 +++ b/net-analyzer/chaosreader/Manifest
24 @@ -1 +1,2 @@
25 DIST chaosreader-0.94.bz2 41039 BLAKE2B 664ac7de3ea15dcc2942f7d9ffa4a7ffd2066a521345877127594ece197cab8d49d2f3441335c012dc09041543cda31c723d021ae86a512b4d578f958acc3afc SHA512 f2c2b31e6f7fc27c5cb59a43ce9cdea67de520c79f6354c9a0f627c098d73f4666461fb4f3c393a0a9ac36105979fe36b08035c4404371db2f573dd534e1adad
26 +DIST chaosreader-0.96.tar.gz 99124 BLAKE2B 04e9dd45543033bb3d15264fcc9168b7e2cec6f304f10142df36c363e841afc91659d7956bbb60b05cc6ab4e8fd519adaf9a2e69be2efc129fd2f38ca0d99f1f SHA512 46ba4a66152403e150e652bf6fa08af98cd3d709ea2cb834a32411ca5dde5f94a7e972404626787e604c1449c29ab5f335673b305ab83856c0dfff7cbf2f4de4
27
28 diff --git a/net-analyzer/chaosreader/chaosreader-0.96.ebuild b/net-analyzer/chaosreader/chaosreader-0.96.ebuild
29 new file mode 100644
30 index 00000000000..ab29f713b3d
31 --- /dev/null
32 +++ b/net-analyzer/chaosreader/chaosreader-0.96.ebuild
33 @@ -0,0 +1,28 @@
34 +# Copyright 1999-2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +DESCRIPTION="Trace TCP/UDP/... sessions and fetch application data."
40 +HOMEPAGE="http://chaosreader.sourceforge.net
41 + https://github.com/brendangregg/Chaosreader"
42 +SRC_URI="https://github.com/brendangregg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
43 +SLOT="0"
44 +
45 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
46 +LICENSE="GPL-2+"
47 +
48 +DEPEND=">=dev-lang/perl-5.8.0"
49 +RDEPEND="${DEPEND}"
50 +
51 +S="${WORKDIR}/Chaosreader-${PV}"
52 +
53 +PATCHES=(
54 + "${FILESDIR}"/chaosreader-0.96-zombies.patch
55 + "${FILESDIR}"/chaosreader-0.96-chunkcheck.patch
56 + "${FILESDIR}"/chaosreader-0.96-divisionbyzero.patch
57 +)
58 +
59 +src_install() {
60 + dobin ${PN}
61 +}
62
63 diff --git a/net-analyzer/chaosreader/files/chaosreader-0.96-chunkcheck.patch b/net-analyzer/chaosreader/files/chaosreader-0.96-chunkcheck.patch
64 new file mode 100644
65 index 00000000000..6a394d4b308
66 --- /dev/null
67 +++ b/net-analyzer/chaosreader/files/chaosreader-0.96-chunkcheck.patch
68 @@ -0,0 +1,27 @@
69 +--- a/chaosreader 2011-11-10 19:17:50.000000000 +0100
70 ++++ b/chaosreader 2012-03-09 18:15:21.096105305 +0100
71 +@@ -5350,6 +5353,24 @@
72 + next if length($http_data) < 8;
73 + $partnum++;
74 + $parttext = sprintf("%02d",$partnum);
75 ++
76 ++ ## from https://sourceforge.net/tracker/?func=detail&aid=2019799&group_id=107384&atid=647491
77 ++ ### Chunk Check
78 ++ if ( $http_header =~ /Transfer-Encoding: chunked/ ) {
79 ++ my $new_http_data="";
80 ++ my $chunksize=-1;
81 ++ my $pos=0;
82 ++ until ($chunksize==0) {
83 ++ my $eolpos=index($http_data,"\r\n",$pos);
84 ++ $chunksize=hex(substr($http_data,$pos,$eolpos - $pos));
85 ++ $pos=($eolpos+2);
86 ++ if ($chunksize > 0) {
87 ++ $new_http_data.=substr($http_data,$pos,$chunksize);
88 ++ }
89 ++ $pos+=($chunksize+2);
90 ++ }
91 ++ $http_data=$new_http_data;
92 ++ }
93 +
94 + ### Part - Checks
95 + $http_type = &File_Type($http_data);
96
97 diff --git a/net-analyzer/chaosreader/files/chaosreader-0.96-divisionbyzero.patch b/net-analyzer/chaosreader/files/chaosreader-0.96-divisionbyzero.patch
98 new file mode 100644
99 index 00000000000..58491851306
100 --- /dev/null
101 +++ b/net-analyzer/chaosreader/files/chaosreader-0.96-divisionbyzero.patch
102 @@ -0,0 +1,18 @@
103 +--- a/chaosreader 2014-06-15 21:30:11.000000000 +0200
104 ++++ b/chaosreader 2019-02-21 18:26:00.671756895 +0100
105 +@@ -4275,7 +4275,14 @@
106 + print REPLAY "ms($timediff1);\n";
107 + }
108 + $duration = 0.01 if $duration == 0; # avoid divide by 0,
109 +- $speed = sprintf("%.2f",$bytes / (1024 * $duration));
110 ++ + # avoid division by zero
111 ++ # from https://sourceforge.net/tracker/?func=detail&aid=2210488&group_id=107384&atid=647489
112 ++ if ( $duration > 0 ) {
113 ++ $speed = sprintf("%.2f",$bytes / (1024 * $duration));
114 ++ }
115 ++ else {
116 ++ $speed = "unknown";
117 ++ }
118 + print REPLAY "print \"\n\n" .
119 + "Summary: $duration2 seconds, $bytes bytes, $speed Kb/sec\\n\";";
120 + close REPLAY;
121
122 diff --git a/net-analyzer/chaosreader/files/chaosreader-0.96-zombies.patch b/net-analyzer/chaosreader/files/chaosreader-0.96-zombies.patch
123 new file mode 100644
124 index 00000000000..40fa6063adf
125 --- /dev/null
126 +++ b/net-analyzer/chaosreader/files/chaosreader-0.96-zombies.patch
127 @@ -0,0 +1,11 @@
128 +--- a/chaosreader 2006-12-24 15:12:23.000000000 +0100
129 ++++ b/chaosreader 2006-12-24 15:11:56.000000000 +0100
130 +@@ -396,6 +395,8 @@ if ($Arg{normal}) {
131 +
132 + elsif ($Arg{standalone}) {
133 +
134 ++ $SIG{CHLD} = "IGNORE";
135 ++
136 + ############################################################
137 + # --- STANDALONE - Create Packet Logs and Process them ---
138 + #