aboutsummaryrefslogtreecommitdiffstats
path: root/tools/make-usb.py
AgeCommit message (Collapse)AuthorFilesLines
2022-01-08Update USB ID list straight from the sourcesJaap Keuter1-11/+37
2020-11-15Tools: Update the usb.ids URL in make-usb.py.Gerald Combs1-4/+6
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-05Tools+test: Call python3 explicitly.Gerald Combs1-5/+0
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
2019-04-15make-usb.py: use HTTPS URLPeter Wu1-3/+3
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-14make-usb.py: use octal escape sequencesPeter Wu1-4/+10
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-12Make a couple of scripts Python 3 only.Gerald Combs1-15/+21
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>
2018-02-09caputils/tools: more SPDX convertions.Dario Lombardo1-13/+1
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>
2015-07-19Fixup make-usb.pyGerald Combs1-3/+9
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>
2014-05-09Be less aggressive about rebuilding sminmpec.c.Gerald Combs1-0/+5
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-02-14Remove $Id$ and other Subversion leftovers from the tools.Jeff Morriss1-4/+0
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>
2013-08-02Make sure we're compatible with Python 2 + 3. Tested with Pythons 2.5,Gerald Combs1-2/+10
2.6, 2.7, and 3.3. svn path=/trunk/; revision=51113
2013-04-12From Max Baker via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8431Evan Huus1-9/+38
Enhancements to usb scripts to add many more camera models by extracting data from libgphoto2 (which is LGPL). svn path=/trunk/; revision=48831
2013-03-15Sometimes the Python you want isn't /usr/bin/python. Fix the shebang.Gerald Combs1-1/+1
svn path=/trunk/; revision=48331
2013-03-15Set properties.Gerald Combs1-0/+0
svn path=/trunk/; revision=48330
2012-12-05Update USB vendor and product ids and escape non ASCII charactersPascal Quantin1-2/+2
svn path=/trunk/; revision=46398
2012-11-29From Michal Labedzki:Anders Broman1-0/+97
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