Commit Graph

597 Commits

Author SHA1 Message Date
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
Joakim Karlsson 5b8cb733fa asn2wrs: disable line directive by default
To debug with line directive build with -DENABLE_DEBUG_A2W=ON flag
2022-11-30 11:03:09 +00:00
Gerald Combs 0af3174508 CMake: Updates for CMake 3.25 and later on Windows.
https://cmake.org/cmake/help/latest/release/3.25.html says:

"On Windows, when targeting the MSVC ABI, the find_library() command now
accepts .a file names after first considering .lib. This is symmetric
with existing behavior when targeting the GNU ABI, in which the command
accepts .lib file names after first considering .a."

If "MSVC" is defined, only search for libsmi-2. This keeps us from finding
libsmi.a. Set NO_SYSTEM_ENVIRONMENT_PATH when we're searching for zlib. This
keeps us from finding Strawberry Perl's version.

Some SpanDSP builds link with LibTIFF, but our Windows version doesn't.
2022-11-28 19:15:48 +00:00
João Valverde 2fdd9d2e5d Windows: Fix detection of asciidoctor again
Scoop uses "asciidoctorj.cmd". The others were added for
completeness.
2022-10-10 16:37:53 +00:00
Gerald Combs 07c7ce6ad0 Windows: Upgrade libgcrypt to 1.10.1. 2022-08-19 18:30:16 -07:00
Gerald Combs ec1986cb97 Falco Bridge: Update to match falcosecurity-libs 0.8.0.
Update sinsp-span to use the current Falco libs APIs. Update the
FindSinsp CMake module to use pkg-config.
2022-08-15 16:21:47 -07:00
Gerald Combs 6857e1ed04 Docs: Fix our man page dependencies.
Dependencies need to be set via add_custom_command.
2022-07-29 18:52:07 +00:00
Gerald Combs 1ed39fa0b5 Add vcpkg-export-20220726-1.
Add vcpkg-export-20220726-1, which includes

  Dirent 1.23.2
  Gettext 0.21
  GLib2 2.72.3
  Libffi 3.4
  Libiconv 1.17
  Liblzma 5.2.5
  Libxml2 2.9.14
  PCRE 8.45
  Zlib 1.2.12

Ping #16265.
2022-07-26 23:33:29 +00:00
Joakim Karlsson 4be3ae9738 CMake: improve finding C-Ares library 2022-07-25 16:02:50 +00: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 52db7e88bc Falco Bridge: Fix building on Windows.
Fix Falco plugin installation in multi-config environments. Fix FindSinsp
on Windows.  Ignore a couple of warnings for now.
2022-04-27 22:01:17 +00:00
Gerald Combs dbf3ac3701 CMake+Logwolf: Populate our Falco plugin directory.
Create plugins/<version>/falco and copy over the Cloudtrail plugin.
2022-04-25 12:07:48 -07:00
Gerald Combs 4bb16383a3 macOS: Require Sparkle 2.
Remove our Sparkle 1 code. Fixes #18035.
2022-04-21 17:54:27 +00:00
Gerald Combs fea6591b0c macOS: Add support for Sparkle 2.
Sparkle 2 deprecated the sharedUpdater singleton, so create our own
which uses Sparkle 2's updated API. Ping #18035.

Update our CMake version check.
2022-04-18 18:57:43 +00:00
Gerald Combs 57172fe4cd CMake: Finish splitting ADD_PLUGIN_LIBRARY.
Rename add_plugin_library to add_wireshark_plugin_library and add a
backward compatibility wrapper. Make Falco Bridge a Logwolf plugin.
2022-04-04 23:10:57 +00:00
Gerald Combs 4f3017c000 CMake: Add a jsoncpp include path.
Ubunutu (and presumably Debian) install jsoncpp's include files in
/usr/include/jsoncpp/json.
2022-04-04 21:57:54 +00:00
Gerald Combs 5d3ffe9b57 More Logshark to Logwolf renaming. 2022-04-04 09:39:27 -07:00
Gerald Combs be03aa1a4d CMake+Sysdig Bridge: Add a FindSinsp module.
Add a FindSinsp CMake module, and use it in the Sysdig Bridge plugin
CMakeLists.txt. It still needs work, but should at least be usable on
more machines.

Conflicts:
	plugins/epan/sysdig_bridge/CMakeLists.txt
