FS#61462 - [wireshark] Switch to CMake, remove wireshark-gtk, PKGBUILD suggestions
Attached to Project:
Community Packages
Opened by Peter Wu (Lekensteyn) - Saturday, 19 January 2019, 12:28 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 21 March 2019, 00:11 GMT
Opened by Peter Wu (Lekensteyn) - Saturday, 19 January 2019, 12:28 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 21 March 2019, 00:11 GMT
|
Details
Wireshark upstream has deprecated GTK+ long time ago. The
next release has dropped this completely as well as
autotools. Please switch to CMake and remove the
wireshark-gtk package.
I maintain the wireshark-git package which could also be used for inspiration: https://aur.archlinux.org/packages/wireshark-git/ Attached is a new PKGBUILD that updates dependencies, packages and build steps, prepared for 2.6.6. It should also work when 3.0 is released (note that current master which will become 3.0 has some known issues with RPATHs, I'm working on that). There are also warnings about $srcdir being included in the binaries, as a workaround you can set -fmacro-prefix-map=$srcdir/= (though maybe I'll do this by default in the upstream scripts). For reproducible builds caveats, see https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15163#c9 Suggestions: Drop do_not_use_svn_version.patch (current versions will always use the version from the tarball in version.conf) Drop all --with-xxx options, with CMake unavailable features will automatically be disabled (the current --with-ssl --with-maxmind options have no effect either). The build function can be as simple as: build() { cd "$srcdir/wireshark" mkdir -p build cd build cmake .. -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib ninja } The following (make)depends can be dropped: - portaudio and gtk3: was needed for GTK+ - bash: was needed for building documentation and the old test suite - hicolor-icon-theme: I think this can be dropped, it could be a GTK thing. Not sure if it is still needed for Qt. Extra dependencies: - qt5-svg: needed for use of SVG resources in menu icons - snappy, lz4: needed for decompression support in cql (since Wireshark 2.4). I do not know how many people need it, for now I have added -DENABLE_SNAPPY=OFF -DENABLE_LZ4=OFF. - spandsp: optional for extra codec support. Could be added, I've not done this for now. - bcg729 (AUR): optional for extra codec support. Not added. The following package could be changed: - wireshark-gtk: drop it - wireshark-common: merge into wireshark-qt since only one GUI exists now. |
This task depends upon
Closed by Levente Polyak (anthraxx)
Thursday, 21 March 2019, 00:11 GMT
Reason for closing: Implemented
Additional comments about closing: 3.0.0-1
Thursday, 21 March 2019, 00:11 GMT
Reason for closing: Implemented
Additional comments about closing: 3.0.0-1
And I don't understand why a deprecated gtk version must not be built, but as you say, they're removing the code anyway next version so that would be getting dropped in due course from our packaging regardless.
On the topic of unavailable features: some maintainers prefer to explicitly enable feature switches in order to turn their lack into a configure failure rather than automagic *de*configuration. The "configure: WARNING: unrecognized options: --with-ssl, --with-maxmind" can of course be dropped regardless.
To enable GTK+ on the 2.6 build you have to explicitly pass -DBUILD_wireshark_gtk=ON, but do note that we do not support it anymore. Any bugs reported against the GTK+ GUI will likely go to void.
While autotools --with-foo overrides --with-foo=auto, in CMake it is either enabled or disabled. By default (almost) all features will be enabled when the package is available (see also CMakeOptions.txt). If not available, it will *not* error out but the output will inform you of missing packages:
- The following OPTIONAL packages have been found:
<elided for brevity>
-- The following REQUIRED packages have been found:
<elided for brevity>
-- The following OPTIONAL packages have not been found:
* BCG729, G.729 decoder, <https://www.linphone.org/technical-corner/bcg729/overview>
Support for G.729 codec in RTP player
* DOXYGEN
* Git
* SBC, Bluetooth low-complexity, subband codec (SBC) decoder, <https://git.kernel.org/pub/scm/bluetooth/sbc.git>
Support for playing SBC codec in RTP player
* SMI
* SNAPPY, A fast compressor/decompressor from Google, <http://google.github.io/snappy/>
Snappy decompression in CQL and Kafka dissectors
* SPANDSP, a library of many DSP functions for telephony, <http://www.soft-switch.org/>
Support for G.722 and G.726 codecs in RTP player
* Asciidoctor (required version >= 1.5)
* XSLTPROC
-- Configuring done
PS. if you do run into build or other issues, please let me know. I am an upstream developer, so could improve the build system as needed.
Though it would be interesting to see if this build would be fixed:
https://tests.reproducible-builds.org/archlinux/community/wireshark/build1.log
And before another VoIP analyst asks for G.722/G.726 support, spandsp could also be added.
As for the release timing, 3.0 has been pushed back to February 20th, see https://wiki.wireshark.org/Development/Roadmap
Should I open a new bug report for bcg729? Or could it be done as part of dropping wireshark-gtk and moving to CMake?
https://github.com/Lekensteyn/aur-bcg729/blob/master/PKGBUILD
Upstream bcg729 deprecated autotools (and in fact, the version number in autotools is wrong) but there are other issues, see also
https://gitlab.linphone.org/BC/public/bcg729/issues/2
3.0.0 would originally be released today, but due to some pending features it might be delayed two days.
- Updated to pkgver=3.0.0 and sha512sum
- Added lz4, snappy, spandsp, bcg729 dependencies
- move wireshark binary (instead of installing it directly) to ensure RPATH is stripped
- move icons and mime info to wireshark-qt package since it is only necessary for GUI.
- restored hicolor-icon-theme runtime dependency to satisfy namcap
- Adjusted cmake invocation accordingly to remove -DENABLE_{SNAPPY,LZ4}=OFF
- minor pkgdesc update
One of the new issues in 3.0 is not very important:
wireshark-cli E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/share/wireshark/help/faq.py'])
this is a bug in the 3.0 packaging, "faq.txt" should have been created and included. In the development version this file is completely gone in favor of an asciidoc file.
Reported here: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15543
Testing performed:
# 1. installed bcg729-1.0.4-3 and wireshark-cli, run tshark --version
# 2. run test suite on a live system (not supported outside the build dir, but I was curious), should pass
sudo pacman -S python3 python-pytest-xdist
sudo gpasswd -a $USER wireshark
bsdtar xf wireshark-3.0.0.tar.xz '*/test' '*/pytest.ini'
cd wireshark-3.0.0
sed /WIRESHARK_RUN_FROM_BUILD_DIRECTORY/d -i test/fixtures_ws.py
pytest . --program-path /usr/bin --skip-missing-programs wireshark,dftest -k "not suite_unittest and not suite_nameres"
# suite_unittest requires the "test-programs" target to be built, "suite_nameres" does not seem to work outside build dir)
# 3. install wireshark-qt, run wireshark --version
# 4. re-run above test suite, but "--skip-missing-programs dftest" only
The version output is ugly, I reported it here:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15544
Another proposal is to simplify the setcap invocation in wireshark.install (for easier copy&paste):
setcap cap_net_raw,cap_net_admin,cap_dac_override+eip usr/bin/dumpcap
Can we keep wireshark-gtk (or wireshark-legacy) in the repositories? I' have nothing against Qt, but the freedom of choice is more pleasant.
upstream doesn't provide wireshark-gtk anymore and Arch isn't supposed to host dead soft in their repos. luckily you have a total freedom of sticking to current version and refuse to update.
If you have any issues with the Qt UI, please report them upstream such that we can work on addressing it.
If you do decide to stick to 2.6, you are free to do, note that the EOL date is October 2020: https://wiki.wireshark.org/Development/LifeCycle
A custom package depends on gtk3 and optionally depends on portaudio for the RTP Player. To explicitly disable Qt and build GTK only, use cmake -DBUILD_wireshark=OFF -DBUILD_wireshark_gtk=ON.
(If it was not clear, Arch itself should stick to Qt and the 3.0 release.)