Commit Graph

2875 Commits

Author SHA1 Message Date
Martin Mathieson eab62aa768 Fix some spellings. 2022-07-06 09:02:37 +01:00
David Perry aa0eeb3184 debian-setup.sh: install pytest and pytest-xdist 2022-07-06 03:35:14 +00:00
Gerald Combs 6684583c7c tools: Remove more unused variables from make-version.pl 2022-07-05 10:40:34 -05:00
Gerald Combs 218d290110 tools: Remove unused variables from make-version.pl.
It looks like repo_branch, repo_url, and repo_root have been unused
since faf5f86e7e.
2022-07-05 10:16:19 -05: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
Gerald Combs 7b38ff3d9d tools: Remove dead/unused code from make-version.pl.
Remove the "ugly internal SVN file hack" block from make-version.pl. It
only worked for Subversion versions prior to 1.4, which was released in
2006.

Remove the Bazaar (bzr) block. James Brown may not have sang about it,
but even so it's a Git's world.

Remove the Tortoise block. As noted in a comment, it appears to be dead
code.
2022-07-04 21:43:37 +00:00
Gerald Combs 493e65a0d8 Tools: Remove fixhf.pl.
Remove fixhf.pl. It doesn't appear to have been used since 2010, and
it's in our commit history if we ever need to restore it.
Ping #18152.
2022-06-30 15:48:41 +00:00
Moshe Kaplan cdb83a370f tools: Port make-sminmpec.pl to make-sminmpec.py
Port make-sminmpec.pl to Python.
Now uses an explicit destination path,
instead of a hardcoded path relative to
the script's location on disk.
Ping #18152
2022-06-28 21:59:53 +00:00
Moshe Kaplan 1fdbc65394 tools: Port colorfilters2js.pl to colorfilters2js.py
Port colorfilters2js.pl to Python.
Slight differences in output code formatting,
but is otherwise consistent.
Ping #18152
2022-06-28 19:05:29 +00:00
Gerald Combs eaae2d0ee7 Minor Python3 script fixups.
Make some scripts executable and use the shebang line recommended at
https://docs.python.org/3/using/unix.html#miscellaneous
2022-06-27 16:46:55 +00:00
Gerald Combs 602e87d6c5 Make sure our Python scripts read and write UTF-8.
Explicitly set "encoding='utf-8'" for each of the files we read and
write in make-reg.py and generate_authors.py.
2022-06-24 11:08:37 -07: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
João Valverde ef581f230f fix-encoding-args: Remove a string check
ENC_NA should not be used because it is unnecessary and
adds no information but since it is just a matter of style and
a lot of code is using it be more lax and ignore that case.
2022-06-09 20:27:26 +00:00
João Valverde eafcd7f97c fix-encoding-args: Revert a change
ENC_ASCII should be invalid for this case so add back the fix.
2022-06-09 20:27:26 +00:00
João Valverde 104cc42008 Make it easier to call tools/make-enums.py from the source dir 2022-06-07 14:31:08 +01:00
Uli Heilmeier 083c6828f5 EOBI: Disable dissector by default
The EOBI dissector has no heuristic and is using several nonstandardized
high ports. Therefore disabling it by default.

Fixes #18103
2022-05-27 19:04:59 +00: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
Gerald Combs 286aec2436 Tools: Clean up win-setup.ps1's CleanupItems
Remove some items from CleanupItems that are no longer relevant.
2022-05-24 18:15:00 +00:00
Gerald Combs f065fdbc63 Windows: Upgrade zstd to 1.5.2. 2022-05-24 17:51:31 +00:00
Gerald Combs e5fc7c1d83 Tools: Switch to a new Windows development library repository.
Download our third party libraries and drivers from dev-libs.wireshark.org
in win-setup.ps1. Automatically check our state based on our library
filenames and hashes instead of a manually updated tag.
2022-05-24 16:53:49 +00:00
Gerald Combs 2f0b5ab2cb Tools: Remove 32-bit support from win-setup.ps1. 2022-05-22 15:46:13 +00:00
Martin Mathieson 17367e4648 check_typed_item_calls: skip mask checks if can't parse 2022-05-21 19:54:13 +00:00
Martin Mathieson 3e117ed788 check_spelling: Recognise epan/pci-ids.c as generated 2022-05-19 10:29:46 +01:00
Gerald Combs 6c612bf251 Tools: Don't validate file_util.c.
It's Windows-only.
2022-05-16 10:13:23 -07:00
Gerald Combs 52054046c1 Tools: Unzip using CMake in win-setup.ps1.
Use `CMake -E tar xf` to unzip files in win-setup.ps1. This seems to be
the most reliable and reasonably fast common denominator for unzipping
files. Update our comments. Fixes #17756.
2022-05-16 00:08:58 +00:00
Gerald Combs 5a48815fb4 Fuzz: Fix our elapsed times.
We use SECONDS in multiple places, so don't reset it.

[skip ci]
2022-05-05 09:58:16 -07:00
Gerald Combs 4fa373400f Tools: Add trailing periods to our bug notes if needed.
[skip ci]
2022-05-04 10:39:18 -07:00
Gerald Combs e8bcaad686 Tools: Show elapsed time when fuzzing. 2022-05-02 22:38:31 +00:00
Gerald Combs 3b6734389d tools: Show recent commits in fuzz output.
Show commits from the past 48 hours instead of the most recent commit.
2022-05-02 11:17:24 -07:00
Gerald Combs 0cce93d76a Tools: Fix make-no-reassembly-profile.py.
Update our path to match fc2cc05dde.

