Commit Graph

1355 Commits

Author SHA1 Message Date
Gerald Combs 83d5533711 GitLab CI: Switch our Linux packages to a twice daily schedule.
The RPM packages use a versioned build directory, which creates problems
for ccache. The APT packages simply take a long time to build. Switch
both to a twice-daily schedule so that we don't set fire to CI minutes
in parallel with every merge.

Back out a recent CMake change since it's no longer needed.
2022-10-21 11:15:22 -07:00
Gerald Combs 139e46898d CMake+GitLab CI: Add and use RPMBUILD_EXTRA_ARGS.
Add an RPMBUILD_EXTRA_ARGS variable to CMakeLists.txt and use it in
GitLab CI to define __cmake_builddir. This should let ccache work with
our RPM builds.
2022-10-20 21:53:37 -07:00
João Valverde 603354203b epan/proto: Replace format text()
The proto.h APIs expect valid UTF-8 so replace uses of format_text()
with a label copy function that just does formatting and does not
check for encoding errors. Avoid multiple levels of temporary
string allocations.

Make sure the copy does not truncate a multibyte character and
produce invalid strings. Add debug checks for UTF-8 encoding errors
instead.

We escape C0 and C1 control codes (because control codes)
and ASCII whitespace (and bell).

Overall the goal is to be more efficient and optimized and help
detect misuse of APIs by passing invalid UTF-8.

Add a unit test for ws_label_strcat.
2022-10-20 20:05:15 +01:00
Guy Harris be60ad9b17 Add include/ws_codepoints.h to the list of public headers. 2022-10-17 00:23:32 -07:00
João Valverde a19834b98c Windows: Store "gui.console_open" in the Windows registry
This removes the last dependency of the logging subsystem on the
preferences module. The latter is started much later than the former
and this is an issue.

The Windows-only preference "gui.console_open" is stored in the
registry as HKEY_LOCAL_USER\Software\Wireshark\ConsoleOpen. The semantics
are exactly the same. The preference is read by the logging subsystem
for initialization and then again by the preferences (read/write) so
the user can configure it as before.

The code to store the preference also in the preferences file was
kept, for backward compatibility and because it is not incompatible
with using the Registry concurrently.

The elimination of the prefs dependency also allows moving the Windows
console logic to wsutil and add the functionality to wslog directly,
thereby eliminating the superfluous Wireshark/Logray custom log handler.

To be able to read the ws_log_console_open global variable from
libwireshark it becomes necessary to add a new export macro
symbol called WSUTIL_EXPORT.
2022-10-11 14:25:04 +01:00
Gerald Combs 8607946295 CMake: Install falcodump.html in the right place. 2022-10-11 00:41:29 +00:00
João Valverde 1b12dc4b9e Add WS_DEPRECATED_X() function attribute
This adds a new attribute that allows declaring Wireshark
functions as deprecated.

Also disabe -Werror with deprecated declarations  Deprecated
declarations can be introduced suddenly with a new version
of an external dependency or a new internal deprecation and
that has its own timeline to fix. We should still be able to
build with -Werror in that case.
2022-10-10 20:27:33 +00:00
João Valverde 91f7762fad wslua: Use wiretap introspection 2022-10-07 10:28:47 +01:00
João Valverde 58cf815173 CMake: Disable errors with -Wstringop-overflow=
Ping #18383.
2022-10-04 18:17:13 +00:00
Roland Knall 7c8c615efd C-Ares: Move library to 1.13
1.13 is the maximum library for RHEL 8, therefore moving down a
version to ensure compatibility
2022-09-30 14:50:06 +02:00
João Valverde 6d06d4e46b Add some UTF-8 debug checks with a compile time flag
Some older dissectors that predate Unicode and parse text protocols
are prone to generate invalid UTF-8 strings. This is a bug and can have
safety implications.

For example passing invalid UTF-8 to proto_tree_add_string() is a
common bug. There are safeguards in format_text() but this should
not be relied on as a general solution to the problem.

