Commit Graph

43 Commits

Author SHA1 Message Date
Gerald Combs 30c392f166 Tools+test: Call python3 explicitly.
PEP 394[1] says,

"In cases where the script is expected to be executed outside virtual
 environments, developers will need to be aware of the following
 discrepancies across platforms and installation methods:

  * Older Linux distributions will provide a python command that refers
    to Python 2, and will likely not provide a python2 command.

  * Some newer Linux distributions will provide a python command that
    refers to Python 3.

  * Some Linux distributions will not provide a python command at all by
    default, but will provide a python3 command by default."

Debian has forced the issue by choosing the third option[2]:

"NOTE: Debian testing (bullseye) has removed the "python" package and
 the '/usr/bin/python' symlink due to the deprecation of Python 2."

Switch our shebang from "#!/usr/bin/env python" to "#!/usr/bin/env
python3" in some places. Remove some 2/3 version checks if we know we're
running under Python 3. Remove the "coding: utf-8" in a bunch of places
since that's the default in Python 3.

[1]https://www.python.org/dev/peps/pep-0394/#for-python-script-publishers
[2]https://wiki.debian.org/Python
2020-11-05 06:46:35 +00:00
Christian Kreibich c5d5023654 A Community ID implementation for Wireshark.
This adds a protocol post-dissector for Community ID support to
Wireshark/tshark: https://github.com/corelight/community-id-spec

The protocol is disabled by default. It establishes one new filter
value, "communityid".

Includes test cases and baselines to verify correct Community ID
strings based on similar testsuites in the existing Zeek and Python
implementations.
2020-09-16 09:25:38 -07:00
Uli Heilmeier 30e13d7717 Gitlab: Add templates for issues
Adding templates for reporting a Bug and Feature Request
Exclude .gitlab from checklicenses.py
2020-09-06 17:15:40 +00:00
Gerald Combs f8d464f435 checklicenses: Add a --list-allowed option.
Add an option to list our allowed licenses.

Remove a couple of GTK+ entries while we're here.

Change-Id: I1c8cf3314cff369766f1ba25438f16c69f42a1ba
Reviewed-on: https://code.wireshark.org/review/37409
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-06-10 18:12:50 +00:00
Gerald Combs 43b5c63aea Tools: Use better terminology.
"Allowed" is a perfectly fine, non-biased word for designating things
that are allowed.

Change-Id: Ia1e0642a073210f0475fba3d437eac654ec36cb5
Reviewed-on: https://code.wireshark.org/review/37397
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-08 05:06:10 +00:00
Peter Wu 84fd2d7968 licensecheck: fix detection of multiple licenses
licensecheck.pl: by the time the second license is evaluated, the $2
variable was already invalidated. Fix that and make it possible for
checklicenses.py to check for multiple license choices.

Change-Id: I8e9e788c33ccd64e85839c82924e28a504f6ae8f
Reviewed-on: https://code.wireshark.org/review/30223
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-16 08:25:43 +00:00
Gerald Combs 977f4c2e68 CMake: Don't bother testing for _fseeki64 on Windows.
We don't appear to use it and if we ever do need it it's been available
since Visual Studio 2005 / MSVCR80.

Change-Id: Ifd44d78b96a21577ceea635653517a348ded50f7
Reviewed-on: https://code.wireshark.org/review/28778
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-07-20 19:20:11 +00:00
Dario Lombardo e7ab7a907c spdx: more licenses converted.
Change-Id: I8f6693108c43959e54911d35b4fbf730c59add60
Reviewed-on: https://code.wireshark.org/review/26361
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09 04:50:23 +00:00
Gerald Combs e73e3580f6 Rename airpdcap to dot11decrypt.
Our 802.11 decryption code isn't tied to any specific product. Change
the file and API names to dot11decrypt.

