Commit Graph

568 Commits

Author SHA1 Message Date
Gerald Combs c227279d33 packet-kerberos: try to fix the build on macOS 10.14
/usr/lib/libkrb5.dylib doesn't have krb5_pac_verify().

This hopefully fixes the build problem introduced by commit
d9aab840a7

Change-Id: Ib354a59cbc20c6bf97ddc029d8b042d4aea6dae9
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35713
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-10 02:44:38 +00:00
Martin Boye Petersen 46b3753d53 case-sensitive: Fix casing for PCAP and WinSparkle
CMake is unable to find PCAP and WinSparkle under Windows
when using case sensitive folders.

Change-Id: I30ba4073afc6089b08cef3c010b09c257362929b
Reviewed-on: https://code.wireshark.org/review/35505
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 12:45:53 +00:00
Gerald Combs 6094e9d392 CMake: Create a DocBook stamp file for Visual Studio.
Create user-guide.xml-stamp and developer-guide.xml-stamp when building
under Visual Studio. Fixes

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): warning MSB8064: Custom build for item "C:\buildbot\builders\wireshark-master-32\windows-2019-x86\build\cmbuild\CMakeFiles\8721ce5c0a51a8e0d8e35fd55fbe2e6e\user-guide.hhp.rule" succeeded, but specified dependency "c:\buildbot\builders\wireshark-master-32\windows-2019-x86\build\cmbuild\docbook\user-guide.xml-stamp" does not exist. This may cause incremental build to work incorrectly. [C:\buildbot\builders\wireshark-master-32\windows-2019-x86\build\cmbuild\docbook\user_guide_chm.vcxproj]

when building the user_guide_chm target.

Change-Id: Ia224823841b4d3def3436f9f3a48b759694ffb37
Reviewed-on: https://code.wireshark.org/review/35509
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-20 07:26:35 +00:00
Gerald Combs 3e0acea604 CMake: Fixup a variable in FindLZ4.cmake
Set "LZ4_PDB" instead of "LZ4_pdb" in FindLZ4.cmake so that CMake 3.16
will convert "${LZ4_DLL_DIR}/${LZ4_PDB}" to the full path to the LZ4
.pdb instead of its parent directory.

This in turn ensures that we don't pass a directory as a source argument
to `cmake -E copy_if_different`, which causes it to crash.

Bug: 16271
Change-Id: Id6f37584379bd07bc929bc5cb5e80cbe60a3c77e
Reviewed-on: https://code.wireshark.org/review/35400
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-11 04:55:43 +00:00
Gerald Combs 7cc5f4c45f CMake: Work correctly without Sparkle.
Set or clear SPARKLE_LIBRARIES and SPARKLE_INCLUDE_DIRS in
FindSparkle.cmake, similar to what we do in other modules. Use them
instead of SPARKLE_LIBRARY and SPARKLE_INCLUDE_DIR.

Change-Id: I023c711edd6a44421aadf85413da3207d9b08e64
Reviewed-on: https://code.wireshark.org/review/35097
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 22:34:06 +00:00
Gerald Combs 02057200fd macOS: Add support for automatic updates using Sparkle.
Add support for automatic updates using the Sparkle framework. Add
FindSparkle.cmake and associated CMake plumbing. Add a public key and
other info to Info.plist.in. Add ui/macosx/sparkle_bridge.{h,m}, which
wraps the Sparkle API. Make code that's specific to WinSparkle
Windows-only.

Add Sparkle installation steps to the macos-setup scripts. Sparkle
prints a warning if your bundle is unsigned (which is the case during
development) so disable installing it by default.

Updating here takes a long time. We might be able to fix that by
shipping our DSYMs separately.

Change-Id: I6cc6671db5657dadc514bda6bf6e1c8bbc9468a5
Reviewed-on: https://code.wireshark.org/review/35090
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 18:39:04 +00:00
Gerald Combs 71996e8d93 CMake+docbook: Fixup our .chm titles.
Some parts of HTML Help have issues displaying curly quotes. Add a
title argument to the XML2HHP macro so that we can set one with a
straight quote. Set the title using the htmlhelp.title XSL parameter
instead of relying on HTML Help to derive it for us. This seems to keep
"???TITLE???" from being mysteriously appended to the title.

Try setting htmlhelp.window.geometry while we're here.

Bug: 16183
Change-Id: I0bf2dbeeb811dc65010ab5223725d6b5cdc96966
Reviewed-on: https://code.wireshark.org/review/35031
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-08 20:27:15 +00:00
João Valverde 97cb389a35 Revert "CMake: Don't install HTML manuals twice"
This reverts commit f1285fcf06.

NSIS package is broken with this commit.

Change-Id: Ief22a308edad188fa2d5fab79355f19493359fa6
Reviewed-on: https://code.wireshark.org/review/34758
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-10-10 15:58:41 +00:00
João Valverde f1285fcf06 CMake: Don't install HTML manuals twice
HTML docs are installed to both $docdir and $pkgdatadir. Fix that
to install to $docdir only.

Change-Id: I115158585b6df9170d9a01249adbc8548df91f14
Reviewed-on: https://code.wireshark.org/review/34640
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-10-09 13:24:58 +00:00
Tomasz Moń e21bb9f7ed CMake: Make FindWSLibrary compatible with older CMake
On Linux we support CMake 3.5 so we cannot use cmake_parser_arguments()
with PARSE_ARGV option that was added in CMake 3.7.

Change-Id: I84e7b679c2a73e5a7a29ac83a3283aedf542f9a4
Reviewed-on: https://code.wireshark.org/review/34674
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-10-02 09:55:44 +00:00
Tomasz Moń 990e409273 CMake: Use glib debug dlls in Windows debug builds
This prevents the mix of debug/release Universal CRT library in a Wireshark.

Bug: 16030
Change-Id: I2961541824caf3bef0a08c72b242427b5406a9bd
Reviewed-on: https://code.wireshark.org/review/34444
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-09-28 10:24:34 +00:00
Dario Lombardo 92ac2f5099 cmake: fix issue when zstd is missing.
We need to check the library version only when the it's present,
otherwise we hit an error.