For one, as the name implies, it is only used with representation of a
field value, which is not the same as the value itself of an FT_STRING field.
Issue #18317 shows another reason why.

For now this compile flag only enables extra checks for string ftypes,
which covers a subset of proto.h APIs including
proto_tree_append_string(). Later is should be extended to other
interfaces.

This is also not expected to be disabled for release builds because
there are still many dissectors that do not correctly handle strings.
More work is needed to 1) identify them and 2) fix them.

Ping #18317
2022-09-27 17:04:44 +00:00
Gerald Combs ab4a4304ee Add Logray icons.
Add lricon.svg and lriconinst.svg, which provide the core graphic
element for the various Logray icons. Add lricon*.png, which were
created using the templates at
https://developer.apple.com/design/resources/. Add Logray.icns,
logray.ico, and lograyinst.ico, and use them in various packaging
resources.
2022-09-04 23:01:06 +00:00
Gerald Combs b984e6e29d CMake: Split more Wireshark/Logray variables.
Split our macOS application bundle variables into Wireshark- and
Logray-specific ones. Make sure Logray's PkgInfo and CFBundleSignature
match.
2022-09-01 09:05:58 -07:00
Gerald Combs 5243ffa4c2 extcap: Add falcodump.
Add an extcap that fetches a scap from a Falco/libsinsp plugin. Tested
using the cloudtrail plugin.
2022-08-29 15:35:19 -07:00
João Valverde 867a068332 CMake: Add back a Wireshark env var to configure Qt
Use the variables WIRESHARK_QT{5,6}_PREFIX_PATH.

This allows having Qt5 and Qt6 paths configured isimultaneously and switch easily between them.

Use list(APPEND) to avoid clobbering other CMAKE_PREFIX_PATH paths.

Follow-up to b33210750c.
2022-08-26 09:55:41 +00:00
John Thacker b65b95dda4 CMake: Build test_programs automatically when running test
Since we require CMake version at least 3.7, we can use fixtures
to ensure that the unittests have been built before running
suite_unittests.

This only applies to running the tests via ctest (including
'[ninja|make] test'), not when running pytest directly.

Fix #17191
2022-08-26 00:51:10 +00:00
João Valverde 94da25af6c RPM: Add support for Qt6 and Fedora Linux 2022-08-25 07:54:00 +00:00
João Valverde b33210750c CMake+etc: Enable Qt6 by default for Unix builds
Linux builds were left behind on the Qt transition, presumably because
our Ubuntu CI image does not support Qt6.

Enable Qt6 by default and explicitly disable it for slower or more
conservative Linux distros.

Drop experimental status for Qt6, because we are using it to build
official Windows and macOS releases.
2022-08-22 09:08:06 +00:00
Tomasz Moń 12bb2788f9 CMake: Break on GLib criticals by default in MSVC
Set G_DEBUG=fatal-criticals environment variable when debugging with
Visual Studio. Setting the environment variable conveniently triggers
breakpoint whenever there is a programmer error.
2022-08-17 17:06:57 +00:00
Gerald Combs d2a70cc4ac CMake: Add a Logray patch version. 2022-08-17 16:20:06 +00:00
Gerald Combs 08feb35af0 Version: 3.7.3 → 4.1.0.
[skip ci]
2022-08-15 15:33:00 -07:00
Chuck Craft bbb9610cb3 pluginifdemo: Qt5->Qt6; bump version to 0.0.2 2022-08-15 05:07:46 +00:00
Tomasz Moń c1861ad1cc
extcap: Close capture session after extcap finishes
Wait up to 30 seconds for extcap process to finish after closing pipes.
The wait is achieved in non-blocking fashion, i.e. the UI is completely
responsive during the wait. Only actions related to capture process like
capture control, file open, save, export are inactive during the wait.

On Windows extcap child watch callback gets called immediately as the
process is forcefully terminated. Prior to this change the extcap was
forcefully terminated on Windows anyway.

