Skip to content

Commit

Permalink
Update to v1.0.27
Browse files Browse the repository at this point in the history
Merge commit '886418d29e24fb2891d5e0815ac58521c0f932de'
  • Loading branch information
Youw committed Feb 15, 2024
2 parents c601510 + 886418d commit e8c242e
Show file tree
Hide file tree
Showing 60 changed files with 2,417 additions and 1,407 deletions.
3 changes: 3 additions & 0 deletions libusb/.codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = strerror.c,AUTHORS
ignore-words-list = numer,ser,xwindows
19 changes: 13 additions & 6 deletions libusb/.github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,33 @@ jobs:
- uses: actions/checkout@v3

- name: setup prerequisites
shell: bash
run: |
sudo apt update
sudo apt install autoconf automake libtool libudev-dev m4
- name: bootstrap
shell: bash
run: ./bootstrap.sh

- name: netlink
shell: bash
run: .private/ci-build.sh --build-dir build-netlink -- --disable-udev
# Disable tests for netlink as it doesn't seem to work in the CI environment.
run: .private/ci-build.sh --build-dir build-netlink --no-test -- --disable-udev

- name: udev
shell: bash
run: .private/ci-build.sh --build-dir build-udev -- --enable-udev

- name: debug-log
shell: bash
run: .private/ci-build.sh --build-dir build-debug -- --enable-debug-log

- name: disable-log
run: .private/ci-build.sh --build-dir build-nolog -- --disable-log

- uses: mymindstorm/setup-emsdk@v13

- run: npm ci
working-directory: tests/webusb-test-shim

- name: emscripten
run: emconfigure .private/ci-build.sh --build-dir build-emscripten -- --host=wasm32-unknown-emscripten