Change-Id: I6323b19d0023d466bfb6ae4b5751f376fc213fa4
Reviewed-on: https://code.wireshark.org/review/34387
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-28 16:51:01 +00:00
Dario Lombardo a1532e7b16 cmake: check minimum zstd library version.
The APIs used in the kafka dissector have been introduced in version
1.0.0, then we need at least that version to work.

Change-Id: I80ded2362d4f324ec26392bd7a9781ea6d9ba630
Reviewed-on: https://code.wireshark.org/review/34382
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-27 15:50:40 +00:00
Piotr Smolinski ad94c4d459 Kafka: include zstd compression in Kafka message batches
Change-Id: I1d06486ccf7b174ee9aa621fa3d8acb8b3673777
Reviewed-on: https://code.wireshark.org/review/34222
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-20 13:50:45 +00:00
Pascal Quantin 41b8c22e74 Windows: add nghttp2.pdb file to our PDB .zip
Change-Id: I496959a04fdbd7a275d772600736bde63ac8b14e
Reviewed-on: https://code.wireshark.org/review/34307
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-08-16 20:15:30 +00:00
Pascal Quantin 3eea735cc1 Windows: upgrade Npcap to 0.9982, USBPcap to 1.5.3.0 and nghttp2 to 1.39.2
Change-Id: I9dcff1c6714c6bbe211997195ff78537c334fdbd
Reviewed-on: https://code.wireshark.org/review/34303
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-08-16 17:39:49 +00:00
Guy Harris 5cf3fd03f1 HTTPS In More Places, update some URLs.
Change-Id: Ice2e1e2e4d94f6c9da7c651866cfa1a8ac4a31d8
Reviewed-on: https://code.wireshark.org/review/34096
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27 07:55:36 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
João Valverde 6e5ba74b31 Remove ABI compliance checker code.
It's broken, unmaintained, poorly implemented and obsoleted by saner
debug-info methods.

Note: To do the compliance check properly would require much more
extensive work to clearly define public and private interfaces (without
manual bookeeping of files or symbols either, of course, because who
would want that...).

Change-Id: Ib801f3c152ca2369f95ca1f4af4d37cd8cc7c47a
Reviewed-on: https://code.wireshark.org/review/33928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2019-07-21 15:54:41 +00:00
Roland Knall 390071ed0b Qt: Import Profile information
Allow easy import of profiles. Profiles must be stored inside
a zip file, with no additional hierarchy.

Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032
Reviewed-on: https://code.wireshark.org/review/33881
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-17 18:25:11 +00:00
João Valverde 4c5d2f5ccf CMake: Add libpcap imported library target
Change-Id: I5326b87784817fb353329e2d686fe0515c32f6cb
Reviewed-on: https://code.wireshark.org/review/33038
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2019-05-03 21:56:45 +00:00
João Valverde 186f985793 CMake: Check for and use system SpeexDSP library
Change-Id: I8443379d23a2946dd21c12e5e0bd5464ab73ca25
Reviewed-on: https://code.wireshark.org/review/31857
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-05-02 21:12:01 +00:00
Peter Wu af72ba7e84 FindPCAP: fix broken search logic
Do not fully trust the output from neither pkg-config nor pcap-config.
These tools might provide bogus output. Instead, use their outputs as
hints to let CMake find the correct include and (static) library paths.

Correct some variable names (PCAP_STATIC_LIBRARIES and PCAP_INCLUDE_DIRS
*must not* be the result of find_path/find_library) and ensure that an
empty include directory from pkg-config does not result in an empty
PCAP_INCLUDE_DIRS variable that would break the build.

Change-Id: If3de90fb497d8163d92e4fe190a227159f0b6acb
Fixes: v3.1.0rc0-645-gc602119bcf ("Use pkg-config if possible; if not, use pcap-config if present.")
Reviewed-on: https://code.wireshark.org/review/32999
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-29 01:12:01 +00:00
Guy Harris c602119bcf Use pkg-config if possible; if not, use pcap-config if present.
First try finding libpcap with pkg-config.  If that fails (either because
the system doesn't have pkg-config or because it does but there's no .pc
file for libpcap), check for pcap-config and, if it's present, use that,
otherwise fall back on manually searching for it.

Pick up the code from tcpdump's FindPCAP.cmake.

Change-Id: I87963aaa7cccac0b5cd942f48eb5d08779695f92
Reviewed-on: https://code.wireshark.org/review/32992
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-27 03:15:51 +00:00
Guy Harris 5ae6a9bea6 Do FIND_PACKAGE_HANDLE_STANDARD_ARGS() before checking ZLIB_FOUND.
It's what sets {package}_FOUND.

Combine two "do this if zlib was found" blocks.

Change-Id: I55062a11c7ae7e6f32886615a0201df55f700d1e
Reviewed-on: https://code.wireshark.org/review/32974
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-25 03:10:04 +00:00
Guy Harris c66994215b Don't look for zlib stuff if we didn't find zlib.
If we didn't find zlib, don't look for its version number in zlib.h, and
don't look for inflate() or inflatePrime() in the library.

Trim off some trailing blank lines while we're at it.

Change-Id: I834a9a76928a00cf5e182bd4224ebc91d36d69a4
Reviewed-on: https://code.wireshark.org/review/32973
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-25 01:59:05 +00:00
Fabrice Fontaine 580098d875 FindXml2: use pkg-config to find libxml2 dependencies
On UNIX, when statically built, libxml2 can depends on other libraries
such as lzma. These dependencies are already retrieved through
pkg-config so append them to LIBXML2_LIBRARIES otherwise static build
will fail

Change-Id: I362064969488ec53042aa323eadb54fef026d8a5
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-on: https://code.wireshark.org/review/32968
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-24 22:07:05 +00:00
Fabrice Fontaine 1799b24aa3 FindPCAP: use pkg-config to find pcap dependencies
On UNIX, when statically built, pcap can depends on other libraries such
as -lnl-3. Add a call to pkg-config to find them and append them to
PCAP_LIBRARIES (and so to CMAKE_REQUIRED_LIBRARIES) otherwise all
check_function_exists calls will fail

