Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#53188 closed defect (fixed)

Checksum mismatch for the usbids package

Reported by: aksansai Owned by: lbschenkel (Leonardo Brondani Schenkel)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kurthindenburg (Kurt Hindenburg), Blokkendoos (Johan), starthal (Stephen Albert), ctreleaven (Craig Treleaven), light2yellow (Oleksii Vilchanskyi), paulp (Paul Phillips)
Port: usbids

Description (last modified by mf2k (Frank Schima))

When attempting to update the usbids package, a checksum mismatch is detected and refuses (correctly) to update the package.

--->  Verifying checksums for usbids
Error: Checksum (rmd160) mismatch for usb.ids.gz
Error: Checksum (sha256) mismatch for usb.ids.gz
Error: org.macports.checksum for port usbids returned: Unable to verify file checksums
Please see the log file for port usbids for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_www.macports.org_files_ports_sysutils_usbids/usbids/main.log
Error: Problem while installing usbids
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

I will attach the log to this bug report.

Attachments (1)

main.log (2.4 KB) - added by aksansai 7 years ago.
The error that is produced that shows the checksum mismatch.

Download all attachments as: .zip

Change History (25)

Changed 7 years ago by aksansai

Attachment: main.log added

The error that is produced that shows the checksum mismatch.

comment:1 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

Cc: kurthindenburg added
Owner: set to lbschenkel
Status: newassigned

I don't see how this port is ever going to work since the download file doesn't have a version to it. It will always fail w/ checksum errors upon ever release.

comment:2 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

Priority: HighNormal
Version: 2.3.5

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Keywords: checksum mismatch removed

comment:4 Changed 7 years ago by mf2k (Frank Schima)

Description: modified (diff)

In the future, please use WikiFormatting.

comment:5 Changed 7 years ago by aksansai

Coming from a Gentoo (portage) background, can this not be handled as a post-process event upon installation of its companion package? To keep the database up-to-date, perhaps a cronjob to handle downloading the updated database periodically.

comment:6 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

I agree that the approach taken by this port is very fragile. When I introduced this port in https://trac.macports.org/ticket/52376 I tried other approaches (including downloading the latest version on the fly like the FreeBSD port does) but they were not accepted by the reviewers.

Besides what I already suggested on that ticket, the only other solution I can think of is that I could create a repo in GitHub to host a snapshot of the file and point the port to the repo instead.

comment:7 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

That might be an idea - another is asking author to add the version to the file name; either the current date version or a generic # version.

comment:8 Changed 7 years ago by Blokkendoos (Johan)

Cc: Blokkendoos added

comment:9 Changed 7 years ago by starthal (Stephen Albert)

Cc: starthal added

comment:10 Changed 7 years ago by starthal (Stephen Albert)

In fact, the PCI ID database is already using the Git repo method: https://github.com/pciutils/pciids

comment:11 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

That is great. I was not aware that the repo existed and I will change the port to use it. However, I'm overseas on vacation so it may take 2 weeks.

comment:12 Changed 7 years ago by starthal (Stephen Albert)

I contacted the usb.ids maintainer to ask about replicating the repo.

comment:13 Changed 7 years ago by ctreleaven (Craig Treleaven)

Cc: ctreleaven added

comment:14 Changed 7 years ago by ctreleaven (Craig Treleaven)

We might want to piggyback off this repo:

https://github.com/gentoo/hwids

It has both pci ids and usb ids as well as some other stuff. The usb ids are supposed to be from the same source this port is using. It was updated 6 times in 2016 so that is not a bad schedule. Last release was Nov 3, 2016:

https://github.com/gentoo/hwids/archive/hwids-20161103.tar.gz

comment:15 Changed 7 years ago by ctreleaven (Craig Treleaven)

BTW, the ioreg command provides similar information to that of lsusb:

