Commit Graph

1412 Commits

Author SHA1 Message Date
Biswapriyo Nath bd24f450f8 CMake: Allow arm64 architecure in Windows
This also sets arm64 as processor architecture in exe manifest files.
2023-02-13 18:25:18 +00:00
João Valverde 9cb759b38e Enable rpathification and working relocation on Linux (take 3)
Dumpcap depends on wsutil.so. The path to the shared library
is encoded in the RPATH (or RUNPATH) property of ELF binaries.
This is currently an absolute path on most Unixy systems.

Dumpcap could not be made to work with a relative RPATH because it
uses elevated privileges and some loaders will ignore relative
RPATHs and non-standard paths under those circumstances, because of
(justified) security concerns.

To enable relocation of the program we link dumpcap statically
with wsutil instead.

This provides a fully working relocatable installation on Linux
and other platforms that support relative RPATHs.
2023-02-13 00:24:21 +00:00
João Valverde ce6c3da727 Revert "Enable rpathification and working relocation on Linux (take 2)"
This reverts commit 8dfe8737c5
2023-02-12 20:30:38 +00:00
João Valverde 8dfe8737c5 Enable rpathification and working relocation on Linux (take 2)
Dumpcap depends on wsutil.so. The path to the shared library
is encoded in the RPATH (or RUNPATH) property of ELF binaries.
This is currently an absolute path on most Unixy systems.

Dumpcap could not be made to work with a relative RPATH because it
uses elevated privileges and some loaders will ignore relative
RPATHs and non-standard paths under those circumstances, because of
(justified) security concerns.

To enable relocation of the program we link dumpcap statically
with wsutil instead.

This provides a fully working relocatable installation on Linux
and other platforms that support relative RPATHs.
2023-02-12 19:20:18 +00:00
João Valverde 9fca1acb40 CMake: Remove dumpcap dependency on ui 2023-02-10 20:59:22 +00:00
Gerald Combs ecbfda08c4 macOS: Update our extra package versions.
Track our extra package versions using CMake variables and bump each
version.
2023-02-09 17:52:55 +00:00
João Valverde 84f963dfa2 Move ui/version_info.[ch] to wsutil 2023-02-07 23:17:37 +00:00
João Valverde c62aa67d2c Move ui/exit_codes.h to include/ 2023-02-07 10:12:08 +00:00
João Valverde 7c156d9ac4 Add a #define HAVE_MSYSTEM and use it
In certain situations using __MINGW64__ is not correct.
We want to have the condition apply using MinGW-w64 but also
using MSYS2, which the __MINGW64__ condition alone does not
capture.

Add a HAVE_MSYSTEM C define and use it where appropriate.
2023-02-06 19:39:33 +00:00
João Valverde ab0d190450 CMake: Fix libnl unused link dependencies 2023-02-06 15:04:46 +00:00
João Valverde b07ab25a1c CMake: Cleanup unnecessary linking with shared libraries 2023-02-06 15:04:46 +00:00
Gerald Combs 894e8c46c6 Revert "Enable rpathification and working relocation on Linux"
This reverts commit 7a346c398a.
2023-01-30 22:30:56 +00:00
João Valverde 7a346c398a Enable rpathification and working relocation on Linux
Dumpcap depends on wsutil.so. The path to the shared library
is encoded in the RPATH (or RUNPATH) property of ELF binaries.
This is currently an absolute path on most Unixy systems.

Dumpcap could not be made to work with a relative RPATH because it
uses elevated privileges and some loaders will ignore relative
RPATHs and non-standard paths under those circumstances, because of
(justified) security concerns.

To enable relocation of the program we link dumpcap statically
with wsutil instead.

This provides a fully working relocatable installation on Linux
and other platforms that support relative RPATHs.
2023-01-29 23:38:00 +00:00
João Valverde c66fc43e5b GUI: Ship authors as a Qt resource file 2023-01-20 13:35:03 +00:00
João Valverde 5f63989ee0 Update authors file in place
Instead of having AUTHORS.src and copying that to a new AUTHORS
file with git log information appended to that have a single
AUHTORS file and update it in place with git log info.
2023-01-20 12:04:57 +00:00
João Valverde 2ab291b3b2 GUI: Ship license + acknowledgements as Qt resource 2023-01-19 19:14:32 +00:00
João Valverde 776aafc7de CMake: Install CSS to DOCDIR 2023-01-19 17:55:20 +00:00
João Valverde 74909f1499 Install PDML files to DOCDIR
Add README because this stuff is somewhat obscure and move XSLT
file to DOCDIR because it is not used by wireshark directly.
2023-01-19 17:08:36 +00:00
Joakim Karlsson c06a38da31 CMake: Update a compiler version check 2023-01-19 16:58:58 +00:00
João Valverde 06519be205 Install documentation (HTML manuals) to DOCDIR
Install documentation to DOCDIR instead of DATADIR.
The code must be fixed to open the Help URLs from
this new path.

