introduction of virtual/libusb0
PATCH 1/1 introduction of virtual/libusb0
Hallo.
I plan to submit attached patch to oe.dev to fix clash of libusb-compat and libusb in recipes by introduction of virtual/libusb0.
libusb-compat and libusb provide exactly the same API and ABI using a different back-end, and applications should work with both of them without recompilation.
After the commit, distro maintainers will be encouraged to set:
PREFERRED_PROVIDER_virtual/libusb0 = "libusb-compat"
Following technical problems may happen with libusb0 applications:
- Application does not compile of fail on runtime linking with
libusb-compat: Badly written application (using internal functions etc.), application needs fix.
gnuradio is known to be affected.
- Application does not work libusb-compat: Application depends on an obscure aspect of libusb behavior. Report it and help with debugging. With libusb-compat-1.0.2, there are no known defects of this type.
The commit will also remove hack recipes/libusb/libusb_0.0.0.bb.
conf/distro/angstrom-2008.1.conf +2 -0
@@ -140,6 +140,7 @@ PREFERRED_PROVIDER_virtual/db ?= "db" PREFERRED_PROVIDER_virtual/db-native ?= "db-native" PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11" PREFERRED_PROVIDER_virtual/libx11 ?= "libx11" +PREFERRED_PROVIDER_virtual/libusb0 ?= "libusb-compat" # Others: PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
@@ -158,6 +159,7 @@ PREFERRED_PROVIDER_bluez-utils-dbus = "bluez-utils" PREFERRED_PROVIDER_bluez-libs = "bluez4" PREFERRED_PROVIDER_bluez-utils = "bluez4" + # we don't ship gtk-directfb by default PREFERRED_PROVIDER_gtk+ ?= "gtk+" PREFERRED_PROVIDER_gdk-pixbuf-loader-ani ?= "gtk+"
conf/distro/include/preferred-slugos-versions.inc +0 -6
@@ -63,11 +63,5 @@ PREFERRED_VERSION_udev ?= "118" ##################### Stuff with special notes, and broken stuff: -# Hack alert - selecting this version of libusb effectively selects -# the use of libusb1 and libusb-compat in the case that something -# still depends on libusb. This is required because otherwise -# libusb will overwrite libusb-compat in staging. -PREFERRED_VERSION_libusb ?= "0.0.0" - # boost 1.36 won't build PREFERRED_VERSION_boost ?= "1.33.1"
recipes/0xFFFF/0xffff-native_0.1.bb +1 -1
@@ -1,6 +1,6 @@ require 0xffff.inc -DEPENDS = "libusb-native" +DEPENDS = "virtual/libusb0-native" inherit native
recipes/0xFFFF/0xffff-native_0.2.bb +1 -1
@@ -1,6 +1,6 @@ require 0xffff.inc -DEPENDS = "libusb-native" +DEPENDS = "virtual/libusb0-native" inherit native
recipes/bluez/bluez-utils.inc +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "Linux Bluetooth Stack Userland Utilities." SECTION = "console" PRIORITY = "optional" -DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb-compat dbus cups" +DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} virtual/libusb0 dbus cups" PROVIDES = "bluez-utils-dbus" RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus" RREPLACES = "bluez-utils-dbus"
recipes/bluez/bluez-utils3.inc +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "Linux Bluetooth Stack Userland Utilities." SECTION = "console" PRIORITY = "optional" -DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb-compat dbus glib-2.0" +DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} virtual/libusb0 dbus glib-2.0" PROVIDES = "bluez-utils-dbus" RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus" RREPLACES = "bluez-utils-dbus"
recipes/bluez/bluez.inc +1 -1
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.bluez.org" LICENSE = "GPL" PR = "r0" -DEPENDS = "gstreamer gst-plugins-base libusb1 dbus glib-2.0" +DEPENDS = "gstreamer gst-plugins-base virtual/libusb0 dbus glib-2.0" PROVIDES = "bluez-utils-dbus" RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus" RREPLACES = "bluez-utils-dbus"
recipes/bluez/bluez4.inc +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "Linux Bluetooth Stack Userland V4" SECTION = "libs" PRIORITY = "optional" -DEPENDS = "gst-plugins-base alsa-lib libusb-compat dbus-glib" +DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib" HOMEPAGE = "http://www.bluez.org" LICENSE = "GPL" INC_PR = "r1"
recipes/bluez/bluez4_4.31.bb +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "Linux Bluetooth Stack Userland V4" SECTION = "libs" PRIORITY = "optional" -DEPENDS = "gst-plugins-base alsa-lib libusb-compat dbus-glib" +DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib" HOMEPAGE = "http://www.bluez.org" LICENSE = "GPL" PR = "r6"
recipes/bluez/bluez4_4.35.bb +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "Linux Bluetooth Stack Userland V4" SECTION = "libs" PRIORITY = "optional" -DEPENDS = "gst-plugins-base alsa-lib libusb-compat dbus-glib" +DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib" HOMEPAGE = "http://www.bluez.org" LICENSE = "GPL"
recipes/bluez/bluez4_4.37.bb +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "Linux Bluetooth Stack Userland V4" SECTION = "libs" PRIORITY = "optional" -DEPENDS = "gst-plugins-base alsa-lib libusb-compat dbus-glib" +DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib" HOMEPAGE = "http://www.bluez.org" LICENSE = "GPL"
recipes/ccid/ccid_1.3.8.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "http://pcsclite.alioth.debian.org/ccid.html" LICENSE = "GPL" PR = "r0" -DEPENDS = "libusb pcsc-lite" +DEPENDS = "virtual/libusb0 pcsc-lite" RDEPENDS = "pcsc-lite" SRC_URI = "http://alioth.debian.org/download.php/2482/ccid-${PV}.tar.bz2"
recipes/dfu-util/dfu-util-native_svn.bb +1 -1
@@ -2,7 +2,7 @@ require dfu-util_${PV}.bb inherit native -DEPENDS = "libusb-native usbpath-native" +DEPENDS = "virtual/libusb0-native usbpath-native" do_stage() { install -d ${STAGING_BINDIR_NATIVE}
recipes/dfu-util/dfu-util_svn.bb +1 -1
@@ -5,7 +5,7 @@ LICENSE = "GPL" PV = "0.1+svnr${SRCREV}" PR = "r2" -DEPENDS = "libusb usbpath" +DEPENDS = "virtual/libusb0 usbpath" SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=dfu-util;proto=http" S = "${WORKDIR}/dfu-util"
recipes/emul/emul_1.0.5.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "EarthMate Userland Library" SECTION = "libs/network" PRIORITY = "optional" LICENSE = "GPL" -DEPENDS = "libusb ncurses" +DEPENDS = "virtual/libusb0 ncurses" PR = "r1" SRC_URI = "http://download.berlios.de/emul/emul-${PV}.tar.gz"
recipes/ezx/ezx-boot-usb-native_svn.bb +1 -1
@@ -1,5 +1,5 @@ DESCRIPTION = "Boot a Motorola EZX device with a user supplied kernel" -DEPENDS = "libusb-native virtual/kernel" +DEPENDS = "virtual/libusb0-native virtual/kernel" SECTION = "devel" AUTHOR = "Team OpenEZX <[email protected]>" LICENSE = "GPL"
recipes/gnuradio/gnuradio.inc +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "GNU Radio" SECTION = "apps" PRIORITY = "optional" LICENSE = "GPLv3" -DEPENDS = "libusb guile-native fftwf python virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native python-numpy" +DEPENDS = "virtual/libusb0 guile-native fftwf python virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native python-numpy" INC_PR = "r7" inherit distutils-base autotools autotools_stage pkgconfig
recipes/gphoto2/libgphoto2_2.1.4.bb +1 -1
@@ -1,5 +1,5 @@ SECTION = "libs" -DEPENDS = "jpeg libusb libexif" +DEPENDS = "jpeg virtual/libusb0 libexif" DESCRIPTION = "libgphoto2 allows you to access digital cameras" SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2"
recipes/gphoto2/libgphoto2_2.1.5.bb +1 -2
@@ -1,6 +1,5 @@ SECTION = "libs" -DEPENDS = "jpeg libusb libexif" -RPEDENDS = "libusb" +DEPENDS = "jpeg virtual/libusb0 libexif" DESCRIPTION = "libgphoto2 allows you to access digital cameras" PR = "r3"
recipes/gphoto2/libgphoto2_2.1.6.bb +1 -2
@@ -1,6 +1,5 @@ SECTION = "libs" -DEPENDS = "jpeg libusb libexif" -RPEDENDS = "libusb" +DEPENDS = "jpeg virtual/libusb0 libexif" DESCRIPTION = "libgphoto2 allows you to access digital cameras" PR = "r6"
recipes/gphoto2/libgphoto2_2.4.2.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "libgphoto2 allows you to access digital cameras" SECTION = "libs" LICENSE = "GPL" -DEPENDS = "libtool jpeg libusb libexif" +DEPENDS = "libtool jpeg virtual/libusb0 libexif" PR = "r0"
recipes/gphoto2/libgphoto2_2.4.4.bb +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "libgphoto2 allows you to access digital cameras" SECTION = "libs" LICENSE = "GPL" -DEPENDS = "libtool jpeg libusb libexif" +DEPENDS = "libtool jpeg virtual/libusb0 libexif" PR = "r0"
recipes/gpsbabel/gpsbabel_1.2.5.bb +1 -1
@@ -1,6 +1,6 @@ SECTION = "console/utils" DESCRIPTION = "GPS data converter" -DEPENDS = "expat libusb" +DEPENDS = "expat virtual/libusb0" HOMEPAGE = "http://gpsbabel.sf.net" LICENSE = "GPL"
recipes/gpsbabel/gpsbabel_1.3.6.bb +1 -1
@@ -1,6 +1,6 @@ SECTION = "console/utils" DESCRIPTION = "GPS data converter" -DEPENDS = "expat libusb-compat" +DEPENDS = "expat virtual/libusb0" HOMEPAGE = "http://www.gpsbabel.org/" LICENSE = "GPL"
recipes/hal/hal.inc +1 -1
@@ -9,7 +9,7 @@ S = "${WORKDIR}/hal-${PV}" inherit autotools pkgconfig -DEPENDS = "virtual/kernel util-linux-ng dbus-glib udev intltool intltool-native expat libusb gperf-native" +DEPENDS = "virtual/kernel util-linux-ng dbus-glib udev intltool intltool-native expat virtual/libusb0 gperf-native" RDEPENDS += "hal-info udev-utils" RRECOMMENDS += "eject"
recipes/hal/hal_0.5.9.1.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "http://freedesktop.org/Software/hal" SECTION = "unknown" LICENSE = "GPL LGPL AFL" -DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat libusb-compat" +DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat virtual/libusb0" RDEPENDS_${PN} += "udev-utils hal-info" PR = "r9"
recipes/hal/hal_git.bb +1 -1
@@ -5,7 +5,7 @@ LICENSE = "GPL LGPL AFL" DEFAULT_PREFERENCE = "-1" -DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat libusb-compat" +DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat virtual/libusb0" RDEPENDS_${PN} += "udev-utils hal-info" SRC_URI = "git://anongit.freedesktop.org/hal/;protocol=git \
recipes/lcd4linux/lcd4linux_0.10.0.bb +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "LCD4Linux is a small program that grabs information from the kernel and some subsystems and displays it on an external liquid crystal display." LICENSE = "GPLv2" -DEPENDS = "libusb-compat ncurses readline virtual/libx11" +DEPENDS = "virtual/libusb0 ncurses readline virtual/libx11" PV = "0.10.0+0.10.1-RC2" PR = "r4"
recipes/lcd4linux/lcd4linux_0.11.0-SVN.bb +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "LCD4Linux is a small program that grabs information from the kernel and some subsystems and displays it on an external liquid crystal display." LICENSE = "GPLv2" -DEPENDS = "libusb-compat ncurses readline virtual/libx11" +DEPENDS = "virtual/libusb0 ncurses readline virtual/libx11" PV = "0.11.0-SVN" PR = "r0"
recipes/lcdproc/lcdproc5.inc +1 -1
@@ -4,7 +4,7 @@ HOMEPAGE = "http://lcdproc.org" SECTION = "utils" PRIORITY = "optional" LICENSE = "GPL" -DEPENDS = "libusb ncurses" +DEPENDS = "virtual/libusb0 ncurses" RRECOMMENDS_lcdproc = "lcdd" SRC_URI = "${SOURCEFORGE_MIRROR}/lcdproc/${P}.tar.gz"
recipes/libftdi/libftdi-native_0.13.bb +1 -1
@@ -2,4 +2,4 @@ require libftdi_${PV}.bb inherit native -DEPENDS = "libusb-native" +DEPENDS = "virtual/libusb0-native"
recipes/libftdi/libftdi-native_0.9.bb +1 -1
@@ -2,4 +2,4 @@ require libftdi_${PV}.bb inherit native -DEPENDS = "libusb-native" +DEPENDS = "virtual/libusb0-native"
recipes/libftdi/libftdi_0.13.bb +1 -1
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.intra2net.com/de/produkte/opensource/ftdi/" LICENSE = "LGPL" SECTION = "libs" -DEPENDS = "libusb" +DEPENDS = "virtual/libusb0" SRC_URI = "http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/libftdi-${PV}.tar.gz \ file://autotools.patch;patch=1 \
recipes/libftdi/libftdi_0.9.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "libftdi is a library (using libusb) to talk to FTDI's \ FT232BM, FT245BM and FT2232C type chips including the popular bitbang mode." HOMEPAGE = "http://www.intra2net.com/de/produkte/opensource/ftdi" LICENSE = "GPL" -DEPENDS = "libusb" +DEPENDS = "virtual/libusb0" SRC_URI = "http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/libftdi-${PV}.tar.gz \ file://doxygen-configure.patch;patch=1"
recipes/libg15/libg15_1.2.1.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "http://g15tools.sourceforge.net" LICENSE = "GPLv2" SECTION = "libs" PRIORITY = "optional" -DEPENDS = "libusb" +DEPENDS = "virtual/libusb0" PR = "r3" SRC_URI = "${SOURCEFORGE_MIRROR}/g15tools/libg15-${PV}.tar.bz2"
recipes/libgphoto2/libgphoto2_2.4.0.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "libgphoto2 allows you to access digital cameras" SECTION = "libs" LICENSE = "GPL" -DEPENDS = "libtool jpeg libusb libexif" +DEPENDS = "libtool jpeg virtual/libusb0 libexif" PR = "r0"
recipes/librfid/librfid_svn.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "RFID library" SECTION = "devel" PRIORITY = "optional" LICENSE = "GPL" -DEPENDS = "libusb" +DEPENDS = "virtual/libusb0" SRCNAME = "librfid" PV = "0.2.0+svnr${SRCREV}"
recipes/libusb/libusb-compat_0.0.9+0.1.0-beta2.bb +1 -0
@@ -3,6 +3,7 @@ access to USB devices." HOMEPAGE = "http://libusb.sf.net" SECTION = "libs" LICENSE = "LGPL" +PROVIDES = "virtual/libusb0" PE = "1" PR = "r0"
recipes/libusb/libusb-compat_0.1.0.bb +1 -0
@@ -3,6 +3,7 @@ access to USB devices." HOMEPAGE = "http://libusb.sf.net" SECTION = "libs" LICENSE = "LGPL" +PROVIDES = "virtual/libusb0" PE = "1" PR = "r0"
recipes/libusb/libusb-native_0.1.10a.bb +1 -0
@@ -1,4 +1,5 @@ require libusb_${PV}.bb inherit native +PROVIDES = "virtual/libusb0-native" FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libusb-0.1.10a"
recipes/libusb/libusb-native_0.1.12.bb +1 -1
@@ -1,3 +1,3 @@ require libusb_${PV}.bb inherit native - +PROVIDES = "virtual/libusb0-native"
recipes/libusb/libusb_0.0.0.bb +1 -1
@@ -24,4 +24,4 @@ the replacement for libusb." DEFAULT_PREFERENCE = "-1" -DEPENDS = "libusb-compat" +DEPENDS = "virtual/libusb0"
recipes/libusb/libusb_0.1.10a.bb +1 -0
@@ -2,6 +2,7 @@ DESCRIPTION = "libusb is a library to provide userspace \ access to USB devices." SECTION = "libs" LICENSE = "LGPL" +PROVIDES = "virtual/libusb0" PR = "r7" SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.gz \
recipes/libusb/libusb_0.1.12.bb +1 -0
@@ -3,6 +3,7 @@ access to USB devices." HOMEPAGE = "http://libusb.sf.net" SECTION = "libs" LICENSE = "LGPL" +PROVIDES = "virtual/libusb0" PR = "r3" SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.gz \
recipes/nut/nut_2.2.1.bb +1 -1
@@ -1,6 +1,6 @@ DESCRIPTION = "Network UPS Tools" LICENSE = "GPL" -DEPENDS = "libusb" +DEPENDS = "virtual/libusb0" PR = "r1" inherit autotools
recipes/obexftp/obexftp_0.22.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "OBEX Ftp Client based on openobex." SECTION = "console/network" HOMEPAGE = "http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp" LICENSE = "GPL" -DEPENDS = "openobex bluez-libs libusb virtual/libiconv" +DEPENDS = "openobex bluez-libs virtual/libusb0 virtual/libiconv" PR = "r0" SRC_URI = "${SOURCEFORGE_MIRROR}/openobex/obexftp-${PV}.tar.bz2 \
recipes/obexftp/obexftp_0.23.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "OBEX Ftp Client based on openobex." SECTION = "console/network" HOMEPAGE = "http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp" LICENSE = "GPL" -DEPENDS = "openobex bluez-libs libusb-compat virtual/libiconv" +DEPENDS = "openobex bluez-libs virtual/libusb0 virtual/libiconv" SRC_URI = "${SOURCEFORGE_MIRROR}/openobex/obexftp-${PV}.tar.bz2 \ "
recipes/openobex/openobex_1.2.bb +1 -1
@@ -3,7 +3,7 @@ Object Exchange (OBEX) protocol." HOMEPAGE = "http://openobex.triq.net" SECTION = "libs" PROVIDES = "openobex-apps" -DEPENDS = "libusb bluez-libs" +DEPENDS = "virtual/libusb0 bluez-libs" LICENSE = "GPL" PR = "r5"
recipes/openobex/openobex_1.3.bb +1 -1
@@ -3,7 +3,7 @@ Object Exchange (OBEX) protocol." HOMEPAGE = "http://openobex.triq.net" SECTION = "libs" PROVIDES = "openobex-apps" -DEPENDS = "libusb bluez-libs" +DEPENDS = "virtual/libusb0 bluez-libs" LICENSE = "GPL" PR = "r0"
recipes/openobex/openobex_1.5.bb +1 -1
@@ -3,7 +3,7 @@ Object Exchange (OBEX) protocol." HOMEPAGE = "http://openobex.triq.net" SECTION = "libs" PROVIDES = "openobex-apps" -DEPENDS = "libusb-compat bluez-libs" +DEPENDS = "virtual/libusb0 bluez-libs" LICENSE = "GPL" PR = "r1"
recipes/owfs/owfs_2.7p21.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.owfs.org/" SECTION = "console/network" PRIORITY = "optional" LICENSE = "GPLv2" -DEPENDS += "fuse libusb" +DEPENDS += "fuse virtual/libusb0" SRC_URI = "${SOURCEFORGE_MIRROR}/owfs/owfs-${PV}.tar.gz \ file://owhttpd \
recipes/python/python-pyusb_0.4.1.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "libusb Python Bindings" SECTION = "devel/python" PRIORITY = "optional" LICENSE = "BSD" -DEPENDS = "libusb" +DEPENDS = "virtual/libusb0" SRCNAME = "pyusb" PR = "r1"
recipes/samsung-soc-utils/s3c2410-boot-usb-native_svn.bb +1 -1
@@ -1,5 +1,5 @@ DESCRIPTION = "Boots a S3C2410 device with a user supplied kernel zImage" -DEPENDS = "libusb-native" +DEPENDS = "virtual/libusb0-native" SECTION = "devel" AUTHOR = "Harald Welte <[email protected]>" LICENSE = "GPL"
recipes/sane/sane-backends_1.0.19.bb +1 -1
@@ -1,5 +1,5 @@ DESCRIPTION = "Scanner drivers for SANE" -DEPENDS = "hal gphoto2 jpeg libusb" +DEPENDS = "hal gphoto2 jpeg virtual/libusb0" LICENSE = "LGPL" SRC_URI = "http://alioth.debian.org/frs/download.php/2318/sane-backends-${PV}.tar.gz \
recipes/sdr/hamlib_1.2.9.bb +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "The Ham Radio Control Libraries, Hamlib for short, is a development effort to provide a consistent interface for programmers wanting to incorporate radio control in their programs" LICENSE = "GPLv2" -DEPENDS = "swig-native perl python libusb-compat tcl gnuradio" +DEPENDS = "swig-native perl python virtual/libusb0 tcl gnuradio" SRC_URI = "${SOURCEFORGE_MIRROR}/hamlib/hamlib-${PV}.tar.gz"
recipes/usbpath/usbpath-native_svn.bb +1 -1
@@ -1,6 +1,6 @@ require usbpath_svn.bb inherit native -DEPENDS = "libusb-native" +DEPENDS = "virtual/libusb0-native" do_stage () { autotools_stage_all
recipes/usbpath/usbpath_svn.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "Convert the physical locations of a USB device to/from its number AUTHOR = "Werner Almesberger <[email protected]>" SECTION = "console/utils" LICENSE = "GPL" -DEPENDS = "libusb-compat" +DEPENDS = "virtual/libusb0" PV = "0.0+svnr${SRCREV}"
recipes/usbutils/usbutils_0.70.bb +1 -1
@@ -1,6 +1,6 @@ DESCRIPTION = "Host side USB console utilities." SECTION = "base" -DEPENDS += "libusb-compat" +DEPENDS += "virtual/libusb0" LICENSE = "GPL" PRIORITY = "optional" DEFAULT_PREFERENCE = "1"
recipes/usbutils/usbutils_0.73.bb +1 -1
@@ -1,6 +1,6 @@ DESCRIPTION = "Host side USB console utilities." SECTION = "base" -DEPENDS += "libusb-compat" +DEPENDS += "virtual/libusb0" LICENSE = "GPL" PRIORITY = "optional" DEFAULT_PREFERENCE = "1"
recipes/usbutils/usbutils_0.82.bb +1 -1
@@ -1,6 +1,6 @@ DESCRIPTION = "Host side USB console utilities." SECTION = "base" -DEPENDS += "libusb-compat" +DEPENDS += "virtual/libusb0" LICENSE = "GPL" PRIORITY = "optional"
recipes/usbutils/usbutils_cvs.bb +1 -1
@@ -1,6 +1,6 @@ DESCRIPTION = "Host side USB console utilities." SECTION = "base" -DEPENDS += "libusb-compat" +DEPENDS += "virtual/libusb0" LICENSE = "GPL" PRIORITY = "optional" PV = "0.71+cvs${SRCDATE}"
recipes/usrp/usrp_0.12.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "Support software for the Universal Software Radio Peripheral (USR LICENSE = "GPL" HOMEPAGE = "http://comsec.com/wiki?UniversalSoftwareRadioPeripheral" SECTION = "devel" -DEPENDS = "swig-native sdcc-native libusb-compat python boost" +DEPENDS = "swig-native sdcc-native virtual/libusb0 python boost" RDEPENDS = "python-core" PR = "r1"
Quoted 121 lines · Stanislav Brabec
Hallo.
I plan to submit attached patch to oe.dev to fix clash of libusb-compat and libusb in recipes by introduction of virtual/libusb0.
libusb-compat and libusb provide exactly the same API and ABI using a different back-end, and applications should work with both of them without recompilation.
After the commit, distro maintainers will be encouraged to set:
PREFERRED_PROVIDER_virtual/libusb0 = "libusb-compat"Following technical problems may happen with libusb0 applications:
- Application does not compile of fail on runtime linking with
libusb-compat: Badly written application (using internal functions etc.), application needs fix.
gnuradio is known to be affected.- Application does not work libusb-compat: Application depends on an obscure aspect of libusb behavior. Report it and help with debugging. With libusb-compat-1.0.2, there are no known defects of this type.
The commit will also remove hack recipes/libusb/libusb_0.0.0.bb.
conf/distro/angstrom-2008.1.conf +0
-0@@ -140,6 +140,7 @@ PREFERRED_PROVIDER_virtual/db ?= "db"PREFERRED_PROVIDER_virtual/db-native ?= "db-native" PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11" PREFERRED_PROVIDER_virtual/libx11 ?= "libx11" +PREFERRED_PROVIDER_virtual/libusb0 ?= "libusb-compat"
# Others:
PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"conf/distro/angstrom-2008.1.conf +0
-0@@ -158,6 +159,7 @@ PREFERRED_PROVIDER_bluez-utils-dbus = "bluez-utils"PREFERRED_PROVIDER_bluez-libs = "bluez4" PREFERRED_PROVIDER_bluez-utils = "bluez4"
+
# we don't ship gtk-directfb by default PREFERRED_PROVIDER_gtk+ ?= "gtk+" PREFERRED_PROVIDER_gdk-pixbuf-loader-ani ?= "gtk+"conf/distro/include/preferred-slugos-versions.inc +0
-6@@ -63,11 +63,5 @@ PREFERRED_VERSION_udev ?= "118" ##################### Stuff with special notes, and broken stuff: -# Hack alert - selecting this version of libusb effectively selects -# the use of libusb1 and libusb-compat in the case that something -# still depends on libusb. This is required because otherwise -# libusb will overwrite libusb-compat in staging. -PREFERRED_VERSION_libusb ?= "0.0.0" - # boost 1.36 won't buildPREFERRED_VERSION_boost ?= "1.33.1"
recipes/0xFFFF/0xffff-native_0.1.bb +0
-0@@ -1,6 +1,6 @@require 0xffff.inc
recipes/0xFFFF/0xffff-native_0.1.bb +1
-1-DEPENDS = "libusb-native" +DEPENDS = "virtual/libusb0-native"inherit native
recipes/0xFFFF/0xffff-native_0.2.bb +0
-0@@ -1,6 +1,6 @@require 0xffff.inc
recipes/0xFFFF/0xffff-native_0.2.bb +1
-1-DEPENDS = "libusb-native" +DEPENDS = "virtual/libusb0-native"inherit native
recipes/bluez/bluez-utils.inc +0
-0@@ -1,7 +1,7 @@DESCRIPTION = "Linux Bluetooth Stack Userland Utilities." SECTION = "console"
PRIORITY = "optional"recipes/bluez/bluez-utils.inc +1
-1-DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb-compat dbus cups" +DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} virtual/libusb0 dbus cups"PROVIDES = "bluez-utils-dbus"
RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus" RREPLACES = "bluez-utils-dbus"recipes/bluez/bluez-utils3.inc +0
-0@@ -1,7 +1,7 @@DESCRIPTION = "Linux Bluetooth Stack Userland Utilities." SECTION = "console"
PRIORITY = "optional"recipes/bluez/bluez-utils3.inc +1
-1-DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb-compat dbus glib-2.0" +DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} virtual/libusb0 dbus glib-2.0"PROVIDES = "bluez-utils-dbus"
RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus" RREPLACES = "bluez-utils-dbus"recipes/bluez/bluez.inc +0
-0@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.bluez.org"LICENSE = "GPL"
PR = "r0"recipes/bluez/bluez.inc +1
-1-DEPENDS = "gstreamer gst-plugins-base libusb1 dbus glib-2.0" +DEPENDS = "gstreamer gst-plugins-base virtual/libusb0 dbus glib-2.0"
Quoted 3 lines
PROVIDES = "bluez-utils-dbus"
RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus" RREPLACES = "bluez-utils-dbus"
This is wrong. libusb0 does not replace libusb1.
It's worth noting that this could be done in a much less intrusive way.
In libusb-compat:
PROVIDES += "libusb"
In libusb:DEFAULT_PREFERENCE = "-1", or just set the PREFERRED_PROVIDER_libusb = "libusb-compat" in the distros. Could also PROVIDES += "libusb0" or PROVIDES += "libusb-old" or something, to let recipes explicitly depend on the old one, though that's a bad thing to be doing.
Signature · 7 lines
Chris Larson clarson at kergoth dot com clarson at mvista dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Software Engineer MontaVista Software, Inc.
Quoted 3 lines · Chris Larson
+++ b/recipes/bluez/bluez.inc
Quoted 1 line
+DEPENDS = "gstreamer gst-plugins-base virtual/libusb0 dbus glib-2.0"
This is wrong. libusb0 does not replace libusb1.
It was an attempt to make unrelated fix. bluez.inc is actually required only by bluez-hcidump_1.42.bb. And bluez-hcidump_1.42.bb does not require libusb at all (or at least not directly). So in fact it should be probably removed completely.
Quoted 8 lines
It's worth noting that this could be done in a much less intrusive way.
In libusb-compat:
PROVIDES += "libusb"In libusb:
DEFAULT_PREFERENCE= "-1", or just set thePREFERRED_PROVIDER_libusb= "libusb-compat" in the distros.
I didn't know that DEFAULT_PREFERENCE_distroname is possible. But if this will work and allow distro maintainers to select one of another, then it may be used as well. But I still think that distro config is a more convenient way.
Quoted 3 lines
Could also PROVIDES += "libusb0" or
PROVIDES += "libusb-old" or something, to let recipes explicitly depend on the old one, though that's a bad thing to be doing.
Once your staging contains libusb-compat, none of your packages can depend on libusb (-old). Their staging files conflict and one replaces another during the build resulting in compilations against a random one.
It's one or another and distro maintainer must decide, which one to use for everything.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
Quoted 9 lines · Stanislav Brabec
Quoted 3 lines · Chris Larson
+++ b/recipes/bluez/bluez.inc
Quoted 1 line
+DEPENDS = "gstreamer gst-plugins-base virtual/libusb0 dbus glib-2.0"
This is wrong. libusb0 does not replace libusb1.
It was an attempt to make unrelated fix. bluez.inc is actually required only by bluez-hcidump_1.42.bb. And bluez-hcidump_1.42.bb does not require libusb at all (or at least not directly). So in fact it should be probably removed completely.
Understood.
Quoted 5 lines
Quoted 5 lines
It's worth noting that this could be done in a much less intrusive way.
In libusb-compat:
PROVIDES += "libusb"
Quoted 8 lines
Quoted 3 lines
In libusb:
DEFAULT_PREFERENCE= "-1", or just set thePREFERRED_PROVIDER_libusb= "libusb-compat" in the distros.I didn't know that
DEFAULT_PREFERENCE_distronameis possible. But if this will work and allow distro maintainers to select one of another, then it may be used as well. But I still think that distro config is a more convenient way.
DEFAULT_PREFERENCE is just default behavior when no PREFERRED_PROVIDER is set by the distro. I'm just pointing out that you could use "libusb" rather than "virtual/libusb0", and avoid having to change the multitude of recipes.
Signature · 7 lines
Chris Larson clarson at kergoth dot com clarson at mvista dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Software Engineer MontaVista Software, Inc.
Quoted 2 lines · Chris Larson
DEFAULT_PREFERENCEis just default behavior when noPREFERRED_PROVIDERis set by the distro.
I just tested it without any of DEFAULT_PREFERENCE nor PREFERRED_PROVIDER. It defaults to the old libusb.
With setting of PREFERRED_PROVIDER_virtual/libusb0 ?= "libusb-compat" in the angstrom distro config, it uses to libusb-compat (but just only for angstrom).
When I remove this line from the distro config and set DEFAULT_PREFERENCE = "-1" to all old libusb recipes (and even setting DEFAULT_PREFERENCE = "1" in libusb-compat), it still populates old libusb instead of expected libusb-compat (using the virtual requires from the patch above).
Maybe it compares version number and makes bad assumption that libusb-0.1.12 > libusb-compat-0.1.0.
I would like to encourage everybody to use new libusb-compat, unless configured opposite... I am not sure how to do it. Is there any default config for default values of PREFERRED_PROVIDER?
Quoted 3 lines
I'm just pointing out that you could use
"libusb" rather than "virtual/libusb0", and avoid having to change the multitude of recipes.
It would not avoid it. Some of recipes use libusb, some of them use libusb-compat, both want just any libusb0. It caused building both and moving one to morgue just after the build of the feed.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
Quoted 4 lines · Stanislav Brabec
Quoted 2 lines · Chris Larson
DEFAULT_PREFERENCEis just default behavior when noPREFERRED_PROVIDERis set by the distro.
It seems that it is not true. First in order it selects ordered package name list for the requirement (using only PREFERRED_PROVIDER), second in order it decides about best version for each package name (using DEFAULT_PREFERENCE and PREFERRED_VERSION variables). When no explicit dependence or conflict is found, best version for the package first in order will be selected.
It seems that virtual/libusb0 is much cleaner solution than the current libusb-0.0.0 (which did not work correctly).
Quoted 5 lines
When I remove this line from the distro config and set
DEFAULT_PREFERENCE= "-1" to all old libusb recipes (and even settingDEFAULT_PREFERENCE= "1" in libusb-compat), it still populates old libusb instead of expected libusb-compat (using the virtual requires from the patch above).
The above may explain this behavior:
DEBUG: Added dependency virtual/libusb0 for /OE/openembedded/recipes/usbutils/usbutils_0.82.bb
DEBUG: Added dependency virtual/libusb0 for /OE/openembedded/recipes/bluez/bluez4_4.42.bb
DEBUG: providers for virtual/libusb0 are: ['libusb', 'libusb-compat']
DEBUG: sorted providers for virtual/libusb0 are: ['/OE/openembedded/recipes/libusb/libusb_0.1.12.bb', '/OE/openembedded/recipes/libusb/libusb-compat_0.1.0.bb']
NOTE: multiple providers are available for virtual/libusb0 (libusb, libusb-compat);
NOTE: consider defining PREFERRED_PROVIDER_virtual/libusb0
DEBUG: adding /OE/openembedded/recipes/libusb/libusb_0.1.12.bb to satisfy virtual/libusb0
Signature · 2 lines
Stanislav Brabec http://www.penguin.cz/~utx/zaurus
Quoted 6 lines · Stanislav Brabec
Quoted 4 lines · Stanislav Brabec
Quoted 2 lines · Chris Larson
DEFAULT_PREFERENCEis just default behavior when noPREFERRED_PROVIDERis set by the distro.
Quoted 6 lines
It seems that it is not true. First in order it selects ordered package name list for the requirement (using only
PREFERRED_PROVIDER), second in order it decides about best version for each package name (usingDEFAULT_PREFERENCEandPREFERRED_VERSIONvariables). When no explicit dependence or conflict is found, best version for the package first in order will be selected.
Aye, good catch. It seems that it always prefers the recipe whose PN is the same as the provider even when there are DEFAULT_PREFERENCE's in either direction in the recipes that provide it. This seems like a bug to me.
Signature · 5 lines
Chris Larson Software Engineer MontaVista Software, Inc. Email: clarson AT mvista DOT com Email: clarson AT kergoth DOT com
Quoted 8 lines · Stanislav Brabec
Hallo.
I plan to submit attached patch to oe.dev to fix clash of libusb-compat and libusb in recipes by introduction of virtual/libusb0.
libusb-compat and libusb provide exactly the same API and ABI using a different back-end, and applications should work with both of them without recompilation.
Why not statically link in the old libusb0 to those broken apps? We do that for gnuradio (in a hacky way, but it can be made generic) and it works well.
regards,
Koen
Quoted 7 lines · Koen Kooi
Quoted 3 lines
libusb-compat and libusb provide exactly the same API and ABI using a different back-end, and applications should work with both of them without recompilation.
Why not statically link in the old libusb0 to those broken apps? We do that for gnuradio (in a hacky way, but it can be made generic) and it works well.
Reverting to libusb-0 (even statically linked) is a quick fix. Debugging of libusb-compat, fixing it and sending patch upstream is a correct way.
Up to now it worked in all cases except gnuradio, which uses internal functions of libusb-0. All other applications should work with libusb-compat and no static linking should be needed.
Maybe few years from now on we can drop libusb-0 recipes completely (and keep gnuradio with statically linked old library maybe forever) altogether with the virtual. Now it is useful for quick fixing and for debugging of problems of libusb-compat.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
Quoted 11 lines · Stanislav Brabec
Quoted 4 lines · Koen Kooi
Quoted 3 lines
libusb-compat and libusb provide exactly the same API and ABI using a different back-end, and applications should work with both of them without recompilation.
Why not statically link in the old libusb0 to those broken apps? We do that for gnuradio (in a hacky way, but it can be made generic) and it works well.
Reverting to libusb-0 (even statically linked) is a quick fix. Debugging of libusb-compat, fixing it and sending patch upstream is a correct way.
Quoted 8 lines
Up to now it worked in all cases except gnuradio, which uses internal functions of libusb-0. All other applications should work with libusb-compat and no static linking should be needed.
Maybe few years from now on we can drop libusb-0 recipes completely (and keep gnuradio with statically linked old library maybe forever) altogether with the virtual. Now it is useful for quick fixing and for debugging of problems of libusb-compat.
I would love to see gnuradio use libusb1 or something. Until mainstream distros go libusb1 + libusb-compat, there is not much motivation to resolve the issue in gnuradio. I have looked at the code, and going to statically linked route was the least time consuming solution.
Basically, I want to do actual interesting work, and not hack arounf at the usb layer :)
Phiip
Quoted 11 lines · Koen Kooi
Quoted 8 lines · Stanislav Brabec
Hallo.
I plan to submit attached patch to oe.dev to fix clash of libusb-compat and libusb in recipes by introduction of virtual/libusb0.
libusb-compat and libusb provide exactly the same API and ABI using a different back-end, and applications should work with both of them without recompilation.
Why not statically link in the old libusb0 to those broken apps? We do that for gnuradio (in a hacky way, but it can be made generic) and it works well.
+1
We have made gnuradio build with a private copy of libusb-0.12 and it is staically linked against this copy. Further clubbing was needed to stop libtool trying to link apps that used the USRP from linking to the library.
I think there are only a small handful of apps that do not use the public libusb interface.
Do you have a specific package you are having issues with? Take a look at the gnuradio.inc file to see how we solved the problem there.
Philip
PS: By solved I mean it builds, I had to leave for Linuxtag before I could test extensively :)
Philip Balister wrote:
Quoted 3 lines
Until mainstream
distros go libusb1 + libusb-compat, there is not much motivation to resolve the issue in gnuradio.
openSUSE 11.2 will probably do it.
Quoted 5 lines
I think there are only a small handful of apps that do not use the public libusb interface.
Do you have a specific package you are having issues with? Take a look at the gnuradio.inc file to see how we solved the problem there.
I did never touch gnuradio, but I seen mails in the list.
There were problems in past with libusb-compat and:
gphoto, f-spot: Problems were fixed before libusb-compat-0.1.0.
gpsbabel + Garmin GPS = depended on undocumented libusb0 USB endpoint direction sanitization. Fixed in libusb-compat-0.1.1.
gphoto + no USB subsystem: Crash after initialization failure. Fixed in libusb-compat-0.1.2.
There are no known issues with libusb-compat-0.1.2 yet.
To resume my plan:
Introduce virtual/libusb0 for now and set is as default to libusb-compat.
When all problems of libusb-compat will be fixed, drop libusb-0 completely and optionally replace virtual/libusb0 by libusb-compat.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus