Re: [Launchpad-users] Fixing broken library package

2021-01-06 Thread Colin Watson
On Fri, Dec 25, 2020 at 01:34:54PM -0500, Pierre Abbat wrote:
> Could you also answer on Ask Ubuntu? On https://askubuntu.com/, it's tagged 
> [ppa], [packaging], and [libraries], and is still near the top.

Done (https://askubuntu.com/a/1305488/3228).

-- 
Colin Watson (he/him)   [cjwat...@canonical.com]

___
Mailing list: https://launchpad.net/~launchpad-users
Post to : launchpad-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-users
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-users] Fixing broken library package

2020-12-25 Thread Pierre Abbat
On Wednesday, December 23, 2020 6:33:31 AM EST Colin Watson wrote:
> You have a few problems here.
> 
> 1) The upstream build system installs to .../usr/lib/lib*.so.*, but in
>the version of your packaging that I downloaded
>debian/plytapus1.install says "usr/lib/*/lib*.so.*", not
>"usr/lib/lib*.so.*" as you quoted above.  You need to drop the "/*"
>bit.

Already done, and yes, I did use dh-make.

> 2) debian/control has the runtime library package name as "plytapus",
>which means that debian/plytapus1.* are entirely ignored.
> 
> 3) Library package names should start with "lib".

Fixed.

> 4) The "1" bit is currently incorrect anyway;
>https://www.debian.org/doc/debian-policy/ch-sharedlibs.html says that
>it should match the version number in the library's SONAME, which in
>this case is "0.6.0" (you can use "objdump -p" on the .so file to see
>it).  You'll need to make sure to change this any time the upstream
>SONAME changes.

Set to 0.6.0.

> 5) It looks as though you aren't currently setting a SONAME explicitly

I think it should be 0.6, as patch version changes should not affect the ABI. 
I'll change that when I release 0.7. I may make a version 0.6.1 and change it 
then.

I took over this library from someone who no longer had time to maintain it. 
He originally wrote it on Windows and got it to compile on Linux; I fixed 
reading and writing big-endian files (but haven't yet tested on a big-endian 
box).

Could you also answer on Ask Ubuntu? On https://askubuntu.com/, it's tagged 
[ppa], [packaging], and [libraries], and is still near the top.

Pierre


-- 
Lanthanidia deliciosa: What the kiwifruit would be
if it weren't so radioactive.




___
Mailing list: https://launchpad.net/~launchpad-users
Post to : launchpad-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-users
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-users] Fixing broken library package

2020-12-23 Thread Pierre Abbat
On Wednesday, December 23, 2020 6:33:31 AM EST Colin Watson wrote:

> So, putting that together, you should remove the "/*" from
> debian/plytapus1.install.  You should rename debian/plytapus1.install to
> debian/libplytapus0.6.0.install and debian/plytapus-dev.install to
> debian/libplytapus-dev.install.  You should change the two "Package:"
> lines in debian/control from plytapus-dev and plytapus to
> libplytapus-dev and libplytapus0.6.0, and also adjust libplytapus-dev's
> Depends line to match.  You can also remove debian/*.dirs entirely since
> they don't seem to be needed.  And I'd recommend sorting out the
> upstream ABI situation, after which you'll need to adjust the library
> package names again to match (if your library in fact has a fairly
> stable ABI, then you'll be rewarded by not having to change the binary
> package names for a while).

Thanks! I'm starting to upgrade my box; I'll work on this when I'm finished 
upgrading.

I took over this library from someone who wrote it originally for Windows and 
didn't have time to maintain it anymore.

Pierre
-- 
sei do'anai mi'a djuno puze'e noroi nalselganse srera




___
Mailing list: https://launchpad.net/~launchpad-users
Post to : launchpad-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-users
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-users] Fixing broken library package

2020-12-23 Thread Colin Watson
On Tue, Dec 22, 2020 at 10:18:03PM -0500, Pierre Abbat wrote:
> On Tuesday, December 22, 2020 11:24:02 AM EST Colin Watson wrote:
> > This is a reasonable mailing list, but people are likely to need a
> > pointer to your existing packaging.
> 
> The PPA is https://launchpad.net/~phma-a/+archive/ubuntu/testing , and the 
> original tarball is at http://bezitopo.org/perfecttin/download.html . The 
> library is Plytapus. The Git repo is at https://github.com/phma/plytapus .
> 
> Installing results in these files in /usr/lib:
> libplytapus.a  libplytapus.so  libplytapus.so.0.6.0
> and these files in /usr/include:
> plytapus.h
> plytapus:
> config.h  textio.h
> 
> plytapus-dev.install says this:
> usr/include/*
> usr/lib/lib*.so
> 
> plytapus1.install (I don't know what the 1 is for) says this:
> usr/lib/lib*.so.*
> usr/lib/lib*.a
> 
> But while the resulting plytapus-dev package contains the header files, the 
> plytapus package does not contain the libplytapus files.

You have a few problems here.

1) The upstream build system installs to .../usr/lib/lib*.so.*, but in
   the version of your packaging that I downloaded
   debian/plytapus1.install says "usr/lib/*/lib*.so.*", not
   "usr/lib/lib*.so.*" as you quoted above.  You need to drop the "/*"
   bit.  (I'm guessing that you used dh-make, and it's assuming that the
   upstream cmake configuration follows the recommendation in
   https://wiki.debian.org/Multiarch/Implementation#CMake, but this
   package doesn't do that; so you need to either make the packaging
   expect pre-multiarch paths or change the upstream cmake configuration
   to be multiarch-friendly as in that wiki page.)

