Commit Graph

1145 Commits

Author SHA1 Message Date
Gerald Combs 4fd5224ecf CMake: Use target_include_directores more.
The include_directories documentation at
https://cmake.org/cmake/help/latest/command/include_directories.html
says:

"Note: Prefer the target_include_directories() command to add include
 directories to individual targets and optionally propagate/export them
 to dependents."

Switch from include_directories to target_include_directories in a bunch
of places.

Add "SYSTEM" to the remaining external include_directories calls in
order to minimize our compiler warning blast radius.
2021-02-18 06:34:46 +00:00
Guy Harris 3ad7f90a96 CMake, GitLab CI: forcibly unset CMAKE_VERBOSE_MAKEFILE if requested.
Forcibly unset the cached version of CMAKE_VERBOSE_MAKEFILE if the
FORCE_CMAKE_NINJA_NON_VERBOSE environment variable is set, to make
*extra* sure that we don't do a verbose build.
2021-02-16 13:23:46 -08:00
Gerald Combs fa15eb8f5d CMake: Add a note about setting CAExcludePath.
Visual Studio's code analyzer lets you avoid analyzing external headers
using CAExcludePath. Add a note suggesting that we might want to do this
using the VS_USER_PROPS CMake property, but that for now we're using an
environment variable in the builder config.
2021-02-16 11:04:35 -08:00
Guy Harris 9ffb0f27c8 GitHub CI, CMake: override the definition of cmake_build.
Overriding the definition of the rpmbuild macro cmake_build on the
command line, so that it doesn't include the string "--verbose", should
prevent cmake --build from being run with --verbose, and thus prevent it
from running Ninja with the -v flag, and thus prevent a bunch of extra
noisy output from being produced for every build command, and thus
prevent the build log from hitting GitLab's 4MB limit.

Unlike piping the output of "ninja rpm-package" to sed, this means that
the exit status of "ninja rpm-package", rather than the exit status of
sed, is tested.
2021-02-16 09:00:12 +00:00
Guy Harris 2e9303b7b2 GitLab CI: use sed to strip out -W and -f options from output.
Filter out the -W and -f options from the output of "ninja rpm-package",
to try to cut down the verbosity.

Do that instead of passing --quiet to rpmbuild, so we get command
progress messages, just without the extra junk.
2021-02-15 14:31:14 -08:00
Guy Harris 0ed0ab665f CMake: the argument to rpmbuild to quiet it is --quiet, not -q. 2021-02-15 12:56:31 -08:00
Guy Harris 4b22f71f76 CMake, .gitlab-ci.yml: try to cut down the output for Fedora RPM builds.
If the FORCE_CMAKE_NINJA_QUIET environment variable is set, have the
top-level CMakeLists.txt add the -q flag to the arguments to rpmbuild.
That appears to reduce the amount of output.

