aboutsummaryrefslogtreecommitdiffstats
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2018-06-11Rewrite make-{dissectors,taps} in PythonJoão Valverde7-443/+127
Having these build tools in machine code poses problems when cross-compiling. The most significant being that we need to find the host and build GLiB dependencies at compile-time. There is no noticeable speed difference between the Python and C implementation. Ping-Bug: 14622 Change-Id: Id13f823c7f4abf51edfa291e703028873748989f Reviewed-on: https://code.wireshark.org/review/28130 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-06-11More shellcheck fixes.Gerald Combs3-16/+20
Change-Id: Iee9e464b3935d4c8a09fa9954f73496eae33f30f Reviewed-on: https://code.wireshark.org/review/28092 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-11debian-setup: fix GnuTLS installation for Ubuntu 14.04Peter Wu1-4/+12
Ubuntu 14.04 ships with gnutls28 3.2.11 which might be license-incompatible with GPL 2.0 and should thus not be used. Fallback to the older gnutls-dev package in that case. Change-Id: I39824a5aee08de1df3790a1a8ff84c9769afd158 Reviewed-on: https://code.wireshark.org/review/28200 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-06-08rpm-setup: add rpmbuild package.Dario Lombardo1-1/+2
Change-Id: Ic0041e150992c64a0b86614cf2d3c2a68abd5ab2 Reviewed-on: https://code.wireshark.org/review/28111 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-08rpm-setup: add support for opensuse non-interactive mode.Dario Lombardo1-1/+2
Change-Id: I3d32854c958d1369f5d475ce67c3932b9357a23f Reviewed-on: https://code.wireshark.org/review/28110 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-08tools: update rpm-setup.Dario Lombardo1-3/+8
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-08Qt: Move wireshark-qt.cpp back to ui/qt/main.cpp.Gerald Combs1-2/+1
The Qt UI's main module started out as ui/qt/main.cpp but was moved to the top-level directory in order to appease Autotools. We don't need to do that any more, so move it back. Change-Id: Ic5bc0ed5b754e36cc2b9e682f2ca097781233dfd Reviewed-on: https://code.wireshark.org/review/28090 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-07More shellcheck checks and fixes.Gerald Combs5-72/+66
Remove a libtool check while we're here. Change-Id: I813add2031480f34ce89f268b541f8939016c2c7 Reviewed-on: https://code.wireshark.org/review/28066 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-07CMake: Get rid of FULL_SO_VERSIONGerald Combs1-4/+4
gd2e0724afc moved our library versions into their own variables named FULL_SO_VERSION. They're no longer used and interfere with tools/release-update-debian-soversions.sh so remove them. Fix some shellcheck warnings in release-update-debian-soversions.sh while we're here. Bug: 14778 Change-Id: I0eb0bb4ab4c482bdb8a94f8c18aa04c6c83c781b Reviewed-on: https://code.wireshark.org/review/28068 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-07lemon: Make it build with __clang_analyzer__ definedStig Bjørlykke1-3/+3
The static function handleswitch() is not compiled with __clang_analyzer__ defined, but it's used in OptInit() without any checks. Change to have an empty implementation for __clang_analyzer__. Change-Id: I73da2042ec64fdfa6910c02c059d36db491dc538 Reviewed-on: https://code.wireshark.org/review/28059 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-06Add COMMON_ARGS to the "Command and args" message.Guy Harris1-1/+1
Change-Id: I286b7727a7b92ecbc913f55b8e77a505df4a7d5e Reviewed-on: https://code.wireshark.org/review/28069 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-06Shellcheck fixes.Gerald Combs1-40/+46
Fix some issues reported by shellcheck. Change-Id: I17e280b2845bb75982788744750fc5404df38b4d Reviewed-on: https://code.wireshark.org/review/28045 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-06Tweak cppcheck to test with better settingsJaap Keuter1-3/+3
c99 is probably a better standard to check against. Also try to cut down on ASN.1 template and config file testing, since these fail anyway, not being full source files yet. Change-Id: I289c35498cf9eba757e46601b4610f085ec4ba77 Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-on: https://code.wireshark.org/review/28019 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-05Fix rpm-setup.sh so it works when you're not installing the optional pkgs.Jeff Morriss1-0/+2
Looks like this has been broken since Ie46d56aff91694a3b8c4c62b4b03e38d3fb1e68a Change-Id: Idd6cfc3e8d7f66160157eed393e8528ada7786d4 Reviewed-on: https://code.wireshark.org/review/28040 Reviewed-by: Gerald Combs <gerald@wireshark.org>
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>
2018-06-04Send the "Command and args:" message to the right output file.Guy Harris1-1/+1
Send it to same output file that gets the output ofthetest command, so that it shows upin the output. (I spent entirely too much time trying to figure out why 14738 was happening on the buildbot but not on my machine - it turns out that the test where it was failing was the one where -V *wasn't* specified, so the protocol tree *wasn't* being generated, so proto_tree_add_string() *wasn't* doing some tests that should have thrown an exception. The output didn't make it clear that the test that was failing was the one where the arguments to tshark were -nr, not -nVxr.) Change-Id: I54e4450029ac56b9ac3d6eff9baf8acc849a5e4c Reviewed-on: https://code.wireshark.org/review/28003 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-02Make make-{taps,dissectors}.c shared code shared.João Valverde5-102/+146
Change-Id: I1cacd88ee26d9b21b67d38daf3d8ec8dcaf2e69e Reviewed-on: https://code.wireshark.org/review/27948 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-05-31Move make-taps and make-dissectors to tools/João Valverde4-1/+399
make-taps and make dissectors are build tools so that is the natural location for them. See also 99ec2b58eb68ab8530245dd13485612695ba064a and bug 14622. Change-Id: I754848ea1c614bfa7121c44d89136ac3cba8a734 Reviewed-on: https://code.wireshark.org/review/27928 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-05-30Add valgrind support to randpkt-test.sh.Darius Davis2-15/+55
There's already valgrind support in fuzz-test.sh; This change simply clones the relevant fragments of script into randpkt-test.sh, making very minor tweaks as needed. Valgrind support in randpkt-test.sh is enabled through the "-g" command-line option, just like with fuzz-test.sh. In my testing here, it seems MAX_LEAK could be reduced somewhat, but I don't think that that belongs as part of this change; I've simply kept the MAX_LEAK value from fuzz-test.sh. While we're here, the last line of valgrind-wireshark.sh launches a subprocess, and that shell then simply returns its exit code, so there is no need for the shell to stick around. So, let's use "exec" here to replace the shell with the new process. Testing Done: On Linux amd64, ran several iterations of randpkt-test.sh and fuzz-test.sh, both with and without the "-g" option. Change-Id: I87cc63559dc2e66c42c905f46657ce40cabf0104 Reviewed-on: https://code.wireshark.org/review/27741 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-29tools: rename rpm_setup.sh to reflect other similar scripts.Dario Lombardo1-0/+0
Change-Id: Ie686d7c5b808d9b89ff47cd65830ae441de8f8a2 Reviewed-on: https://code.wireshark.org/review/27862 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-24Asciidoctor: Remove underscores from macro names.Gerald Combs1-1/+1
AsciiDoc allows dashes in macro names but not underscores. Current versions of AsciiDoctor allow the inverse. Remove underscores to allow for easier copying and pasting. Remove asciidoc.conf while we're here. It's no longer used. Change-Id: I32d8a4ec695b9e17a80ac720ee9faf62dbb362d3 Reviewed-on: https://code.wireshark.org/review/27787 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-23Add asciidoctor and asciidoctor-pdf to macos-setup.shJoerg Mayer1-0/+97
Change-Id: I531c3cbb4685e722e9b5f7762f184063eca61976 Reviewed-on: https://code.wireshark.org/review/26129 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-05-19If the OS version of curl isn't new enough, download and install from source.Guy Harris1-19/+74
The Mountain Lion version, and presumably earlier versions, can't handle the site for xz. This means we don't need to check the OS version before downloading Ninja or MaxMindDB. Change-Id: I0afa2216d67cddc58d5c3d91d1620f3004026dfa Reviewed-on: https://code.wireshark.org/review/27652 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-18Install CMake 3.5.2 on Lion and 3.7.2 on later releases.Guy Harris1-5/+12
See the comment for the painful details. Change-Id: Ic82de342b1d9c8d118e08c7b298ab7514a6f4ed3 Reviewed-on: https://code.wireshark.org/review/27651 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-18Don't try to download MaxMindDB on Lion or earlier.Guy Harris1-1/+4
Same problem as with Ninja - I guess this version can't handle the TLS version those sites use. Change-Id: I659313813d0e0d68c9ab7426e8feaf1f3f52b06e Reviewed-on: https://code.wireshark.org/review/27648 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-18Wrong Darwin major version - Lion is 11, not 10.Guy Harris1-1/+1
Change-Id: I3977bf33b7c9d66c299fa945b49791dac7a03126 Reviewed-on: https://code.wireshark.org/review/27646 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-18Don't try to download Ninja on Lion or earlier.Guy Harris1-12/+34
The version of curl that comes with Lion gets a TLS error when trying to download Ninja. Also note some other issues. Change-Id: I0e26a5b2f2f54e36461d3d3909f719fcca2ac04b Reviewed-on: https://code.wireshark.org/review/27645 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-17Remove older Visual Studio suport.Gerald Combs1-10/+0
Remove conditional checks for Visual Studio 2013 and earlier from CMakeLists.txt. Remove the VSVersion flag from win-setup.ps1. We haven't used it in quite a while. Change-Id: Iea80f8cd566f4909e1bac2d0a620488255c4d0a7 Reviewed-on: https://code.wireshark.org/review/27607 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16Add a few more notes to git-export-release.sh.Gerald Combs1-0/+6
Change-Id: I8a2250387cc3187ecd5ca8abb6e29442668398a9 Reviewed-on: https://code.wireshark.org/review/27604 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-16Minimum supported QT-Version is 5.2Joerg Mayer1-1/+1
Change-Id: I9652a4d19b73a95022b39f738d6ad01dd458df94 Reviewed-on: https://code.wireshark.org/review/27572 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-05-16CMake 3.11.0 has problems on Lion; use 3.5.2, which works.Guy Harris1-1/+1
We're using 3.5.2 on the buildbot. 3.11.0 appears to be getting tripped up by the libc++ on Lion, cutting off lines at 1024 characters in generated Makefiles. Change-Id: Iff1a2fb13ef873e5d0976544f3c8248239a9772d Reviewed-on: https://code.wireshark.org/review/27570 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-15CMake: require at least CMake 3.5Peter Wu1-1/+5
CMake 3.11 with the Ninja generator started complaining about CMP0058 related to ui/qt/CMakeFiles/qtui_autogen.dir/RCCstock_iconsInfo.cmake amd other files (AUTORCC). While the policy could be set explicitly, let's try to modernize the CMake configuration: - Drop CMP0042, if this gives issues with macOS, then it must be solved in a different way using non-deprecated methods. - Drop CMP0054 and ensure that all if("${foo}") and if(${foo}) are converted to if(foo). - Remove string comparison against "-NOTFOUND", it already evaluates to false in an if condition. - Use CXX_STANDARD/CXX_STANDARD_REQUIRED for Qt 5.7 and newer. - Assume that copy_if_different can accept multiple sources (CMake 3.5). - Consistency: Out of the 60 CMake 3.11 FindXxx.cmake files that use find_library, 34 contain "XXX_LIBRAR" while 16 contain "Xxx_LIBRAR". Let's assume uppercase variables (now custom MaxMindDB include dirs are correctly used). CMake 3.5 was chosen as the next version because of its wide support. Ubuntu 14.04 ships with cmake3 3.5.1, Debian jessie-backports has 3.6.2, EPEL for CentOS/RHEL6 includes cmake3 3.6.1 and SLES12 SP2 has 3.5. Change-Id: I2fa7b94bf8cc78411f414987d17bab3a33dfb360 Reviewed-on: https://code.wireshark.org/review/27444 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15Give Ninja build instructions if we've installed Ninja.Guy Harris1-2/+7
Change-Id: I629f0e48e1b66ae9bb65f025669fd94b2480e765 Reviewed-on: https://code.wireshark.org/review/27548 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-15Download and install Ninja.Guy Harris1-0/+50
The Developer's Guide recommends Ninja for all UN*Xes, so download it rather than having to say "but on macOS use make". Change-Id: I147b96144c25d01151c68e13d249172023b1fccc Reviewed-on: https://code.wireshark.org/review/27544 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-15Get rid of debugging printout.Guy Harris1-1/+0
Change-Id: I6641aca753b40a8a06ce8d3baf47d37cdf0c420a Reviewed-on: https://code.wireshark.org/review/27543 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-15Clean up Qt installation.Guy Harris1-46/+96
We don't support 32-bit builds on macOS, so get rid of the now-unused TARGET_PLATFORM variable and the comment about how to build 32-bit libraries. Follow the complex rules that Qt's download directories unfortunately require to get the .dmg for a given release. Drop support for installing Qt 4. CMake doesn't use pkg-config to find the Qt frameworks, so we don't need to fix up the .pc files (which aren't even shipped with later versions of Qt). Change-Id: I5edc69f8b34dac47bb2310689f296ce37347f495 Reviewed-on: https://code.wireshark.org/review/27542 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-14Update a comment.Guy Harris1-1/+1
Change-Id: Ia5971b466f2e2da40730933b44bba5672d94c399 Reviewed-on: https://code.wireshark.org/review/27541 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-14Builds require CMake, so always install it.Guy Harris1-35/+12
Don't have an option not to install it. (If we want to avoid installing it when it's already been installed by something other than this script, we should check for its existence before installing, and skip the installation step for it.) Get rid of the instructions for autotools builds; always show the instructions for CMake builds. We wouldn't get to the uninstall stage if it hadn't been installed by this script; remove the comment asking about that. Change-Id: I276ee96bf955ef4ff33dea87bc27c21111301ea0 Reviewed-on: https://code.wireshark.org/review/27540 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-14Update some comments.Guy Harris1-8/+3
(Wireshark hasn't been strictly a C program for a while, and we now allow C99-and-later comments in the C code.) Change-Id: Ic68e053eed7aae1971a800cf74135bc86d211e97 Reviewed-on: https://code.wireshark.org/review/27520 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-14checkAPIs: handle C++ / C99-style '//' commentsPeter Wu1-3/+4
Avoids a warning in epan/dissectors/packet-enip.c due to "time" appearing in a comment. Change-Id: I88b6856425c09fc3b8cb2edc345047062a07b662 Reviewed-on: https://code.wireshark.org/review/27516 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13tools: add missing packages to osx setup.Dario Lombardo1-1/+1
Change-Id: Iac480865198478dee6de37476e22a727576cb066 Reviewed-on: https://code.wireshark.org/review/27511 Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-12html2txt.py: replaced 2 occurences of '{}' with equal '{0}' because of ↵Matej Tkac1-2/+2
CentOS 6.x+Python2.6.6 issues Change-Id: Ibf395007e32db70f49b7bdae22fff8c377ae41b0 Reviewed-on: https://code.wireshark.org/review/27457 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-08Report the file name in the "#if/#endif mismatch" error.Guy Harris1-2/+4
Change-Id: I54d2b98e471e04a2ad0a8ecc036180af04bb8359 Reviewed-on: https://code.wireshark.org/review/27394 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-05Test: Integrate ftsanity directly into our tests.Gerald Combs1-103/+0
Move tools/ftsanity.py to test/suite_unittests.py. Change-Id: I8582b19c0544d032eb0566bc1e82be385e904c11 Reviewed-on: https://code.wireshark.org/review/27341 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-05Don't use dladdr() to get a pathname for the current executable().Guy Harris1-1/+1
Change-Id: I24ad11a659c2cb936f873339dc2b36ac9944280a Reviewed-on: https://code.wireshark.org/review/27359 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-04Test: Add dftest to our tests.Gerald Combs27-1227/+0
Move the dfilter tests and captures from tools to test. Change-Id: I2e6a6cc1d383c985ba07c76c93ae1c57d3c8f84c Reviewed-on: https://code.wireshark.org/review/27339 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-04travis: use ninja for building.Dario Lombardo1-1/+1
Change-Id: I18cf4c79e6073955d8224c7a37f906ec54a8edbc Reviewed-on: https://code.wireshark.org/review/27324 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-03tools: add missing optional packages in debian/rpm setup.Dario Lombardo2-2/+7
Change-Id: Ie84f8d6e9ebdff0b760bc71ec227358ce23f427d Reviewed-on: https://code.wireshark.org/review/27307 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-03tools: add ninja to debian/rpm additional packages.Dario Lombardo2-2/+4
Change-Id: I56c1af8a5a4bdd4f9c2276a6e246a1b76a003049 Reviewed-on: https://code.wireshark.org/review/27302 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-02Windows: Upgrade WinSparkle to 0.5.7.Gerald Combs1-4/+4
Bug: 14642 Change-Id: Iac5e417f05eb7a5f0acb36c3588352ceefb8bf6e Reviewed-on: https://code.wireshark.org/review/27276 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>