Commit Graph

16 Commits

Author SHA1 Message Date
Jaap Keuter 7ad17154d4 Update USB ID list straight from the sources 2022-01-08 17:59:40 +00:00
Gerald Combs 01d5e8ee51 Tools: Update the usb.ids URL in make-usb.py.
The canonical location for the usb.ids file is
http://www.linux-usb.org/usb.ids. Unfortunately that site isn't
accessible over HTTPS so we were using https://usb-ids.gowdy.us/usb.ids
instead. *That* site is down, so switch to the Linux USB project's
SourceForge repository URL, which appears to house the assets for
www.linux-usb.org, including the usb.ids file.
2020-11-15 22:21:14 +00:00
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
Peter Wu 30fc67202c make-usb.py: use HTTPS URL
The linux-usb.org website seems maintained by Stephen J. Gowdy as linked
from the bottom of the website, use the https version.

Change-Id: Id50694735d1078df5845ae8d1ec32523d2216c68
Reviewed-on: https://code.wireshark.org/review/32856
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-15 04:13:32 +00:00
Peter Wu 1c4885deaf make-usb.py: use octal escape sequences
Fixes errors like:

    epan/dissectors/usb.c:15220:42: error: hex escape sequence out of range
        { 0x0cad9001, "PowerPad Pocket PC\xc2\xa0Device" },

Change-Id: I8c120892c0d52aceb3f6767401e7944353495825
Fixes: v3.1.0rc0-524-g6f57aa72a8 ("Make a couple of scripts Python 3 only.")
Reviewed-on: https://code.wireshark.org/review/32854
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-14 21:36:58 +00:00
Gerald Combs 6f57aa72a8 Make a couple of scripts Python 3 only.
Remove Python 2 support from tools/make-manuf.py and tools/make-usb.py.

Don't double-escape UTF-8 sequences in make-usb.py so that we generate

    { 0x045e000e, "SideWinder\xc2\xae Freestyle Pro" },

instead of

    { 0x045e000e, "SideWinder\\xc2\\xae Freestyle Pro" },

Change-Id: I918f854ccba868a122fd7b138c1654b2c7615f94
Reviewed-on: https://code.wireshark.org/review/32839
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-12 20:12:10 +00:00
Dario Lombardo be38102eea caputils/tools: more SPDX convertions.
Change-Id: I44a8d1848f768acf4c3b31a68c845264c74e4bba
Reviewed-on: https://code.wireshark.org/review/25709
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-09 15:20:05 +00:00
Gerald Combs 19b28488ac Fixup make-usb.py
SourceForge (which is where the Linux USB project is hosted) is
currently under maintenance. As a result this morning's update-numbers
run clobbered usb.c. Add a minimum vendor and product count check to
make-usb.py.

Change-Id: Ia18bcd9c0eb365bd97b735795e9ad39cd85093a8
Reviewed-on: https://code.wireshark.org/review/9706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-19 20:24:08 +00:00
Gerald Combs 3f247a5cee Be less aggressive about rebuilding sminmpec.c.
Instead of forcing developers to generate sminmpec.c (which will have
different results depending on the presence or absence of a working
Internet connection) add sminmpec.c back to the repository. I'll add
it to the weekly update-numbers script so that it will be updated at
the same time as manuf, services, enterprise-numbers, and usb.c.

Change the Autotools, CMake, and Nmake sminmpec.c target name to
"update-sminmpec".

Remove the mtime check from make-sminmpec.pl. Update enterprise-numbers
and sminmpec.c while we're here.

Tested with an in-tree Autotools build and an out-of-tree CMake build.

Change-Id: Iecc332ce2731e3e98ab0205a56c78807e599a026
Reviewed-on: https://code.wireshark.org/review/1516
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-09 09:03:24 +00:00
Jeff Morriss 82e2865739 Remove $Id$ and other Subversion leftovers from the tools.
There are a few things in here which could still use attention.

Don't regenerate anything now.

Change-Id: I283c224d3523212144707fca3d6265916cb11792
Reviewed-on: https://code.wireshark.org/review/205
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-14 01:35:57 +00:00
Gerald Combs 9bf533c9db Make sure we're compatible with Python 2 + 3. Tested with Pythons 2.5,
2.6, 2.7, and 3.3.

svn path=/trunk/; revision=51113
2013-08-02 02:09:11 +00:00
Evan Huus 374c1dd1e3 From Max Baker via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8431
Enhancements to usb scripts to add many more camera models by extracting data
from libgphoto2 (which is LGPL).

svn path=/trunk/; revision=48831
2013-04-12 15:50:55 +00:00
Gerald Combs f076414b6d Sometimes the Python you want isn't /usr/bin/python. Fix the shebang.
svn path=/trunk/; revision=48331
2013-03-15 22:09:25 +00:00
Gerald Combs 1ef83e3e76 Set properties.
svn path=/trunk/; revision=48330
2013-03-15 21:55:21 +00:00
Pascal Quantin 57f7171c87 Update USB vendor and product ids and escape non ASCII characters
svn path=/trunk/; revision=46398
2012-12-05 12:56:41 +00:00
Anders Broman 5a61f202d4 From Michal Labedzki:
USB: Add support for vendor and product names from
 usb.ids database

Part of:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032

svn path=/trunk/; revision=46280
2012-11-29 13:39:08 +00:00