Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-17 Thread Liang Guo
On Wed, Aug 17, 2011 at 5:33 AM, Michael Tokarev m...@tls.msk.ru wrote:

 We'll need to list all the rest in build-depends too, and update
 it every time upstream will pick something else as needlessly as
 it is now.  In particular, currently it's libssl-dev (right version) --
 provided we patched out various other X bits.  With this particular
 user - qemu-kvm - it so happens that libssl-dev gets pulled too,
 unlike libpixmap, so there's no issue here.  For other package that
 will try to use libspice, there will be yet another bug of the same
 nature but due to missing libssl-dev dependency.

 The problem is to have real dependencies - both build- and run-tme,
 no less (to avoid bugs like this) and no more (to avoid pulling
 whole archive just to install a random binary).

It looks like the better solution is:

1 move  pixman-1 = 0.17.7 celt051 = 0.5.1.1 openssl to
Requires.private in spice-server.pc
2 keep libpixman-1-dev (= 0.17.7~), libssl-dev in depends control file field

The disadvantage is libpixman-1-dev (= 0.17.7~), libssl-dev need be
downloaded.

What's your opinion ?

Actually I think removing pixman-1 = 0.17.7  openssl from Requires is
acceptable too,
qemu/qemu-kvm don't use staticially link at all, and no other program
calls spice.

Thanks,
-- 
Liang Guo
http://bluestone.cublog.cn



--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-17 Thread Julien Cristau
On Wed, Aug 17, 2011 at 01:33:28 +0400, Michael Tokarev wrote:

 17.08.2011 01:24, Julien Cristau wrote:
  On Wed, Aug 17, 2011 at 00:59:36 +0400, Michael Tokarev wrote:
  17.08.2011 00:46, Julien Cristau wrote:
 
  Even with Requires.private you'll need the corresponding -dev packages
  in Depends, because pkg-config will look for them for --cflags, just not
  --libs.
 
  You're right, it complains without libpixman-1-dev too, just as before.
 []
  What problem are you trying to solve that doesn't go away with Depends:
  libpixman-1-dev?
 
 We'll need to list all the rest in build-depends too, and update
 it every time upstream will pick something else as needlessly as
 it is now.  In particular, currently it's libssl-dev (right version) --
 provided we patched out various other X bits.  With this particular
 user - qemu-kvm - it so happens that libssl-dev gets pulled too,
 unlike libpixmap, so there's no issue here.  For other package that
 will try to use libspice, there will be yet another bug of the same
 nature but due to missing libssl-dev dependency.
 
 The problem is to have real dependencies - both build- and run-tme,
 no less (to avoid bugs like this) and no more (to avoid pulling
 whole archive just to install a random binary).
 
I have no idea what you're trying to say here, sorry.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-17 Thread Michael Tokarev
17.08.2011 12:16, Liang Guo wrote:
 On Wed, Aug 17, 2011 at 5:33 AM, Michael Tokarev m...@tls.msk.ru wrote:

 We'll need to list all the rest in build-depends too, and update
 it every time upstream will pick something else as needlessly as
 it is now.  In particular, currently it's libssl-dev (right version) --
 provided we patched out various other X bits.  With this particular
 user - qemu-kvm - it so happens that libssl-dev gets pulled too,
 unlike libpixmap, so there's no issue here.  For other package that
 will try to use libspice, there will be yet another bug of the same
 nature but due to missing libssl-dev dependency.

 The problem is to have real dependencies - both build- and run-tme,
 no less (to avoid bugs like this) and no more (to avoid pulling
 whole archive just to install a random binary).

 It looks like the better solution is:
 
 1 move  pixman-1 = 0.17.7 celt051 = 0.5.1.1 openssl to
 Requires.private in spice-server.pc
 2 keep libpixman-1-dev (= 0.17.7~), libssl-dev in depends control file field
 
 The disadvantage is libpixman-1-dev (= 0.17.7~), libssl-dev need be
 downloaded.
 
 What's your opinion ?

That's the best approach so far, yes.

 Actually I think removing pixman-1 = 0.17.7  openssl from Requires is
 acceptable too,
 qemu/qemu-kvm don't use staticially link at all, and no other program
 calls spice.

while qemu/qemu-kvm does not, it calls pkg-config, which, in case
any of packages listed in Requires: or Requires.private: variables
are missing, complains, just like in my initial bugreport.  This is
true for pkg-config --cflags, which is used by qemu.

So the final solution is to keep libssl-dev and libpixman-dev as
build dependencies (and watch for versions!), move the dependent
packages to Requires.private, and stop depending on extra stuff.