Change-Id: I14fd951be3ae9b656a4e1959067fc0bdcc681ee2
Reviewed-on: https://code.wireshark.org/review/26058
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-24 11:56:18 +00:00
Gerald Combs 94a0f7c641 Switch from AsciiDoc to Asciidoctor.
Switch the markup text processor for files in the docbook directory from
AsciiDoc to Asciidoctor. Asciidoctor has several useful features (such
as direct PDF output) and is actively developed. It's written in Ruby
but that dependency can be sidestepped with AsciidoctorJ, a
self-contained bundle that only depends on the JRE.

The current toolchain targets require Python, AsciiDoc, DocBook XML,
DocBook XSL, Java, FOP, xsltproc, lynx, and the HTMLHelp compiler:

HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
PDF: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → FOP
HTMLHelp: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → HHC

This change removes the AsciiDoc and FOP requirements and adds either
AsciidoctorJ or Asciidoctor + Ruby:

HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
PDF: Asciidoctor
HTMLHelp: Asciidoctor → DocBook XML → xsltproc + DocBook XSL → HHC

Ideally we could generate all of these using AsciidoctorJ, Java, and
lynx. Unfortunately we're not there yet.

The release notes depend on several macros (ws-buglink, ws-salink,
cve-idlink, sort-and-group). Add Asciidoctor (Ruby) equivalents.

Remove the BUILD_xxx_GUIDES CMake options and add various output targets
automatically. This means that you have to build the various documentation
targets explicitly.

Change-Id: I31930677a656b99b1c6839bb6c33a13db951eb9a
Reviewed-on: https://code.wireshark.org/review/25668
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-11 18:22:09 +00:00
Dario Lombardo c1f37d25c3 tools: add files from wsutil and caputils to checklicense whitelist.
Change-Id: I35b6df8fbb31c209e7e79d5c002568d5194f3485
Reviewed-on: https://code.wireshark.org/review/25641
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-07 05:33:17 +00:00
Balint Reczey 40ac3c8682 Documentation with unset license is under project's license (GPL-2+)
doc/idl2deb.pod is licensed explicitly under GPL-2+ it is just
not recognized by the check.

Change-Id: Iabc7ee6bd6fe9080d6cdd28a29bb4c5f97b0ece9
Reviewed-on: https://code.wireshark.org/review/17268
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Petri-Dish: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2016-08-23 15:02:31 +00:00
João Valverde e3009b0b1c checklicenses: Fix a FIXME
We do not whitelist GPLv2 only code because of the
incompatibility with GPLv3.

Move the path exception to its proper place. These files are
dual-licensed in the sense of "choose one or the other", not
"both licenses are in use".

If the exception becomes unnecessary later it can be removed,
but let's get rid of the FIXME until then.

Change-Id: Ia040284b72c2ff6588b0544896cc37ae19a61613
Reviewed-on: https://code.wireshark.org/review/16957
Reviewed-by: João Valverde <j@v6e.pt>
2016-08-15 01:32:04 +00:00
João Valverde ba70b88419 checklicenses: Remove whitelisted licenses not being used
Removed a few licenses we shouldn't use (Apache v2, BSD 4-clause) and
removed many others not currently being used. (Add on a need-to basis).

Added GPLv3+ with Bison exception to licensecheck.pl.

Also removed some crud to work around bugs for older licensecheck.pl versions.

The original list came from the chromium project, which has a BSD-like license,
and many more licenses in use, not all of them vetted for GPLv2+ compatibility.

Change-Id: I67f334f21cd94904cf8a0e5d9beb659c82437df4
Reviewed-on: https://code.wireshark.org/review/16966
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-08-09 02:41:30 +00:00
João Valverde e32890af11 checklicenses.py: Remove some boilerplate from upstream
Change-Id: If8a1537fe5ad0c5decaf2facf6fd0c43b32ffe70
Reviewed-on: https://code.wireshark.org/review/16930
Reviewed-by: João Valverde <j@v6e.pt>
2016-08-06 19:19:38 +00:00
João Valverde 57be744df5 Add licensecheck.pl to our /tools directory and use it
Source: https://anonscm.debian.org/cgit/collab-maint/devscripts.git/plain/scripts/licensecheck.pl?h=v2.16.2