The wait is possible on UNIX systems if extcap does handle SIGPIPE and
SIGTERM signals. The defaults handlers for SIGPIPE and SIGTERM simply
terminate the process so for large number of extcaps there is no change.
If extcap does not finish within 30 seconds, it is forcefully terminated
using SIGKILL signal.
2022-08-10 06:18:15 +02:00
João Valverde b8ec3199ab Convert Acknowledgements to markdown and update GUI
Move Acknowledgements to a separate file to enable some code
simplification and improve maintenance and discoverability
for acknowlegements.

Convert the Acknowledgements file to Github flavored markdown
and display it in rich text using QTextBrowser.

Add Acknowledgements.md to NSIS installer
2022-08-02 00:09:29 +00:00
Gerald Combs f65fd437dd Fix our version.
Update our version to 3.7.3.

[skip ci]
2022-07-29 10:20:59 -07:00
Gerald Combs 3307397da1 CMake: Set the correct variables for ccache.
As the RULE_LAUNCH_COMPILE documentation says,

"Note: This property is intended for internal use by ctest(1). Projects
and developers should use the <LANG>_COMPILER_LAUNCHER target properties
or the associated CMAKE_<LANG>_COMPILER_LAUNCHER variables instead."
2022-07-25 14:10:39 -07:00
Gerald Combs 49dda8c71e Make Perl optional.
Update our documentation, build configuration, and setup scripts to make
Perl optional.
Closes #18152.
2022-07-23 21:12:25 +00:00
Chuck Craft 26e1d3cdb2 cmake: copy profiles output check
Extend directory path used for RELATIVE comparison.

Closes #18204
2022-07-21 21:31:54 +00:00
Gerald Combs b8d85227f6 Qt: Update the RTP stream UI to support Qt6Multimedia.
Fixes #18115
2022-07-21 20:09:52 +00:00
João Valverde d2b6b89b94 Update license file structure and GUI display
Add the text of the GPLv2 in HTML, taken from the FSF website,
and use rich text to display the license in the GUI.

Move the introductory note about the GPL from the COPYING
license text file to the README.

Remove various other license callouts at the end of the COPYING file
as unnecessary and unhelpful. This information is present in
each source file, where it belongs.
2022-07-21 19:10:06 +00:00
Roland Knall 5991a75d78 ReleasNotes: Add minimum version requirements
Adding an explanation on minimum required versions to the release
notes, as well as bumping c-ares to version 1.14.0

The previous minimum (1.5.0) has been released in 2008. The new
version has been choosen to correlate with those distros, that
also provide a minimum version of Qt5 higher than 5.9, as 5.9
is no longer supported in the main branch
2022-07-21 12:37:17 +00:00
Roland Knall 06cd84a6e9 Qt: Recommend 5.12 and enforce 5.10
In order to phase out older versions, we recommed 5.12 as a
minimum Qt version going forward. Although build support for
5.10 and 5.11 is not being removed at this point, it might
be for 4.x at a later time.
2022-07-13 21:26:46 +00:00
Tomasz Moń 0438fca96b Qt: Concurrently fill display filter expression dialog
Use QtConcurrent to create and sort widget items. The dialog window is
immediately visible and usable. Search becomes available once all items
are added to the tree.

When compiled with Qt5, all items are added in bulk. Qt6 features new
QPromise interface that makes it possible to add tree items one by one.
2022-07-11 16:36:43 +00:00
Moshe Kaplan 87ca8c227a tools: Port make-version.pl to Python 2022-07-11 14:44:23 +00:00
Tomasz Moń 75196b5103 Qt: Fix Qt 6.3 Visual Studio build
Since Qt 6.3 the /permissive- option is required as otherwise the
compilation fails on static assert:
  "On MSVC you must pass the /permissive- option to the compiler."