Now, can someone tell me what problem pkg-config is trying to _solve_ ? :)
(Kidding really, I know it's helpful when installing from sources
using upstream makefiles directly, for example).

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-17 Thread Liang Guo
On Wed, Aug 17, 2011 at 4:22 PM, Michael Tokarev m...@tls.msk.ru wrote:
 17.08.2011 12:16, Liang Guo wrote:
 It looks like the better solution is:

 1 move  pixman-1 = 0.17.7 celt051 = 0.5.1.1 openssl to
 Requires.private in spice-server.pc
 2 keep libpixman-1-dev (= 0.17.7~), libssl-dev in depends control file field

 The disadvantage is libpixman-1-dev (= 0.17.7~), libssl-dev need be
 downloaded.

 What's your opinion ?

 That's the best approach so far, yes.

 Actually I think removing pixman-1 = 0.17.7  openssl from Requires is
 acceptable too,
 qemu/qemu-kvm don't use staticially link at all, and no other program
 calls spice.

 while qemu/qemu-kvm does not, it calls pkg-config, which, in case
 any of packages listed in Requires: or Requires.private: variables
 are missing, complains, just like in my initial bugreport.  This is
 true for pkg-config --cflags, which is used by qemu.

 So the final solution is to keep libssl-dev and libpixman-dev as
 build dependencies (and watch for versions!), move the dependent
 packages to Requires.private, and stop depending on extra stuff.

 Now, can someone tell me what problem pkg-config is trying to _solve_ ? :)
 (Kidding really, I know it's helpful when installing from sources
 using upstream makefiles directly, for example).

 /mjt

I've pushed changes to git.d.o, and re-uploaded spice to mentors.d.n,

Would you like review it ?

Thanks,

-- 
Liang Guo
http://bluestone.cublog.cn



--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-16 Thread Michael Tokarev
16.08.2011 11:50, Liang Guo wrote:
 Hi, Michael,
 
 On Wed, Aug 10, 2011 at 5:49 AM, Michael Tokarev m...@tls.msk.ru wrote:
 09.08.2011 14:26, Michael Tokarev wrote:
 []
 There are other dependencies too, like alsa openssl xrandr etc,
 but I haven't checked these.

 See also 
 http://cgit.freedesktop.org/spice/spice/commit/?h=0.8id=54c660470a5aea19f799c5574cc0d4a707696712
  --
 this is actually a bugfix, -- spice .pc file unnecessary includes alsa which
 pulls its own set of include dirs, which contains, among other things,
 file named error.h.  Which clashes with local (in another package
 using spice) file of the same name.  So that qemu 0.15 does not
 build with spice 0.8.2 for example:

 http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg00417.html
 http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg00617.html

 /mjt
 I've asked Kilian to sponsor my new spice 0.8.2-2,
 
 In this upload, libpixman-1-dev (= 0.17.7~) and libssl-dev is added to
 libspice-server-dev's Depends field. alsa and other unused x11 Requires
 are removed.

And this is, actually, wrong.  The original issue, incorrectly diagnosed
by me in this bugreport, is that spice people use Requires: pkg-config
variable to declare inter-library dependencies, while they should use
Requires.private instead.  It is the development files of libpixman,
libssl etc are not needed to build applications against lispice-server,
unless you want to have static build (in which case all inter-dependent
libraries are also needed, and that's where Requires.private pkg-config
variable comes into play).

So the problem actually is the wrong pkg-config dependencies, not debian
package dependencies, due to wrong upstream usage of pkg-config.

So I went on and corrected the mess.  Here's the difference:


commit 805ace942c4ab731c231ff4497bf3093a8b8ce0e
Author: Michael Tokarev m...@tls.msk.ru
Date:   Tue Aug 16 15:53:44 2011 +0400

move libspice-server interdependencies to Requires.private pkgconfig 
variable and remove extra dependencies for -dev package

diff --git a/debian/changelog b/debian/changelog
index 9aa49fe..ff8ca0b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,10 @@
 spice (0.8.2-2) unstable; urgency=low

