For a CMake build done in a subdirectory of the source directory, the
equivalent of "make distclean" is "rm -rf {that subdirectory}". Make it
so.
When uninstalling the stuff snappy installs with "rm -rf", use $DO_RM,
so it's done with sudo iff /usr/local isn't writable by us, just as
"make uninstall" is done with $DO_MAKE_UNINSTALL so it's done with sudo
iff /usr/local isn't writable by us.
Fix up the list of what to remove, now that we're building snappy as a
shared library, so that it removes shared libraries rather than the
non-existent static library.
Update a comment while we're at it, as Lua isn't the only dependency
that doesn't support "make uninstall".
(cherry picked from commit 7d01e3a74e)
The older versions of snappy apparently used autotools and build a
shared library by default; for example, Wireshark 3.2.6 for macOS is
built with snappy, and includes a snappy dynamic library in the app
bundle.
The current version uses CMake and does *not* build a shared library by
default. Instead, it builds a static library, which, when you try to
link it to a C-only shared library...
...does not work.
The linker sees that you're statically linking in a bunch of C++ .o
files and gets upset because it can't find C++ standard library routines
used by that code.
If it's a dynamic library, the library was itself already linked with
the C++ standard library, so the external references to that library
from the snappy library are already marked as having been resolved to
the extent that they're expected to be in the C++ standard library at
run time - and, when the dynamic snappy library is built, it's marked as
depending on the C++ standard library, so the run time linker will, when
it loads the snappy dynamic library, see that the C++ standard library
is required and will load it if it hasn't already been loaded.
(cherry picked from commit e92119c608)
Or a distclean target, for that matter.
Do the best we can.
(libpcap and tcpdump support both autotools and CMake, and Wireshark
uses only CMake; all of them support an uninstall target in CMake. Go
forth, read what they did, and sin no more.)
(cherry picked from commit 504f2ea42a)
GNU libtool has a libtool program and a libtoolize program.
The development tools for NeXTStEP, apparently, had a libtool program as
well, and the current version of the development tools for the current
version of NeXTStEP, generally known as "Xcode for macOS", still have
that program.
This means that we do some renaming after installing GNU libtool, so
that its "libtool" becomes "glibtool" and its "libtoolize" becomes
"glibtoolize".
That meant we had to compensate for that when running autoreconf when
building and installing minizip.
It turns out we have to do that when running autogen.sh when building
and installing GLib as well.
(cherry picked from commit 2ecb606142)
Enable PKCS #11 support in macOS builds with macos-setup.sh (already
supported on macOS via Homebrew and on all other OSes with GnuTLS 3.4
or greater) by installing p11-kit (and its dependency libtasn1) and
building nettle and GnuTLS against it.
(cherry picked from commit fe1f947540)
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
(backported from commit 77e9d7d3f9)
These are the versions being used to build 3.4, so we're updating this
so that the 3.4 source tree's macos-setup.sh can be used to set up the
build environment for 3.4.
[skip ci]
It's minizip-$installed_minizip_version-done, not
zlib-$installed_minizip_version-done; the tarball is
zlib-$installed_minizip_version.tar.gz, because it's a contributed file
in the zlib package, but we don't use zlib in the name of the -done
file.
[skip ci]
(cherry picked from commit 0cdbdcc5a4)
It has no configure script, so there's no need for "make distclean", and
the Makefile supplied with it has no "make distclean" rule; just do
"make clean".
[skip ci]
(cherry picked from commit 806f524a10)
Big Sur goes to 11, and it appears that next year's (San Juan Capistrano?)
will go to 12, and so on.
Split version numbers into major and minor, and do version-number
comparison (alas, whilst CMake has that built in, the Bourne shell
doesn't, and neither does the Bourne-again shell).
This should fix issue #17043.
(cherry picked from commit 8e2815bfc0)
In uninstall_autoconf, when running uninstall subfunctions, pass the
arguments to the subfunctions.
When uninstalling Ninja, remove the "we've finished installing this"
indicator file.
Get rid of a debugging "set +x".
(cherry picked from commit 9fbf79c045)
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
(backported from commit 02c5f50009)
The canonical location for the usb.ids file is
http://www.linux-usb.org/usb.ids. Unfortunately that site isn't
accessible over HTTPS so we were using https://usb-ids.gowdy.us/usb.ids
instead. *That* site is down, so switch to the Linux USB project's
SourceForge repository URL, which appears to house the assets for
www.linux-usb.org, including the usb.ids file.
(cherry picked from commit 01d5e8ee51)
PEP 394[1] says,
"In cases where the script is expected to be executed outside virtual
environments, developers will need to be aware of the following
discrepancies across platforms and installation methods:
* Older Linux distributions will provide a python command that refers
to Python 2, and will likely not provide a python2 command.
* Some newer Linux distributions will provide a python command that
refers to Python 3.
* Some Linux distributions will not provide a python command at all by
default, but will provide a python3 command by default."
Debian has forced the issue by choosing the third option[2]:
"NOTE: Debian testing (bullseye) has removed the "python" package and
the '/usr/bin/python' symlink due to the deprecation of Python 2."
Switch our shebang from "#!/usr/bin/env python" to "#!/usr/bin/env
python3" in some places. Remove some 2/3 version checks if we know we're
running under Python 3. Remove the "coding: utf-8" in a bunch of places
since that's the default in Python 3.
[1]https://www.python.org/dev/peps/pep-0394/#for-python-script-publishers
[2]https://wiki.debian.org/Python
(cherry picked from commit 30c392f166)
Cherry picking tends to add an extra blank line to the commit message.
Update the body check in validate-commit.py to allow for this.
Revert "tools: Skip over commit body checks." This reverts commit
24450d9c51.
(cherry picked from commit dd6b6f48dc)
Cherry-pick the part of 507dd98a58 that skips over commit body checks
since they might contain extra newlines due to appending "(cherry picked
from commit xxx)".
Speed functions to print hex bytes, escape XML strings and
print out indents by avoiding specifier calls, and building
larger strings before calling fputs().
Someone mentioned this in the sharkfest chat yesterday.
Also, Ostinato relies upon this when importing from pcap.
An example capture I have has gone from 18 to 11 seconds.
It's possible to play opus payload with libopus (https://opus-codec.org/).
Closes#16882.
Helped-by: Pascal Quantin <pascal.quantin@gmail.com>
Signed-off-by: Lin Sun <lin.sun@zoom.us>
Signed-off-by: Yuanzhi Li <ryanlee@mail.ustc.edu.cn>
Add ui/urls.h to define some URLs on various of our websites. Use the
GitLab URL for the wiki. Add a macro to generate wiki URLs.
Update wiki URLs in comments etc.
Use the #defined URL for the docs page in
WelcomePage::on_helpLabel_clicked; that removes the last user of
topic_online_url(), so get rid of it and swallow it up into
topic_action_url().
Add a check to point out where consecutive items have the same filter
but different labels. Quite a few of these look like bugs.
Also, make some REs raw strings, as identified as an issue in
https://gitlab.com/wireshark/wireshark/-/merge_requests/346
Fix some issues discovered by common python linters including:
* switch `None` comparisons to use `is` rather than `==`. Identity !=
equality, and I've spent 40+ hours before tracking down a subtle bug
caused by exactly this issue. Note that this may introduce a problem if
one of the scripts is depending on this behavior, in which case the
comparison should be changed to `True`/`False` rather than `None`.
* Use `except Exception:` as bare `except:` statements have been
discouraged for years. Ideally for some of these we'd examine if there
were specific exceptions that should be caught, but for now I simply
caught all. Again, this could introduce very subtle behavioral changes
under Python 2, but IIUC, that was all fixed in Python 3, so safe to
move to `except Exception:`.
* Use more idiomatic `if not x in y`--> `if x not in y`
* Use more idiomatic 2 blank lines. I only did this at the beginning,
until I realized how overwhelming this was going to be to apply, then I
stopped.
* Add a TODO where an undefined function name is called, so will fail
whenever that code is run.
* Add more idiomatic spacing around `:`. This is also only partially
cleaned up, as I gave up when I saw how `asn2wrs.py` was clearly
infatuated with the construct.
* Various other small cleanups, removed some trailing whitespace and
improper indentation that wasn't a multiple of 4, etc.
There is still _much_ to do, but I haven't been heavily involved with
this project before, so thought this was a sufficient amount to put up
and see what the feedback is.
Linters that I have enabled which highlighted some of these issues
include:
* `pylint`
* `flake8`
* `pycodestyle`
This adds a protocol post-dissector for Community ID support to
Wireshark/tshark: https://github.com/corelight/community-id-spec
The protocol is disabled by default. It establishes one new filter
value, "communityid".
Includes test cases and baselines to verify correct Community ID
strings based on similar testsuites in the existing Zeek and Python
implementations.
Replace bugs.wireshark.org links with their equivalent
gitlab.com/wireshark/wireshark/issues links in the AsciiDoctor buglink
macro and the please_report_bug function. Update the bug URLs in
comments in the tools and test directories.