- name: umockdev test
run: .private/ci-container-build.sh docker.io/amd64/ubuntu:rolling
12 changes: 7 additions & 5 deletions libusb/.github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-cc mingw-w64-x86_64-autotools
- name: CI-Build
run: |
echo 'Running in MSYS2!'
./bootstrap.sh
./.private/ci-build.sh --build-dir build-msys2
- name: bootstrap
run: ./bootstrap.sh
- name: Build
# GCC on MSYS2 doesn't have ASAN support (but Clang does).
run: ./.private/ci-build.sh --build-dir build-msys2 --no-asan
- name: Build with logging disabled
run: ./.private/ci-build.sh --build-dir build-msys2-nolog --no-asan -- --disable-log
6 changes: 5 additions & 1 deletion libusb/.github/workflows/msys2_clang32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ jobs:
run: |
echo 'Running in MSYS2!'
./bootstrap.sh
./.private/ci-build.sh --build-dir build-msys2-clang32
# Disabling tests as there is some issue that prevents libtool from
# finalizing its executable wrappers.
# Perhaps this one https://github.com/msys2/MSYS2-packages/issues/1351
# but it only occurs on clang32 configuration.
./.private/ci-build.sh --build-dir build-msys2-clang32 --no-test
8 changes: 8 additions & 0 deletions libusb/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Makefile.in
*.lo
*.o
*.js
!/tests/webusb-test-shim/*.js
*.wasm
*.html
libtool
Expand All @@ -21,6 +22,7 @@ depcomp
configure
aclocal.m4
compile
test-driver
config.guess
config.h*
!msvc/config.h
Expand All @@ -40,7 +42,13 @@ examples/fxload
examples/hotplugtest
examples/sam3u_benchmark
examples/testlibusb
tests/init_context
tests/macos
tests/set_option
tests/stress
tests/stress_mt
tests/*.log
tests/*.trs
android/libs
android/obj
*.exe
Expand Down
6 changes: 5 additions & 1 deletion libusb/.private/appveyor_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ echo "Bootstrapping ..."
./bootstrap.sh
echo ""

exec .private/ci-build.sh --build-dir "${builddir}" --install -- "--prefix=${installdir}"
extra_args=""
if [ "${Configuration}" == "Release" ]; then
extra_args="--no-asan"
fi
exec .private/ci-build.sh --build-dir "${builddir}" --install ${extra_args} -- "--prefix=${installdir}"
27 changes: 26 additions & 1 deletion libusb/.private/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
set -e

builddir=
scriptdir=$(dirname $(readlink -f "$0"))
install=no
test=yes
asan=yes

while [ $# -gt 0 ]; do
case "$1" in
Expand All @@ -19,6 +22,14 @@ while [ $# -gt 0 ]; do
install=yes
shift
;;
--no-test)
test=no
shift
;;
--no-asan)
asan=no
shift
;;
--)
shift
break;
Expand Down Expand Up @@ -52,14 +63,28 @@ cflags+=" -Wpointer-arith"
cflags+=" -Wredundant-decls"
cflags+=" -Wswitch-enum"

# enable address sanitizer
if [ "${asan}" = "yes" ]; then
cflags+=" -fsanitize=address"
fi

echo ""
echo "Configuring ..."
CFLAGS="${cflags}" ../configure --enable-examples-build --enable-tests-build "$@"
CFLAGS="${cflags}" CXXFLAGS="${cflags}" ../configure --enable-examples-build --enable-tests-build "$@"

echo ""
echo "Building ..."
make -j4 -k

if [ "${test}" = "yes" ]; then
# Load custom shim for WebUSB tests that simulates Web environment.
export NODE_OPTIONS="--require ${scriptdir}/../tests/webusb-test-shim/"
if ! make check ; then
cat tests/test-suite.log
exit 1
fi
fi

if [ "${install}" = "yes" ]; then
echo ""
echo "Installing ..."
Expand Down
8 changes: 2 additions & 6 deletions libusb/.private/ci-container-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ CFLAGS+=" -Wredundant-decls"
CFLAGS+=" -Wswitch-enum"
export CFLAGS
export CXXFLAGS="\${CFLAGS}"
echo ""
echo "Configuring ..."
/source/configure --enable-examples-build --enable-tests-build
Expand All @@ -61,11 +63,5 @@ make -j4 -k
echo ""
echo "Running umockdev tests ..."
tests/umockdev
echo "Running stress tests ..."
tests/stress
tests/stress_mt
EOG
EOF


2 changes: 1 addition & 1 deletion libusb/.private/wbs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ o Additional information:
http://windows.libusb.info/#Driver_Installation
- The MinGW and MS generated DLLs are fully interchangeable, provided that you
use the import libs provided or generate one from the .def also provided.
- If you find any issue, please visit http://libusb.info/ and check the
- If you find any issue, please visit https://libusb.info/ and check the
Support section
22 changes: 22 additions & 0 deletions libusb/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ Copyright © 2013-2018 Chris Dickens <christopher.a.dickens@gmail.com>
Other contributors:
Aaron Luft
Adam Korcz
Addison Crump
Adrian Bunk
Adrien Destugues
Akshay Jaggi
Alan Ott
Alan Stern
Aleksandr Mezin
Alexander Mot
Alexander Pyhalov
Alexander Schlarb
Alexander Stein
Alex Feinman
Alex Vatchenko
Andrew Aldridge
Andrew Fernandes
Expand All @@ -44,6 +47,7 @@ Bence Csokas
Benjamin Berg
Benjamin Dobell
Bohdan Tymkiv
Brad Smith
Brent Rector
Bruno Harbulot
Carl Karsten
Expand All @@ -59,7 +63,9 @@ David Moore
Dmitry Fleytman
Dmitry Kostjuchenko
Dmitry Zakablukov
Dominik Boehi
Doug Johnston
Edgar Fuß
Evan Hunter
Evan Miller
Fabrice Fontaine
Expand All @@ -68,6 +74,7 @@ Felipe Balbi
Florian Albrechtskirchinger
Francesco Montorsi
Francisco Facioni
Francis Hart
Frank Li
Frederik Carlier
Freek Dijkstra
Expand All @@ -84,6 +91,7 @@ Ido Yariv
Igor Anokhin
Ihor Dutchak
Ilya Konstantinov
Ingvar Stepanyan
Jakub Klama
James Hanko
Jeffrey Nichols
Expand All @@ -98,6 +106,7 @@ Joost Muller
Josh Gao
Joshua Blake
Joshua Hou
Joshua M. Clulow
Juan Cruz Viotti
Julian Scheel
Justin Bischoff
Expand All @@ -112,11 +121,13 @@ Lars Wirzenius
Lei Chen
Léo Lam
Liang Yunwang
Lonnie Abelbeck
Luca Longinotti
Luz Paz
Mac Wang
Marco Trevisan (Treviño)
Marcus Meissner
Mario Kleiner
Mark Kuo
Markus Heidelberg
Martin Ettl
Expand All @@ -136,20 +147,26 @@ Moritz Fischer
Nancy Li
Nia Alarie
Nicholas Corgan
Niklas Gürtler
Omri Iluz
Orhan aib Kavrakoglu
Orin Eman
Ozkan Sezer
Pablo Prietz
Patrick Stewart
Paul Cercueil
Paul Fertser
Paul Qureshi
Pekka Nikander
Petr Pazourek
Philémon Favrod
Pino Toscano
Rob Walker
Romain Vimont
Roman Kalashnikov
Rosen Penev
Ryan Hileman
Ryan Metcalfe
Ryan Schmidt
Saleem Rashid
Sameeh Jubran
Expand All @@ -158,13 +175,15 @@ Sebastian Pipping
Sebastian von Ohr
Sergey Serb
Shawn Hoffman
Simon Chan
Simon Haggett
Simon Newton
Slash Gordon
Stefan Agner
Stefan Tauner
Steinar H. Gunderson
Stephen Groat
Sylvain Fasel
Theo Buehler
Thomas Röfer
Tim Hutt
Expand All @@ -187,6 +206,7 @@ William Orr
William Skellenger
Xiaofan Chen
Yegor Yefremov
Zeng Guang
Zhiqiang Liu
Zoltán Kovács
Сергей Валерьевич
Expand All @@ -199,4 +219,6 @@ parafin
RipleyTom
Seneral
saur0n
SomeAlphabetGuy
winterrace
xloem
21 changes: 19 additions & 2 deletions libusb/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
For detailed information about the changes below, please see the git log or
visit: http://log.libusb.info
For detailed information about the changes below, please see the git log
or visit: http://log.libusb.info

2024-01-31: v1.0.27
* New libusb_init_context API to replace libusb_init
* New libusb_get_max_alt_packet_size API
* New libusb_get_platform_descriptor API (BOS)
* Allow setting log callback with libusb_set_option/libusb_init_context
* New WebAssembly + WebUSB backend using Emscripten
* Fix regression in libusb_set_interface_alt_setting
* Fix sync transfer completion race and use-after-free
* Fix hotplug exit ordering
* Linux: NO_DEVICE_DISCOVERY option set per context
* macOS: Fix missing device list cleanup locking
* macOS: Do not clear device data toggle for newer OS versions
* macOS: Fix running binaries on older OS than build host
* Windows: Allow claiming multiple associated interfaces
* Windows: Ignore non-configured devices instead of waiting
* Windows: Improved root hub detection

2022-04-10: v1.0.26
* Fix regression with transfer free's after closing device
Expand Down
25 changes: 25 additions & 0 deletions libusb/HACKING
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Contributing to libusb
**********************

For larger changes or API changes/extensions it may be wise to first
discuss on the mailing list or in the issue tracker before larger
coding efforts are initiated.

If you extend or change the API make sure documentation is updated.
Please run make -C doc and check for any Doxygen warnings.

Commit messages should be formatted to 72 chars width and have a
free-standing summary line. See for instance "Commit Guidelines" on
https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project
or https://cbea.ms/git-commit/ about how to make well-formed commit
messages.

Put detailed information in the commit message itself, which will end
up in the git history. On the other hand the description that you fill
in the GitHub pull request web page does not go anywhere.

For copyright reasons it is preferable to have your full name in the
commit author field. Do not update the AUTHOR file yourself, the
maintainers will update it as part of the release preparation.

Please don't touch version_nano.h in your patches or pull requests.
4 changes: 2 additions & 2 deletions libusb/NEWS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
For the latest libusb news, please refer to the ChangeLog file, or visit:
http://libusb.info
For the latest libusb news, please refer to the ChangeLog file, or visit:
https://libusb.info
2 changes: 1 addition & 1 deletion libusb/README
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ be ported to other operating systems. Please see the [PORTING](PORTING)
file for more information.

libusb homepage:
http://libusb.info/
https://libusb.info/

Developers will wish to consult the API documentation:
http://api.libusb.info
Expand Down
Loading

0 comments on commit e8c242e

Please sign in to comment.