Commit Graph

13 Commits

Author SHA1 Message Date
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
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
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 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
Gerald Combs d8429d2065 Tools: Add PCRE2 to our setup scripts.
Add PCRE2 to the base package list in our various setup scripts.
2021-11-14 17:53:36 +00:00
Gerald Combs 55a67fd66a Tools: Migrate compress-pngs.sh to Python.
Migrate compress-pngs from a Bash script that ran Make to a Python
script, which should be usable on more platforms.

Add Efficient Compression Tool (ect) to the list of compressors.

Add the compressors to the various *-setup.sh scripts, but comment them
out for now.
2021-09-13 11:00:04 -07:00
Gerald Combs f21cd2e23f wiretap: Convert ascend.y to Lemon.
Convert wiretap/ascend.y.in from Bison/YACC to Lemon and rename it to
wiretap/ascend_parser.lemon. Tighten up some of our scanning and
parsing. Make the indentation in it and related files consistent. Aside
from the recent IPv4 fragment offset changes, this produces identical
output to the 3.4 branch for the Ascend trace files I have here.

Remove the comment about supporting other commands. Another timeline
might have an Ascend that successfully pivoted to DSL or 15625B+1D
gigabit ISDN, but this one has neither.

This was our last/only Bison/YACC file, so remove Bison/YACC as a
development and packaging dependency and remove references to it from
the documentation.
2020-11-30 08:15:43 +00:00
Peter Wu 2b50d124ec tools: do not install doxygen
Most people will never generate API documentation by running the
'wsar_html' target and will not notice any feature degradation.

On Ubuntu 18.04, doxygen depends on libclang1-6.0 (and indirectly
libllvm6.0), 108M can be saved by not installing these.

Change-Id: I51b58f4106696b5475c48afcdaed256f9a97cc81
Reviewed-on: https://code.wireshark.org/review/36416
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-03-16 21:55:32 +00:00
Dario Lombardo b116405139 tools: use better operators in package scripts.
Change-Id: I1de75829de5f77fa5fe6c8715b1df76148937bc5
Reviewed-on: https://code.wireshark.org/review/35326
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-12-06 13:32:47 +00:00
Gerald Combs 451a241e50 Add c-ares to the required library list.
Although c-ares support was techically optional, it was either on by
default or required in all of our packaging. Go ahead and require it
globally. C-ares is widely available and synchronous name resolution can
easily result in a horrific user experience.

Change-Id: Id67c797316ed6b8a0ab5052e55a43a1b9e2a2464
Reviewed-on: https://code.wireshark.org/review/35188
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-23 22:45:59 +00:00
Dario Lombardo bcd19c9f86 tools: add brotli to alpine-setup.
Change-Id: Ica9c46e1fa75ad1bdc52fba9acda9ef4ecf4e9be
Reviewed-on: https://code.wireshark.org/review/34109
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-07-28 17:53:12 +00:00
Roland Knall 390071ed0b Qt: Import Profile information
Allow easy import of profiles. Profiles must be stored inside
a zip file, with no additional hierarchy.

Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032
Reviewed-on: https://code.wireshark.org/review/33881
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-17 18:25:11 +00:00
Dario Lombardo aab172fbda tools: add alpine-setup script.
As for debian/rpm/bsd add a script that helps the user to setup
a development environment for alpine.

Tested on s390x alpine.

Change-Id: Ib4e002385ce748b764ae7ff51f39a9cfce61590c
Reviewed-on: https://code.wireshark.org/review/33268
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-21 11:01:11 +00:00