LWN.net Logo

Policy-respecting .debs?

Policy-respecting .debs?

Posted Sep 2, 2008 9:58 UTC (Tue) by tzafrir (subscriber, #11501)
In reply to: Policy-respecting .debs? by GreyWizard
Parent article: Bitten by the Red Hat Perl bug (InfoWorld)

In that case you should run lintian with the option -i to provide you more information about those errors/warnings , as well as a reference to thew relevant section in the policy manual.

no-shlibs-control-file:

Although the package includes a shared library, the package does not
have a shlibs control file. If this is intentional, please override this
error.

Section 8.6: http://www.debian.org/doc/debian-policy/ch-sharedlibs.htm...

non-dev-pkg-with-shlib-symlink:

Although this package is not a `-dev' package, it installs a
`libsomething.so' symbolic link referencing the corresponding shared
library. When the link doesn't include the version number, it is used by
the linker when other programs are built against this shared library.

Shared libraries are supposed to place such symbolic links in their
respective `-dev' packages, so it is a bug to include it with the main
library package.

However, if this is a small package which includes the runtime and the
development libraries, this is not a bug. In the latter case, please
override this warning.

Section 8.4: http://www.debian.org/doc/debian-policy/ch-sharedlibs.htm...

The executable bit should only be set where it is needed. For scripts. Shared libraries don't need to be executable. If you use the recommended toolchain this will mostly be done for you. I can't think of a specific problem caused by this, but this is the general rule here. Don't mistake /usr/lib for /usr/libexec .

As for the other issues you have raised:

I'm not sure I can easily answer all of your questions. But here's an example: you don't ship .pyc files because you can't tell in advance with what version of python (and potentially: with what other libraries) the code will build. So those are likely to change. See the python policy manual for the exact details:
http://www.debian.org/doc/packaging-manuals/python-policy/

Also, if the file is has a '#!', it is probably intended to be executable. If you have some python code that is only intended to be used as a module and not as an executable, remove the '#!' from the first line. Chances are you merely forgot to set a script as executable (note that lintian here gives you a warning rather thna an error). Actually python modules are often have a small main for a simple test driver.


(Log in to post comments)

Policy-respecting .debs?

Posted Sep 2, 2008 16:02 UTC (Tue) by GreyWizard (guest, #1026) [Link]

That's quite helpful, thank you. Still, the point I'm trying to make is that all this is quite hard to master. There are surely things Debian can do to be more friendly to people who want to create packages that conform to their policies. One concrete suggestion is to make the more informative mode the default for lintian. Experts can set whatever switch is necessary to get more concise output.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds