aboutsummaryrefslogtreecommitdiffstats
path: root/community/wireshark/APKBUILD
blob: ce639f10bd18627d7b91e84657443e1ea2d68d9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Jeremy Thomerson <jeremy@thomersonfamily.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wireshark
pkgver=3.0.1
pkgrel=0
pkgdesc="A network protocol analyzer"
url="https://www.wireshark.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="bash bison c-ares-dev cmake flex glib glib-dev gnutls-dev
	libcap-dev libgcrypt-dev libnl3-dev libpcap-dev
	lua5.2-dev pcre-dev perl-dev portaudio-dev qt5-qtbase-dev 
	qt5-qtmultimedia-dev qt5-qtsvg-dev qt5-qttools-dev"
checkdepends="py3-pytest py3-pytest-xdist"
subpackages="$pkgname-dev $pkgname-doc $pkgname-common tshark"
source="https://www.wireshark.org/download/src/$pkgname-$pkgver.tar.xz
	fix-udpdump.patch
	"

# secfixes:
#   3.0.1-r0:
#     - CVE-2019-10897
#     - CVE-2019-10898
#     - CVE-2019-10900
#     - CVE-2019-10902
#   2.6.8-r0:
#     - CVE-2019-10894
#     - CVE-2019-10895
#     - CVE-2019-10896
#     - CVE-2019-10899
#     - CVE-2019-10901
#     - CVE-2019-10903
#   2.6.7-r0:
#     - CVE-2019-9208
#     - CVE-2019-9209
#     - CVE-2019-9214
#   2.6.6-r0:
#     - CVE-2019-5717
#     - CVE-2019-5718
#     - CVE-2019-5719
#     - CVE-2019-5721
#   2.6.5-r0:
#     - CVE-2018-19622
#     - CVE-2018-19623
#     - CVE-2018-19624
#     - CVE-2018-19625
#     - CVE-2018-19626
#     - CVE-2018-19627
#     - CVE-2018-19628
#   2.6.4-r0:
#     - CVE-2018-12086
#     - CVE-2018-18225
#     - CVE-2018-18226
#     - CVE-2018-18227
#   2.6.3-r0:
#     - CVE-2018-16056
#     - CVE-2018-16057
#     - CVE-2018-16058
#   2.6.2-r0:
#     - CVE-2018-14339
#     - CVE-2018-14340
#     - CVE-2018-14341
#     - CVE-2018-14342
#     - CVE-2018-14343
#     - CVE-2018-14344
#     - CVE-2018-14367
#     - CVE-2018-14368
#     - CVE-2018-14369
#     - CVE-2018-14370
#   2.4.7-r0:
#     - CVE-2018-11356
#     - CVE-2018-11357
#     - CVE-2018-11358
#     - CVE-2018-11359
#     - CVE-2018-11360
#     - CVE-2018-11362
#   2.4.6-r0:
#     - CVE-2018-9256
#     - CVE-2018-9257
#     - CVE-2018-9258
#     - CVE-2018-9260
#     - CVE-2018-9261
#     - CVE-2018-9262
#     - CVE-2018-9263
#     - CVE-2018-9264
#     - CVE-2018-9267
#     - CVE-2018-10194
#   2.4.5-r0:
#     - CVE-2018-7320
#     - CVE-2018-7321
#     - CVE-2018-7322
#     - CVE-2018-7323
#     - CVE-2018-7324
#     - CVE-2018-7325
#     - CVE-2018-7326
#     - CVE-2018-7327
#     - CVE-2018-7328
#     - CVE-2018-7329
#     - CVE-2018-7330
#     - CVE-2018-7331
#     - CVE-2018-7332
#     - CVE-2018-7333
#     - CVE-2018-7334
#     - CVE-2018-7335
#     - CVE-2018-7336
#     - CVE-2018-7337
#     - CVE-2018-7417
#     - CVE-2018-7418
#     - CVE-2018-7419
#     - CVE-2018-7420
#   2.4.4-r0:
#     - CVE-2018-5334
#     - CVE-2018-5335
#     - CVE-2018-5336
#   2.4.3-r0:
#     - CVE-2017-17083
#     - CVE-2017-17084
#     - CVE-2017-17085
#   2.4.2-r0:
#     - CVE-2017-15191
#     - CVE-2017-15192
#     - CVE-2017-15193
#   2.4.1-r0:
#     - CVE-2017-13765
#     - CVE-2017-13766
#     - CVE-2017-13767
#   2.2.10-r0:
#     - CVE-2017-15191
#     - CVE-2017-15192
#     - CVE-2017-15193
#   2.2.9-r0:
#     - CVE-2017-13765
#     - CVE-2017-13766
#     - CVE-2017-13767
#   2.2.8-r0:
#     - CVE-2017-11406
#     - CVE-2017-11407
#     - CVE-2017-11408
#   2.2.7-r0:
#     - CVE-2017-9343
#     - CVE-2017-9344
#     - CVE-2017-9345
#     - CVE-2017-9346
#     - CVE-2017-9347
#     - CVE-2017-9348
#     - CVE-2017-9349
#     - CVE-2017-9350
#     - CVE-2017-9351
#     - CVE-2017-9352
#     - CVE-2017-9353
#     - CVE-2017-9354
#   2.2.6-r0:
#     - CVE-2017-7700
#     - CVE-2017-7701
#     - CVE-2017-7702
#     - CVE-2017-7703
#     - CVE-2017-7704
#     - CVE-2017-7705
#   2.2.5-r0:
#     - CVE-2017-6467
#     - CVE-2017-6468
#     - CVE-2017-6469
#     - CVE-2017-6470
#     - CVE-2017-6471
#     - CVE-2017-6472
#     - CVE-2017-6473
#     - CVE-2017-6474
#   2.2.4-r1:
#     - CVE-2017-6014
#   2.0.5-r0:
#     - CVE-2016-6505
#     - CVE-2016-6506
#     - CVE-2016-6508
#     - CVE-2016-6509
#     - CVE-2016-6510
#     - CVE-2016-6511
#     - CVE-2016-6512
#     - CVE-2016-6513