This only affects Unix-like FHS platforms. Windows
installation does its own thing.

Needs testing with macOS packaging.
2023-01-19 01:40:59 +00:00
João Valverde 9e6faf4169 Remove dftest man page
DFTest is a private test utility and isn't installed anywhere.

I don't think it makes sense to maintain a man page. Certainly
doesn't make sense to ship it.

The doc file is understandably minimal so just nuke it.
2023-01-19 00:17:56 +00:00
Gerald Combs de7ca4c64a Packaging: Add a Logray AppImage package 2023-01-18 14:26:33 -08:00
Gerald Combs 5a9812ab61 AppRun: Set various paths
Set our ld library path and our data, extcap, and plugin directories.
Document WIRESHARK_EXTCAP_DIR and WIRESHARK_PLUGIN_DIR. Note that we
might want to set our various directories relative to the program path.
2023-01-18 20:37:08 +00:00
João Valverde 83f57bd4c2 Debian: Fix header installation 2023-01-18 10:51:51 +00:00
João Valverde fe7bfdf6ca CMake: Require explicit installation of development headers
Develpment headers are a sizeable part of the binary installation
and most users won't ever require them. It's recommended to package
them separately in a devel package or SDK.

Create a CMake installation component for development headers
and add the EXCLUDE_FROM_ALL property.

Headers can be installed using the invocation:

    cmake --install <dir> --component Development
2023-01-18 03:35:13 +00:00
João Valverde 728073ade0 CMake: Do no install some misc CMake modules
These are build files, not part of the installation.
2023-01-18 02:46:45 +00:00
Gerald Combs d3d6db58fe Resources: Add Logray Freedesktop files 2023-01-17 20:58:31 +00:00
João Valverde 89188380ae MSYS2: Add better support for other environments
Add support for and generally recommend using UCRT64.
2023-01-14 23:38:55 +00:00
João Valverde 184a567621 CMake+Windows: Try to prevent symbol redefinitions again 2023-01-14 14:52:53 +00:00
Gerald Combs dd07fb5a15 CMake: Update a compiler version check
It looks like AppleClang 10 and 11 generate bogus missing braces
warnings as well. The macOS Intel builder, which has AppleClang
11.0.0.11000033 installed, is failing with

wireshark/epan/dissectors/packet-rtps.c:11403:63: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
  coherent_set_entity_info coherent_set_entity_info_object = {0};
                                                              ^
                                                              {}
2023-01-14 02:28:38 +00:00
João Valverde c8fe23575f MSYS2: Fix build with -Werror 2023-01-13 22:41:04 +00:00
Gerald Combs 34ce99f32e AppImage: Switch to linuxdeploy
Linuxdeployqt resists running on newer versions of Linux to the extent
that you can't even use "-h" or "--help":

https://github.com/probonopd/linuxdeployqt/issues/340