Removed regex to check files without an extension.

Change-Id: Icf98d0da2d201731da7134799ead0d2dc5c3fc39
Reviewed-on: https://code.wireshark.org/review/16913
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-08-06 19:17:40 +00:00
João Valverde 78ef23f0d2 checklicenses.py: Whitelist some plaintext files without license requirements
Change-Id: I029ef1d52ac6edd44c0bac41adb86361ddd94272
Reviewed-on: https://code.wireshark.org/review/16898
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-05 14:05:36 +00:00
Alexis La Goutte 9a09f36807 Lemon: resync with upstream
lemon: Thu Oct 29 13:48:15 2015
lempar: Tue Nov 10 14:51:22 2015

a copy of all Wireshark changes are available https://github.com/alagoutte/sqlite/tree/wireshark

Change-Id: I51f8b40a7087362502f6ce2156820a9f107ddf15
Reviewed-on: https://code.wireshark.org/review/13033
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-12 05:42:57 +00:00
João Valverde 67d9daa65b autotools: Fix extra-compiler-warnings for system headers
Use -isystem instead of -I for external headers with GCC/clang to squash
all the noise.

cmake already uses -isystem by default for supported platforms/compilers.

Change-Id: Ia6c9d1eb9b894fda6f48c531094d792e16fd39fc
Reviewed-on: https://code.wireshark.org/review/11947
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-21 13:50:54 +00:00
João Valverde 2d7b0fc7d0 [GTK] Replace deprecated gdk_pixbuf_new_from_inline()
Use GResource instead, if available. Add autotools and cmake compile time
checks for build requirements (GIO >= 2.32 and GDK-Pixbuf >= 2.26).

Merge all the various static pixbuf csource header files into
a single pixbuf-csource.h header with external linkage through use of the
tools/make-pixbuf-csource.pl script.

Fix inline pixbuf build target for some image paths (broken for GTK
in gb4a4de7).

Add missing 'expert_ok.png' file to distribution (GTK only).

Minor improvements to style/structure of ui/gtk/Makefile.am.

Bug: 10750
Change-Id: I031296b666ee8b92730400dfa6f71f9ee4304863
Reviewed-on: https://code.wireshark.org/review/10992
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-12 07:14:32 +00:00
Peter Wu 68698db8cc Always use html2text.py for FAQ, improve output
A recent commit broke compilation with Python 3. The original author of
html2text.py is deceased and the fork has increased the number of files
for this "simple" helper.

The html2text.py script in this patch was rewritten and its output
matches with lynx (except for a few newlines around lists). This means
that indentation has been added for headings, paragraphs and lists.
Also, since it was written from scratch, a new license could be chosen
that matches Wireshark.

Since now the in-tree html2text.py script provides nicer output, remove
detection of the alternative programs (elinks, links). lynx/w3m is
somehow still necessary for asciidoc though.

(I also looked into reusing html2text.py for the release notes to
replace asciidoc, but the --format=html output produces different output
(HTML adds a ToC and section numbers). For now still require lynx for
release notes)

Tested with Python 2.6.6, 2.7.9, 3.2.6 and 3.4.3 under LC_ALL=C and
LC_ALL=en_US.UTF-8 on Linux. Tested reading from stdin and file, writing
to file, pipe and tty. Tested with cmake (Ninja) and autotools on Arch
Linux x86_64. Test:

    # For each $PATH per python version, execute (with varying LC_ALL)
    help/faq.py -b | tools/html2text.py /dev/stdin | md5sum
    help/faq.py -b | tools/html2text.py | md5sum
    help/faq.py -b | tools/html2text.py
    help/faq.py -b | tools/html2text.py >/dev/null

