X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=policy.sgml;h=d5edf52667d2135c8870be08a6336e4a02941ae0;hb=2ae3e536615ebb3615f395d39a615b1d84e0b90a;hp=68083420d2e1f9a7885c83519ff5dfdb5d6e200b;hpb=202206511b87e973c294babb58d1c27f79ef31a4;p=debian%2Fdebian-policy.git diff --git a/policy.sgml b/policy.sgml index 6808342..d5edf52 100644 --- a/policy.sgml +++ b/policy.sgml @@ -578,7 +578,7 @@

Every package must be accompanied by a verbatim copy of its copyright and distribution license in the file - /usr/share/doc/<package-name>/copyright + /usr/share/doc/<package>/copyright (see for further details).

@@ -3632,75 +3632,87 @@ Replaces: mail-transport-agent

- Shared libraries - + Shared libraries

Packages containing shared libraries must be constructed with a little care to make sure that the shared library is always available. This is especially important for packages whose - shared libraries are vitally important, such as the libc. + shared libraries are vitally important, such as the C library + (currently libc6).

- Firstly, your package should install the shared libraries - under their normal names. For example, the - libgdbm1 package should install - libgdbm.so.1.7.3 as + Firstly, the package should install the shared libraries under + their normal names. For example, the libgdbmg1 + package should install libgdbm.so.1.7.3 as /usr/lib/libgdbm.so.1.7.3. The files should not be - renamed or re-linked by any prerm or postrm scripts; - dpkg will take care of renaming things safely - without affecting running programs, and attempts to interfere - with this are likely to lead to problems. + renamed or re-linked by any prerm or + postrm scripts; dpkg will take care + of renaming things safely without affecting running programs, + and attempts to interfere with this are likely to lead to + problems.

- Secondly, your package should include the symlink that + Secondly, the package should include the symbolic link that ldconfig would create for the shared libraries. - For example, the libgdbm1 package should include - a symlink from /usr/lib/libgdbm.so.1 to - libgdbm.so.1.7.3. This is needed so that - ld.so can find the library in between the time - dpkg installs it and ldconfig is run - in the postinst script. Furthermore, older - versions of the package management system required the library - must be placed before the symlink pointing to it in the - .deb file. This is so that by the time - dpkg comes to install the symlink (overwriting - the previous symlink pointing at an older version of the - library) the new shared library is already in place. - Unfortunately, this was not not always possible, since it - highly depends on the behavior of the file system. Some - file systems (such as reiserfs) will reorder the files so it - doesn't matter in what order you create them. Starting with - release 1.7.0 dpkg will reorder the - files itself when building a package. + For example, the libgdbmg1 package should include + a symbolic link from /usr/lib/libgdbm.so.1 to + libgdbm.so.1.7.3. This is needed so that the dynamic + linker (for example ld.so or + ld-linux.so.*) can find the library between the + time that dpkg installs it and the time that + ldconfig is run in the postinst + script. + +

+ The package management system requires the library to be + placed before the symbolic link pointing to it in the + .deb file. This is so that when + dpkg comes to install the symlink + (overwriting the previous symlink pointing at an older + version of the library), the new shared library is already + in place. In the past, this was achieved by creating the + library in the temporary packaging directory before + creating the symlink. Unfortunately, this was not always + effective, since the building of the tar file in the + .deb depended on the behavior of the underlying + file system. Some file systems (such as reiserfs) reorder + the files so that the order of creation is forgotten. + Starting with release 1.7.0, dpkg + will reorder the files itself as necessary when building a + package. Thus it is no longer important to concern + oneself with the order of file creation. +

+

- Thirdly, the development package should contain a symlink for - the shared library without a version number. For example, the - libgdbm1-dev package should include a symlink from - /usr/lib/libgdm.so to libgdm.so.1.7.3. This - symlink is needed by ld when compiling packages - as it will only look for libgdm.so and - libgdm.a when compiling dynamically or statically, - respectively. + Thirdly, the associated development package should contain a + symlink for the shared library without a version number. For + example, the libgdbmg1-dev package should include a + symlink from /usr/lib/libgdbm.so to + libgdbm.so.1.7.3. This symlink is needed by the + linker (ld) when compiling packages, as it will + only look for libgdbm.so when compiling dynamically.

- Any package installing shared libraries in a directory that's listed - in /etc/ld.so.conf or in one of the default library - directories of ld.so (currently, these are /usr/lib - and /lib) must call ldconfig in its postinst - script if and only if the first argument is `configure'. However, it - is important not to call ldconfig in the postrm or preinst - scripts in the case where the package is being upgraded (see ), as ldconfig will see the temporary names - that dpkg uses for the files while it is - installing them and will make the shared library links point - to them, just before dpkg continues the - installation and removes the links! + Any package installing shared libraries in a directory that is + listed in /etc/ld.so.conf or in one of the default + library directories of the dynamic linker (currently, these + are /usr/lib and /lib) must call + ldconfig in its postinst script if + and only if the first argument is `configure'. However, it is + important not to call ldconfig in the postrm or + preinst scripts in the case where the package is being + upgraded (see ), as + ldconfig will see the temporary names that + dpkg uses for the files while it is installing + them and will make the shared library links point to them, + just before dpkg continues the installation and + removes the links!

The shlibs File Format @@ -4623,7 +4635,7 @@ Replaces: mail-transport-agent

If a certain job has to be executed more frequently than daily, the package should install a file - /etc/cron.d/package-name. This file uses + /etc/cron.d/package. This file uses the same syntax as /etc/crontab and is processed by cron automatically. The file must also be treated as a configuration file. (Note, that entries in the @@ -6303,7 +6315,7 @@ Replaces: mail-transport-agent BDF fonts should be converted to PCF fonts with the bdftopcf utility (available in the - xutils package, gzipped, and + xutils package), gzipped, and placed in a directory that corresponds to their resolution: @@ -6780,7 +6792,7 @@ Replaces: mail-transport-agent

Every package must be accompanied by a verbatim copy of its copyright and distribution license in the file - /usr/share/doc/<package-name>/copyright. This file must + /usr/share/doc/<package>/copyright. This file must neither be compressed nor be a symbolic link.

@@ -6798,7 +6810,7 @@ Replaces: mail-transport-agent

- /usr/share/doc/<package-name> may be a symbolic link to a + /usr/share/doc/<package> may be a symbolic link to a directory in /usr/share/doc only if two packages both come from the same source and the first package has a "Depends" relationship on the second. These rules are important