Commit Graph

52 Commits

Author SHA1 Message Date
Gerald Combs f809e62b2a Tools: Move speexdsp to the Alpine and RPM basic lists. 2022-12-22 17:44:37 +00:00
John Thacker 6e6386a3dc rpm-setup: Don't attempt to install cmake3
cmake is already in the basic list of packages. "cmake3" is
necessary for RHEL/CentOS 7 (where the "cmake" package is 2.8.12),
but that distribution isn't supported on 4.0 and later.

At the same time, the OpenSUSE 15.4 repository accidentally has
a "cmake3" package which is an earlier version than the "cmake" RPM,
which creates some conflicts when trying to install both.
(https://gitlab.com/wireshark/wireshark-containers/-/jobs/3328997023)

So, don't attempt to install cmake3 anymore.
2022-11-16 18:51:42 -05:00
Chuck Craft 69f1cd3eed build: rpm-setup.sh - typo in usage 2022-10-19 01:18:51 +00:00
João Valverde 1d8f8d620d tools: Add --install-all option to some setup scripts 2022-08-25 10:35:02 +01:00
João Valverde 1c26cb178f rpm-setup.sh: Add support for Qt6 2022-08-25 07:54:00 +00:00
John Thacker 32326b3a07 packaging: EPEL 8 has asciidoctor now
rubygems-asciidoctor was released 2022-05-18 for EPEL 8
( https://bugzilla.redhat.com/show_bug.cgi?id=1820896 )
so we don't need to special case it for RHEL/Centos 8.
2022-07-28 16:17:52 +00:00
Gerald Combs 6196394833 Tools: Remove Pod installation steps from rpm-setup.sh.
[skip ci]
2022-07-24 10:54:15 -07:00
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
Uli Heilmeier 73ecb86f4c rpm-setup.sh: Improve messages
Give more detailed information to the user which package
is missing.

Fixes: #18166
2022-07-21 06:37:21 +00:00
Gerald Combs 84d230d878 Tools: Add Qt5Concurrent to rpm-setup.sh.
Qt5Concurrent needs to be explicitly installed on openSUSE.

[skip ci]
2022-07-12 17:31: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 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
Gerald Combs 7f5f7c8285 Tools: Remove git-review from rpm-setup. 2022-01-06 11:24:31 -08:00
Gerald Combs 11d8520f69 Tools: Add openSUSE 15.3 requirements to rpm-setup. 2022-01-06 10:36:16 -08: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 7f47511653 Try to fix RPM packaging.
Asciidoctor is now required for packaging. Try to make sure it's
installed on CentOS 8 and openSUSE 15.2. Note that CentOS 8 doesn't have
an Asciidoctor package, which complicates our SPEC.
2021-10-01 18:26:24 +00:00
Gerald Combs 84ab55cf75 Docs+Packaging: Convert our man pages to Asciidoctor.
Convert doc/*.pod to Asciidoctor. This:

* Means we use the same markup for our man pages, the guides, and
  release notes.
* Lets us add versions to our man pages.
* Gives us more formatting options, e.g. AsciiDoc supports `commands`,
  nested lists and makes it easy to include version information. The
  manpage backend doesn't seem to support tables very well,
  unfortunately.

Convert our CMake configuration to produce *roff and html man pages
using Asciidoctor. Add a "manarg" block macro which makes our synopses
wrap correctly.

Similar to the release notes, guides, and FAQ, if Asciidoctor isn't
found the man pages won't be generated or installed.

Move Asciidoctor to the list of package build dependencies in various
places.

This commit includes the conversion script (pod2adoc.py), which will be
removed later.

Line count sanity check:

Man page         .pod .adoc
androiddump       260  280
asn2deb            93  105
capinfos          401  471
captype            54   55
ciscodump         241  269
dftest             42   42
dpauxmon          153  169
dumpcap           464  534
editcap           528  583
etwdump           136  156
extcap            157  181
idl2deb            91  103
idl2wrs           120  100
mergecap          206  207
mmdbresolve        75   75
randpkt           107  111
randpktdump       158  184
rawshark          558  610
reordercap         76   78
sdjournal         145  157
sshdump           272  302
text2pcap         274  312
tshark           2135 2360
udpdump           133  151
wireshark-filter  486  479
wireshark        2967 3420
2021-10-01 16:42:34 +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
João Valverde f13fd55663 rpm-setup.sh: Fix typo 2021-03-05 16:40:28 +00:00
Guy Harris 812c9f5b81 rpm-setup, WSDG: add a --install-rpm-deps option to install rpm-build.
This matches what deb-setup does - it has an --install-deb-deps optionto
install tools necessary to build a .deb.

Document it in the WSDG while we're at it.
2021-02-15 09:48:51 +00:00
Guy Harris 3c404abf2c rpm-setup: install libgcrypt by default.
Wireshark now requires it.
2021-02-15 08:14:14 +00: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
John Thacker ac34f3e8b6 RPM+CI: Update and fix for Fedora 33, CentOS 8, OpenSUSE Leap 15.2
Re-enable Fedora build and add CentOS 8 and OpenSUSE 15.2 builds.
Fedora 33 does out of build tree cmake builds and needs spec file changes.
CentOS 8 has some changes with cmake and other packages that are similar to
older Fedora, and needs extra repositories enabled to get -devel packages
(still missing -devel for some optional libraries). OpenSUSE Leap 15.2 also
has some changes needed to build. Note that OpenSUSE Leap 15.1 is EOL
at the end of November 2020. Fixes #16971
2020-11-05 17:58:16 -05:00
John Thacker 63d045e7eb rpm-setup: Find opus development package for OpenSUSE 2020-11-02 13:42:22 +00:00
John Thacker 25f1540d39 Add bcg729 to the optional RPMs installed when building 2020-11-01 13:04:28 +00:00
Lin Sun 6136c719da RTP: opus playback
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>
2020-10-03 21:15:09 +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
Anders Broman 8953da8975 rpm-setup: Get rid of unary operator expected warning.
Change-Id: Id43f39c4d662d69a292ac433ee48fab72256a156
Reviewed-on: https://code.wireshark.org/review/36168
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:42:27 +00:00
Peter Wu b926d24b96 RPM: fix missing qt5-linguist dependency, simplify installed packages
Remove unnecessary Qt5SVG build dependency. Do not install Qt4 qt-devel.
qt5-qtbase-devel is big, try to avoid pulling unnecessary deps.

Change-Id: Id289bea10ea89de6b7a3ea77996d861ff7354560
Reviewed-on: https://code.wireshark.org/review/36058
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-09 13:10:12 +00:00
Jirka Novak 12a13a6926 RTP: decode iLBC payload
It is possible to decode iLBC payload. It uses libilbc library (https://github.com/TimothyGu/libilbc).

Bug: 16314
Change-Id: Id4cad7ae32305a0e94ef32beb24e07733d7f834e
Reviewed-on: https://code.wireshark.org/review/35686
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 07:50:08 +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
Peter Wu ceb2ee2e44 rpm: use python3 to fix CentOS 7 builds
CentOS 7 (1908) started including python3 (Python 3.6), see
https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7.1908

Change-Id: I6418e7839f1119cf1152f445759e92acd4f39cc4
Reviewed-on: https://code.wireshark.org/review/34593
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-23 08:50:10 +00:00
Piotr Smolinski ad94c4d459 Kafka: include zstd compression in Kafka message batches
Change-Id: I1d06486ccf7b174ee9aa621fa3d8acb8b3673777
Reviewed-on: https://code.wireshark.org/review/34222
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-20 13:50:45 +00:00
Dario Lombardo b69f032d03 tools: add libnl to rpm-setup.
Add libnl-devel on RHEL.

Change-Id: I82a147ee6c67292d8e2571f91545ae5af5a5e8ff
Reviewed-on: https://code.wireshark.org/review/34191
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-08-08 08:59:52 +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 24138a0a74 tools: add speex to rpm-setup.
Change-Id: Ie430eab506d1311cc8bf8f995f72489f4a990aea
Reviewed-on: https://code.wireshark.org/review/33593
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-14 13:37:27 +00:00
Dario Lombardo 1a7b83c20f tools: fix rpm-setup script.
Some packages are missing, others are in the wrong place.

Change-Id: I396716e85e2106f527b7ff7ad5ee7a519061cbdd
Reviewed-on: https://code.wireshark.org/review/33264
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-20 04:17:39 +00:00
Dániel Bakai 9ce60b173b Add brotli decompression support for HTTP and HTTP2 dissectors.
Change-Id: I9c09f55673187f6fee723fcd72798fb6b9958b03
Reviewed-on: https://code.wireshark.org/review/32745
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-22 15:24:46 +00:00
Dániel Bakai c77ee0008d rpm: update rpm package dependencies and spec to work on current os versions
Change-Id: Iaa0bd9513869e65b96b6014d66ca3cfd917dbe64
Reviewed-on: https://code.wireshark.org/review/32938
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-22 13:21:37 +00:00
Peter Wu 60e32b6eb3 RPM: remove dependency on the which utility
It is not necessary to know the full path to a program. Instead use the
'type' shell builtin (part of POSIX) to detect availability.

Change-Id: Id68b298625d389a1f7843f52f56312bf81d97b80
Reviewed-on: https://code.wireshark.org/review/31540
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-14 19:01:27 +00:00
Dario Lombardo 651a146667 tools/gitlab-ci: add missing packages for rpm builds.
Change-Id: I04e3414ff27e18db8c83581116f4099bbb696a08
Reviewed-on: https://code.wireshark.org/review/31516
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-13 07:14:28 +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
Gerald Combs 8788c990b5 rpm-setup.sh: We no longer use FOP or AsciiDoc.
Change-Id: I3b6e200be149d12a42604528a695aae98d310b9c
Reviewed-on: https://code.wireshark.org/review/30719
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-19 20:54:15 +00:00
Dario Lombardo 50a0a78bd0 rpm: update all rpm files for using python3.
This includes:
- tools/rpm-setup.sh
- packaging/rpm/wireshark.spec.in

Fixes: v2.9.0rc0-2460-ge9f7bb5127 ("Require Python 3, drop Python 2 support")
Change-Id: I9fb92be936dec5fdb819a54e132e64521fa95bbb
Reviewed-on: https://code.wireshark.org/review/30543
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-11-08 15:55:20 +00:00
Gerald Combs 1666d89107 Tools: Add systemd-devel to rpm-setup.sh.
Change-Id: Ib6599926146b58cff66dda978c61b6a705f7565d
Reviewed-on: https://code.wireshark.org/review/30000
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-03 19:33:38 +00:00
Dario Lombardo 2b1741ecd0 rpm-setup: add rpmbuild package.
Change-Id: Ic0041e150992c64a0b86614cf2d3c2a68abd5ab2
Reviewed-on: https://code.wireshark.org/review/28111
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-08 11:23:21 +00:00
Dario Lombardo e2ada3e687 rpm-setup: add support for opensuse non-interactive mode.
Change-Id: I3d32854c958d1369f5d475ce67c3932b9357a23f
Reviewed-on: https://code.wireshark.org/review/28110
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-08 11:22:58 +00:00
Dario Lombardo 63c62a2212 tools: update rpm-setup.
Add cmake3, ninja and g++ (required in docker).

Change-Id: I1ff4b09648cce0354d1fe60bd796d40348f284b7
Reviewed-on: https://code.wireshark.org/review/28109
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-08 11:22:39 +00:00