Commit Graph

646 Commits

Author SHA1 Message Date
Anders Broman ac9ff53c7a LUA: Pickup LUA 5.3 or 5.4 if available and use it. 2024-02-22 04:48:23 +00:00
Gerald Combs 3588090b2a Falco bridge+falcodump: Various fixes
Fix building with Visual C++ and recent versions of falco-libs.
2024-01-31 00:03:48 +00:00
João Valverde 7f32c90ab9 plugins: Add a codecs API level
Add a minimum and maximum API level. Backward-compatible changes to
the API only bump the maximum API level. Backward incompatible
changes bump the maximum API level and the mininum, to the
new (maximum) level.

This may allow codec plugins to continue working without recompilation,
possibly with reduced functionality.

The API level is only defined for codecs because it is a small
and easy to define API, and very stable.

Maybe we could do the same for wiretap (file type) plugins. For the
various epan plugin types it seems pointless and futile. I cannot
see a scenario where a new Wireshark minor release does not increase
the minimum API level.
2023-12-14 16:18:35 +00:00
João Valverde b52d9173f8 Remove version component from plugin path
Remove the major.minor version from the plugin path, i.e:
    lib/plugins/X.Y/{epan,wiretap,codecs}
and use an unversioned path:
    lib/plugins/{epan,wiretap,codecs}

Introduce a new naming policy for plugins that requires
name.so.ABI_VERSION.

This is a simplified filesystem layoutfor plugins some
important benefits such as:

 * improves compatibility between Wireshark versions, because
a plugin that wasn't recompiled will be automatically picked
up, but only if it has a compatible ABI version in the file name.
 * does not clash with Apple guidelines
 * simpler for users to understand and apply
 * just overall simpler and easier to maintain, removes a lot
of complexity from CMake code

It does impose more requirements on the plugin naming scheme
but this should be handled completely transparently
by the build system.

It would also be possible to add support for unversioned *.so file
extensions at the same time, although in ths case it is not possible
to support multiple Wireshark ABI versions with only *.so, of course.
This wasn't done here but it may or may not be a useful enhancement
in the future.

Follow-up to 90b16b4092.
2023-12-14 14:28:30 +00:00
João Valverde b51a3933ba CMake: Refactor plugin add_library() macros
Replace the macro subfolder argument with type specific plugin
macros.
2023-12-14 14:18:55 +00:00
João Valverde 60f1972fa3 plugins: Fill in short description field
Fill-in the short description field for plugins that was left as
a FIXME in commit 3b59ce90c31df5d77ddd4d08ad13cb0f0e818117.

We should add a similar field for extcap extensions and Lua scripts
eventually.
2023-12-03 23:20:39 +00:00
Gerald Combs 6ce97e418b Docs: Move attributes.adoc to the doc directory 2023-11-14 06:07:53 +00:00
Gerald Combs a5e0be51df Windows: Upgrade Minizip to 1.3 2023-11-10 21:00:30 +00:00
Guy Harris 27e8c8ebde FindPCAP: mystery solved!
Explain why __builtin_available() doesn't help with the problem in

[skip ci]
2023-11-01 15:55:57 -07:00
Guy Harris d300f30469 cmake: work around a mysterious macOS dyld problem.
For some reason, there appears to be no way to build Wireshark on macOS
Ventura with Xcode 15 and have the resulting program run without getting
an error due to failing to find pcap_createsrcstr() at startup.

In particular, there appears to be no way to use __builtin_available()
to protect accesses to the routines that showed up in Sonoma, so that
the run-time linker doesn't fail if the routine in question isn't
present.  Perhaps it requires more compiler command-line arguments.

So, instead, only check for pcap_open() if 1) this isn't macOS or 2) the
pcap library pathname doesn't begin with /usr/lib/ or
/Application/Xcode.app/, i.e. if it's not the system libpcap.  That way,
we won't every try to use those APIs for a built with the system
libpcap.

Fixes #19436.
2023-10-30 16:55:19 -07:00
Gerald Combs 800831cab2 Fixup vcpkg-export-20231017-1
GLib's debug libraries link against pcre2-8d.lib, which means we have
to as well.

Revert some debugging in GitLab CI.
2023-10-19 18:05:43 -07:00
Gerald Combs 36fb1a1122 Doc: Fix the include path in the release notes
Update a note about the asciidoctor's --failure-level flag.
2023-10-06 21:09:33 +00:00
John Thacker 2b4f939761 lemon: Add -- support to end options, use in our lemon
Patch lemon to stop parsing options upon encountering "--".
This prevents an issue in the unlikely situation where the
source directory or a source filename has a '=' in it, or
starts with a "-".

Redo 3716933046 but only
use the -- option in our lemon, not when using system lemon.
2023-09-27 08:37:07 -04:00
João Valverde 37697f7f4e Revert "lemon: Add -- support to end options"
This reverts commit 3716933046.