2022-03-22 17:51:32 +00:00
Gerald Combs e482b375f2 Rename the "image" directory to "resources".
The "image" directory contains resource compiler assets and other
application resources, so name it "resources."
2022-03-09 02:07:51 +00:00
Gerald Combs a6e24a6234 macOS: Require Sparkle 1 for now.
The Sparkle project recently released Sparkle 2.0.0, which deprecates
the version 1 API. Add version discovery to FindSparkle.cmake and
require version 1 until we add support for the new API. Ping #17861.
2022-01-13 09:11:24 +00:00
Gerald Combs dea3d5e5fc CMake: Update our WiX search paths. 2021-12-22 13:07:51 -08:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
Gerald Combs b62197c283 CMake+GitLab CI: Reduce verbosity.
For various commands, make sure we show warnings and errors, but not
other extraneous information such as filenames.
2021-12-11 13:57:29 -08:00
João Valverde ed8a02af17 dfilter: Add support for PCRE2
PCRE2 is the future of PCRE. The only advantage of GRegex is that
it comes bundled with GLib, which is not an advantage at all.
PCRE2 is widely available, the GRegex abstractions layer are not a
good fit and abstract things that don't need abstracting or that we
could handle better ourselves, there are open bugs (#12997) and
maintenance is spotty at best.

GRegex comes with many of the problems of bundled code, aggravated by
the fact that it completely falls outside of our control.
2021-11-14 21:00:59 +00:00
João Valverde a3fe5c6162 MSYS2/CMake: Fix asciidoctor invocation
CMake does not use any shell to run execute_process(). When
running asciidoctor we must use the batch file. Put that before
"asciidoctor" (a ruby script) so CMake uses that instead.
2021-11-07 22:07:14 +00:00
Gerald Combs 2c3b13834d CMake: Place all of the documentation in the "Documentation" folder. 2021-10-21 00:21:17 +00:00
Gerald Combs 44bd3a7d79 CMake+Docs: Update our man page targets.
Remove the generate_*_pages targets that were recently introduced,
since they're not really needed. Only add the "manpages" target
if we have Asciidoctor.
2021-10-20 19:29:08 +00:00
Gerald Combs b8a45f3638 CMake+Docs: Generate man pages all at once.
Asciidoctor lets us generate multiple documents at once, so do so for
our man pages. If we're using AsciidoctorJ this minimizes the number
of JVM instances we have to spin up. This reduces the build time on my
Windows VM here quite a bit, and will hopefully do so on the CI builders.

Add a .editorconfig file in cmake/modules.
2021-10-19 22:06:45 +00:00
Gerald Combs 74747c4d2f CMake: Try to make our man page builds faster.
Depend on our generator targets instead of the generated files, which
allows parallel builds outside of Ninja. Don't reserve JRE memory when
building HTML and man page targets. This reduces the "docs" target build
time on my Windows VM here from over two minutes to under one.
2021-10-13 23:10:35 +00:00
Gerald Combs 84ab55cf75 Docs+Packaging: Convert our man pages to Asciidoctor.
Convert doc/*.pod to Asciidoctor. This:

* Means we use the same markup for our man pages, the guides, and
  release notes.
* Lets us add versions to our man pages.
* Gives us more formatting options, e.g. AsciiDoc supports `commands`,
  nested lists and makes it easy to include version information. The
  manpage backend doesn't seem to support tables very well,
  unfortunately.

Convert our CMake configuration to produce *roff and html man pages
using Asciidoctor. Add a "manarg" block macro which makes our synopses
wrap correctly.

Similar to the release notes, guides, and FAQ, if Asciidoctor isn't
found the man pages won't be generated or installed.

Move Asciidoctor to the list of package build dependencies in various
places.

This commit includes the conversion script (pod2adoc.py), which will be
removed later.

Line count sanity check:

Man page         .pod .adoc
androiddump       260  280
asn2deb            93  105
capinfos          401  471
captype            54   55
ciscodump         241  269
dftest             42   42
dpauxmon          153  169
dumpcap           464  534
editcap           528  583
etwdump           136  156
extcap            157  181
idl2deb            91  103
idl2wrs           120  100
mergecap          206  207
mmdbresolve        75   75
randpkt           107  111
randpktdump       158  184
rawshark          558  610
reordercap         76   78
sdjournal         145  157
sshdump           272  302
text2pcap         274  312
tshark           2135 2360
udpdump           133  151
wireshark-filter  486  479
wireshark        2967 3420
2021-10-01 16:42:34 +00:00
João Valverde 6c5e56f752 Windows: Add preliminary support for MSYS2
If we are using MSYS2 we use those packages to build Wireshark
using MinGW-w64 and disable most or all of our win-setup.ps1 codepaths.

Fix GLib configuration. Disable copying of DLLs with MSYS2.

Some tests in the suite_capture test suite are failing with MSYS
MINGW64. That particular set of tests is way too brittle regarding
file system paths; more work is needed to improve that situation.
2021-09-27 16:45:58 +00:00
João Valverde f4c283298f Add compatibility fix for Minizip dependency 2021-09-23 14:19:02 +00:00
Gerald Combs 0b567bb27e Docs: Asciidoctor.js isn't yet suitable for our needs.
Reverse the text added in cdd6f2ec80 and note that we can't yet use
Asciidoctor.js to build our documentation. I'm not sure how I managed to
miss this in my initial tests, but Asciidoctor.js is missing Docbook,
PDF, and EPUB backends, and doesn't support Ruby macros.
2021-09-23 06:40:08 +00:00
João Valverde 76e31fe09e CMake: Add Doxygen search hint for Windows
This is where chocolatey installs doxygen.

  > choco install doxygen.install
2021-09-20 15:49:57 +00:00
João Valverde 750cc38669 epan: Remove some extraneous #ifdefs
If a macro identifier is not defined it evaluates to zero in an
expression, so the outer #ifdef is unnecessary and should be
avoided (the less the better).

Add a missing CMake comment while here.
2021-09-18 23:25:31 +01:00
Adrian Ratiu 49240e23b4 cmake: lemon: fix path to internal lemon tool
Wireshark fails to build when cross-compiling on Gentoo/ChromeOS
systems because the lemon command is not properly specified or
included in PATH, failing with:

/bin/sh: lemon: command not found

The relevant excerpt from build.ninja is:

COMMAND = cd ..._build/plugins/epan/mate && lemon -T.../tools/lemon/lempar.c
-d. .../plugins/epan/mate/mate_grammar.lemon

By specifying the full path to "lemon" we ensure it is
always searched and found in the correct location.
2021-08-31 19:19:05 +00:00
Chuck Craft eaa2cf0c21 Cmake: misplaced quote in epub asciidoctor_opts
Follow up to !3988
2021-08-29 11:21:54 +00:00
Gerald Combs 8c4543373a CMake: Use "'" instead of "’" in our guide filenames.
Use an apostrophe instead of RIGHT SINGLE QUOTATION MARK in our PDF and
EPUB filenames. Some programs (notably Okular) can't open filenames with
extended characters, at least on Windows.
2021-08-27 01:18:13 +00:00
Pascal Quantin 1b61474d9d CMake: include CheckFunctionExists in FindKERBEROS.cmake 2021-08-10 17:46:40 +02:00
Gerald Combs a6e0482a6f Docs: Give the PDF and EPUB guides descriptive filenames.
Use the document title for our PDF and EPUB filenames under the theory
that "Wireshark User’s Guide.pdf" is more obvious than "user-guide.pdf".
2021-08-03 22:18:06 +00:00
Gerald Combs b58edf3cb8 Docs: Add epub targets for the guides.
Add user_guide_epub and developer_guide_epub targets that generate
EPUB versions of the User's Guide and Developer's Guide.
Ping #17494.
2021-07-30 21:05:37 +00:00
João Valverde c0ae696253 CMake: Remove some unused definitions 2021-07-23 21:23:00 +01:00
Stefan Metzmacher 94ac641efa packet-kerberos: implement PAC Ticket checksum verification
We use some private functions from MIT kerberos:
- krb5_free_enc_tkt_part()
- decode_krb5_enc_tkt_part()
- encode_krb5_enc_tkt_part()
but we already do that for krb5int_c_mandatory_cksumtype(),
which is newer than the above functions.

We use all of them only under HAVE_KRB5_PAC_VERIFY,
so we don't seem to need additional configure tests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2021-07-15 04:52:30 +00:00
Gerald Combs 8834b470d0 CMake: Fixup SpanDSP's TIFF includes.
Add TIFF_INCLUDE_DIR to SPANDSP_INCLUDE_DIRS, but only if TIFF has been
found.

Ping #17477.
2021-07-14 09:10:09 -07:00
Gerald Combs cdd6f2ec80 CMake+docs: Use Asciidoctor.js if it's available.
Add the executables shipped by the Asciidoctor.js project to
FindAsciidoctor.cmake, and update the Developer's Guide to match.
2021-06-23 05:28:55 +00:00
Gerald Combs 4609bc4ad5 CMake: Mark our plugin include directories PRIVATE.
Use target_include_directories to mark our local include directories
PRIVATE, similar to what we do elsewhere.
2021-06-22 22:17:42 +00:00
Gerald Combs b86ec10ca4 CMake: Fixup our glibconfig.h discovery.
On Windows, search for glibconfig.h in the vcpkg lib directory. Search
for it in the directory that contains libglib-2.0 on other platforms.
Avoid a side effect that caused us to search in `/lib` on non-Windows
platforms. Don't add GLIB2_LIBRARY to the search path -- that contains
the path to a file, not a directory.
2021-06-11 11:22:11 +00:00
Gerald Combs 6357f46bc6 Windows: Update GLib to 2.66.4.
Upgrade our vcpkg bundle to one that includes GLib 2.66.4 and libxml2
2.9.10.

Avoid running pkgconfig on Windows so that we don't find Strawberry
Perl's headers.
2021-06-10 03:48:28 +00:00
Gerald Combs 6bfab69d14 Windows: Switch from HTML Help to plain HTML.
Switch from HTML Help to plain HTML files. In the NSIS and WiX installers,
place the help assets in a directory with a friendly name.
2021-06-04 08:57:32 +00:00
João Valverde 9b13c4352d epan: Add SMI version 2021-05-25 20:10:37 +01:00