Skip to content

Commit a2667c8

Browse files
dehydr8radiantly
andauthored
feat: update to Wireshark 4.4.5 (#24)
* feat: updating Wireshark to 4.2.5 * add dfilter patch, install wireshark libs * feat: update to wireshark 4.4.5 * fix: return correct data dir path (#22) There is some "smart" logic around what the data directory path should be, but fails to return the correct directory. This change patches the get_datafile_dir() function to return DATA_DIR. This fixes the colorfilters file not loading correctly. * feat: update to 4.4.5, IOGraph fixes, formatting --------- Co-authored-by: Joshua T. <[email protected]>
1 parent 7016c45 commit a2667c8

23 files changed

+1208
-1456
lines changed

.clang-format

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BasedOnStyle: LLVM
2+
# Minimal overrides mirroring .editorconfig C++ intent while deferring most style to editor.
3+
IndentWidth: 2
4+
TabWidth: 2
5+
UseTab: Never
6+
ColumnLimit: 0 # Allow wrapping to be manual (editorconfig handles line ends)
7+
PointerAlignment: Right # matches cpp_space_pointer_reference_alignment=right
8+
AlignAfterOpenBracket: Align # similar to multi-line relative indent
9+
AllowShortIfStatementsOnASingleLine: false
10+
AllowShortLoopsOnASingleLine: false
11+
BreakBeforeBraces: Attach # keep brace on same line (all *ignore* in .editorconfig)
12+
SpaceBeforeParens: ControlStatements
13+
SpacesInParentheses: false
14+
SpaceInEmptyParentheses: false
15+
SpacesInAngles: false
16+
SpaceAfterCStyleCast: false
17+
SpacesInCStyleCastParentheses: false
18+
SpaceBeforeAssignmentOperators: true
19+
SpaceBeforeRangeBasedForLoopColon: true
20+
SpaceBeforeCaseColon: false
21+
SpacesInSquareBrackets: false
22+
SpaceBeforeSquareBrackets: false
23+
SpacesInContainerLiterals: false
24+
Cpp11BracedListStyle: true
25+
DerivePointerAlignment: false
26+
SortIncludes: true
27+
IncludeBlocks: Preserve
28+
KeepEmptyLinesAtTheStartOfBlocks: false

lib/Makefile

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ MESON_SETUP = meson setup $(BUILD_DIR) $< --default-library static --prefix $(PR
6262
MESON_BUILD = meson compile -C $(BUILD_DIR) && meson install -C $(BUILD_DIR)
6363

6464
mostlyclean:
65-
rm -rf c-ares ffi gcrypt glib gpg-error lua pcre nghttp2 wireshark
66-
rm -rf .c-ares .ffi .gcrypt .glib .gpg-error .lua .pcre .nghttp2 .wireshark
65+
rm -rf c-ares ffi gcrypt glib gpg-error pcre nghttp2 wireshark
66+
rm -rf .c-ares .ffi .gcrypt .glib .gpg-error .pcre .nghttp2 .wireshark
6767
rm -rf .sum-*
6868

6969
clean: mostlyclean
@@ -253,33 +253,6 @@ glib: glib-$(GLIB_MINOR_VERSION).tar.xz .sum-glib
253253
+$(MESON_BUILD)
254254
touch $@
255255

256-
#
257-
# LUA
258-
#
259-
LUA_VERSION := 5.2.4
260-
LUA_URL := https://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz
261-
LUA_CHECKSUM := cd77148aba4b707b6c159758b5e8444e04f968092eb98f6b4c405b2fb647e709370d5a8dcf604176101d3407e196a7433b5dcdce4fe9605c76191d3649d61a8c
262-
# Borrowed from https://github.com/ysugimoto/webassembly-lua/blob/master/Dockerfile
263-
LUA_CONF := CC='emcc -s WASM=1'
264-
265-
$(TARBALLS)/lua-$(LUA_VERSION).tar.gz:
266-
$(call download,$(LUA_URL))
267-
268-
.sum-lua: lua-$(LUA_VERSION).tar.gz
269-
$(call checksum,$(LUA_CHECKSUM),$<)
270-
touch $@
271-
272-
lua: lua-$(LUA_VERSION).tar.gz .sum-lua
273-
$(CLEANUP)
274-
tar xzfo $<
275-
$(MOVE)
276-
277-
.lua: lua
278-
echo "[+] Building Lua"
279-
$(MAKE) -C $< clean
280-
emmake make -C $< generic INSTALL_TOP=$(PREFIX) install $(LUA_CONF)
281-
touch $@
282-
283256
NGHTTP2_VERSION := 1.61.0
284257
NGHTTP2_URL := https://github.com/nghttp2/nghttp2/releases/download/v$(NGHTTP2_VERSION)/nghttp2-$(NGHTTP2_VERSION).tar.xz
285258
NGHTTP2_CHECKSUM := 01e930d7caf464699505f92b76e2bc8192d168612dc564d2546812c42afea2fb81d552d70e8a5fed35e2bf5deadbec8eda095af94a2484bca41542988afce52a
@@ -310,9 +283,9 @@ nghttp2: nghttp2-$(NGHTTP2_VERSION).tar.xz .sum-nghttp2
310283
#
311284
# Wireshark (epan)
312285
#
313-
WIRESHARK_VERSION := 4.0.3
314-
WIRESHARK_URL := https://gitlab.com/wireshark/wireshark/-/archive/v$(WIRESHARK_VERSION)/wireshark-v$(WIRESHARK_VERSION).tar.bz2
315-
WIRESHARK_CHECKSUM := 2f0f166dae43706945d681dd9f07aa4aa8d303967baae7d4065e1437fc0ae14c65648578ad3734e71729f3449ccc1590baadd6b140d246115cf7be8c5af55a83
286+
WIRESHARK_VERSION := 4.4.5
287+
WIRESHARK_URL := https://www.wireshark.org/download/src/all-versions/wireshark-$(WIRESHARK_VERSION).tar.xz
288+
WIRESHARK_CHECKSUM := 09956fadb2ab80df136c6b35a1be2aa72eec20e1f11c94aaaabecff72d450239d09173ef3cc2bcd8c85c194816afb750e1d476538038ff612366a255ae4fece5
316289
# do not build any tools, we're only interested in libwireshark (epan)
317290
WIRESHARK_CONF = \
318291
-DBUILD_wireshark=OFF \
@@ -339,34 +312,30 @@ WIRESHARK_CONF = \
339312
-DBUILD_udpdump=OFF \
340313
-DBUILD_sharkd=OFF \
341314
-DBUILD_mmdbresolve=OFF \
315+
-DFETCH_lua=ON \
342316
-DENABLE_CAP=OFF
343317

344-
$(TARBALLS)/wireshark-v$(WIRESHARK_VERSION).tar.bz2:
318+
$(TARBALLS)/wireshark-$(WIRESHARK_VERSION).tar.xz:
345319
$(call download,$(WIRESHARK_URL))
346320

347-
.sum-wireshark: wireshark-v$(WIRESHARK_VERSION).tar.bz2
321+
.sum-wireshark: wireshark-$(WIRESHARK_VERSION).tar.xz
348322
$(call checksum,$(WIRESHARK_CHECKSUM),$<)
349323
touch $@
350324

351-
wireshark: wireshark-v$(WIRESHARK_VERSION).tar.bz2 .sum-wireshark
325+
wireshark: wireshark-$(WIRESHARK_VERSION).tar.xz .sum-wireshark
352326
$(CLEANUP)
353-
tar xjfo $<
354-
$(APPLY) $(PATCHES)/wireshark/0001-dont-build-radiotap-lemon.patch
355-
$(APPLY) $(PATCHES)/wireshark/0002-fix-cpu-name-unknown.patch
356-
$(APPLY) $(PATCHES)/wireshark/0003-disable-snort-emscripten.patch
357-
$(APPLY) $(PATCHES)/wireshark/0004-export-wireshark-common.patch
358-
$(APPLY) $(PATCHES)/wireshark/0005-force-data-dir.patch
359-
$(APPLY) $(PATCHES)/wireshark/0006-threadless-registration.patch
360-
$(APPLY) $(PATCHES)/wireshark/0007-export-lrexlib.patch
361-
$(APPLY) $(PATCHES)/wireshark/0008-export-wslua-headers.patch
327+
tar xJfo $<
328+
$(APPLY) $(PATCHES)/wireshark/wiregasm-patches.patch
362329
$(MOVE)
363330

364-
.wireshark: wireshark .c-ares .gcrypt .glib .lua .nghttp2
331+
.wireshark: wireshark .c-ares .gcrypt .glib .nghttp2
365332
echo "[+] Building Wireshark"
366333
$(CMAKECLEAN)
367334
emcmake cmake -G Ninja -S $< -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:STRING=$(PREFIX) -DCMAKE_FIND_ROOT_PATH:STRING=$(PREFIX) $(WIRESHARK_CONF)
368335
env cmake --build $(BUILD_DIR)
369336
env cmake --install $(BUILD_DIR) --prefix $(PREFIX)
337+
env cmake --install $(BUILD_DIR) --prefix $(PREFIX) --component Development
338+
cp -rf $(BUILD_DIR)/staging/* $(PREFIX) # copy artifacts from the staging directory
370339
touch $@
371340

372341
#

0 commit comments

Comments
 (0)