usbip source is maintained in kernel tree now

Bug #898003 reported by Rockwalrus
144
This bug affects 38 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Low
Tim Gardner
Utopic
Fix Released
Low
Tim Gardner
usbip (Ubuntu)
Invalid
Undecided
Unassigned
Utopic
Invalid
Undecided
Unassigned

Bug Description

Both the userspace and kernel module parts of usbip are in the linux kernel tree now. The source used in this package is quite old.

I'm not sure how to best handle the packaging aspects here -- I imagine that it would be undesirable for usbip to be built as a side effect of the main kernel package build, because then the kernel package build would be even slower and usbip is probably not updated enough to justify that.

CVE References

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 898003

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Rockwalrus (rockwalrus) wrote :

Log files are irrelevant to a change in SCM location. :)

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: bot-stop-nagging
Changed in linux (Ubuntu):
importance: Undecided → Low
Revision history for this message
Rockwalrus (rockwalrus) wrote :
Revision history for this message
Rockwalrus (rockwalrus) wrote :
Revision history for this message
Rockwalrus (rockwalrus) wrote :
Revision history for this message
Rockwalrus (rockwalrus) wrote :
Revision history for this message
Rockwalrus (rockwalrus) wrote :
Revision history for this message
Rockwalrus (rockwalrus) wrote :
Revision history for this message
Rockwalrus (rockwalrus) wrote :
Revision history for this message
Rockwalrus (rockwalrus) wrote :
Rockwalrus (rockwalrus)
Changed in usbip (Ubuntu):
status: New → Confirmed
Revision history for this message
Evan Broder (broder) wrote :

Thanks for your work on getting these packages updated, and I'm sorry that it's taken so long to get this looked at.

I asked the kernel team about building the usbip packages as part of the kernel build process:

1:18 PM <broder> i'm wondering whether or not it would be plausible to incorporate the usbip userspace pieces into the kernel package build (there's a client, a server, and a library), or whether we should keep snapshotting the source from the kernel into a separate source package
1:19 PM <tgardner> broder, looking
1:23 PM <tgardner> broder, this is still a staging driver. while we have a mechanism for building and distributing applications from the kernel source tree, I'm not sure I wanna bother with a staging driver.
1:25 PM <broder> tgardner: ok. that's reasonable. it doesn't seem like it's going through a whole lot of churn anyway
1:26 PM <broder> i'll work on updating the separate package
1:26 PM <tgardner> broder, maybe we can pick it up when it gets promoted to mainline

For now, I'm going to mark the bug task on Linux as invalid.