build() {
	cmake CMakeLists.txt \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DENABLE_GNUTLS=ON \
		-DENABLE_LUA=ON
	make
}

check() {
	make test-programs
	# Disabled tests 1, 2 fail on armhf
	# See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15771
	# Disabled tests 3-10 fail on s390x
	# See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15772
	pytest test/ \
		--deselect suite_wslua.py::case_wslua.test_wslua_tvb_tree \
		--deselect suite_wslua.py::case_wslua.test_wslua_tvb_no_tree \
		--deselect suite_capture.py::case_dumpcap_pcapng_sections.test_dumpcap_pcapng_single_in_multi_out \
		--deselect suite_capture.py::case_dumpcap_pcapng_sections.test_dumpcap_pcapng_single_in_single_out \
		--deselect suite_capture.py::case_dumpcap_pcapng_sections.test_dumpcap_pcapng_multi_in_single_out \
		--deselect suite_capture.py::case_dumpcap_pcapng_sections.test_dumpcap_pcapng_multi_in_multi_out \
		--deselect suite_decryption.py::case_decrypt_smb2.test_smb311_bad_key \
		--deselect suite_decryption.py::case_decrypt_smb2.test_smb300_aes128ccm \
		--deselect suite_decryption.py::case_decrypt_smb2.test_smb300_bad_key \
		--deselect suite_decryption.py::case_decrypt_smb2.test_smb311_aes128ccm

}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

common() {
	local i
	pkgdesc="network protoccol analyzer - common files"
	mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/share \
		"$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/share/wireshark "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/lib*/* "$subpkgdir"/usr/lib/
	# move all bins except wireshark
	for i in "$pkgdir"/usr/bin/*; do
		case "$i" in
			*/tshark|*/wireshark) continue;;
		esac
		mv "$i" "$subpkgdir"/usr/bin/
	done
}

tshark() {
	pkgdesc="network protoccol analyzer - console version"
	install -d "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/tshark "$subpkgdir"/usr/bin/tshark
}


sha512sums="59c3f36e4e7a1a7ea8f926dbf8ca495f83346396e1df5edf6a1bb34823c84308f52a1b6d46be9675d3af9ce8718da4a574f63a4fb210d8fc52131f4534d8670d  wireshark-3.0.1.tar.xz
287159576be76fc8afbce450a53f969bbd519321e038c812b96857ca08c352052dbbfaa9208d54ed30d7a0c9ca4192b83c8865de60562c4490d99d75c61ede0b  fix-udpdump.patch"