[skip ci]
2022-05-01 09:50:40 -07:00
Gerald Combs 76660922e1 Tools: Add a timestamp to our fuzz test error header.
Print the UTC date and time.
2022-04-29 17:01:40 -07:00
Gerald Combs b104af1c7d Tools: Update our fuzz test error header.
Add the GitLab job URL and reorder other items.
2022-04-27 21:45:09 +00:00
Gerald Combs b53d349583 Tools: Only validate a file if we have a build rule for it.
In validate-clang-check.sh, only check files that have rules in
compile_commands.json or build.ninja.
2022-04-26 09:35:38 -07:00
Martin Mathieson 35cc7f43ab Spelling script: minor improvements and more dict words 2022-04-25 08:57:43 +00:00
Gerald Combs 968f40d373 Tools: Handle table rows and admonition titles in html2text. 2022-04-24 23:59:48 +00:00
John Thacker 9c115d0ed5 macos-setup: Require Qt 5.9 or later and macOS 10.10 or later
The minimum required version of Qt is now 5.9, and thus the
minimum required version of macOS is 10.10 (Yosemite). Update
that in macos-setup, and remove various version checks and older
packages needed for Mountain Lion and Mavericks.

Also update the default version of Qt installed to 5.12.12, the
last release in the Qt 5.12 LTS series (and the last version with
an offline installer.)
2022-04-20 19:44:29 -04:00
Gerald Combs 21d8522334 Tools: Update the Sparkle version in macos-setup.sh.
[skip ci]
2022-04-20 21:50:28 +00:00
Gerald Combs f6061c4a3c Tools: Fix our pacman arguments in arch-setup.sh.
Add back the -u / --sysupgrade flag.
2022-04-19 21:06:24 +00:00
Pascal Quantin 5c7c723feb LPP: upgrade dissector to v16.8.0 2022-04-19 10:05:41 +02:00
naesten c8d9c6fc6a Fix tools/*-setup.sh to work with no arguments
They were checking for --help in an unusual manner that failed when
run with no arguments.

I've checked that --help works for each script, and that debian-setup.sh
actually works.

NOTE: bsd-setup.sh and rpm-setup.sh seem to have sometimes-broken
formatting, because they try to pass escape sequences to echo, which
POSIX says is implementation-defined (except on XSI-conformant systems).

These changes were mostly made using the following script, with a
manual fix in bsd-setup.sh because it isn't using "switch case".

```python
#!/bin/env python3

import sys
import re

usage_p = re.compile(r'^if \[ "\$1" = "--help" \]\nthen\n((?:\t(?:printf|echo) .*\n)*)\texit 1\nfi$',
                     re.MULTILINE)

case_p = re.compile(r'(^\tcase \$arg in$)',
                    re.MULTILINE)

root_check_p = re.compile(r'(\n# Check if the user is root(?:\n|.)*?fi\n)',
                          re.MULTILINE)

done_p = re.compile(r'(^done\n)',
                    re.MULTILINE)

def fix_setup(name: str):
    assert name.endswith('-setup.sh')

    with open(name, 'r') as fin:
        s = fin.read()

    s = usage_p.sub(r'function print_usage() {\n\1}', s)
    s = case_p.sub(r'''\1
\t\t--help)
\t\t\tprint_usage
\t\t\texit 0
\t\t\t;;''', s)

    m1 = root_check_p.search(s)
    if m1:
        root_check = m1[0]
        s = root_check_p.sub('', s)
        pos = done_p.search(s).end()  # type: ignore[union-attr]
        s = s[:pos] + root_check + s[pos:]

    with open(name, 'w') as fout:
        fout.write(s)

if __name__ == '__main__':
    for name in sys.argv[1:]:
        fix_setup(name)
```
2022-04-18 17:05:03 +00:00
Martin Mathieson 24d65950e9 check_typed_item_calls: Count all warnings 2022-04-17 22:47:09 +00:00
Gerald Combs 6900065f2d Tools: Make the Alpine and Arch setup scripts more strict.
Make sure alpine-setup.sh and arch-setup.sh fail with a nonzero status
similar to debian-setup.sh and rpm-setup.sh.
2022-04-17 11:04:02 -07:00
Gerald Combs 05c86efcf6 Tools: Set a variable in rpm-setup.sh.
[skip ci]
2022-04-17 17:41:46 +00:00
Gerald Combs bd6ee4479f Tools: Make the Debian and RPM setup scripts more strict.
We use debian-setup.sh and rpm-setup.sh to build the containers in
https://gitlab.com/wireshark/wireshark-containers/. Make sure they fail
with a nonzero exit status, otherwise we might end up with an invalid
container image.

Make sure OPTIONS is defined in all of the setup scripts that use it.
2022-04-10 16:05:42 -07:00
Dylan Ulis 3890d822ba macOS Homebrew: Install PCRE2 2022-04-10 22:09:55 +00:00
Roman Schmitz 545553e203 Update tools/macos-setup-brew.sh 2022-04-07 23:27:08 +00:00
Kenrick Trip cb1b4fb966 Allow building with Qt without Xcode on macOS 2022-04-05 10:31:39 +00:00
Dylan Ulis df5941d467 debian: add ccache to additional_list packages 2022-04-02 17:39:08 +00:00
João Valverde 2a9cb588aa dfilter: Add binary arithmetic (add/subtract)
Add support for display filter binary addition and subtraction.

The grammar is intentionally kept simple for now. The use case
is to add a constant to a protocol field, or (maybe) add two
fields in an expression.

We use signed arithmetic with unsigned numbers, checking for
overflow and casting where necessary to do the conversion.
We could legitimately opt to use traditional modular arithmetic
instead (like C) and if it turns out that that is more useful for
some reason we may want to in the future.

Fixes #15504.
2022-03-31 11:27:34 +01:00