Change-Id: I6409450a3e6c8b010ca082251f9db7358b0cc2fd
Reviewed-on: https://code.wireshark.org/review/7779
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-25 07:08:52 +00:00
Peter Wu 693304bf53 checklicenses.py: add python3 compatibility
Tested with Python 2.5.6, 2.6.6, 2.7.9, 3.2.6, 3.4.3.

Change-Id: I5893bb32d339118ec968edc7de0e185e39ab4f81
Reviewed-on: https://code.wireshark.org/review/7789
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-24 05:10:39 +00:00
Pascal Quantin 17b57ecbf8 checklicenses.py: check the first 150 lines of a file
It should solve the recent failure seen since gdf164df

Change-Id: If86bff18fcd9157941ea843ad5029c9d0b2f0b32
Reviewed-on: https://code.wireshark.org/review/7659
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-03-12 21:50:58 +00:00
Alexis La Goutte b1c91b06dc Tools: Add fix_pragma_wdocumentation to UNKNOWN licence
Change-Id: Ib5665924b99644c52c95d408c7cff19509cf3eb2
Reviewed-on: https://code.wireshark.org/review/5241
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-11-11 18:37:38 +00:00
Alexis La Goutte efd95341e8 Add custom_layer_chm.xsl to UNKNOWN (fix checklicence)
Change-Id: I4c336f21f721443e83eca7b9bf8d7a6138b367f4
Reviewed-on: https://code.wireshark.org/review/3827
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-26 15:22:28 +00:00
Evan Huus 5de268aacb Replace "see copyright notice in" message with full license
Should make the licensecheck buildbot happy.

Also add "Public domain MIT/X11 (BSD like)" to the list of permitted licenses,
since it is a combination of two permitted licenses.

Change-Id: Ibc4ead09af89e9225c4e0589a2b7d06dcee6a44e
Reviewed-on: https://code.wireshark.org/review/581
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-10 16:42:20 +00:00
Evan Huus 3fd9a5e613 Licensecheck improvements, just two errors left.
Spawned from https://www.wireshark.org/lists/wireshark-dev/201402/msg00024.html

Add some ignore rules for files that can't/shouldn't include a license header.

Reorganize some ignore rules to group rules with similar motivations.

Add a header to autogen.sh and attribute it to just "The Wireshark Authors"
since while Gilbert wrote the original version it's gone through so many changes
over the years that sorting out proper authorship is unnecessarily complex.

Add headers to Graeme Hewson's two files as verified by private email, and
update his address in the AUTHORS file per his request.

Add header to one of Ulf Lamping's files, as verified by private email.

Only remaining problem is the reedsolomon code.

Change-Id: Ifb7de8c4b4d79012553e29d459a0145d39f51df5
Reviewed-on: https://code.wireshark.org/review/145
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-08 16:51:42 +00:00
Gerald Combs f966980937 Replace "svn" with "git" all over the place.
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate.
Rename "svnversion.h" to "version.h" as Evan suggested. Update some
URLs. In make-version.pl, make sure we don't set an improper upstream
branch name. Use the number of commits + short hash from `git describe`
for package names by default.

Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96
Reviewed-on: https://code.wireshark.org/review/139
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-07 23:03:03 +00:00
Evan Huus 11d8147ab5 Add exception for cmake/TestWindowsFSeek.c it is copied from upstream under a
valid license, but has no recognizable header and there's no reason to carry the
delta.

svn path=/trunk/; revision=53518
2013-11-22 23:46:00 +00:00
Evan Huus 99d8439ce0 Add a license-ignore for tools/html2text.py
Update the preamble to COPYING to clarify that pidl isn't the only tool we carry
which isn't GPLv2-compatible.