I'm also happy to try and review your packing updates. I have a few questions/concerns so far:

 - Where did the -2.5- in the version number come from? Was that the kernel version number when you snapshotted it? I'm assuming at this point that the package is out of date from the current kernel

 - Since the 3.0.0 version of the packaging was never uploaded to Ubuntu, there should only be a single changelog entry for 3.2.0 (similarly, the debian/NEWS file should be updated)

 - The changelog should be more explicit about changes to the packaging. In particular, it would be good to see some discussion about the debian/header/* files

 - Please use XS-Debian-Vcs-Browser and -Vcs-Git instead of -Original- (see https://lists.ubuntu.com/archives/ubuntu-devel/2007-March/023332.html)

 - As more of a wishlist thing, we generally prefer dkms-based kernel module packages over module-assistant based ones these days. It would be excellent to have a usbip-dkms in addition to (or instead of) usbip-source

If you'd like to update the packaging to address all of these, that's fine. If not, I'm happy to do the cleanup, but I need a hint on the version number to move forward.

(I'm unsubscribing ubuntu-sponsors for the time being, but feel free to resubscribe them when you feel you've addressed my concerns)

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Peter Meiser (meiser79) wrote :

I packaged the usbip-utils slightly different. I copied the userspace directory from the kernel and tar'ed it. Then, I removed all unimportant stuff from the debian folder (including the usbip-source package).

The result can be found in my testing PPA. Could some of the ubuntu devs please have a look?

Revision history for this message
Peter Meiser (meiser79) wrote :

I did another cleanup round and simplified the debian/rules a lot. The updated package can be found in my testing PPA (https://launchpad.net/~whoopie79/+archive/testing/+packages).

Revision history for this message
Peter Meiser (meiser79) wrote :

I just saw that the usbip-utils package has a version numer of 1.1.1 (see https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=0aee58894551d7a9992f79d77d89f5846eb5e938).

I uploaded a new package in my PPA (https://launchpad.net/~whoopie79/+archive/ppa/+packages) with the correct version number.

Revision history for this message
James Page (james-page) wrote :

Hi Whoopie

As discussed in #ubuntu-devel:

1) You should make contact with the Debian Maintainer - at some point in time they are going to hit the same problem and you have made alot of packaging changes with this update - we need to ensure that this is a delta and not a permanent fork because he disagrees with the way we have done things re packaging and approach.

2) Documentation; as you have done quite a bit of packaging change and altered the way the orig.tar.gz is created this really needs documenting both in the changelog and in debian/README.source,watch so that if some else touches this in the future they can follow the same processes. Also worth noting why the -source package is being dropped -most people won't look in the bug report.

I think that trying to keep and approach+packaging inline with Debian but using a different upstream version/source is the best way forwards in this case.

Revision history for this message
Michael Markstaller (makki) wrote :

It would be good to get this resolved, it worked basically some months back but now with the change from SF to kernel-tree things are fully messed up somehow (12.04), the modules on the client cannot be loaded at all and cannot connect to a recent server (on OpenWRT, kernel 3.3.5) due to "version mismatch: 262 273"

Michael

P.S.: bug/994934 looks related/same issue

Revision history for this message
Chris Halse Rogers (raof) wrote :

Hi Whoopie:

I've unsubscribed sponsors; James' comments should be addressed before we upload anything. Are you planning to address these issues?

Revision history for this message
Peter Meiser (meiser79) wrote :

The usbip package is now built inside of linux-tools in Debian. Would it be possible to do the same?

See http://packages.debian.org/changelogs/pool/main/l/linux-tools/linux-tools_3.2.17-1/changelog

Revision history for this message
Nicolas Delvaux (malizor) wrote :

As Whoopie said, this bug is now fixed in Debian, so there is just Ubuntu now.
AFAIK it is still not fixed in Raring...

@Whoopie: I don't see the usbip package in your PPA, could you re-upload it (at least for Precise)? It would be appreciated :-)

Revision history for this message
Martin Schröder (martinschroeder) wrote :

Whats the progress on this?
On my Raspberry Pi (wheezy) I have version 1.1.1:

usbip version
usbip (usbip-utils 1.1.1)

On Ubuntu Raring I have version 0.1.7 which seems to be hopelessly outdated:
usbip -v

** (process:19658): WARNING **: running non-root?
usbip 0.1.7 ($Id: vhci_attach.c 42 2007-09-07 12:07:51Z hirofuchi $)

These two different versions don't seem to work with each other:

Command (Client / Raring)
sudo usbip -D --list 192.168.178.35
usbip dbg: usbip_network.c: 221 (tcp_connect ) trying 192.168.178.35 port 3240

usbip dbg: usbip_network.c: 241 (tcp_connect ) connected to 192.168.178.35:3240
- 192.168.178.35
usbip err: usbip_network.c: 119 (usbip_recv_op_common) recv op_common, -1
usbip err: vhci_attach.c: 202 (query_exported_devices) recv op_common
usbip err: vhci_attach.c: 417 (show_exported_devices) query

Messages (Server / Wheezy)
sudo usbipd
usbipd: info: starting usbipd (usbip-utils 1.1.1)
usbipd: info: listening on 0.0.0.0:3240
usbipd: info: connection from 192.168.178.32:36593

@Whoopie: Could you make your packages available for Raring?

Revision history for this message
Elliott Friedman (elliott-friedman) wrote :

This seems to be broken for all current kernels paired with package version 0.1.7.

Revision history for this message
Peter Meiser (meiser79) wrote :

This really needs some attention. USBIP will be moved out of the staging area in kernel 3.17.

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu):
assignee: nobody → Tim Gardner (timg-tpi)
status: Won't Fix → In Progress
Andy Whitcroft (apw)
Changed in linux (Ubuntu Utopic):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.16.0-18.25

---------------
linux (3.16.0-18.25) utopic; urgency=low

  [ Tim Gardner ]

  * Release Tracking Bug
    - LP: #1373682
 -- Tim Gardner <email address hidden> Wed, 24 Sep 2014 19:23:23 -0600

Changed in linux (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Peter Meiser (meiser79) wrote :

Any chance to get this backported to Trusty?

Revision history for this message
Mauro (mauromol) wrote :

In what exactly consists the fix to this bug? An updated (and working) usbip package? Or the ability to set up usbip without any additional packages? Or what else?

I too would really like to use it in Trusty...

Revision history for this message
Michael Salisbury (michaelsalisbury) wrote :

Whoopie,
Mauro,

  Have either of you come accross and details to how USBIP was fixed for Ubuntu Utopic?

Tim,
Andy,

  Can you share some details as to what was changed so that if there are no plans to backport the fix to Trusty we can attempt a manual fix on our own.

Revision history for this message
Peter Meiser (meiser79) wrote :

You must install the linux-tools-generic package which provides right packages. There's usbip and usbipd included (http://packages.ubuntu.com/utopic/amd64/linux-tools-3.16.0-23-generic/filelist).

@Tim Gardner: shouldn't the usbip package be removed from the repository (http://packages.ubuntu.com/utopic/usbip)?

Revision history for this message
Peter Meiser (meiser79) wrote :

@Tim Gardner: could it be that there's a missing line in debian/rules.d/3-binary-indep.mk?

after "ifeq ($(do_tools_common),true)", you install the usbip client, but the usbipd daemon is missing. I think, there should be a line "install -m755 debian/tools/generic $(toolsbin)/usbipd".

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Utopic):
status: Fix Released → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Whoopie - I think it is too late to remove usbip from Utopic. I've commited the fix you suggested in #28.

Andy Whitcroft (apw)
Changed in linux (Ubuntu Utopic):
status: In Progress → Fix Committed
Revision history for this message
Peter Meiser (meiser79) wrote :

Tim, maybe a transitional usbip package could be pushed to utopic which installs linux-tools-generic.

Revision history for this message
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-utopic' to 'verification-done-utopic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-utopic
Revision history for this message
Peter Meiser (meiser79) wrote :

usbip and usbipd binaries are part of the linux-tools-common package.

tags: added: verification-done-utopic
removed: verification-needed-utopic
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (17.0 KiB)

This bug was fixed in the package linux - 3.16.0-25.33

---------------
linux (3.16.0-25.33) utopic; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1389170

  [ dann frazier ]

  * [Config] Disable CONFIG_IPMI_SI_PROBE_DEFAULTS on armhf and arm64
    - LP: #1388952

  [ Duc Dang ]

  * SAUCE: (no-up) [PCIE] APM X-Gene: Remove debug messages in MSI
    interrupt handler path.
    - LP: #1382244
  * SAUCE: (no-up) PCI: X-Gene: Fix max payload size and phantom function
    configuration
    - LP: #1386261

  [ Tim Gardner ]

  * Revert "SAUCE: (no-up) PCI: Increase BAR size quirk for IBM ipr SAS
    Crocodile adapters"
    - LP: #1387813
  * [Config] CONFIG_SOUND_OSS_CORE_PRECLAIM=n
    - LP: #1385510
  * [Debian] install usbipd
    - LP: #898003
  * [Debian] Fix linux-doc dangling symlinks
    - LP: #661306

  [ Upstream Kernel Changes ]

  * Revert "macvlan: simplify the structure port"
    - LP: #1381490
  * Revert "net/macb: add pinctrl consumer support"
    - LP: #1381490
  * Revert "lzo: properly check for overruns"
    - LP: #1387813
  * Revert "ath9k_hw: reduce ANI firstep range for older chips"
    - LP: #1387813
  * ASoC: ssm2602: do not hardcode type to SSM2602
    - LP: #1379785
  * ASoC: core: fix possible ZERO_SIZE_PTR pointer dereferencing error.
    - LP: #1379785
  * perf: fix perf bug in fork()
    - LP: #1379785
  * mm: memcontrol: do not iterate uninitialized memcgs
    - LP: #1379785
  * mm: migrate: Close race between migration completion and mprotect
    - LP: #1379785
  * i2c: qup: Fix order of runtime pm initialization
    - LP: #1379785
  * i2c: rk3x: fix 0 length write transfers
    - LP: #1379785
  * ACPI / i915: Update the condition to ignore firmware backlight change
    request
    - LP: #1379785
  * cpufreq: integrator: fix integrator_cpufreq_remove return type
    - LP: #1379785
  * cpufreq: pcc-cpufreq: Fix wait_event() under spinlock
    - LP: #1379785
  * md/raid5: disable 'DISCARD' by default due to safety concerns.
    - LP: #1379785
  * drm/i915: Flush the PTEs after updating them before suspend
    - LP: #1379785
  * Fix problem recognizing symlinks
    - LP: #1379785
  * init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu
    - LP: #1379785
  * ring-buffer: Fix infinite spin in reading buffer
    - LP: #1379785
  * uas: Only complain about missing sg if all other checks succeed
    - LP: #1379785
  * uas: Log a warning when we cannot use uas because the hcd lacks streams
    - LP: #1379785
  * uas: Disable uas on ASM1051 devices
    - LP: #1379785
  * uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
    - LP: #1379785
  * x86, ia64: Move EFI_FB vga_default_device() initialization to
    pci_vga_fixup()
    - LP: #1379785
  * vgaarb: Don't default exclusively to first video device with mem+io
    - LP: #1379785
  * mm, thp: move invariant bug check out of loop in __split_huge_page_map
    - LP: #1379785
  * mm: numa: Do not mark PTEs pte_numa when splitting huge pages
    - LP: #1379785
  * media: vb2: fix VBI/poll regression
    - LP: #1379785
  * jiffies: Fix timeval conversion to jiffies
    - LP: #1379785
  * Linux 3.16.5
    - LP: #1379785
 ...

Changed in linux (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

For those users wanting a solution:

Uninstall usbip package if you've installed it.

On trusty, install linux-tools-generic-lts-utopic. I can't seem to find a package that will create a binary, but you can run the binary manually from /usr/lib/linux-tools/. As of this writing it's /usr/lib/linux-tools/3.16.0-23-generic/usbip. NOTE, I am running the HWE utopic kernel on my trusty box.

On utopic or vivid install linux-tools-generic. usbip is registered as a binary in this case, you can use directly with 'usbip'.

Revision history for this message
Ales Berka (ales-berka) wrote :

Thanks a lot, Nicholas. Very helpful.

Revision history for this message
Lauren Weinstein (lauren4321) wrote :

Greetings. I've been trying to install usbip on Trusty, and -- judging from my research leading me here -- apparently it's not compiled into the stock 14.04 kernel, and I'm not set-up to rebuild the kernel here right now. Is there a reasonable alternative path to getting this working? Thanks!

Revision history for this message
Mauro (mauromol) wrote :

For Trusty, you must compile usbip from sources yourself. I did it a couple of times in Linux Mint 17 (based on Trusty) and Debian 7. Here is what I ended up with:

On the Linux server that will share the USB devices or on any Linux client that will need to access shared devices on other servers:
- download the kernel source: apt-get install linux-source-3.13.0 (replace with your desired kernel version)
- extract the usbip sources from the kernel source tarball (e.g.: /usr/src/linux-source-3.13.0.tar.bz2): they should be under drivers/staging/usbip (or something like that); for instance, extract them to /root/usbip
- find where the file usb.ids from usbutils package is located in your system: apt-file search usb.ids (in my case it's at /usr/share/misc/usb.ids)
- enter /root/usbip/userspace to build the userspace tools:
    ./autogen.sh
    ./configure --with-usbids-dir=/usr/share/misc
    make install
  (replace the usb.ids path as needed)
- if the build fails, you may need some additional libraries; take a look at the README file; for instance, I needed to install libtool (apt-get install libtool)
- the executable files /usr/local/sbin/usbip and /usr/local/sbin/usbipd will be installed, as well as some libraries into /usr/local/lib
- try to run usbip or usbipd to see if they complain about something; if they say some library is missing, try to launch them by preceding with a proper LD_LIBRARY_PATH setting; for instance, you may need to run usbip in this way:
  LD_LIBRARY_PATH=/usr/local/lib; usbip

Until now, we've compiled the userspace tools required to control usbip; then, we need to compile the kernel modules, too. The following is again needed on the Linux server that will share the USB devices:
- the kernel headers are required:
  apt-get install linux-headers-`uname -r`
  cd /usr/src/linux-headers-`uname -r`
  make M=/root/usbip
  (replace the path after M= with the folder where you extracted the usbip sources in the previous steps)
- the kernel modules will be installed in the usbip folder; to load them:
  modprobe usbip-core.ko
  modprobe usbip-host.ko

After you've loaded the kernel modules, type:
usbipd -D

Then, you can start to use the usbip tool to list the attached USB modules and bind them.

If you want to load the kernel modules automatically on system startup:
sudo echo usbip-core >>/etc/modules
sudo echo usbip-host >>/etc/modules

If you want to start the usbipd daemon automatically on system startup, one way to achieve this is to edit /etc/rc.local and add the following line before the line with "exit 0":
/usr/local/sbin/usbipd -D
(remember the LD_LIBRARY_PATH thing, if you determined it's needed)

Please note that if you plan to use Windows clients, you need to try the LATEST compiled binaries, otherwise they will fail to work. When I last used usbip, I had to use some binaries compiled by users posting on the usbip forum, because the one published on the usbip website were outdated and did not work. That's another huge problem with this tool, I think.

Hope this helps someone.

Revision history for this message
Michael Markstaller (makki) wrote : Re: [Bug 898003] Re: usbip source is maintained in kernel tree now
Download full text (3.4 KiB)

This was VERY helpful! Thanks!

But why must that be that freaky?
I love OSS, really! - but sometimes I doubt, if anybody understands that
things like "./autogen.sh" etc. aren't suitable for common people?!
Upstream, "apt-get install usbip" would be great, otherwise nobody could
really use it.

just my 5 ct,
Michael

On 10.11.2015 22:07, Mauro wrote:
> For Trusty, you must compile usbip from sources yourself. I did it a
> couple of times in Linux Mint 17 (based on Trusty) and Debian 7. Here is
> what I ended up with:
>
> On the Linux server that will share the USB devices or on any Linux client that will need to access shared devices on other servers:
> - download the kernel source: apt-get install linux-source-3.13.0 (replace with your desired kernel version)
> - extract the usbip sources from the kernel source tarball (e.g.: /usr/src/linux-source-3.13.0.tar.bz2): they should be under drivers/staging/usbip (or something like that); for instance, extract them to /root/usbip
> - find where the file usb.ids from usbutils package is located in your system: apt-file search usb.ids (in my case it's at /usr/share/misc/usb.ids)
> - enter /root/usbip/userspace to build the userspace tools:
> ./autogen.sh
> ./configure --with-usbids-dir=/usr/share/misc
> make install
> (replace the usb.ids path as needed)
> - if the build fails, you may need some additional libraries; take a look at the README file; for instance, I needed to install libtool (apt-get install libtool)
> - the executable files /usr/local/sbin/usbip and /usr/local/sbin/usbipd will be installed, as well as some libraries into /usr/local/lib
> - try to run usbip or usbipd to see if they complain about something; if they say some library is missing, try to launch them by preceding with a proper LD_LIBRARY_PATH setting; for instance, you may need to run usbip in this way:
> LD_LIBRARY_PATH=/usr/local/lib; usbip
>
> Until now, we've compiled the userspace tools required to control usbip; then, we need to compile the kernel modules, too. The following is again needed on the Linux server that will share the USB devices:
> - the kernel headers are required:
> apt-get install linux-headers-`uname -r`
> cd /usr/src/linux-headers-`uname -r`
> make M=/root/usbip
> (replace the path after M= with the folder where you extracted the usbip sources in the previous steps)
> - the kernel modules will be installed in the usbip folder; to load them:
> modprobe usbip-core.ko
> modprobe usbip-host.ko
>
> After you've loaded the kernel modules, type:
> usbipd -D
>
> Then, you can start to use the usbip tool to list the attached USB
> modules and bind them.
>
> If you want to load the kernel modules automatically on system startup:
> sudo echo usbip-core >>/etc/modules
> sudo echo usbip-host >>/etc/modules
>
> If you want to start the usbipd daemon automatically on system startup, one way to achieve this is to edit /etc/rc.local and add the following line before the line with "exit 0":
> /usr/local/sbin/usbipd -D
> (remember the LD_LIBRARY_PATH thing, if you determined it's needed)
>
> Please note that if you plan to use Windows clients, you need to try the
> LATEST compiled...

Read more...

Revision history for this message
Peter Meiser (meiser79) wrote :

@mauro: the LD_LIBRARY_PATH is not needed if you run "sudo ldconfig" after the installation.

Revision history for this message
Michael Kasprzak (mike-sykhronics) wrote :

Since this seems to have been forgotten, I just thought I'd mention that since the kernel version of USBIP is working, the USBIP package should probably be removed. It doesn't work anymore and only causes confusion (I spent a regrettable amount of time trying to get it working, only to discover it's not the same thing as the kernel version found in linux-tools-generic).

dino99 (9d9)
Changed in usbip (Ubuntu Utopic):
status: Confirmed → Invalid
Changed in usbip (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.