diff --git a/.gitignore b/.gitignore index 99e65a8..5b8e587 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1 @@ -usbutils-0.86.tar.gz -/usbutils-0.90.tar.gz -/usbutils-0.91.tar.gz -/usbutils-001.tar.gz -/usbutils-003.tar.gz +/usbutils-*.tar.xz diff --git a/changelog b/changelog new file mode 100644 index 0000000..7740917 --- /dev/null +++ b/changelog @@ -0,0 +1,106 @@ +* Sat Jul 23 2022 Fedora Release Engineering - 014-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 014-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Aug 11 2021 Peter Robinson - 014-1 +- Update to 014 +- Cleanup spec, licenses now shipped upstream + +* Fri Jul 23 2021 Fedora Release Engineering - 013-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 013-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Oct 29 2020 Peter Robinson - 013-1 +- Update to 013 + +* Wed Jul 29 2020 Fedora Release Engineering - 012-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 012-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jul 27 2019 Fedora Release Engineering - 012-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun May 12 2019 Peter Robinson 012-2 +- New 012 release + +* Sun Feb 03 2019 Fedora Release Engineering - 010-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jun 08 2018 Lukas Nykryn - 010-2 +- add upstream fixes + +* Wed May 16 2018 Lukas Nykryn - 010-1 +- New 010 release + +* Fri Feb 09 2018 Fedora Release Engineering - 009-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Dec 4 2017 Peter Robinson 009-1 +- New 009 release + +* Thu Aug 03 2017 Fedora Release Engineering - 008-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 008-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 008-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Aug 29 2016 Peter Robinson 008-6 +- Don't ship usbutils pkgconfig file + +* Fri Feb 05 2016 Fedora Release Engineering - 008-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sun Jul 19 2015 Peter Robinson 008-4 +- Fix FTBFS, cleanup and modernise spec, use %%license + +* Fri Jun 19 2015 Fedora Release Engineering - 008-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Feb 21 2015 Till Maas - 008-2 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Wed Oct 22 2014 Lukáš Nykrýn - 008-1 +- new release + +* Mon Aug 18 2014 Fedora Release Engineering - 007-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 007-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 007-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Jun 17 2013 Lukáš Nykrýn - 007-1 +- new upstream release + +* Tue Feb 26 2013 Lukáš Nykrýn - 006-4 +- lsusb-t: make sure that interfaces are added to lists only once (#914929) + +* Fri Feb 15 2013 Fedora Release Engineering - 006-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 006-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 16 2012 Lukáš Nykrýn - 006-1 +- new upstream release + +* Thu Apr 19 2012 Lukas Nykryn 005-1 +- new upstream release + +* Thu Apr 19 2012 Lukas Nykryn 004-4 +- Ignore missing driver symlink (#808934) + +* Sat Jan 14 2012 Fedora Release Engineering - 004-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index 55fdbcf..8550f5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -94a1738fe92062cdd6a9642eeaccefc1 usbutils-003.tar.gz +SHA512 (usbutils-019.tar.xz) = fb4acc570c2b71f90c51c2717dc80e844727c8fcfebb5d92c57145eb9d09cbd1f63cf405e07db76c3afaaf3fac87b90f3f512d0a7c4d50cb9e6f26438eca9390 diff --git a/usbreset.patch b/usbreset.patch new file mode 100644 index 0000000..15a2f80 --- /dev/null +++ b/usbreset.patch @@ -0,0 +1,22 @@ +diff --git a/meson.build b/meson.build +index c522283..f6bd530 100644 +--- a/meson.build ++++ b/meson.build +@@ -76,7 +76,7 @@ add_project_arguments('-include', 'config.h', language : 'c') + ##################### + # man page generation + ##################### +-install_man(['man/lsusb.8', 'man/lsusb.py.1', 'man/usb-devices.1', 'man/usbhid-dump.8']) ++install_man(['man/lsusb.8', 'man/lsusb.py.1', 'man/usb-devices.1', 'man/usbhid-dump.8', 'man/usbreset.1']) + + + ########################## +@@ -137,7 +137,7 @@ usbreset_sources = [ + + # By default, usbreset does not get installed as it could cause problems, it's + # in the repo for those that wish to try it out. +-executable('usbreset', usbreset_sources, install: false) ++executable('usbreset', usbreset_sources, install: true) + + + ################################ diff --git a/usbutils-003-hwdata.patch b/usbutils-003-hwdata.patch deleted file mode 100644 index c755983..0000000 --- a/usbutils-003-hwdata.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- usbutils-003/Makefile.am 2011-03-22 00:23:33.000000000 +0100 -+++ usbutils-003_/Makefile.am 2011-06-16 15:41:20.927882420 +0200 -@@ -4,15 +4,9 @@ - AM_LDFLAGS = \ - -Wl,--as-needed - --data_DATA = \ -- usb.ids -- - bin_PROGRAMS = \ - lsusb - --sbin_SCRIPTS = \ -- update-usbids.sh -- - bin_SCRIPTS = \ - usb-devices \ - lsusb.py -@@ -27,37 +21,22 @@ - - lsusb_CPPFLAGS = \ - $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) \ -- -DDATADIR=\"$(datadir)\" -+ -DDATADIR=\"$(datadir)/hwdata\" - - lsusb_LDADD = \ - $(LIBUSB_LIBS) - --if HAVE_ZLIB --data_DATA += usb.ids.gz --lsusb_CPPFLAGS += -DHAVE_LIBZ --lsusb_LDADD += -lz --endif -- - man_MANS = \ - lsusb.8 \ - usb-devices.1 - - EXTRA_DIST = \ -- usb.ids \ -- update-usbids.sh.in \ - lsusb.8.in \ - usb-devices.1.in \ - usb-devices \ - lsusb.py \ - usbutils.pc.in - --usb.ids.gz: $(srcdir)/usb.ids -- gzip -c -9 $< > $@ -- --update-usbids.sh: $(srcdir)/update-usbids.sh.in -- sed 's|@usbids@|$(datadir)/usb.ids|g' $< >$@ -- chmod 755 $@ -- - lsusb.8: $(srcdir)/lsusb.8.in - sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@ - -@@ -71,10 +50,8 @@ - sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@ - - DISTCLEANFILES = \ -- usb.ids.gz \ - lsusb.8 \ - usb-devices.1 \ -- update-usbids.sh \ - usbutils.pc - - distclean-local: diff --git a/usbutils-003-invalid-config-descriptors.patch b/usbutils-003-invalid-config-descriptors.patch deleted file mode 100644 index 32fbaff..0000000 --- a/usbutils-003-invalid-config-descriptors.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d63fa164a4ffebc5247acaa3b80b0d4f2e21d926 Mon Sep 17 00:00:00 2001 -From: Nils Philippsen -Date: Mon, 30 May 2011 17:19:47 +0200 -Subject: [PATCH] don't use invalid config descriptors - -This fixes "lsusb -v" crashing if device files are present but can't be -opened. ---- - lsusb.c | 23 +++++++++++++++++------ - 1 files changed, 17 insertions(+), 6 deletions(-) - -diff --git a/lsusb.c b/lsusb.c -index 6ba2288..25dbc51 100644 ---- a/lsusb.c -+++ b/lsusb.c -@@ -3800,14 +3800,25 @@ static void dumpdev(libusb_device *dev) - if (desc.bNumConfigurations) { - struct libusb_config_descriptor *config; - -- libusb_get_config_descriptor(dev, 0, &config); -- otg = do_otg(config) || otg; -- libusb_free_config_descriptor(config); -+ ret = libusb_get_config_descriptor(dev, 0, &config); -+ if (ret) { -+ fprintf(stderr, "Couldn't get configuration descriptor 0, " -+ "some information will be missing\n"); -+ } else { -+ otg = do_otg(config) || otg; -+ libusb_free_config_descriptor(config); -+ } - - for (i = 0; i < desc.bNumConfigurations; ++i) { -- libusb_get_config_descriptor(dev, i, &config); -- dump_config(udev, config); -- libusb_free_config_descriptor(config); -+ ret = libusb_get_config_descriptor(dev, i, &config); -+ if (ret) { -+ fprintf(stderr, "Couldn't get configuration " -+ "descriptor %d, some information will " -+ "be missing\n", i); -+ } else { -+ dump_config(udev, config); -+ libusb_free_config_descriptor(config); -+ } - } - } - if (!udev) --- -1.7.5.4 - diff --git a/usbutils.spec b/usbutils.spec index 9ae17c7..8be5e9d 100644 --- a/usbutils.spec +++ b/usbutils.spec @@ -1,219 +1,44 @@ -Name: usbutils -Version: 003 -Release: 2%{?dist} -Source: http://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.gz -URL: http://www.linux-usb.org/ -License: GPLv2+ -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -Requires: hwdata -BuildRequires: autoconf, libtool, libusb-devel >= 0.1.8, libusb1-devel +Name: usbutils +Version: 019 +Release: %autorelease Summary: Linux USB utilities -Group: Applications/System -Conflicts: hotplug < 3:2002_01_14-2 -Patch0: usbutils-003-hwdata.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=707853 -# "[abrt] usbutils-001-3.fc15: find_otg: Process /usr/bin/lsusb was killed by -# signal 11 (SIGSEGV)" -# sent to upstream (Greg KH) via email and github pull request -Patch1: usbutils-003-invalid-config-descriptors.patch +URL: http://www.linux-usb.org/ +License: GPL-2.0-or-later + +Source0: https://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.xz + +# This adds usbreset binary to the package, but since upstream does not consider it stable, +# let's not include it in the ELN. https://github.com/gregkh/usbutils/issues/222#issuecomment-2715192013 +%if 0%{?fedora} +Patch0: usbreset.patch +%endif + +BuildRequires: meson +BuildRequires: gcc +BuildRequires: libusb1-devel +BuildRequires: systemd-devel +Requires: hwdata %description This package contains utilities for inspecting devices connected to a USB bus. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -b .invalid-config-descriptors -autoreconf +%autosetup -p1 %build -%configure --sbindir=%{_sbindir} -make %{?_smp_mflags} +%meson --sbindir=%{_sbindir} --datadir=%{_datadir}/hwdata +%meson_build %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" - -# usb.ids is shipped in hwdata; nuke and adjust .pc file -sed -i 's|usbids=/usr/share/usb.ids|usbids=/usr/share/hwdata/usb.ids|' $RPM_BUILD_ROOT%{_datadir}/pkgconfig/usbutils.pc +%meson_install +rm -rf %{buildroot}/%{_libdir}/pkgconfig/usbutils.pc %files -%defattr(-,root,root,-) +%license LICENSES/GPL* +%doc NEWS %{_mandir}/*/* %{_bindir}/* -%{_datadir}/pkgconfig/usbutils.pc -%doc AUTHORS COPYING ChangeLog NEWS README - -%clean -rm -rf $RPM_BUILD_ROOT %changelog -* Mon Jun 27 2011 Nils Philippsen 003-2 -- don't use invalid config descriptors (#707853) - -* Thu Jun 16 2011 Jiri Moskovcak 003-1 -- new upstream release - -* Tue Apr 26 2011 Jiri Moskovcak 002-1 -- new upstream release -- udpated hwdata patch - -* Mon Feb 07 2011 Fedora Release Engineering - 001-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Jan 27 2011 Jiri Moskovcak 001-2 -- rebuild against new libusb - -* Thu Jan 06 2011 Jiri Moskovcak 001-1 -- new upstream release -- updated usbhid-dump subproject -- usbutils: Support UVC frame-based descriptors -- usbutils: Support UVC MPEG2-TS format descriptor -- lsusb: Fix getting BOS and DEVQUAL descriptors -- lsusb: Dump the Pipe Usage desciptor -- lsusb: Fix bMaxBurst reporting -- lsusb: install into /usr/bin -- usbmisc: pull in unistd.h for readlink() -- lsusb: pull in stdlib.h for exit() -- lsusb: constify! -- usbutils: convert to libusb-1.0 -- Update usbhid-dump to release 1.2 -- usbutils: Fix compile error on Ubuntu 9.04 -- usbutils: Make lsusb -t show USB 3.0 devices - -* Wed Oct 27 2010 Jiri Moskovcak 0.91-2 -- bump release - -* Wed Oct 27 2010 Jiri Moskovcak 0.91-1 -- new upstream release - - ads usbhid-dump - -* Thu Aug 26 2010 Jiri Moskovcak 0.90-1 -- new upstream release - -* Tue Sep 22 2009 Jiri Moskovcak 0.86-2 -- spec file fixes - package should not own /usr/{bin,sbin} (rhbz#524005) - -* Wed Sep 16 2009 Jiri Moskovcak 0.86-1 -- new version -- spec file fixes as suggested in rhbz#466041 (info@owlriver.com) - -* Mon Aug 24 2009 Karsten Hopp 0.82-5 -- drop ExcludeArch: s390 s390x as we need this package on s390x to be able to build - p.e. udev without any hacks - -* Sun Jul 26 2009 Fedora Release Engineering - 0.82-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 1 2009 Jiri Moskovcak 0.82-3 -- added autoconf to fix build in koji - -* Wed Jul 1 2009 Jiri Moskovcak 0.82-2 -- minor fix in Makefile.am to properly find usb.ids from hwdata -- Resolves: #506974 - -* Fri May 22 2009 David Zeuthen 0.82-1 -- Update to 0.82 - -* Wed Feb 25 2009 Fedora Release Engineering - 0.73-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Tue Feb 12 2008 Jiri Moskovcak 0.73-2 -- spec file cleanup - -* Thu Jan 17 2008 Jiri Moskovcak 0.73-1 -- new version 0.73 - -* Mon Sep 18 2006 Thomas Woerner 0.72-1 -- new version 0.72 -- videoterminal (vt) patch is now upstream, dropped - -* Wed Jul 12 2006 Jesse Keating - 0.71-2.1 -- rebuild - -* Wed Mar 01 2006 Karsten Hopp 1.71-2 -- add usbutils-0.71-VT.patch to fix warnings about unknown lines - (#176903) - -* Fri Feb 10 2006 Jesse Keating - 0.71-1.2 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 0.71-1.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Tue Dec 13 2005 Thomas Woerner 0.71-1 -- new version 0.71 - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Fri Apr 15 2005 Thomas Woerner 0.70-1.1 -- added fix from Robert Scheck to fix missing BuildRequires for libusb-devel - (#155006) - -* Thu Apr 14 2005 Thomas Woerner 0.70-1 -- new version 0.70 - -* Thu Jan 20 2005 David Woodhouse 0.11-6.2 -- Don't byteswap parts of device descriptor which kernel already swapped - -* Mon Sep 13 2004 Thomas Woerner 0.11-6.1 -- added missing BuildRequires for libtool (#132406) - -* Wed Sep 1 2004 Thomas Woerner 0.11-6 -- added patch from Aurelien Jarno for unknown HID Country Code entries in - usb.ids (#127415) - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Tue May 4 2004 Bill Nottingham 0.11-4 -- add patch from USB maintainer to fix various brokenness (#115694, ) - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Tue Jun 3 2003 Jeff Johnson -- add explicit epoch's where needed. - -* Mon May 19 2003 Bill Nottingham 0.11-1 -- update to 0.11, fixes #90640 -- add patch to fix some warnings (#78462, ) - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Fri Nov 29 2002 Tim Powers 0.9-9 -- remove unpackaged files from the buildroot - -* Wed Nov 20 2002 Florian La Roche -- exclude mainframe - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Thu May 23 2002 Tim Powers -- automated rebuild - -* Thu Mar 21 2002 Trond Eivind Glomsrød 0.9-5 -- Fix conflict check - -* Mon Mar 18 2002 Trond Eivind Glomsrød 0.9-4 -- Conflict with older versions of hotplug which contained - parts of this package (#60615) - -* Fri Feb 22 2002 Trond Eivind Glomsrød 0.9-3 -- Rebuild - -* Wed Jan 30 2002 Bill Nottingham 0.9-2 -- require hwdata - -* Wed Jan 16 2002 Trond Eivind Glomsrød 0.9-1 -- Initial RPM -- make it build on ia64 - +%autochangelog