Switch to linuxdeploy (https://github.com/linuxdeploy/linuxdeploy).
2023-01-13 08:59:30 +00:00
João Valverde d00bd20fea MSYS2: Fix system installation
Make the "ninja install" target in the MINGW64 shell work and
allow Wireshark to run from the msys2 installation, besides
the build directory.

To clarify the names used here MSYSTEM is the distribution with a
Linux-like environment for Windows. MINGW is the toolchain.

It is possible to use MinGW without MSYS2 and we generally select
the CMake variables WIN32/MSVC/MINGW/USE_MSYSTEM taking that into
consideration but that WIN32+MINGW platform is not supported at the
moment and it's unlikely to be supported in the near future.
2023-01-12 14:30:41 +00:00
Gerald Combs de16040021 CMake: Rename SINSP_PLUGINS to FALCO_PLUGINS 2023-01-12 02:21:15 +00:00
João Valverde 4c9b0d846c CMake: Reverse debug macros
Originally WS_DISABLE_DEBUG was chosen to be
similar to G_DISABLE_ASSERT and NDEBUG.

However generator expressions are essential for modern CMake
but the syntax is weird and having to use negations makes it
ten-fold worse.

Remove the negation. Instead of changing the CMake variable
reverse the macro definition for WS_DISABLE_DEBUG.

The $<CONFIG:cgs> generator expression with multiple config arguments
requires CMake >= 3.19 so we can't use that yet for a further
syntactical simplification.
2023-01-12 00:59:15 +00:00
João Valverde 25d4a099f7 Remove WS_DISABLE_ASSERT
Assertions can be enabled/disabled using WS_DISABLE_DEBUG. The extra
granularity afforded by WS_DISABLE_ASSERT seems unnecessary.
2023-01-12 00:59:15 +00:00
Gerald Combs 29ca9c289f macOS: Add an initial donation page to the .dmg
Add a donation page to the .dmg package.
2023-01-11 18:42:39 +00:00
João Valverde 4d3f580961 tests: Reorganize dfilter group 2023-01-07 21:21:36 +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
João Valverde 415389eb84 CMake: Update a comment
The stringop-overflow warning is active with both GCC and Clang
in the master branch and was not triggered by our build bots so
update the comment to reflect that.

```
epan/dissectors/packet-lwm.c:464:31: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
epan/dissectors/packet-lwm.c:419:21: note: at offset 192 into destination object ‘nwkSecurityVector’ of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
```
2022-12-15 03:34:06 +00:00
João Valverde 2d3de008f5 CMake: Disable UTF-8 debug checks for release builds
Disable UTF-8 debug checks for release builds for optimization
purposes.

Also remove unused macro that currently lacks a proper use case.

Change version info to be more complete about the build type without
being too verbose.
2022-12-15 01:57:39 +00:00
João Valverde 400235ad7e CMake: Re-enable -Wno-error=stringop-overflow= 2022-12-15 01:57:39 +00:00
João Valverde 60cb3dd3c6 CMake: Remove -Wjump-misses-init warning
If the jump misses init it's probably because the variable is
not used. Don't force contortions to avoid this common and
harmless case of "missing init" for an unused variable after
jumping.
2022-12-05 11:53:31 +00:00
João Valverde 2897e904f9 CMake: Remove redundant warning
-Wunused-const-variable is enabled with -Wunused-variable
which is enabled by -Wall.
2022-12-05 11:53:23 +00:00
João Valverde c4ca4312c1 CMake: Add -Werror to sharkd 2022-11-19 23:12:19 +00:00
John Thacker d7ae26bf6c CMake: Update minimum required version to 3.13
Windows already requires CMake 3.13. Bump the non-Windows
required version to 3.13 as well, since all our currently
supported Linux distributions have at least 3.13.

RHEL 8 and SUSE Enterprise 15 were initially released with
3.10 and 3.11, but have had updates with much more recent
versions since mid 2021 and mid 2020, respectively.
2022-11-18 10:05:25 +00:00
João Valverde 18b161c80f CMake: Split "extra" warnings into interesting/not interesting
Add another category for warnings that are worth looking
into.

Split ENABLE_EXTRA_WARNINGS into ENABLE_TODO_WARNINGS and
ENABLE_PEDANTIC_WARNINGS.

Disable pedantic warnings in the CI builds.

Add Clang specific warnings to standard category.

Fix or workaround -Wunreachable warnings.
2022-11-18 10:04:50 +00:00
João Valverde dbb5b80344 CMake: Comment out some warning exceptions 2022-11-17 13:30:33 +00:00
João Valverde e1d492e2e0 CMake: Do not disable -Werror with "extra compiler warnings"
Give the ENABLE_WERROR option full control of -Werror. Silently
overriding the user configuration is potentially confusing and
unnecessary.
2022-11-17 11:22:57 +00:00
João Valverde 973748f321 CMake: Cleanup some compiler flags
Enable -Qunused-arguments because it may be a useful warning.
Remove -fwrapv because it is implied by -fno-strict-overflow.

Move GCC-specific flag out of if(GCC) condition. Let CMake enable
it automatically.
2022-11-17 11:20:57 +00:00