Change-Id: I98361c05553738d015310fae76c17dfc08e131ff
Ping-Bug: 15713
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-on: https://code.wireshark.org/review/32946
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-24 20:00:37 +00:00
Dániel Bakai 9ce60b173b Add brotli decompression support for HTTP and HTTP2 dissectors.
Change-Id: I9c09f55673187f6fee723fcd72798fb6b9958b03
Reviewed-on: https://code.wireshark.org/review/32745
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-22 15:24:46 +00:00
Peter Wu 8c26217548 CMake: bail out if minimum GLib version is not satisfied
Require glibconfig.h to be found and extract the version from this file,
this has been present since the original GLib commit and is still
present in the meson build system introduced with 2.53.4.

Bug: 15706
Change-Id: I2e938a339d48d6815ed7cc46462735b93418377f
Reviewed-on: https://code.wireshark.org/review/32894
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-19 17:29:11 +00:00
Gerald Combs ba40851b27 Windows: Use an lz4 DLL built with vcpkg.
Update the Windows build environment to use lz4 packages built from a
VS 2017 command prompt with

    set LZ4_VERSION=1.8.3
    vcpkg remove lz4:x86-windows lz4:x64-windows
    vcpkg install lz4:x86-windows lz4:x64-windows
    vcpkg export lz4:x86-windows --output=lz4-%LZ4_VERSION%-win32ws --zip
    vcpkg export lz4:x64-windows --output=lz4-%LZ4_VERSION%-win64ws --zip

The packages also include a PDB, so copy it to the build directory and
add it to the PDB .zip.