2022-07-10 14:47:49 +00:00
Gerald Combs f296a00f09 Add a default configuration profile for Logray.
Add and install default coloring rules and filter buttons for Logray.
Add is_packet_configuration_namespace() and use it to set the default
timestamp type for Logray to "Absolute", which is more appropriate for
log entries.
2022-07-06 10:53:21 -05:00
Gerald Combs 75efbb1ac4 Rename Logwolf to Logray
Switch to the name "Logray" for the log analyzer. Rays are biological
cousins of sharks and more people like the name "Logray" in a completely
unscientific survey here. Apologies for any inconvenience this might
cause.
2022-07-06 15:04:25 +00:00
Gerald Combs 51cb231208 CMake: Copy our DLLs to a DLL-specific directory.
Set our DLL build directory to the the target directory for wsutil.dll
instead of DATAFILE_DIR.
2022-07-06 01:06:20 +00:00
Gerald Combs f17d39db1e CMake+tools: Clean up our build version variables.
In the top-level CMakeLists.txt, fill in PROJECT_BUILD_VERSION directly.
Clean up the WiX PRODUCT_VERSION variable.
2022-07-05 15:00:06 +00:00
João Valverde a877f2d5f3 dfilter: Allow existence check for slices
Allow checking if a slice exists. The result is true if the
slice has length greater than zero.

The len() function is implemented as a DFVM instruction instead.
The semantics are the same.
2022-07-04 22:45:14 +00:00
Gerald Combs 7c96053f3b Version: 3.7.1 → 3.7.2
[skip ci]
2022-06-27 12:10:57 -07:00
Gerald Combs dac75fba7f CMake: Bump the minimum Python version to 3.6.
Make Python 3.6 the minimum required version. Version 3.6 added support
for f-strings.
2022-06-27 15:54:40 +00:00
Moshe Kaplan acb8158033 Tools: Port tools/generate_authors.py to Python3.
Port the script that creates AUTHORS to Python3.
Ping #18152.
2022-06-24 08:05:50 +00:00
Gerald Combs de1a4c3774 CMake: Update package target names.
Rename the rpm-package target to wireshark_rpm and the appimage target
to wireshark_appimage.
2022-06-08 17:56:21 +00:00
Gerald Combs c253dda269 CMake+Packaging: Add a logwolf_dmg target. 2022-06-08 17:39:54 +00:00
Gerald Combs c5e265f852 CMake: Deduplicate some version variables.
Use PROJECT_VERSION instead of VERSION. Prepend "PROJECT_" or
"LOG_PROJECT_" as needed to other variables. Remove the leftover unused
variables.
2022-06-07 16:04:17 -07:00
Gerald Combs 8c7e3f0d30 Packaging: Add a Logwolf NSIS config.
Create Logwolf-specific copies of the various Wireshark NSIS config files
and modify them to install and uninstall Logwolf. There are still a bunch
of rough edges, but the installer works for a test capture I have here.
2022-06-03 21:24:21 +00:00
Gerald Combs 056fd8a1e3 NSIS: Update some target and filenames.
Rename the following build targets, similar to the recent macOS target
name changes:

nsis_package_prep to wireshark_nsis_prep
nsis_package to wireshark_nsis

Rename some NSIS files to reflect that they're specific to Wireshark.
Update the documentation and CI configurations.
2022-06-02 16:33:31 -07:00
Gerald Combs 370c58f913 macOS: Add Logwolf packaging targets.
Rename the following build targets:

app_bundle to wireshark_app_bundle
dmg_package_prep to wireshark_dmg_prep
dmg_package to wireshark_dmg

Add logwolf_app_bundle, logwolf_dmg_prep, and logwolf_dmg targets and
packaging assets. Update the documentation.

We need to add a set of Logwolf version variables to CMake and
make-version.pl. Add a static logwolf-version attribute to
attributes.adoc in the mean time.
2022-05-26 20:29:20 +00:00
Gerald Combs 5373483963 Tools: Add a CMakeExecutable parameter to win-setup.ps1.
52054046c1 switched archive extraction from 7Zip to CMake. This removed
a dependency on 7Zip, but assumed that CMake was in our PATH.  Add a
CMakeExecutable to win-setup.ps1 and use it in CMakeLists.txt to pass
the value of CMAKE_COMMAND.
2022-05-26 20:13:18 +00:00