2) debian/control has the runtime library package name as "plytapus",
   which means that debian/plytapus1.* are entirely ignored.

3) Library package names should start with "lib".

4) The "1" bit is currently incorrect anyway;
   https://www.debian.org/doc/debian-policy/ch-sharedlibs.html says that
   it should match the version number in the library's SONAME, which in
   this case is "0.6.0" (you can use "objdump -p" on the .so file to see
   it).  You'll need to make sure to change this any time the upstream
   SONAME changes.

5) It looks as though you aren't currently setting a SONAME explicitly
   in the upstream cmake configuration and are just leaving cmake to
   guess at one.  Perhaps this is unintentional, since it amounts to
   saying that every new upstream release may be entirely
   ABI-incompatible with every previous one.  If this isn't what you
   meant, then you should set SOVERSION in the upstream cmake
   configuration (I think; I'm not very fluent in cmake) and possibly
   read up on the sorts of things you need to do when maintaining a C++
   library interface.  Symbols files
   
(https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#dependencies-between-the-library-and-other-packages)
   are a useful discipline if possible.

So, putting that together, you should remove the "/*" from
debian/plytapus1.install.  You should rename debian/plytapus1.install to
debian/libplytapus0.6.0.install and debian/plytapus-dev.install to
debian/libplytapus-dev.install.  You should change the two "Package:"
lines in debian/control from plytapus-dev and plytapus to
libplytapus-dev and libplytapus0.6.0, and also adjust libplytapus-dev's
Depends line to match.  You can also remove debian/*.dirs entirely since
they don't seem to be needed.  And I'd recommend sorting out the
upstream ABI situation, after which you'll need to adjust the library
package names again to match (if your library in fact has a fairly
stable ABI, then you'll be rewarded by not having to change the binary
package names for a while).

-- 
Colin Watson (he/him)   [cjwat...@canonical.com]

___
Mailing list: https://launchpad.net/~launchpad-users
Post to : launchpad-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-users
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-users] Fixing broken library package

2020-12-22 Thread Pierre Abbat
On Tuesday, December 22, 2020 11:24:02 AM EST Colin Watson wrote:
> This is a reasonable mailing list, but people are likely to need a
> pointer to your existing packaging.

The PPA is https://launchpad.net/~phma-a/+archive/ubuntu/testing , and the 
original tarball is at http://bezitopo.org/perfecttin/download.html . The 
library is Plytapus. The Git repo is at https://github.com/phma/plytapus .

Installing results in these files in /usr/lib:
libplytapus.a  libplytapus.so  libplytapus.so.0.6.0
and these files in /usr/include:
plytapus.h
plytapus:
config.h  textio.h

plytapus-dev.install says this:
usr/include/*
usr/lib/lib*.so

plytapus1.install (I don't know what the 1 is for) says this:
usr/lib/lib*.so.*
usr/lib/lib*.a

But while the resulting plytapus-dev package contains the header files, the 
plytapus package does not contain the libplytapus files.

Pierre
-- 
Don't buy a French car in Holland. It may be a citroen.




___
Mailing list: https://launchpad.net/~launchpad-users
Post to : launchpad-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-users
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-users] Fixing broken library package

2020-12-22 Thread Colin Watson
On Tue, Dec 22, 2020 at 11:11:32AM -0500, Pierre Abbat wrote:
> I've successfully packaged a program that doesn't need any libraries I 
> package. I'm stuck, though, on packaging a library. I end up with two 
> packages, neither of which contains the .so file. I've asked on Ask Ubuntu, 
> no 
> answer. I've browsed tutorials and guides about packaging and can't figure it 
> out. Is there a mailing list or IRC channel where I can ask?

This is a reasonable mailing list, but people are likely to need a
pointer to your existing packaging.

-- 
Colin Watson (he/him)   [cjwat...@canonical.com]

___
Mailing list: https://launchpad.net/~launchpad-users
Post to : launchpad-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-users
More help   : https://help.launchpad.net/ListHelp


[Launchpad-users] Fixing broken library package

2020-12-22 Thread Pierre Abbat
I've successfully packaged a program that doesn't need any libraries I 
package. I'm stuck, though, on packaging a library. I end up with two 
packages, neither of which contains the .so file. I've asked on Ask Ubuntu, no 
answer. I've browsed tutorials and guides about packaging and can't figure it 
out. Is there a mailing list or IRC channel where I can ask?

Pierre
-- 
sei do'anai mi'a djuno puze'e noroi nalselganse srera




___
Mailing list: https://launchpad.net/~launchpad-users
Post to : launchpad-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-users
More help   : https://help.launchpad.net/ListHelp