Set that environment varible in the rpm-fedora build.
2021-02-15 02:21:12 -08:00
Guy Harris c0711693ab Enable -Wredundant-decls.
Add it to the default list of checks, and fix some errors it causes.
(Sadly, it doesn't work in CLang.)
2021-02-14 14:43:42 -08:00
Gerald Combs bb48a9da99 CMake: Fixup rpmbuild verbosity.
546dc0270c made things too quiet. Pass '-v' to rpmbuild if
CMAKE_VERBOSE_MAKEFILE is set. Don't pass '--quiet'.
2021-01-22 18:57:23 +00:00
Gerald Combs 546dc0270c CMake: Make the rpmbuild output quiet by default.
If CMAKE_VERBOSE_MAKEFILE is false (the default), pass `--quiet` to
rpmbuild.
2021-01-10 15:10:10 +00:00
Dario Lombardo e0f1c67970 cmake: make rpm-package dependent from dist target. 2021-01-07 19:03:36 +00:00
John Thacker fbd3fb3138 GnuTLS: Bump minimum version to 3.3.0
Every supported distribution has at least the 3.3 branch of GnuTLS
(stable branch starting in April 2014). That branch was maintained
for bug-fixes until July 2018, so some distributions (e.g. RHEL7,
SUSE Enterprise 12) are still on it, keeping us from requiring 3.4 yet.
Also clarify a comment about when the Mac OS build of gnutls started
being compiled with pkcs11 support.
2021-01-02 19:00:51 +00:00
John Thacker 5c936174c6 libgcrypt: Bump version number to 1.5.0
With RHEL/CentOS 6 EOL and already unsupported by Wireshark, there's no
reason to keep the minimum version of libgcrypt below 1.5.0 (which was
released 9.5 years ago). Version 1.6.0 is a big improvement in functionality,
but RHEL/CentOS 7 is stuck on 1.5.3 (As an aside, GCRYPT_VERSION_NUMBER
wasn't defined until 1.5.1, so this change will make us actually use the
libgcrypt AES-WRAP handling on 1.5.0)
2021-01-01 12:24:42 +00:00
Dario Lombardo e017fd5a04 cmake: fix comment in rpm-build target. 2020-12-22 18:34:52 +00:00
Gerald Combs 2c303c725f CMake: macOS version updates.
Set MIN_MACOS_VERSION to 10.14 if we're building with Qt 6.0 or later.
Print both our deployment target and our base SDK at configure time.
2020-12-20 19:50:25 +00:00
Gerald Combs b63692e327 GitLab CI: Disable LTO on Windows
`cmake -DENABLE_LTO=off ..` builds more quickly here, so add it to
merge-req:windows.

Fix a typo.
2020-12-13 01:31:09 +00:00
Peter Eszlari 42a09ad02e Linux: rename metadata according to spec
https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html

https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#desktop-file-id
2020-12-10 18:11:12 +00:00
Pascal Quantin 86e23155fe Windows: upgrade libssh to 0.9.5
Closes #17065
2020-12-09 22:35:25 +00:00
Odysseus Yang 2a5b34d8b0 MBIM: Update dissector to support DLT_ETW
New link type DLT_ETW is added for write and read Event Trace on Windows.
This change updates MBIM dissector to decode a MBIM message from
a DLT_ETW packet.
2020-12-02 09:05:11 +00:00
John Thacker fe1f947540 macOS: Enable PKCS #11 support when building with macos-setup.sh
Enable PKCS #11 support in macOS builds with macos-setup.sh (already
supported on macOS via Homebrew and on all other OSes with GnuTLS 3.4
or greater) by installing p11-kit (and its dependency libtasn1) and
building nettle and GnuTLS against it.
2020-12-02 07:55:42 +00:00
Gerald Combs 3a42bf0de2 Windows: Upgrade brotli, libmaxminddb, lz4, and snappy.
Upgrade brotli to 1.0.9, libmaxminddb to 1.4.3, lz4 to 1.9.2, and snappy
to 1.1.8.
2020-12-01 08:32:44 +00:00
Gerald Combs f21cd2e23f wiretap: Convert ascend.y to Lemon.
Convert wiretap/ascend.y.in from Bison/YACC to Lemon and rename it to
wiretap/ascend_parser.lemon. Tighten up some of our scanning and
parsing. Make the indentation in it and related files consistent. Aside
from the recent IPv4 fragment offset changes, this produces identical
output to the 3.4 branch for the Ascend trace files I have here.

Remove the comment about supporting other commands. Another timeline
might have an Ascend that successfully pivoted to DSL or 15625B+1D
gigabit ISDN, but this one has neither.

This was our last/only Bison/YACC file, so remove Bison/YACC as a
development and packaging dependency and remove references to it from
the documentation.
2020-11-30 08:15:43 +00:00
John Thacker 15d315c2ae GLib: Bump requirement 2.32 -> 2.36 2020-11-25 06:25:38 +00:00
Gerald Combs 21e1056058 CMake: Don't restrict ENABLE_CCACHE.
Don't restrict ENABLE_CCACHE, but print a warning for non-gcc and
non-clang compilers. Fixes #16960.
2020-11-01 10:15:04 +00:00
Gerald Combs 4653955957 Version: 3.3.0 → 3.5.0. 2020-10-22 19:15:42 +00:00
Gerald Combs 4a8b6da58f CMake+macOS: Explicitly create the extra package directory.
Create Wireshark.app/Contents/Resources/Extras, which is needed by the
Makefile generator.
2020-10-16 13:39:17 -07:00
Lin Sun 6136c719da RTP: opus playback
It's possible to play opus payload with libopus (https://opus-codec.org/).
Closes #16882.

Helped-by: Pascal Quantin <pascal.quantin@gmail.com>
Signed-off-by: Lin Sun <lin.sun@zoom.us>
Signed-off-by: Yuanzhi Li <ryanlee@mail.ustc.edu.cn>
2020-10-03 21:15:09 +00:00
Gerald Combs 4a82dd165b Version: 3.3.1 → 3.3.2. 2020-10-01 12:18:35 -07:00
Gerald Combs 586121fad4 Shellcheck fixes.
Note that ChmodBPF requires a newer version of shellcheck. Fix an issue
found after upgrading to 0.7.1.
2020-09-21 22:09:13 +00:00
Gerald Combs 59483604de macOS: Switch ChmodBPF to zsh.
Switch the ChmodBPF script to /bin/zsh since it

