libmtp-dev dependency issue on kfreebsd

2013-11-17 Thread Modestas Vainius
Control: reassign -1 libmtp-dev 1.1.6-20-g1b9f164-1

Hello,

Ketvirtadienis 14 Lapkritis 2013 03:12:20 rašė:
> Package: libgphoto2-2-dev
> Version: 2.4.14-2.3
> Severity: serious
> Tags: patch
> User: debian-bsd@lists.debian.org
> Usertags: kfreebsd
> Control: block 725951 by -1
> 
> Hi,
> 
> The recent change to the libusb dependency of libgphoto2-2-dev created
> an odd problem on kfreebsd when trying to build gvfs:
> 
> https://buildd.debian.org/status/package.php?p=gvfs
> 
> > gvfs build-depends on:
> > - libgphoto2-2-dev (>= 2.4.0)
> > libgphoto2-2-dev depends on:
> > - libusb-1.0-0-dev | --virtual-libusb-1.0-0-dev
> > gvfs build-depends on:
> > - libmtp-dev (>= 1.1.0)
> > libmtp-dev depends on:
> > - libusb-dev
> > libusb2-dev conflicts with:
> > - libusb-dev
> 
> kfreebsd has its own libusb-dev different from the implementations
> available on linux. 

I wouldn't be so sure that libgphoto2 is the one which needs to be fixed. In 
my opinion, here libmtp-dev does the wrong thing. libusb-1.0 home page[1] 
says:

-
FreeBSD 8 and above include a FreeBSD-specific reimplementation of the 
libusb-1.0 API, so your applications will probably work there too. The source 
code for this library can be found ​here. 
-

Having in mind that libusb-0.1 is deprecated, it seems that the whole libusb* 
packaging structure (i.e. libusb-1.0-0-dev virtual package on kFreeBSD) in 
Debian is meant to establish that libusbx should be used on Linux while 
libusb2 from freebsd-libs should be used on kFreeBSD. I might be wrong so I'm 
also CC'ing libusbx and kFreeBSD maintainers. I will reassign the bug back to 
libgphoto2-2-dev if that's the case.

So the attached patch once applied against libmtp would also solve the 
problem. I have verified that resulting libmtp actually builds on both 
kfreebsd-amd64/sid and linux-amd64/sid. I haven't checked that it works on 
kfreebsd-amd64 though but very likely it is safe to assume that it would.


[1] http://www.libusb.org/wiki/libusb-1.0

