Commit Graph

25 Commits

Author SHA1 Message Date
Martin Mathieson cc9905b87f tools/bsd_setup.sh: speexdsp is a required package 2022-12-20 12:27:41 +00:00
Chuck Craft 41f14af980 build: bsd-setup.sh - make code like the others; FreeBSD gcrypt 2022-10-18 16:06:05 +00:00
Gerald Combs 9206c4b8fa Tools: Switch the BSD setup script to Qt6.
Switch bsd-setup.sh to Qt6.
2022-09-09 17:56:30 -07: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 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 b5c629b62d tools: add lua to bsd-setup.sh.
Change-Id: I16a5aefa11f3c73ebdd69d972136980b630892e1
Reviewed-on: https://code.wireshark.org/review/36011
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-02-02 19:52:23 +00:00
Dario Lombardo a4cb1c3234 tools: add missing package to bsd-setup.
Change-Id: I80da65063bdabc99a3ca0dd722df710be34f1285
Reviewed-on: https://code.wireshark.org/review/35955
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-26 17:41:59 +00:00
Dario Lombardo ece8da5ea6 tools: fix check in bsd-setup.
Change-Id: I3ad5793d6aeca54fc84c82b226311c0e6777c1df
Reviewed-on: https://code.wireshark.org/review/35922
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-23 16:57:13 +00:00
Dario Lombardo 23b91bdcd0 tools: minor changes in bsd-setup script.
Changes:
- use bash
- fix list checks

Change-Id: Idb933155035091974460d6957a9f6a223f6680dc
Reviewed-on: https://code.wireshark.org/review/35872
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-21 16:22:43 +00:00
Dario Lombardo 567991b8fb toold: add libilbc to bsd-setup.
Change-Id: I471b6936cef3df0ed9aaf6cc4421ac9fa47ad27c
Reviewed-on: https://code.wireshark.org/review/35873
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Jirka Novak <j.novak@netsystem.cz>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 21:50:54 +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
Dario Lombardo 469228a2e5 tools: fix check of shell variables in other setup scripts.
Change-Id: I7423f994b2295ef8336c37fd2e53418d363a4327
Reviewed-on: https://code.wireshark.org/review/35309
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-05 05:37:44 +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 e624545b95 tools: fix echo in bsd-setup.
Change-Id: I17479e30ea70e7c9d080994330388b205bcf56e8
Reviewed-on: https://code.wireshark.org/review/35099
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-11-15 22:22:31 +00:00
Dario Lombardo ecd731ca92 tools: add missing packages to bsd-setup.
Change-Id: I2d9272c5f320891420a7336d648e1ee23d2f20e8
Reviewed-on: https://code.wireshark.org/review/34128
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-07-29 21:28:55 +00:00
Peter Wu 811d5f7fac Drop JSON-GLib completely
JSON-GLib was added in v2.9.0rc0-201-g511c2e166a, but is no longer
necessary since we have a home-grown JSON dumper (wsutil/json_dumper.h).
Remove the remaining traces and additionally remove GObject from
FindGLIB2.cmake since it was only added for JSON-GLib.

Change-Id: If9dfd2c60cec130f98109d100bdb6618bde06ba0
Reviewed-on: https://code.wireshark.org/review/30733
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20 05:04:11 +00:00
Guy Harris ad3367e169 Use the standard test/[ command.
We use it elsewhere; use it here, as FreeBSD's /bin/sh doesn't support
[[ as a test operator.

Change-Id: I183b10cc6f4aceec9725027474848061e8ea4fd9
Reviewed-on: https://code.wireshark.org/review/29232
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-21 19:21:34 +00:00
Guy Harris ea515c5f2d Don't assume Bash.
At least on my OpenBSD 6.3 VM, there's no Bash installed; just use
/bin/sh.

Fix two places that use csh-style ">& /dev/null" to use
"> /dev/null 2>&1" instead.

Change-Id: I48656c47e89b3ad09f3c2d9e3c90dfad7afabb71
Reviewed-on: https://code.wireshark.org/review/29214
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-21 09:38:24 +00:00
Guy Harris 92b4cd586e Fix search for pkg-config on FreeBSD.
1) At least with FreeBSD's "pkg search", the search does *not* do a
prefix match, so if you look for "pkg-config", you can find packages
whose name is *not* pkg-config but that has "pkg-config" in the middle
of the name.  This means that we think we have a "pkg-config" package,
but we don't, and fail when we try to install it.

So we force a prefix match.

2) FreeBSD 11 doesn't have a "pkg-config" packate, but has a "pkgconf"
package.  If we don't find "pkg-config", look for "pkgconf".

Change-Id: Iad5ef9d5630981958830c03e4cb90fe2d01ce1d0
Reviewed-on: https://code.wireshark.org/review/29213
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-21 06:38:45 +00:00
Guy Harris 4a5484eaf1 Bash is not guaranteed to be in /usr/pkg/bin/bash.
On my FreeBSD 11 VM, it's the standard FreeBSD package, which installs
it in /usr/local/bin/bash.

Change-Id: Ic6427a88efd963de8909a2d333c2c3bf8586e559
Reviewed-on: https://code.wireshark.org/review/29211
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-21 05:02:21 +00:00
Dario Lombardo 3add4176ea tools: add bsd-setup.sh.
Change-Id: I342f13b962e97fb1429472c315e1ca35b5a9ffc6
Reviewed-on: https://code.wireshark.org/review/27863
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-06-04 16:48:11 +00:00