- Has known behavior, unlike /bin/sh, which execs whatever
  /private/var/select/sh points to.

- Supports 'read -n 0' and other nice features.

- Is unlikely to be deprecated, since it was made the default shell in
  Catalina[1].

- Exists in older macOS releases, unlike dash[2].

Closes #16826.

[1]https://support.apple.com/en-us/HT208050
[2]https://scriptingosx.com/2020/06/about-bash-zsh-sh-and-dash-in-macos-catalina-and-beyond/
2020-09-18 16:34:24 +00:00
Gerald Combs 573894d870 Version: 3.3.0 → 3.3.1. 2020-09-15 17:29:32 -07:00
Gerald Combs 7ab6440416 Tools: Clean up checkAPI and add ui/qt.
Remove the --check-addtext and --build flags. They were used for
checkAddTextCalls, which was removed in e2735ecfdd.

Add the sources in ui/qt except for qcustomplot.{cpp,h}. Fix issues in
main.cpp, rtp_audio_stream.cpp, and wireshark_zip_helper.cpp.

Rename "index"es in packet-usb-hid.c.
2020-09-05 07:41:29 +00:00
Graham Bloice e6b5bd0976 Build: Add LTO/IPO support
Enable Link Time Optimization, also known as Interprocedural Optimization
if the compiler supports it.

Added a CMake option (ENABLE_LTO), defaulted to ON only on Windows

Change-Id: Iea02b00aac12cc9a62595eeb8ff52382f1c4ddcd
Reviewed-on: https://code.wireshark.org/review/37573
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-04 05:21:01 +00:00
Pascal Quantin 2471ae1e0e CMake: update a comment regarding Libgcrypt requirement for LTE PDCP
Change-Id: Ib8c7d9a1fcee41444588eca94decfe09ee7b3630
Reviewed-on: https://code.wireshark.org/review/37553
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-06-24 07:09:53 +00:00
Peter Wu dc023ad68a CMake: warn for older Libgcrypt version
Libgcrypt enables decryption for so many protocols, be sure to warn
users when their Wireshark build is constrained due to an old version.
Previously a user on Ubuntu 16.04 was surprised that QUIC decryption did
not work even though the "minimum required" version was satisfied:

    Found GCRYPT: /usr/lib/x86_64-linux-gnu/libgcrypt.so (found suitable
    version "1.6.4", minimum required is "1.4.2")

Change-Id: Ief927b8892a6be9f994bdc65619a1236ca2f4fa7
Reviewed-on: https://code.wireshark.org/review/37552
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-24 04:17:10 +00:00
Gerald Combs 029051d7e9 CMake: Add a MIN_MACOS_VERSION check for Qt 5.15.
According to https://doc.qt.io/qt-5/supported-platforms.html, Qt 5.15
supports macOS 10.13 - 10.15.

Change-Id: Iecd9b6f10d6b968ad145d247e934fddec25658f7
Reviewed-on: https://code.wireshark.org/review/37330
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-28 04:59:56 +00:00
Peter Wu ef717da61a CMake: remove ENABLE_PCAP_NG_DEFAULT option
pcapng has been the compile-time default since 2011. If there are any
users who would like to use the libpcap format, then they should use
runtime options instead (e.g. `tshark -P` or `editcap -F pcap`).

Change-Id: I54b70368cdc3ca78bc8617bc488cc687740a1eb9
Reviewed-on: https://code.wireshark.org/review/36721
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-06 01:29:37 +00:00
Paul Aurich 378ecc27df CMake: FindGLIB2 depends on FindWSLibrary module
Beginning in Wireshark 3.2, the FindGLIB2 cmake module depends on FindWSLibrary
(see 990e409273), so FindWSLibrary needs to be installed as well, or
attempting to build an out-of-tree plugin fails.

Simple example CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
project(myplugin)
find_package(Wireshark)
LIST(APPEND CMAKE_MODULE_PATH "${Wireshark_LIB_DIR}/wireshark/cmake")
find_package(GLIB2)

Fails:

-- Checking for one of the modules 'glib-2.0'
CMake Error at /usr/local/lib/wireshark/cmake/FindGLIB2.cmake:49 (include):
  include could not find load file:

    FindWSLibrary
Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)

CMake Error at /usr/local/lib/wireshark/cmake/FindGLIB2.cmake:50 (FindWSLibrary):
  Unknown CMake command "FindWSLibrary".
Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred!