-- 
Modestas Vainius diff -Nru libmtp-1.1.6-20-g1b9f164/debian/changelog libmtp-1.1.6-20-g1b9f164/debian/changelog
--- libmtp-1.1.6-20-g1b9f164/debian/changelog	2013-08-23 11:22:41.0 +0300
+++ libmtp-1.1.6-20-g1b9f164/debian/changelog	2013-11-17 18:04:40.0 +0200
@@ -1,3 +1,9 @@
+libmtp (1.1.6-20-g1b9f164-1.1) UNRELEASED; urgency=low
+
+  * Build against libusb2 on kfreebsd-any. (Closes: #729545)
+
+ -- Modestas Vainius   Sun, 17 Nov 2013 14:37:35 +
+
 libmtp (1.1.6-20-g1b9f164-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru libmtp-1.1.6-20-g1b9f164/debian/control libmtp-1.1.6-20-g1b9f164/debian/control
--- libmtp-1.1.6-20-g1b9f164/debian/control	2013-08-23 11:21:28.0 +0300
+++ libmtp-1.1.6-20-g1b9f164/debian/control	2013-11-17 18:04:40.0 +0200
@@ -13,8 +13,8 @@
  dpkg-dev (>= 1.13.19),
  gnulib,
  libgcrypt11-dev,
- libusb-1.0-0-dev [linux-any],
- libusb-dev [!linux-any],
+ libusb-1.0-0-dev [!hurd-i386],
+ libusb-dev [hurd-i386],
  lsb-release,
  pkg-config,
  xsltproc
@@ -96,8 +96,8 @@
 Architecture: any
 Depends:
  libmtp9 (= ${binary:Version}),
- libusb-1.0-0-dev [linux-any],
- libusb-dev [!linux-any],
+ libusb-1.0-0-dev [!hurd-i386],
+ libusb-dev [hurd-i386],
  ${misc:Depends}
 Multi-Arch: same
 Description: Media Transfer Protocol (MTP) development files
diff -Nru libmtp-1.1.6-20-g1b9f164/debian/control.in libmtp-1.1.6-20-g1b9f164/debian/control.in
--- libmtp-1.1.6-20-g1b9f164/debian/control.in	2013-08-23 11:20:52.0 +0300
+++ libmtp-1.1.6-20-g1b9f164/debian/control.in	2013-11-17 18:20:37.0 +0200
@@ -13,8 +13,8 @@
  dpkg-dev (>= 1.13.19),
  gnulib,
  libgcrypt11-dev,
- libusb-1.0-0-dev [linux-any],
- libusb-dev [!linux-any],
+ libusb-1.0-0-dev [!hurd-i386],
+ libusb-dev [hurd-i386],
  lsb-release,
  pkg-config,
  xsltproc
@@ -96,8 +96,8 @@
 Architecture: any
 Depends:
  libmtp@SOVERSION@ (= ${binary:Version}),
- libusb-1.0-0-dev [linux-any],
- libusb-dev [!linux-any],
+ libusb-1.0-0-dev [!hurd-i386],
+ libusb-dev [hurd-i386],
  ${misc:Depends}
 Multi-Arch: same
 Description: Media Transfer Protocol (MTP) development files
diff -Nru libmtp-1.1.6-20-g1b9f164/debian/patches/kfreebsd_libusb2.patch libmtp-1.1.6-20-g1b9f164/debian/patches/kfreebsd_libusb2.patch
--- libmtp-1.1.6-20-g1b9f164/debian/patches/kfreebsd_libusb2.patch	1970-01-01 03:00:00.0 +0300
+++ libmtp-1.1.6-20-g1b9f164/debian/patches/kfreebsd_libusb2.patch	2013-11-17 18:04:40.0 +0200
@@ -0,0 +1,17 @@
+Description: Make libmtp built against libusb2-dev on kFreeBSD
+Author: Modestas Vainius 
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729545
+Origin: vendor
+Last-Update: 2013-11-17
+
+--- libmtp-1.1.6-20-g1b9f164.orig/src/libusb-glue.h
 libmtp-1.1.6-20-g1b9f164/src/libusb-glue.h
+@@ -32,7 +32,7 @@
+ 
+ #include "ptp.h"
+ #ifdef HAVE_LIBUSB1
+-#in

Re: libmtp-dev dependency issue on kfreebsd

2013-11-17 Thread Steven Chamberlain
Hi,

On 17/11/13 16:27, Modestas Vainius wrote:
> Having in mind that libusb-0.1 is deprecated, it seems that the whole libusb* 
> packaging structure (i.e. libusb-1.0-0-dev virtual package on kFreeBSD) in 
> Debian is meant to establish that libusbx should be used on Linux while 
> libusb2 from freebsd-libs should be used on kFreeBSD.

This seems reasonable to me.  But it is an odd situation, that
libgphoto2 moving to libusb2 requires that unrelated package libmtp (and
perhaps others?) does the same.

Usual debcheck installability checks did not see this issue, but it is
identified here (updated nightly) or by using the relevant tools:
http://bootstrap.debian.net/kfreebsd-amd64/log.txt

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org



signature.asc
Description: OpenPGP digital signature


Re: libmtp-dev dependency issue on kfreebsd

2013-11-17 Thread Aurelien Jarno
On Sun, Nov 17, 2013 at 06:27:54PM +0200, Modestas Vainius wrote:
> Control: reassign -1 libmtp-dev 1.1.6-20-g1b9f164-1
> 
> Hello,
> 
> Ketvirtadienis 14 Lapkritis 2013 03:12:20 rašė:
> > Package: libgphoto2-2-dev
> > Version: 2.4.14-2.3
> > Severity: serious
> > Tags: patch
> > User: debian-bsd@lists.debian.org
> > Usertags: kfreebsd
> > Control: block 725951 by -1
> > 
> > Hi,
> > 
> > The recent change to the libusb dependency of libgphoto2-2-dev created
> > an odd problem on kfreebsd when trying to build gvfs:
> > 
> > https://buildd.debian.org/status/package.php?p=gvfs
> > 
> > > gvfs build-depends on:
> > > - libgphoto2-2-dev (>= 2.4.0)
> > > libgphoto2-2-dev depends on:
> > > - libusb-1.0-0-dev | --virtual-libusb-1.0-0-dev
> > > gvfs build-depends on:
> > > - libmtp-dev (>= 1.1.0)
> > > libmtp-dev depends on:
> > > - libusb-dev
> > > libusb2-dev conflicts with:
> > > - libusb-dev
> > 
> > kfreebsd has its own libusb-dev different from the implementations
> > available on linux. 
> 
> I wouldn't be so sure that libgphoto2 is the one which needs to be fixed. In 
> my opinion, here libmtp-dev does the wrong thing. libusb-1.0 home page[1] 
> says:
> 
> -
> FreeBSD 8 and above include a FreeBSD-specific reimplementation of the 
> libusb-1.0 API, so your applications will probably work there too. The source 
> code for this library can be found ​here. 
> -
> 
> Having in mind that libusb-0.1 is deprecated, it seems that the whole libusb* 
> packaging structure (i.e. libusb-1.0-0-dev virtual package on kFreeBSD) in 
> Debian is meant to establish that libusbx should be used on Linux while 
> libusb2 from freebsd-libs should be used on kFreeBSD. I might be wrong so I'm 
> also CC'ing libusbx and kFreeBSD maintainers. I will reassign the bug back to 
> libgphoto2-2-dev if that's the case.

This is exactly what I suggested in bug #729249.

-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131117165612.gv18...@hall.aurel32.net



Re: libmtp-dev dependency issue on kfreebsd

2013-11-17 Thread Markus Koschany
> On Sun, Nov 17, 2013 at 06:27:54PM +0200, Modestas Vainius wrote:
[...]
>> I wouldn't be so sure that libgphoto2 is the one which needs to be fixed. In 
>> my opinion, here libmtp-dev does the wrong thing. 

I prepared the last NMU for libgphoto2 because we ran into a similar
issue with sane-backends back then. I agree that libmtp-dev needs to be
fixed too. However I also think that the dependency on libusbx/libusb2
can be dropped completely from libgphot2-2-dev because the reason for
that, described in #407108, no longer holds true.

See also http://bugs.debian.org/717914, that libgphoto2-2-dev should not
depend on libusb-1.0-0-dev anymore.

Regards,

Markus




signature.asc
Description: OpenPGP digital signature