-  * Add libpixman-1-dev and libssl-dev to libspice-server1
-Depends (Closes: #637189)
+  [ Michael Tokarev ]
+  * move libraries used internally by libspice-server from Requires
+to Requires.private in pkg-config file (Closes: #637189)
+
+  [ Liang Guo ]
   * Remove alsa, xrandr, xfixes, x11, xext and xrender
 from spice-server.pc Requires
   * Fix typo in debian/spicec.1
diff --git a/debian/control b/debian/control
index 93efec1..b95b784 100644
--- a/debian/control
+++ b/debian/control
@@ -49,7 +49,7 @@ Description: Implements the server side of the SPICE protocol
 Package: libspice-server-dev
 Section: libdevel
 Architecture: i386 amd64
-Depends: libspice-server1 (= ${binary:Version}), ${misc:Depends}, 
libpixman-1-dev (= 0.17.7~), libssl-dev
+Depends: libspice-server1 (= ${binary:Version}), ${misc:Depends}
 Suggests: pkg-config
 Description: Header files and development documentation for spice-server
  The Simple Protocol for Independent Computing Environments (SPICE) is
diff --git a/debian/patches/series b/debian/patches/series
index 95650d5..252b3d0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 fix-typo-in-record-cpp.patch
 fix-typo-in-cmd_line_parser-cpp.patch
 drop-unnecessary-build-request.patch
+use-requires-private-for-libspice-pkgconfig.patch
diff --git a/debian/patches/use-requires-private-for-libspice-pkgconfig.patch 
b/debian/patches/use-requires-private-for-libspice-pkgconfig.patch
new file mode 100644
index 000..3d67550
--- /dev/null
+++ b/debian/patches/use-requires-private-for-libspice-pkgconfig.patch
@@ -0,0 +1,14 @@
+Use Requires.private pkg-config variable instead of Requires
+for internal libspice-server libraries.
+
+--- spice.orig/spice-server.pc.in
 spice/spice-server.pc.in
+@@ -7,7 +7,7 @@
+ Description: SPICE server library
+ Version: @VERSION@
+
+-Requires: @SPICE_REQUIRES@
++Requires.private: @SPICE_REQUIRES@
+ Libs: -L${libdir} -lspice-server
+ Libs.private: @SPICE_NONPKGCONFIG_LIBS@
+ Cflags: -I${includedir}/spice-server


I also pushed this change to collab-maint git tree, to a
branch named mjt - you can use `git remote update' followed
by 'git pull origin mjt' to fetch it directly using git if you
like.

 To compile qemu/qemu-kvm with spice-support, please add
 libspice-server-dev (= 0.8.2-2), libspice-protocol-dev to build
 depends, and --enable-spice to configure option.

That works, but introduces a ton of needlessly linked-to
libraries, due to the reason described above.

 Actually, IMO, libspice-server-dev don't directly use  libpixman-1-dev
 and libssl-dev, they should be removed too.

No, they _are_ used internally by libspice-server - if you by a
chance will want to link some application 

Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-16 Thread Julien Cristau
On Tue, Aug 16, 2011 at 15:59:32 +0400, Michael Tokarev wrote:

 16.08.2011 11:50, Liang Guo wrote:
  Hi, Michael,
  
  On Wed, Aug 10, 2011 at 5:49 AM, Michael Tokarev m...@tls.msk.ru wrote:
  09.08.2011 14:26, Michael Tokarev wrote:
  []
  There are other dependencies too, like alsa openssl xrandr etc,
  but I haven't checked these.
 
  See also 
  http://cgit.freedesktop.org/spice/spice/commit/?h=0.8id=54c660470a5aea19f799c5574cc0d4a707696712
   --
  this is actually a bugfix, -- spice .pc file unnecessary includes alsa 
  which
  pulls its own set of include dirs, which contains, among other things,
  file named error.h.  Which clashes with local (in another package
  using spice) file of the same name.  So that qemu 0.15 does not
  build with spice 0.8.2 for example:
 
  http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg00417.html
  http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg00617.html
 
  /mjt
  I've asked Kilian to sponsor my new spice 0.8.2-2,
  
  In this upload, libpixman-1-dev (= 0.17.7~) and libssl-dev is added to
  libspice-server-dev's Depends field. alsa and other unused x11 Requires
  are removed.
 
 And this is, actually, wrong.  The original issue, incorrectly diagnosed
 by me in this bugreport, is that spice people use Requires: pkg-config
 variable to declare inter-library dependencies, while they should use
 Requires.private instead.  It is the development files of libpixman,
 libssl etc are not needed to build applications against lispice-server,
 unless you want to have static build (in which case all inter-dependent
 libraries are also needed, and that's where Requires.private pkg-config
 variable comes into play).
 
 So the problem actually is the wrong pkg-config dependencies, not debian
 package dependencies, due to wrong upstream usage of pkg-config.
 
 So I went on and corrected the mess.  Here's the difference:
 
Even with Requires.private you'll need the corresponding -dev packages
in Depends, because pkg-config will look for them for --cflags, just not
--libs.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-16 Thread Michael Tokarev
17.08.2011 00:46, Julien Cristau wrote:

 Even with Requires.private you'll need the corresponding -dev packages
 in Depends, because pkg-config will look for them for --cflags, just not
 --libs.

You're right, it complains without libpixman-1-dev too, just as before.

It looks like it may be better to patch away pkg-config usage
in the dependent packages instead... ;)

So, what is the right way here, having in mind that - in this
particular example - pixman isn't used except of a an inter-
dependent library?  It looks like the upstream should switch
from

  Requires: $pkg

(or as my wrong attempt, Requires.private) to

  libs.private: $(pkg-config --libs $pkg)

with some way of handling -L options, right?  Is there some
good document outlining all this pkg-config best practices?

Thanks,

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-16 Thread Julien Cristau
On Wed, Aug 17, 2011 at 00:59:36 +0400, Michael Tokarev wrote:

 17.08.2011 00:46, Julien Cristau wrote:
 
  Even with Requires.private you'll need the corresponding -dev packages
  in Depends, because pkg-config will look for them for --cflags, just not
  --libs.
 
 You're right, it complains without libpixman-1-dev too, just as before.
 
 It looks like it may be better to patch away pkg-config usage
 in the dependent packages instead... ;)
 
 So, what is the right way here, having in mind that - in this
 particular example - pixman isn't used except of a an inter-
 dependent library?  It looks like the upstream should switch
 from
 
   Requires: $pkg
 
 (or as my wrong attempt, Requires.private) to
 
   libs.private: $(pkg-config --libs $pkg)
 
 with some way of handling -L options, right?  Is there some
 good document outlining all this pkg-config best practices?
 
What problem are you trying to solve that doesn't go away with Depends:
libpixman-1-dev?

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-16 Thread Michael Tokarev
17.08.2011 01:24, Julien Cristau wrote:
 On Wed, Aug 17, 2011 at 00:59:36 +0400, Michael Tokarev wrote:
 17.08.2011 00:46, Julien Cristau wrote:

 Even with Requires.private you'll need the corresponding -dev packages
 in Depends, because pkg-config will look for them for --cflags, just not
 --libs.

 You're right, it complains without libpixman-1-dev too, just as before.
[]
 What problem are you trying to solve that doesn't go away with Depends:
 libpixman-1-dev?

We'll need to list all the rest in build-depends too, and update
it every time upstream will pick something else as needlessly as
it is now.  In particular, currently it's libssl-dev (right version) --
provided we patched out various other X bits.  With this particular
user - qemu-kvm - it so happens that libssl-dev gets pulled too,
unlike libpixmap, so there's no issue here.  For other package that
will try to use libspice, there will be yet another bug of the same
nature but due to missing libssl-dev dependency.

The problem is to have real dependencies - both build- and run-tme,
no less (to avoid bugs like this) and no more (to avoid pulling
whole archive just to install a random binary).

Thanks,

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-09 Thread Michael Tokarev
Package: libspice-server-dev
Version: 0.8.2-1
Severity: grave

In pkg-config file of libspice-server-dev, pixman-1 (= 0.17.7) is 
specified as required, yet it is not marked as such in the
libspice-server-dev package control file.  This means that
installed libspice-server-dev package is unusable because
it itn't possible to build packages against it, since
pkg-config complains:

 $ pkg-config --cflags spice-server
 Package pixman-1 was not found in the pkg-config search path.
 Perhaps you should add the directory containing `pixman-1.pc'
 to the PKG_CONFIG_PATH environment variable
 Package 'pixman-1', required by 'spice', not found

As far as I can see, adding libpixman-1-dev dependency should fix that.

There are other dependencies too, like alsa openssl xrandr etc,
but I haven't checked these.



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#637189: libspice-server-dev depends on pixman-1 but it is not specified in dependencies

2011-08-09 Thread Michael Tokarev
09.08.2011 14:26, Michael Tokarev wrote:
[]
 There are other dependencies too, like alsa openssl xrandr etc,
 but I haven't checked these.

See also 
http://cgit.freedesktop.org/spice/spice/commit/?h=0.8id=54c660470a5aea19f799c5574cc0d4a707696712
 --
this is actually a bugfix, -- spice .pc file unnecessary includes alsa which
pulls its own set of include dirs, which contains, among other things,
file named error.h.  Which clashes with local (in another package
using spice) file of the same name.  So that qemu 0.15 does not
build with spice 0.8.2 for example:

http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg00417.html
http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg00617.html

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org