Change-Id: Icea512405d2085e5b271fa4a3ba8c0fe318b8cb5
Reviewed-on: https://code.wireshark.org/review/32785
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-09 04:28:36 +00:00
Gerald Combs 2c00e5b4e4 Fix our .chm titles.
HTML Help has trouble rendering both straight (') and curly (’) quotes
in its window titles. Make sure we remove them.

Bug: 15656
Change-Id: Ic7ab6652e285c11e50e4acb3fab4fcc12653778c
Reviewed-on: https://code.wireshark.org/review/32674
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-01 18:24:11 +00:00
Gerald Combs acc96e5206 Windows: Start using a `vcpkg export` bundle.
Create a library bundle using `vcpkg export ... --zip` as described at
https://vcpkg.readthedocs.io/en/latest/users/integration/#export-command.

The bundle includes the following packages:

gettext     0.19-8
glib        2.52.3-13
libffi      3.1-4
libiconv    1.15-5
liblzma     5.2.4
libxml2     2.9.9-4
pcre        8.41-1
zlib        1.2.11-5

It also includes a CMake toolchain file which we might want to make use
of in the future.

This means we no longer compile Zlib locally. Update the CMake environment
accordingly and remove zlib from win-setup.ps1.

It includes PDBs, so add them to the PDB .zip.

Change-Id: I0a94904a86d836e990019dab62af506573be1f35
Reviewed-on: https://code.wireshark.org/review/31377
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-03-18 22:22:44 +00:00
Peter Wu 203839df3d CMake: remove unused FindMACOS_FRAMEWORKS.cmake file
This was added in v1.99.0-rc1-578-gdbd409d041, but was never used.

Change-Id: Ieb202693d555ff62ff13aca46b0f289f0d4c6cfb
Reviewed-on: https://code.wireshark.org/review/31959
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:05:49 +00:00
Gerald Combs 2b52ca1890 Windows: Upgrade Kerberos to 1.17.
Recent versions of Kerberos are much easier to compile on Windows. Switch
to version 1.17, compiled with Visual Studio 2017 and linked with the
Universal CRT.

Change-Id: I393d51666cd13255ee1419f2164d7fa59fe1c5cb
Reviewed-on: https://code.wireshark.org/review/31919
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-06 20:07:27 +00:00
João Valverde d17e218918 CMake: Update FindLibXml2.cmake
Change-Id: I55f77910be642535cba128900c2af40fa6824f04
Reviewed-on: https://code.wireshark.org/review/31874
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-02-04 10:14:36 +00:00
Peter Wu 87e5269c69 CMake: rewrite FindSystemd.cmake file
Clarify that this is only needed for the sdjournal extcap interface and
report the found version in the CMake output.

Change-Id: I40bc540631bda32d0b92e4fcd59d8c1726606d86
Reviewed-on: https://code.wireshark.org/review/31834
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-31 13:15:47 +00:00
Peter Wu ccf37e3905 CMake: fix failure to locate zlib (and possibly libssh)
Include directories are no longer globally included, be explicit with
the required include directories or else function checks will fail.

Change-Id: I72d88f94854fcfe6529554f84e49d1dba696e9df
Fixes: v2.9.1rc0-436-ga3991874eb ("CMake: Replace PACKAGELIST magic")
Reviewed-on: https://code.wireshark.org/review/31693
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-23 15:43:38 +00:00
João Valverde 7c1d99cb89 CMake: do not set an invalid INSTALL_RPATH for (plugin) libraries
CMAKE_INSTALL_RPATH also applies to libraries such as plugins. This
should not happen when relative RPATHs (through $ORIGIN) are in use, so
fix that.

Change-Id: I154d93ba6ed66c2f78a42b25e352b5b54e9b8818
Reviewed-on: https://code.wireshark.org/review/31609
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-19 23:41:43 +00:00
Gerald Combs b14b048a5e CMake: Fix Vcpkg x86 directory discovery.
`vcpkg export` installs files into an architecture-dependent
subdirectory which matches the PLATFORM environment variable on 64-bit
Windows but not 32-bit Windows. Replace $ENV{PLATFORM} in FindWSWinLibs
with a variable derived from WIRESHARK_TARGET_PLATFORM.

Change-Id: I142615bd50179fdffdebd2bb1f193ef0070c0483
Reviewed-on: https://code.wireshark.org/review/31582
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-18 01:11:06 +00:00
Gerald Combs 7fa8215feb Windows: Use a c-ares DLL built with vcpkg.
Update the Windows build environment to use c-ares packages built from
a VS 2017 command prompt with

    set CARES_VERSION=1.15.0
    vcpkg install c-ares:x86-windows c-ares:x64-windows
    vcpkg export c-ares:x86-windows --output=c-ares-%CARES_VERSION%-win32ws --zip
    vcpkg export c-ares:x64-windows --output=c-ares-%CARES_VERSION%-win64ws --zip

The packages also include a PDB, so  copy it to the build directory and
add it to the PDB .zip.

Change-Id: I1887ca89d897bea184144315219b366096519961
Reviewed-on: https://code.wireshark.org/review/31376
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-14 21:31:08 +00:00
João Valverde 833bd45812 CMake: Don't go on about "custom files"
For each call of add_custom_cmake_include() CMake prints
STATUS "No custom file found in <full_path>".

This is noisy, not to mention confusing.

Print output only if a custom include is found, be silent otherwise.

Change-Id: If603d206486354993ebac8e4c61f6876a26223d3
Reviewed-on: https://code.wireshark.org/review/31517
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-13 07:15:40 +00:00
João Valverde 6d08cb2ecd CMake: Fix inconsistent find_package() report output
Most CMake find modules report the binary found, the modules
fixed by this change represent an inconsistent exception.

The first REQUIRED_VAR argument to
find_package_handle_standard_args() is the one used by CMake
to report on the result of find_package().

Compare (master)
  -- Found SNAPPY: /usr/include
to (this change)
  -- Found SNAPPY: /usr/lib/x86_64-linux-gnu/libsnappy.so

This convention of using XXX_LIBRARY matches upstream practice.

Change-Id: Iaa0ec644e963430d73722354f6ee2a3694906ba7
Reviewed-on: https://code.wireshark.org/review/31498
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-12 18:16:59 +00:00
Peter Wu 3cc0cfc48c CMake: try harder to find the right Python version
The FindPythonInterp module does not verify that a discovered 'python'
program is actually Python 3. Replace this deprecated module by a modern
version that was introduced with CMake 3.12.

Remove PYTHON_EXECUTABLE from WSDG now that it is much more likely that
CMake discovers the right version.

Change-Id: I1f8438baced3d5bf9e1e2732980ad177d3257ca3
Reviewed-on: https://code.wireshark.org/review/31468
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-10 06:42:08 +00:00
Peter Wu fd4d41fc32 CMake: remove LocatePythonExecutable.cmake for Windows
Cygwin is now unsupported, so remove special handling for it and rely on
FindPythonInterp.cmake to locate an appropriate version.

This patch can only cause issues if the PATH environment variable
contains the Cygwin binary directory without any native Python version
appearing before that. In that case, either remove Cygwin from PATH or
add the native Python (e.g. C:\Python37) earlier in PATH.

Change-Id: Ia5554e5a83d06a941dacf4a28d41d84fca4fe99d
Reviewed-on: https://code.wireshark.org/review/31453
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-09 04:22:27 +00:00
Peter Wu aac30ba2d1 CMake,WSDG: Remove Cygwin support
Declare Cygwin as unsupported and remove all supporting code. Simplify
some Chocolatey notes in the WSDG.

Remove FindPerl.cmake as it only existed to force use of Wireshark's
bundled FindCygwin.cmake (bug 13922). FindXSLTPROC.cmake special
handling for Cygwin was also removed, in theory this could cause issues
when the PATH contains a Cygwin xsltproc, but it's unsupported anyway.

Change-Id: Iabfac2b4a9fd930530505d27bdba618bdb8f7f34
Reviewed-on: https://code.wireshark.org/review/31452
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-09 04:21:50 +00:00
Peter Wu dcf6a571b0 CMake: clean up FindGNUTLS.cmake
Use consistent capitalization and whitespace. Remove library names from
find_library that are unsuitable. No functional change intended.

Change-Id: Ic40516542777d768b6eef656fe5c0a0af143fb7e
Reviewed-on: https://code.wireshark.org/review/31264
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-31 08:11:21 +00:00
Peter Wu cfd79b4701 Windows: Upgrade GnuTLS to 1.6.3
Upgrade to GnuTLS 3.6.3-1, using MinGW binaries from Fedora 29 packages:

    mingw64-gnutls-3.6.3-1.fc29.noarch.rpm
    mingw64-gcc-8.2.0-3.fc29.x86_64.rpm
    mingw64-gmp-6.1.2-4.fc29.noarch.rpm
    mingw64-nettle-3.4-2.fc29.noarch.rpm
    mingw64-p11-kit-0.23.7-5.fc29.noarch.rpm
    mingw64-libffi-3.1-4.fc29.noarch.rpm
    mingw64-libtasn1-4.13-3.fc29.noarch.rpm
    mingw64-winpthreads-5.0.4-2.fc29.noarch.rpm

This includes libgcc_s_seh-1.dll (64-bit, new) and libgcc_s_sjlj-1.dll
(32-bit, previously included with glib2).

Built with
https://git.lekensteyn.nl/peter/wireshark-notes/tree/windows-libs/make-gnutls-libs-zip.sh?id=b86878e458d5d7deb21218ce6598b98af4ed7ec2

The main motivation is improved PKCS #11 support:
- 3.6.0: fix potential compatibility issue with SafeNet HSMs
  https://gitlab.com/gnutls/gnutls/merge_requests/398/
- 3.6.2: gnutls_pkcs11_token_get_flags now forwards token info.
- 3.6.3: new APIs for low-level PKCS #11 token or object operations.

Change-Id: I235774e3b27f3426cb74d3d9c0ab593d06870e89
Reviewed-on: https://code.wireshark.org/review/31128
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-31 08:10:56 +00:00
Peter Wu 932edd0878 CMake: clean up FindGCRYPT.cmake
Use consistent lowercase capitalization and whitespace. Windows: clarify
libgpg-error names and remove libgcc_s (1.7.6/1.8.3 do not need it).

Change-Id: I5d1b1a67f7a992ccfca4c28d0e19bbbfc41b7a4d
Reviewed-on: https://code.wireshark.org/review/31244
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-12-30 15:03:23 +00:00
Peter Wu 604aef7164 Windows: fix handling of Unicode paths in Lua
Lua internally uses ANSI C APIs (such as fopen). On many systems (macOS
and Linux for example) these work fine with UTF-8. Windows however
requires special Unicode APIs (such as _wfopen), so patch the Lua
library to interpret paths are UTF-8 and call appropriate Unicode APIs.

Changes compared to the previous LuaBinaries zip archive:

- Patched with UTF-8 support for loadfile, os.execute, etc.
- Built with VS 2015 (VCRUNTIME140.dll) instead of MinGW (MSVCRT.dll).
- Includes PDB file for lua52.dll
- Includes lua52.exe and luac52.exe with UTF-8 argv support (wmain).
- Includes build scripts, source files and README.md.
- Extra subdirectory named after the zip file.

These zip files are taken from https://github.com/Lekensteyn/lua-unicode
(the "prepared" source zips can be found here as well.)

Bug: 15118
Change-Id: I219f046d6e0fd5093287b5d6503a48ba7d1fc6a4
Reviewed-on: https://code.wireshark.org/review/31165
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-29 08:27:08 +00:00
Gerald Combs 2bcc8dbf26 NSIS: Install NPcap instead of WinPcap.
Install NPcap 0.99-r7 instead of WinPcap in the NSIS installer. Update
and/or remove installer text, variables, and variable names accordingly.

Change-Id: Ied36f00c2516127969894f55698e70401dfffb4f
Reviewed-on: https://code.wireshark.org/review/30829
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-30 06:12:23 +00:00
Peter Wu 811d5f7fac Drop JSON-GLib completely
JSON-GLib was added in v2.9.0rc0-201-g511c2e166a, but is no longer
necessary since we have a home-grown JSON dumper (wsutil/json_dumper.h).
Remove the remaining traces and additionally remove GObject from
FindGLIB2.cmake since it was only added for JSON-GLib.

Change-Id: If9dfd2c60cec130f98109d100bdb6618bde06ba0
Reviewed-on: https://code.wireshark.org/review/30733
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20 05:04:11 +00:00
Peter Wu e9f7bb5127 Require Python 3, drop Python 2 support
Python 3 is widely available. All major Linux distributions support it.
RHEL is covered via EPEL (which is already required for cmake3). Drop
support for Python 2 in order to reduce maintenance costs. The main
motivation is being able to simplify the tests.

CMake is updated to search for Python >= 3.4 and will fail if
unavailable (generating dissectors.c requires Python, so it is quite an
important piece to have).

The documentation is updated to reflect the Python 3.7 paths used by
Chocolatey. Tested the git-review installation instructions in Windows 7
x64 without a previous Chocolatey installation.

macOS brew now installs Python 3 (its dependencies are already installed
by python@2 for libxml2). The macOS (non-brew variant) is updated to use
the official 64-bit installer to install Python 3.

Change-Id: I80b1e36957f338e0dad1bfcc173b6418682cddba
Reviewed-on: https://code.wireshark.org/review/30192
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-07 20:46:59 +00:00
Pascal Quantin 85f822b044 Windows: fix RC information generation
Change-Id: I36e1da16b7eb8c224dab74750939a2c9a9a01cfa
Reviewed-on: https://code.wireshark.org/review/30525
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-11-06 21:56:39 +00:00
Peter Wu 7ce9081fdc lemon: sync with upstream (2018-09-08)
Changes:
- Drop the old basename modification that was present in the Wireshark
  version of lemon.c. Use a new option available since 2018-04-20
  ("Add the -dDIRECTORY command-line option to LEMON.")
- Redo the static analyzer warning fixes, identifying the root causes
  and adding assertions instead of hiding code with __clang_analyzer__.
- Ignore compiler warnings instead of adding config.h, _U_, extra const
  keywords, unsigned/signed changes, etc.
- Remove lemon.html, it is out-of-date and external links are available.

In order to make future updates easier, document the exact steps that
were followed to create the lemon.c and lempar.c files. Future changes
SHOULD follow the same process.

My process to reach this updated lemon version:
1. Identify previous sync. Found v2.5.2rc0-147-g653af0f6d0 ("lemon: Sync
   with latest trunk.") which seems based on sqlite commit 2b3d584ffe.
2. Check successive Wireshark patches. Identified many non-functional
   changes to silence compiler warnings and static analyzer issues.
   Found one feature (basename) that can be replaced with upstream -d.
3. Write minimal patches and document changes.

Upstream typos and coding style issues (other than trailing whitespace)
were deliberately not fixed to remain as close as possible to upstream.

Change-Id: I606f46dede86e34520f962a9e7163912392aad57
Reviewed-on: https://code.wireshark.org/review/30290
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-21 07:00:05 +00:00
Peter Wu 55cd530cf0 FindM.cmake: directly pass -lm to fix selective static linking
When CMAKE_FIND_LIBRARY_SUFFIXES is set to ".a" (in order to find only
static libraries), executables would be linked with libm.a. This fails
when the C runtime is not statically linked as well:
https://bugzilla.redhat.com/show_bug.cgi?id=1433347

Change-Id: I1480607bd3d0678661694657a2709ee1c56f9530
Reviewed-on: https://code.wireshark.org/review/30253
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-18 20:06:49 +00:00
Peter Wu 54286eb09c FindGLIB2.cmake: workaround to make static linking work
When using pkg_search_module(GLIB2 glib-2.0), it will also include
transitive dependencies (pcre) in GLIB2_STATIC_LIBRARIES, but it will
still lack -pthread (which is in GLIB2_STATIC_LDFLAGS). For simplicity
just hardcode these.

Change-Id: Ia227f8b56e088c71210a748aeb2dedaba521c090
Reviewed-on: https://code.wireshark.org/review/30252
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-18 20:06:16 +00:00
Peter Wu e6e2137459 cmake: rewrite FindGMODULE2.cmake and FindGTHREAD2.cmake
These modules currently set the library variables from PkgConfig
directly, but these are not absolute paths. These modules are therefore
not usable for static linking. Rewrite these files to follow a more
familiar pattern: collect hints, find absolute header/library paths and
let FPHSA handle the REQUIRED check.

The old modules had some special cases for Apple, but I believe that
these cases are no longer relevant.

Change-Id: Idaef7e35b40a3ab4449d92ccb12a9febde962cf6
Reviewed-on: https://code.wireshark.org/review/30251
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-18 20:05:43 +00:00
Joakim Karlsson 3d6bf1fe00 Revert "cmake: fix version check for c-ares and gnuTLS"
This reverts commit 189a7357e7.

Change-Id: I6550703036a135866d7751da489c4974be79bb37
Reviewed-on: https://code.wireshark.org/review/30226
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-16 20:43:52 +00:00
Joakim Karlsson 189a7357e7 cmake: fix version check for c-ares and gnuTLS
Version requirement was already in place but not executed

Change-Id: I9a163fae2b428cecd309f932f5ef87dd8db8c516
Reviewed-on: https://code.wireshark.org/review/30210
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-15 14:41:33 +00:00
Graham Bloice 0f25b377cf Windows: Remove Cygwin warning
As Cygwin is no longer required for Windows, remove
the CMake warning if it isn't found

Change-Id: I2fd44a00941d6b3f33666d8f6fcfa44a40224ad9
Reviewed-on: https://code.wireshark.org/review/30194
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-10-14 00:07:47 +00:00
Gerald Combs 573e842002 Windows: Make our program details more consistent.
Use a single template file for most of our program resources. Encode
our resource files as UTF-8. Add resources to extcap/*.exe.

Replace a regex with concatenation.

Change-Id: I0ed49086618127ca4fdef69272f849d8f16e4dab
Reviewed-on: https://code.wireshark.org/review/30088
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-10-10 15:40:21 +00:00
Guy Harris 237cbb1823 Put the Windows-specific system library settings in CMakeLists.txt.
We already do that for the macOS-specific system libraries; do it for
the Windows-specific system libraries as well.

Change-Id: I4646cbf5043406a9b6be70307b51df2fbe0329dd
Reviewed-on: https://code.wireshark.org/review/30066
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-08 04:14:45 +00:00
Guy Harris 97972ea9ff We should only link executables with setargv.obj.
Libraries shouldn't be linked with it.

See if this fixes the weird problems I'm having with mergecap -
including, apparently, the mergecap from the buildbots - when run with
wildcard arguments, terminating before it gets to main() (making it hard
to try to debug bug 15151).

Change-Id: Ie793b0ea8157186a121106636ac8b782457c09f5
Reviewed-on: https://code.wireshark.org/review/29985
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-02 20:34:43 +00:00
Gerald Combs f69108b84e Add a systemd Journal Export extcap.
Add an sdjournal extcap, which reads journal entries using the
sd-journal API and dumps them as journal Export Format records.

Change-Id: I17ccfa88ab5d053c16c869cd26e580d84022502e
Reviewed-on: https://code.wireshark.org/review/29479
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-01 08:58:13 +00:00
João Valverde d1daf3fd10 CMake: Remove link test output line
The mode keyword STATUS needs to be capitalized, but this line is
mostly redundant with the check_c_source_compiles_output(), so
just remove it.

Change-Id: I7f29915a7ab2c4b5681e0159773d9216643f8a9c
Reviewed-on: https://code.wireshark.org/review/29524
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09 22:33:00 +00:00
João Valverde 500ac10999 CMake: Use upstream check compiler modules instead
CMake gives precedence to modules in CMAKE_MODULES_PATH (ours then).

It already includes CheckCCompilerFlags and CheckCXXCompilerFlags,
prefer uptream's instead, to benefit from bug fixes, etc.

Change-Id: I063c43cf29f5837c445e8281262356660594c4e5
Reviewed-on: https://code.wireshark.org/review/29484
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-08 06:11:49 +00:00
Peter Wu d703310749 cmake: optionally require Lua 5.1 or newer
doc/README.wslua reports support for 5.1 and 5.2 only. Even RHEL6 ships
with Lua 5.1, so it makes not sense to maintain support for Lua 5.0.

Change-Id: I34a8084c7fba19d631b90ce5d5a28198be6a7850
Reviewed-on: https://code.wireshark.org/review/29448
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-07 04:02:36 +00:00
João Valverde d0b97a420d CMake: Modernize config-file package support
A CMake config-file package provides support for downstreams using
CMake and Wireshark libraries to easily configure the libwireshark
dependency with:
  find_package(Wireshark CONFIG [REQUIRED])
  target_link_libraries(foo epan)

The FindWireshark.cmake file is no longer needed.

See cmake-package(7) for more details on CMake's package system.

Change-Id: Ie8af1d44417a99dd08d37959f7b2ffca88572ec2
Reviewed-on: https://code.wireshark.org/review/29208
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-25 18:07:21 +00:00
João Valverde f0b41190eb CMake: Clean up and homogenize plugin dir configuration
Change-Id: If43c7b124afdf6471164675f8a0c55a76e998ea1
Reviewed-on: https://code.wireshark.org/review/29254
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-23 08:33:56 +00:00
João Valverde 7d76d0ce28 Revert "CMake: Clean up plugin dirs"
Broke system (global) binary plugin path.

This reverts commit 450ff674a6.

Change-Id: I5353d2f3acf4450aed243040ef71425a71542a08
Reviewed-on: https://code.wireshark.org/review/29240
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-22 00:49:16 +00:00
João Valverde 450ff674a6 CMake: Clean up plugin dirs
Change-Id: Ie41366205db19b8a9714ad5259c3f958e1e9ee95
Reviewed-on: https://code.wireshark.org/review/29233
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-21 23:06:38 +00:00
Guy Harris b622b1f5c1 Clean up tests.
On Windows with MSVC, just assume we have 64-bit file offset support,
including _fseeki64() and _ftelli64().

On UN*X, test for Large File Support and for fseeko()/ftello(), and for
what #defines are needed to enable them.

On Windows without MSVC, test for Large File Support, but assume we have
_fseeki64() and _ftelli64(); what *should* we be doing?

Clean up indentation and else()/endif() arguments while we're at it.

Change-Id: I801d1f4059abbed2d5123d2375a560634a9ee056
Reviewed-on: https://code.wireshark.org/review/28781
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-20 21:57:04 +00:00
Gerald Combs 977f4c2e68 CMake: Don't bother testing for _fseeki64 on Windows.
We don't appear to use it and if we ever do need it it's been available
since Visual Studio 2005 / MSVCR80.

Change-Id: Ifd44d78b96a21577ceea635653517a348ded50f7
Reviewed-on: https://code.wireshark.org/review/28778
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-07-20 19:20:11 +00:00
Pascal Quantin 40d180ec6d Lua: add include/lua-5.1 and include/lua-5.2 to CMake path suffixes
Bug: 14983
Change-Id: I8be206ace7f61c62e2e42bc53841067ec39e3a0a
Reviewed-on: https://code.wireshark.org/review/28726
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-07-16 17:39:57 +00:00
Dario Lombardo e4e0488da9 docbook: reduce ruby code duplication by introducing utils module.
Change-Id: I7e436db3cb86f5ebd0f5827c6da630303bc3f538
Reviewed-on: https://code.wireshark.org/review/28400
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-27 17:01:18 +00:00
David Kreitschmann 11ba10dd4b Fix build paths for cmake's Xcode project generator on macOS.
Multi-configuration generators (such as Xcode or VS) append the current build configuration to most paths (eg. Debug/Release). Currently this results in inconsistent paths for the application bundle and the included command line tools. This commit sets the correct path information for multi-configuration generators for macOS application bundles. The standard Makefile behaviour is untouched.

One Windows specific configuration was changed, as it was conflicting with these changes. This needs to be checked before merging.

Additionally the wrapper scripts are omitted for Xcode, as the path to the binaries depends on the configuration chosen in Xcode. Therefore it is not viable to create these scripts in the cmake run.

Bug: 11816

Change-Id: Ib43d82eb04600a0e2f2b020afb44b579ffc7a7c9
Reviewed-on: https://code.wireshark.org/review/28291
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-21 03:33:03 +00:00
João Valverde 722d6b06f6 Rewrite make-{dissectors,taps} in Python
Having these build tools in machine code poses problems when cross-compiling.
The most significant being that we need to find the host and build GLiB
dependencies at compile-time.

There is no noticeable speed difference between the Python and C implementation.

Ping-Bug: 14622
Change-Id: Id13f823c7f4abf51edfa291e703028873748989f
Reviewed-on: https://code.wireshark.org/review/28130
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-06-11 17:01:05 +00:00
Gerald Combs 0dcd8cd1a2 Asciidoctor: Remove underscores from macro names.
AsciiDoc allows dashes in macro names but not underscores. Current
versions of AsciiDoctor allow the inverse. Remove underscores to allow
for easier copying and pasting.

Remove asciidoc.conf while we're here. It's no longer used.

Change-Id: I32d8a4ec695b9e17a80ac720ee9faf62dbb362d3
Reviewed-on: https://code.wireshark.org/review/27787
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-24 20:00:56 +00:00
Gerald Combs a8b6c6fbcc Don't look for Asciidoctor PDF unless we find Asciidoctor.
Fix a doc string while we're here.

Change-Id: Ic67e40dc7e8d624a00b97fe40fe162e6f8633cfc
Reviewed-on: https://code.wireshark.org/review/27728
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-23 13:24:12 +00:00
Gerald Combs eed4961387 CMake: Search for asciidoctor-pdf separate from asciidoctor.
Search for asciidoctorj and asciidoctor-pdf and set
ASCIIDOCTOR_PDF_EXECUTABLE if either are found. Only enable the PDF
targets if we find ASCIIDOCTOR_PDF_EXECUTABLE.

Remove env.cmake since it's no longer needed.

Change-Id: Iee82b30eaa67d1ad3fd3a296d9997b0643a0cb4e
Reviewed-on: https://code.wireshark.org/review/27696
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-22 07:34:57 +00:00
Gerald Combs f7e879c5cf CMake: Remove FindFreetype.
Remove the FindFreetype module. It was required by the FindGTK2 module,
but it's no longer used.

Change-Id: Id7575d024b5c13b5800989434a994e3a0dcb2b26
Reviewed-on: https://code.wireshark.org/review/27450
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-11 15:19:25 +00:00
Gerald Combs 58da452d22 Test: Remove the Bash test scripts.
They've been replaced by the Python scripts.

Change-Id: I8add9c9ea0a6bdd68b2fa3841977863c0ea9a761
Reviewed-on: https://code.wireshark.org/review/27243
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-02 04:09:26 +00:00
Guy Harris 27a6715242 Put references to autotools in the past tense.
In CMake files, we don't do some checks that our autotools scripts did;
speak of those in the past tense, as the autotools scripts are gone.
(Leave the comments there, to note that we *might* have to reinstate
those tests, although they're for old versions of macOS and GCC.)

In CMake files, we use some #defines because that's what autotools did;
speak of those in the past tense as well.

Change-Id: I594fe8225cf94b5087093febc11f6b0a7e42e7cd
Reviewed-on: https://code.wireshark.org/review/27149
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-25 16:54:34 +00:00
Joakim Karlsson 5994c902b4 cmake: remove warnings -Werror=old-style-definition
see https://cmake.org/Bug/bug_relationship_graph.php?bug_id=15058

Change-Id: I325f476b145a542e987a13bedd1f95a7d8faba94
Reviewed-on: https://code.wireshark.org/review/27121
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-24 19:19:23 +00:00
Dario Lombardo 2132b8314d cmake: remove gtk find scripts.
Change-Id: I1645b664ddbf879e82bd4759d26993eab9f2490e
Reviewed-on: https://code.wireshark.org/review/27115
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 10:58:58 +00:00
Gerald Combs 631fec3e1b CMake: Doxygen and API reference target updates.
The DOXYGEN_* variables which we use to create doxygen.cfg are native
paths and are not compatible with Cygwin. We could try to make them
compatible, but given that we're trying to migrate away from Cygwin set
"DOXYGEN_EXECUTABLE" to "DOXYGEN_EXECUTABLE-NOTFOUND" if "cyg" is anywhere
in its path.

Add the wsar_html* targets to "Docs" and exclude them from Visual Studio's
default build.

Change-Id: Id23a3c43a9f4f1edb2d827bbf36a3a7eb64f0212
Reviewed-on: https://code.wireshark.org/review/27100
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 03:45:15 +00:00
Gerald Combs f70a7bf09b CMake: If we find Strawberry's xsltproc, un-find it.
Strawberry Perl ships with xsltproc but no DocBook XML files, which will
break the User's and Developer's Guide targets. Set XSLTPROC_EXECUTABLE
to XSLTPROC_EXECUTABLE-NOTFOUND if "strawberry" is anywhere in its path.

Change-Id: I070eaa247a24a1a79fcdb01256dd5812aa8f6fa8
Reviewed-on: https://code.wireshark.org/review/27101
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 03:43:59 +00:00
Guy Harris 6eecb31030 Fix up handling of the Kerberos package.
On Ubuntu 16.04, and possibly other versions of Ubuntu, and on Debian
and other Debian derivatives, packages for MIT and Heimdal Kerberos can
both be installed at the same time - including developer packages.
Collisions between headers and libraries are handled by putting them in
subdirectories of the system include and library directory and having
their .pc files add -isystem flags to point to the appropriate include
directory and -L flags to point to the appropriate library directory.

CMake's pkg-config support, however, only looks for -I flags, not
-isystem flags, in pkg-config output (using --cflags-only-I), so it
doesn't get the directory in which to look for the headers, and just
uses the results of --libs-only-l to get a list of library names and
does nothing with the results of --libs-only-L, causing it not to look
for libraries in the directory in which to look for the libraries.

We fix this by:

If FindKERBEROS.cmake found Kerberos with pkg-config, have it set
KERBEROS_DEFINITIONS to the "other" compiler flags, which includes the
-isystem flag.

For all packages, adding the <PACKAGE>_DEFINITIONS values to
CMAKE_C_FLAGS and CMAKE_CXX_FLAGS so that they're used when compiling.

If FindKERBEROS.cmake found Kerberos with pkg-config, having it search
for each of the libraries in KERBEROS_LIBRARIES using find_library()
with KERBEROS_LIBDIR and KERBEROS_LIBRARY_DIRS as hints, and
re-assembling the resulting full paths into KERBEROS_LIBRARIES.

Change-Id: Ie18b56b76934f542bd12dc737631c0190026d18a
Reviewed-on: https://code.wireshark.org/review/27071
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-22 03:04:19 +00:00
Pascal Quantin 4704b89aa1 Windows: add JSON-GLib library
Change-Id: I9b266bffc74779f9d28eabb5642644a2b0afa7cf
Reviewed-on: https://code.wireshark.org/review/27049
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 10:46:19 +00:00
Pascal Quantin 2b65e9e74b Windows: upgrade GLib to 2.52.2
Change-Id: If54ec9f8c62d95697a5703ea24cf3ad7c2d6112c
Reviewed-on: https://code.wireshark.org/review/27048
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 10:46:06 +00:00
Peter Wu b887fd4919 CMake: fix build with json-glib with gold linker
JSON-GLIB depends on GObject. To avoid "undefined reference to
'g_object_unref'" with the gold linker, include gobject directly.
As the files are included with the GLib package, adjust FindGLIB2.cmake.

Change-Id: I007d30b89cc07d8746cee6b619832a722f086105
Fixes: v2.9.0rc0-201-g511c2e166a ("tshark: add -G elastic-mapping report.")
Reviewed-on: https://code.wireshark.org/review/27007
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-19 08:08:11 +00:00
Pascal Quantin aae825cf77 Remove remnants of WS_QT_BIN_PATH
Change-Id: If1152b285df143dd7cf75abf9ecbc2d0251306df
Reviewed-on: https://code.wireshark.org/review/27021
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-19 08:01:27 +00:00
Dario Lombardo 511c2e166a tshark: add -G elastic-mapping report.
This option generates an ElasticSearch mapping file as described here:
https://www.elastic.co/blog/analyzing-network-packets-with-wireshark-elasticsearch-and-kibana

It leverages the Glib-json library.

Change-Id: Iff25f991e87d3da07bf06654e353fb785799dde9
Reviewed-on: https://code.wireshark.org/review/26848
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-18 08:57:39 +00:00
Gerald Combs c8cf127375 Add a destination directory flag to git-export-release.
Add a destination directory flag to git-export-release.sh. Use it to
replace the current "dist" target. Use it in the RPM section to avoid a
symlink.

Change-Id: I30ae76b3ab1a995d232e748b79aa37440f90f854
Reviewed-on: https://code.wireshark.org/review/26974
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:43:38 +00:00
Gerald Combs 80256442af More PortAudio removal.
Change-Id: Ib56212e09d41fc76494d8186c77541302700104c
Reviewed-on: https://code.wireshark.org/review/26952
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-15 16:49:53 +00:00
Joerg Mayer 0d31ec328f Check for HAVE_LZ4FRAME_H in the LZ4 detection process and use it
Change-Id: I919621b8c4c809eb181d563251eeb099b767ad82
Reviewed-on: https://code.wireshark.org/review/26940
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 05:34:08 +00:00
Peter Wu 2173309920 Revert "Docs: Reduce our TOC depth."
The Lua documentation has class names at its third level which is quite useful
to discover its documentation.

This reverts commit f5cd52c0fb.

Change-Id: I2a2e82041ac46a1a9974727bbb1d5cbf6855a878
Reviewed-on: https://code.wireshark.org/review/26814
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-09 23:56:36 +00:00
Roland Knall d347091da9 Qt: Fix MacOSX menu entries
Remove various menu items added automatically on Mac OS X. The following
menu items have been removed:

- Edit / Start Dictation
- Edit / Emoji & Symbols
- View / Enter Fullscreen Mode
- View / Show Tab Bar - Hide Tab Bar

Bug: 13366
Change-Id: I44deae7ee8ea7a43926820e4f5d0517ece246939
Reviewed-on: https://code.wireshark.org/review/26823
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-09 15:44:22 +00:00
AndersBroman 2bc030268c FindAsciidoctor: On SLES 12.2 the executable name is asciidoctor.ruby2.1
Change-Id: I609aae2335ee8171c1d54eb05cf4c184f2dc1eb0
Reviewed-on: https://code.wireshark.org/review/26775
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-07 05:34:32 +00:00