Does not work currently when cross-compiling.
2023-09-27 12:28:34 +00:00
John Thacker 3716933046 lemon: Add -- support to end options
Patch lemon to stop parsing options upon encountering "--".
This prevents an issue in the unlikely situation where the
source directory or a source filename has a '=' in it, or
starts with a "-".

This has been reported to sqlite upstream.
2023-09-27 01:16:43 +00:00
Omer Shapira 8564c8d525 HTTP3: Use NG-HTTP3 to dissect headers.
All code by Omer Shapira.
Copy of MR #9330 with minor fixes.
2023-08-30 10:12:10 +00:00
Joakim Karlsson da809de404 CMake: improve finding Gcrypt library 2023-08-24 16:44:15 +00:00
João Valverde 759c0feab3 CMake: Accept any supported Lua version by default 2023-08-17 18:16:12 +00:00
João Valverde 919bc0d6f5 CMake: Update FindLua module
Replace our code with the upstream version, simplified to search
only for our supported Lua versions.

This allows selecting Lua versions 5.2, 5.2 or "any". The default
is 5.2 only because supporting more than one Lua versions is
generally the wrong thing to do. Allow falling back to
5.1 *explicitly*
2023-08-16 15:19:00 +00:00
Gerald Combs 049a89b2ce CMake+Windows: Use "x64" instead of "win64"
Use "x64" to refer to "Windows running on 64-bit Intel processors". Get
rid of WIRESHARK_TARGET_PROCESSOR_ARCHITECTURE in favor of
WIRESHARK_TARGET_PLATFORM because the latter is shorter.
2023-06-10 21:41:27 +00:00
João Valverde 5e0c35df51 CMake: Use USE_REPOSITORY with FindWSWinLibs.cmake
This CMake module is specific to Wireshark's 3rd party Windows
repository so make use the correct variable for that, so this
isn't activated in Windows builds that do not use the reppsitory.
2023-06-09 13:57:52 +00:00
Gerald Combs 2dbd2b44dc CMake: Use "arm64" instead of "win64arm"
Use "arm64" instead of "win64arm". This lets us simplify some of our
CMake logic. Note that we could simplify things further if we used "x64"
instead of "win64" in various places.
2023-05-28 19:45:21 +00:00
Gerald Combs d7189583c7 Windows: Update our iLBC, SBC, and SpanDSP packages
Upgrade SBC to version 2.0. Add Arm64 packages for all three.
2023-05-28 19:43:54 +00:00
João Valverde f653e52e0f CMake: Try to use FindPython3.cmake again
Use FindPython3.cmake instead of the deprecated FindPythonInterp.cmake,
to make sure we actually find Python3.

Don't use the module with MSYS2 because it is buggy and exhibits broken
behaviour.

Run it earlier in the configuration, just as a precaution, so other
indirect calls to find python don't happen earlier.
2023-05-27 12:49:29 +01:00
João Valverde f0e4c5262d Revert "CMake: Replace deprecated module FindPythonInterp"
This reverts commit d6380e7ae4.

Turns out we were unwittingly still using FindPythonInterp
instead of FindPython3.cmake, via LocatePythonModule.cmake,
nd this commit actually enabled FindPython3.cmake. Also turns
out FindPython3.cmake is far too clever and very buggy with MSYS2.
It will usually not find the correct python binary and fail in many
suprising ways, depending on which combination of Python Windows
installations is present.
2023-05-26 22:55:47 +01:00
João Valverde 601bf39e6b CMake: Remove module LocatePythonModule.cmake
This module is unnecessary and frequently causes hard-to-debug
issues during CMake's configure run. Nuke it.
2023-05-26 19:38:42 +00:00
João Valverde d6380e7ae4 CMake: Replace deprecated module FindPythonInterp 2023-05-26 19:38:42 +00:00
João Valverde 8dc5d2d348 Fedora: Fix cross-compilation with mingw-wpcap
Fix various issues preventing compilation with Fedora's
MinGW WinPcap package.
2023-05-26 00:18:59 +01:00
João Valverde 51accf1b90 Allow using host Lemon executable
Add support for using the host system's lemon binary instead of
compiling our own. Many linux distributions include a lemon
parser generator package. Using this binary when cross-compiling
is much simpler than configuring the build to use the build host
toolchain to compile lemon.
2023-05-25 21:45:22 +00:00
João Valverde 0da67aee02 CMake: Reformat UseLemon.cmake
Replace spaces with tabs and use lower-case CMake names to
match our usual style.
2023-05-25 21:45:22 +00:00
João Valverde 5051378b69 CMake: Add "pwsh" as a PowerShell name
PowerShell on Linux is installed as "pwsh".
2023-05-25 19:08:30 +01:00
Gerald Combs 624cdacd4e Windows: Update our libssh packages and add Lua for Arm64
Update libssh to 0.10.5 and add an Arm64 version. Add an Arm64 version
of our customized Lua.
2023-05-21 13:51:59 -07:00
Gerald Combs 46dd9c31bb Windows: Update our GnuTLS packages
Use custom-built packages with MSYS2 dependencies and add an Arm64
package. This adds duplicate iconv and intl DLLs; hopefully that won't
be an issue.
2023-05-20 19:05:01 -07:00
Gerald Combs 035f9531f3 Windows: Update our libgcrypt packages
Switch to automatically built packages and add back libgpg-error.
2023-05-19 20:11:21 +00:00
Gerald Combs da01f878e1 Windows: Upgrade WinSparkle to 0.8.0
Upgrade to an OpenSSL-less build of 0.8.0 and add Arm64 support.
2023-05-18 16:13:02 +00:00
Gerald Combs f0819d9552 CMake: Fix our Asciidoctor build dir
Set the build directory based on CMAKE_BINARY_DIR.