Change-Id: Id765d671e74fe15a60add38b95e62536abf60a79
Reviewed-on: https://code.wireshark.org/review/36509
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-03-20 05:14:11 +00:00
Gerald Combs 290ddeeed4 macOS: Make the dmg_package target fail noisily.
Change-Id: I479c9f13b9695d78d47b698a14cda0989724c639
Reviewed-on: https://code.wireshark.org/review/36270
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-03-03 17:22:30 +00:00
Gerald Combs d7bbe384f5 Test+Qt: Add an automatic update check.
Add software_update_info() to the software update module, which returns
the name of our update library if we have one. Use it to add automatic
update information to the compiled information in `wireshark --version`.

Add a "release" test suite, which contains a test for automatic updates.

Ping-Bug: 16381
Change-Id: I867a96bdcfde8be541eca2dc0e84b5000276e7dd
Reviewed-on: https://code.wireshark.org/review/36107
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-02-15 11:13:25 +00:00
Peter Wu 530e243c09 CMake: look for libcap on Linux only
The feature is Linux-specific, do not suggest an unavailable feature on
macOS and other systems.

Change-Id: If53989749f571ace7397e288e9c06e357d0a96b2
Reviewed-on: https://code.wireshark.org/review/35985
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-30 05:51:25 +00:00
Dario Lombardo ec7a84f14e cmake: add libcap package properties.
Change-Id: Ie3ea8a51d6cf200b3815b0046255bf0208240287
Reviewed-on: https://code.wireshark.org/review/35954
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-01-29 22:18:23 +00:00
Jeroen Roovers a5abaa81ad CMake: do not check for Qt5Svg at build time
At runtime, the Qt5Svg library is required for displaying language icons
at Preferences. Without this library, these icons will be invisible.
However this does not require a build-time check, so remove it.

Change-Id: I5aaf0282f941513c5e867d8591ddf1916aa408bc
Reviewed-on: https://code.wireshark.org/review/35856
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 07:50:24 +00:00
Jirka Novak 12a13a6926 RTP: decode iLBC payload
It is possible to decode iLBC payload. It uses libilbc library (https://github.com/TimothyGu/libilbc).

Bug: 16314
Change-Id: Id4cad7ae32305a0e94ef32beb24e07733d7f834e
Reviewed-on: https://code.wireshark.org/review/35686
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 07:50:08 +00:00
Jeroen Roovers 7bd57479b6 tfshark: Link against libm
ld: CMakeFiles/tfshark.dir/ui/cli/tap-icmpstat.c.o: undefined reference to
symbol 'sqrt@@GLIBC_2.2.5'

Change-Id: Ifbf49ba00a4246e68c1d3965f0257eca1b4e3ef8
Reviewed-on: https://code.wireshark.org/review/35854
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-01-20 00:25:10 +00:00
Gerald Combs 44b0cb187d Docs: Ensure that the API reference has the proper permissions.
Set our file permissions before building the wsar_html_zip target.

Change-Id: I660bf87891a0c8bbebfd497984617bd1d294bf10
Reviewed-on: https://code.wireshark.org/review/35685
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-07 23:56:28 +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 7a09c78f12 NSIS: Don't package .pdb files.
We run `windeployqt ... --pdbs` at build time, which means that we need
to be careful not to include them in the NSIS package. Switch from using
wildcards ("File ...\*") to using separate "File" commands for each file.

Simplify the PDB Zip package command while we're here.

Bug: 16307
Change-Id: Ibd9bcbdfdc216f1f6a067baf711bbc184845143f
Reviewed-on: https://code.wireshark.org/review/35670
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-06 19:50:50 +00:00
Gerald Combs 56a609028f macOS: Explicitly set our package root permissions.
The pkgbuild man page doesn't really discuss file permissions[1], but it
appears that it simply preserves them. Make sure the ChmodBPF and
path_helper roots have the correct permssions before building their
respective installers.

[1] The --ownership flag description mentions chmod but that appears to
be a typo.

Bug: 16284
Change-Id: I5ef277539a5b2015394ae3e722ef4c176f9c243f
Reviewed-on: https://code.wireshark.org/review/35507
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-19 17:42:47 +00:00
Gerald Combs fd6cf89f21 macOS: More ChmodBPF signing updates.
Run osx-extras.sh before building the ChmodBPF installer package.

Change-Id: Iec3f88da86e48b5aac385369c7e68f23babc4c34
Reviewed-on: https://code.wireshark.org/review/35491
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-18 17:35:49 +00:00