aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bsd-setup.sh
AgeCommit message (Collapse)AuthorFilesLines
2024-08-03tools: Install latest Lua on *BSDJohn Thacker1-1/+8
Install the lua package (latest on OpenBSD), lua54, or lua53 in that order of preference, as we support 5.3 and later. [skip ci]
2024-05-22CMake+tools: Add more scripts to the shellcheck targetGerald Combs1-5/+7
Add arch-setup.sh, bsd-setup.sh, and macos-setup-brew.sh.
2024-03-04LUA: Ue LUA 5.3 in our setup scriptsAnders Broman1-1/+1
2023-10-16HTTP3: remove nghttp3 min version, update setup scriptsPeter Wu1-0/+8
* The QPACK decoder code has not significantly changed since the initial nghttp3 0.1.0 release. The `user_data` field of `nghttp3_mem` was renamed from `mem_user_data` in 0.2.0. Since we do not use it, just remove the field to make it build on Ubuntu 22.04 with 0.1.1. * Arch Linux, BSD, Debian, Alpine: add (lib)nghttp3. * debian/control: add libnghttp3-dev dependency. * brew: Install libnghttp2 instead of nghttp2, we only need the library. * brew: libnghttp3 was just made available in Homebrew, so install it: https://github.com/Homebrew/homebrew-core/pull/150922
2023-05-08bsd-setup: don't use Bash as the interpreter for the script.Guy Harris1-2/+7
Do not use Bash as the shell for this script, and use the POSIX syntax for function definition rather than the "function <name>() { ... }" syntax, as FreeBSD 13, at least, does not have Bash, and its /bin/sh doesn't support the other syntax.
2022-12-20tools/bsd_setup.sh: speexdsp is a required packageMartin Mathieson1-2/+2
2022-10-18build: bsd-setup.sh - make code like the others; FreeBSD gcryptChuck Craft1-20/+22
2022-09-09Tools: Switch the BSD setup script to Qt6.Gerald Combs1-1/+1
Switch bsd-setup.sh to Qt6.
2022-04-18Fix tools/*-setup.sh to work with no argumentsnaesten1-11/+13
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-10Tools: Make the Debian and RPM setup scripts more strict.Gerald Combs1-0/+1
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.
2021-11-14Tools: Add PCRE2 to our setup scripts.Gerald Combs1-1/+2
Add PCRE2 to the base package list in our various setup scripts.
2021-09-13Tools: Migrate compress-pngs.sh to Python.Gerald Combs1-0/+6
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.
2020-11-30wiretap: Convert ascend.y to Lemon.Gerald Combs1-3/+0
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-03-16tools: do not install doxygenPeter Wu1-1/+0
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-02-02tools: add lua to bsd-setup.sh.Dario Lombardo1-0/+1
Change-Id: I16a5aefa11f3c73ebdd69d972136980b630892e1 Reviewed-on: https://code.wireshark.org/review/36011 Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-26tools: add missing package to bsd-setup.Dario Lombardo1-0/+3
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-23tools: fix check in bsd-setup.Dario Lombardo1-1/+1
Change-Id: I3ad5793d6aeca54fc84c82b226311c0e6777c1df Reviewed-on: https://code.wireshark.org/review/35922 Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-21tools: minor changes in bsd-setup script.Dario Lombardo1-4/+4
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-20toold: add libilbc to bsd-setup.Dario Lombardo1-0/+4
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>
2019-12-06tools: use better operators in package scripts.Dario Lombardo1-3/+3
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-05tools: fix check of shell variables in other setup scripts.Dario Lombardo1-2/+2
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-11-23Add c-ares to the required library list.Gerald Combs1-2/+2
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-15tools: fix echo in bsd-setup.Dario Lombardo1-1/+1
Change-Id: I17479e30ea70e7c9d080994330388b205bcf56e8 Reviewed-on: https://code.wireshark.org/review/35099 Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-07-29tools: add missing packages to bsd-setup.Dario Lombardo1-1/+4
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>
2018-11-20Drop JSON-GLib completelyPeter Wu1-4/+0
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-08-21Use the standard test/[ command.Guy Harris1-1/+1
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-21Don't assume Bash.Guy Harris1-3/+3
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-21Fix search for pkg-config on FreeBSD.Guy Harris1-1/+22
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-21Bash is not guaranteed to be in /usr/pkg/bin/bash.Guy Harris1-1/+1
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-06-04tools: add bsd-setup.sh.Dario Lombardo1-0/+153
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>