Fixes #19070
2023-05-14 13:37:00 -07:00
João Valverde a88af3a866 CMake: Use components to install doc guides
Use CMake components to install the guides, instead of
a custom target and script.

We have to inconveniently place the install() command in the
top-level CMakeLists.txt file, instead of docbook/CMakeLists.txt,
so that we can use
    cmake --install <builddir> --component UserGuide
insead of
    cmake --install <builddir>/docbook --component UserGuide

so that it can be used in the wireshark.spec file without too
many contortions.
2023-05-14 02:35:35 +01:00
Gerald Combs 98a19a85a5 CMake+tools: Add Visual C++ Arm64 support
Add support for building for Windows on Arm64 using Visual C++ to the
CMake environment. Add our initial batch of packages to win-setup.ps1.

Ping #18123
2023-05-05 23:01:35 +00:00
João Valverde a508cfd2f2 CMake: Fix more PkgConfig invocations with MSYS2 2023-04-10 14:26:13 +01:00
João Valverde cb58daab31 MSYS2: Fix detection of GnuTLS 2023-04-10 14:26:12 +01:00
João Valverde 33bd99d0ca CMake: Fixups for FindAMRNB module
Ping #18930.
2023-04-09 00:35:56 +00:00
Martin Mathieson aa4e848070 AMRNB: Look for package name using allcaps 2023-03-22 11:57:33 +00:00
Harald Welte 01c51aad3e Add AMR codec support 2023-03-21 12:26:05 +00:00
Gerald Combs 53b2994b43 Docbook: Reorganize our guide directories
Move the top-level user-guide.adoc and developer-guide.adoc to their
respective source directores. This is in preparation for a future
toolchain revamp.

Move the wsug_graphics directory to wsug_src/images and wsdg_graphics
directory to wsdg_src/images. Copy common_graphics/* to the each images
directory and remove common_graphics. We only have five admonition
graphics; duplicating them lets us remove some build config overhead.

Rename wsluarm.adoc to wsdg_src/wsdg_lua_support.adoc.

Remove a dummy file.

Tested visually and by enabling `--failure-level=WARN`.
2023-02-11 21:09:46 +00:00
João Valverde 7e6266d33d MSYS2: Add Lua 5.1 support and fix test suite failures 2023-01-16 11:54:43 +00:00
Gerald Combs de16040021 CMake: Rename SINSP_PLUGINS to FALCO_PLUGINS 2023-01-12 02:21:15 +00:00
Gerald Combs 640c44f24e CMake: Specify Falco plugins manually.
Falco plugins don't yet have a standard installation location, and even
when they do we might not want to install all of them. Remove plugin
detection from FindSinsp.cmake and note that you should just pass the
paths to your plugins in SINSP_PLUGINS.
2023-01-11 15:37:46 -08:00
João Valverde 613331f07b dfilter: Disable flex debug trace for release builds
This omits the flex debug code in the binary if the build type is
RelMinSize or Release.

It replaces the "%option debug" stanza with the -d command line
option, to be able to configure the flex behaviour.
2023-01-09 04:03:19 +00:00
João Valverde f2218ae5f0 Lemon: Update code and remove cruft
Remove some unused historical files.

Aggressively disable warnings to keep the lemon source
pristine and avoid the maintenance burden for lemon itself.

Lemon has its own lax policy for warnings that doesn't match our
own and they won't accept external patches to remove the
warnings, so just ignore them. Lemon is just executed to generate
code for the Wireshark build and the minor code issues it has
have no influence at runtime.

For lemon generated code we selectively disable some linting
warnings.

Remove patches for lemon and lempar, they are no longer required
with these changes to silence warnings.
2023-01-01 18:18:06 +00:00
João Valverde ae14849864 Windows: Use SpeexDSP binary package
Remove bundled code and use vcpkg binary library instead.
2022-12-16 11:11:28 +00:00