Bug#844735: libusb-1.0: Build fxload package from libusb-1.0 examples

2016-11-18 Thread Stefano Rivera
Hi Debian (2016.11.18_15:36:47_+0100)
> For flashing the Opsis [3] boards, which the DebConf Video team uses, we
> need to use a libusb version of fxload.

Bah, I don't know where I got that idea from. (Well I do, but it was
confused.)

That said, libusb still has the better maintained fxload :)

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272



Bug#844735: libusb-1.0: Build fxload package from libusb-1.0 examples

2016-11-18 Thread Stefano Rivera
Almost forgot. I have a patch.

It doesn't include a manpage, as there isn't one upstream :(

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272
diff -Nru libusb-1.0-1.0.21/debian/control libusb-1.0-1.0.21/debian/control
--- libusb-1.0-1.0.21/debian/control2016-10-26 17:53:41.0 +0200
+++ libusb-1.0-1.0.21/debian/control2016-11-18 13:33:48.0 +0100
@@ -56,3 +56,12 @@
  of Linux kernel internals.
  .
  This is a minimal package for use in debian-installer.
+
+Package: fxload
+Section: admin
+Architecture: any
+Depends: ${misc:Depends}
+Description: Firmware download to EZ-USB devices
+ This program is conveniently able to download firmware into FX and FX2 ez-usb
+ devices. It is intended to be invoked by hotplug scripts when the unprogrammed
+ device appears on the bus.
diff -Nru libusb-1.0-1.0.21/debian/fxload.install 
libusb-1.0-1.0.21/debian/fxload.install
--- libusb-1.0-1.0.21/debian/fxload.install 1970-01-01 01:00:00.0 
+0100
+++ libusb-1.0-1.0.21/debian/fxload.install 2016-11-18 13:33:49.0 
+0100
@@ -0,0 +1 @@
+/usr/sbin/fxload
diff -Nru libusb-1.0-1.0.21/debian/patches/install-fxload 
libusb-1.0-1.0.21/debian/patches/install-fxload
--- libusb-1.0-1.0.21/debian/patches/install-fxload 1970-01-01 
01:00:00.0 +0100
+++ libusb-1.0-1.0.21/debian/patches/install-fxload 2016-11-18 
13:33:49.0 +0100
@@ -0,0 +1,12 @@
+--- a/examples/Makefile.am
 b/examples/Makefile.am
+@@ -1,7 +1,8 @@
+ AM_CPPFLAGS = -I$(top_srcdir)/libusb
+ LDADD = ../libusb/libusb-1.0.la
+ 
+-noinst_PROGRAMS = listdevs xusb fxload hotplugtest testlibusb
++noinst_PROGRAMS = listdevs xusb hotplugtest testlibusb
++sbin_PROGRAMS = fxload
+ 
+ if HAVE_SIGACTION
+ noinst_PROGRAMS += dpfp
diff -Nru libusb-1.0-1.0.21/debian/patches/series 
libusb-1.0-1.0.21/debian/patches/series
--- libusb-1.0-1.0.21/debian/patches/series 2016-08-25 10:30:40.0 
+0200
+++ libusb-1.0-1.0.21/debian/patches/series 2016-11-18 13:33:49.0 
+0100
@@ -1 +1,2 @@
 gnu-hurd-stub.diff
+install-fxload
diff -Nru libusb-1.0-1.0.21/debian/rules libusb-1.0-1.0.21/debian/rules
--- libusb-1.0-1.0.21/debian/rules  2016-10-26 17:43:38.0 +0200
+++ libusb-1.0-1.0.21/debian/rules  2016-11-18 13:33:49.0 +0100
@@ -20,10 +20,12 @@
 
 override_dh_auto_build-arch:
dh_auto_build --builddirectory build-deb
+   dh_auto_build --builddirectory build-deb/examples
dh_auto_build --builddirectory build-udeb
 
 override_dh_auto_install-arch:
dh_auto_install --builddirectory build-deb 
--destdir=$(CURDIR)/debian/tmp-deb
+   dh_auto_install --builddirectory build-deb/examples 
--destdir=$(CURDIR)/debian/tmp-deb
# Move the library to /lib
mkdir -p $(CURDIR)/debian/tmp-deb/lib/$(DEB_HOST_MULTIARCH)/
mv 
$(CURDIR)/debian/tmp-deb/usr/lib/$(DEB_HOST_MULTIARCH)/libusb-1.0.so.* \


Bug#844735: libusb-1.0: Build fxload package from libusb-1.0 examples

2016-11-18 Thread Stefano Rivera
Source: libusb-1.0
Affects: fxload
Severity: normal
Tags: patch

fxload upstream seems to have stalled [0].

[0]: http://linux-hotplug.cvs.sourceforge.net/viewvc/linux-hotplug/fxload/

I think the best maintained version of fxload these days is in the
libusb examples [1,2].

[1]: https://github.com/libusb/libusb/blob/master/examples/fxload.c
[2]: https://github.com/libusb/libusb/commits/master/examples/fxload.c

For flashing the Opsis [3] boards, which the DebConf Video team uses, we
need to use a libusb version of fxload.

Currently we're using a patchset [4] that I don't see landing in a dead
upstream, any time soon :(

[3]: https://opsis.hdmi2usb.tv/getting-started/jtag.html
[4]: 
https://git.launchpad.net/~timvideos/+git/fxload/tree/debian/patches/multios

So, the best path forward is probably libusb's fxload, in examples. Can
we take over the fxload package with it?

SR