CT-MBP11:usbids craigtreleaven$ ioreg -p IOUSB -w0
+-o Root  <class IORegistryEntry, id 0x100000100, retain 10>
  +-o EHCI Root Hub Simulation@1A,7  <class IOUSBRootHubDevice, id 0x100000227, registered, matched, active, busy 0 (16 ms), retain 15>
  | +-o HubDevice@fa100000  <class IOUSBHubDevice, id 0x100000290, registered, matched, active, busy 0 (8 ms), retain 15>
  | | +-o Apple Internal Keyboard / Trackpad@fa120000  <class IOUSBDevice, id 0x1000002a6, registered, matched, active, busy 0 (559 ms), retain 16>
  | | +-o BRCM2070 Hub@fa110000  <class IOUSBHubDevice, id 0x1000002b8, registered, matched, active, busy 0 (4 ms), retain 13>
  | |   +-o Bluetooth USB Host Controller@fa113000  <class IOUSBDevice, id 0x1000002bf, registered, matched, active, busy 0 (82 ms), retain 14>
  | +-o FaceTime HD Camera (Built-in)@fa200000  <class IOUSBDevice, id 0x10000029a, registered, matched, active, busy 0 (99 ms), retain 15>
  +-o EHCI Root Hub Simulation@1D,7  <class IOUSBRootHubDevice, id 0x100000228, registered, matched, active, busy 0 (16 ms), retain 13>
    +-o HubDevice@fd100000  <class IOUSBHubDevice, id 0x10000028f, registered, matched, active, busy 0 (8 ms), retain 15>
      +-o IR Receiver@fd110000  <class IOUSBDevice, id 0x1000002a0, registered, matched, active, busy 0 (85 ms), retain 12>
      +-o Tira-2@fd120000  <class IOUSBDevice, id 0x100000d96, registered, matched, active, busy 0 (31 ms), retain 11>

The last device on the list is a fairly obscure IR receiver manufactured by Home Electronics in Canada.

https://www.home-electro.com/products/tira-21

Equivalent output for lsusb is:

CT-MBP11:usbids craigtreleaven$ lsusb
Bus 253 Device 004: ID 0403:fa78 Future Technology Devices International, Ltd 
Bus 250 Device 004: ID 05ac:0252 Apple, Inc. Internal Keyboard/Trackpad (ANSI)
Bus 250 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
Bus 253 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
Bus 253 Device 001: ID 05ac:8006 Apple, Inc. EHCI Root Hub Simulation
Bus 250 Device 001: ID 05ac:8006 Apple, Inc. EHCI Root Hub Simulation

My device is the first one on this list.

comment:16 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

I'm back from vacation. I misread https://trac.macports.org/ticket/53188#comment:10 and didn't realize it was for the PCI database instead of the USB database.

How do you suggest proceeding from here?

  1. I can create a GitHub repo right now to host a snapshot of usb.ids
  2. We can leverage the existing gentoo/hwids repo, but I need to create a PR against it to update the USB database to a newer version than 2016-11-14
  3. ...something else?

I'm inclined to take option 1 since I'm the maintainer of this port and everything needed will be under my control. In case there's a repo out that is updated often (I'm not sure if option 2 qualifies) then I don't object using it since it simplifies things a bit for me.

comment:17 Changed 7 years ago by light2yellow (Oleksii Vilchanskyi)

@ctreleaven No, it is not similar to any tool on mac and that's why usbutils is crucial (and it fails to install because this package is a dependency). Try lsusb -v and you will see. This is what I want to see on mac. And there's no other tool that does it. Installing macports just for this is already painful enough. Subscribing for any news.

Last edited 7 years ago by light2yellow (Oleksii Vilchanskyi) (previous) (diff)

comment:18 Changed 7 years ago by light2yellow (Oleksii Vilchanskyi)

Cc: light2yellow added

comment:19 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

comment:20 Changed 7 years ago by paulp (Paul Phillips)

Cc: paulp added

comment:21 Changed 7 years ago by starthal (Stephen Albert)

The maintainer of usb.ids (Stephen Gowdy) has set up this repo in response to my request:

https://github.com/usbids/usbids

This might make things easier to maintain.

comment:22 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

Wonderful. Thank you Stephen, I have updated my PR.

comment:23 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

Resolution: fixed
Status: assignedclosed

In 93a537a7/macports-ports:

usbids: update to 2016.12.05 and fix checksum mismatches

To avoid checksum mismatches when the USB ID database is updated, this port
now relies on a GitHub repository mirroring the database.

Fixes #53188.

comment:24 Changed 7 years ago by tidalscale-frankh (Frank Hoeflich)

I ran into this problem with a MacPorts that had been updated late February 2017. Just selfupdated now and was able to install usbutils with no checksum problem.

Note: See TracTickets for help on using tickets.