svn path=/trunk/; revision=53108
2013-11-06 17:43:49 +00:00
Evan Huus 01c2eecc35 Updates to radiotap-iter licensing terms. The upstream version has a COPYING
file containing what is actually the ISC license (BSD-like), so add that to the
header for licensecheck's sake (and remove the confusing reference to the BSD
license). This makes the code actually your choice of ISC
and GPL2 (since it is used in the Linux kernel which is GPL2-only). ISC is
already acceptable for us, so ISC \union * must be also, so add ISC+GPL2 to
checlicenses' list.

Upstream COPYING file, for reference:
http://git.sipsolutions.net/?p=radiotap.git;a=blob;f=COPYING;hb=97478c8467ce7ab56b7c9e8fd7cdc0f4e2cb22ed

svn path=/trunk/; revision=52879
2013-10-26 20:57:38 +00:00
Evan Huus ce22ab5ef6 Add an exception to the license-checker for Samba's special IDL license which
appears to be compatible as far as I can tell (not a lawyer). See:
https://www.wireshark.org/lists/wireshark-dev/201310/msg00234.html

svn path=/trunk/; revision=52849
2013-10-25 18:14:36 +00:00
Evan Huus 2322bd3122 Fix lemon FSF address and add license exception for the generated mate grammar
files. One of them has no license (it is just defines) and the other gets picked
up as LGPL for no reason I can discern.

svn path=/trunk/; revision=52675
2013-10-18 18:10:46 +00:00
Evan Huus 00c8690599 Ignore g711.c it's under some weird Sun license but appears to be fully
GPL-compatible as far as I can tell (not a lawyer).

svn path=/trunk/; revision=52415
2013-10-06 19:07:30 +00:00
Evan Huus 863e056a9c cmake/TestFileOffsetBits also copied from an upstream with the appropriate
license

svn path=/trunk/; revision=52020
2013-09-13 18:40:15 +00:00
Evan Huus b33c061cc5 Permit a bunch of 'combo' licenses (meaning GPL + something else we accept in
the same file).

svn path=/trunk/; revision=52019
2013-09-13 18:36:11 +00:00
Evan Huus b5c48b4a41 Ignore svnversion.h, it's auto-generated. Ignore lemon and except.[ch], they're
imported from upstreams with correct licensing but without a useful header (and
there's no particular reason to carry that delta).

svn path=/trunk/; revision=52017
2013-09-13 18:24:22 +00:00
Evan Huus 2fd0b974f7 Ignore licensing in the macosx packaging - it's all copied from Inkscape (GPL)
as far as I can tell, so it doesn't have our headers.

svn path=/trunk/; revision=51829
2013-09-07 22:06:19 +00:00
Evan Huus 108a75a603 Add 'dtds' and 'fix' directories to the checklicense whitelist, they don't
appear to be things we have licensing power over (IANAL).

svn path=/trunk/; revision=49095
2013-04-30 01:34:19 +00:00
Guy Harris 6bfd0bb9d5 See whether we can whitelist 'GPL (v3 or later)' for the output of Bison
run on wiretap/ascend.y.

svn path=/trunk/; revision=48908
2013-04-18 02:06:53 +00:00
Evan Huus d385db2133 Remove chromium-specific license exceptions which it makes no sense for
us to carry.

Add an exception of our own for tools/pidl since that is GPL but the headers
are not in a format that licensecheck will pick up, and fixing them all would
just introduce a delta with upstream for no reason.

svn path=/trunk/; revision=48896
2013-04-17 19:35:43 +00:00
Gerald Combs 2875b8e3c0 Set properties.
svn path=/trunk/; revision=48821
2013-04-11 18:39:42 +00:00
Gerald Combs 4ea6f01d4d Copy Chromium's checklicenses.py from
http://src.chromium.org/svn/trunk/src/tools/checklicenses/checklicenses.py@190741

The original referred to the project's LICENSE file. Insert its contents from

  http://src.chromium.org/svn/trunk/src/LICENSE@174795

Add an exception for GPLv2 or later.

svn path=/trunk/; revision=48810
2013-04-10 20:36:55 +00:00