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.
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.
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.
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.
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.
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.
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*
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.
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.
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.
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.
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.
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.
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.
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
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`.
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.
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.
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.