From 29c28c5b7b0ea98b0e3107ab1364482ba25d8bef Mon Sep 17 00:00:00 2001 From: Manoj Srivastava Date: Thu, 16 Jun 2005 05:05:01 +0000 Subject: [PATCH] Fixed white spaces in examples Author: srivasta Date: 1998/11/27 08:13:51 Fixed white spaces in examples git-archimport-id: srivasta@debian.org--etch/debian-policy--devel--3.0--patch-21 --- packaging.sgml | 270 +++++++++++++++++++++++++------------------------ 1 file changed, 136 insertions(+), 134 deletions(-) diff --git a/packaging.sgml b/packaging.sgml index a040af4..97dcc20 100644 --- a/packaging.sgml +++ b/packaging.sgml @@ -245,7 +245,7 @@

When you've prepared the package, you should invoke: - dpkg --build directory + dpkg --build directory

@@ -262,15 +262,17 @@ to examine the contents of this newly-created file. You may find the output of following commands enlightening: -dpkg-deb --info filename.deb -dpkg-deb --contents filename.deb -dpkg --contents filename.deb - + dpkg-deb --info filename.deb + dpkg-deb --contents filename.deb + dpkg --contents filename.deb + To view the copyright file for a package you could use this command: - -dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyright | less -

- + + dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyright | less + +

+ + Package control information files @@ -540,7 +542,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

To unpack a package it is typically invoked with - dpkg-source -x .../path/to/filename.dsc + dpkg-source -x .../path/to/filename.dsc

@@ -557,7 +559,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

To create a packed source archive it is typically invoked: - dpkg-source -b package-version + dpkg-source -b package-version

@@ -676,17 +678,15 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

For a package which generates only one binary package, and which builds it in debian/tmp relative to the top - of the source package, it is usually sufficient to call: - - dpkg-gencontrol - + of the source package, it is usually sufficient to call + dpkg-gencontrol.

Sources which build several binaries will typically need something like: - dpkg-gencontrol -Pdebian/tmp-pkg -ppackage + dpkg-gencontrol -Pdebian/tmp-pkg -ppackage The -P tells dpkg-gencontrol that the package is being built in a non-default directory, and the -p @@ -751,15 +751,15 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr binaries like top which require only a recommendation. It can say in its debian/rules: - dpkg-shlibdeps -dPre-Depends ps -dRecommends top + dpkg-shlibdeps -dPre-Depends ps -dRecommends top and then in its main control file debian/control: - ... - Package: procps - Pre-Depends: ${shlibs:Pre-Depends} - Recommends: ${shlibs:Recommends} - ... + ... + Package: procps + Pre-Depends: ${shlibs:Pre-Depends} + Recommends: ${shlibs:Recommends} + ...

@@ -800,7 +800,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr It is usually invoked from the binary target of debian/rules: - dpkg-distaddfile filename section priority + dpkg-distaddfile filename section priority The filename is relative to the directory where dpkg-genchanges will expect to find it - this @@ -1203,12 +1203,12 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr For example, if the main source information control file contains the field - XBS-Comment: I stand between the candle and the star. + XBS-Comment: I stand between the candle and the star. then the binary and source package control files will contain the field - Comment: I stand between the candle and the star. + Comment: I stand between the candle and the star.

@@ -1241,14 +1241,13 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

That format is a series of entries like this: - package (version) distribution(s); - urgency=urgency - - * change details - more change details - * even more change details + package (version) distribution(s); urgency=urgency + + * change details + more change details + * even more change details - -- maintainer name and email address date + -- maintainer name and email address date

@@ -1339,7 +1338,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr parentheses should be the name of the format. For example, you might say: - @@@ changelog-format: joebloggs @@@ + @@@ changelog-format: joebloggs @@@ Changelog format names are non-empty strings of alphanumerics.

@@ -1950,7 +1949,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

This actually invokes - gcc --print-libgcc-file-name + gcc --print-libgcc-file-name and parses and decomposes the output and looks the CPU type from the GCC configuration in a table in dpkg. This is so that it will @@ -2367,7 +2366,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr commentary (separated by a space) which is usually in parentheses. For example: - Urgency: LOW (HIGH for diversions users) + Urgency: LOW (HIGH for diversions users)

@@ -2917,7 +2916,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

If a version the package is already installed, call - old-prerm upgrade new-version + old-prerm upgrade new-version

@@ -2925,11 +2924,11 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr If this gives an error (ie, a non-zero exit status), dpkg will attempt instead: - new-prerm failed-upgrade old-version + new-prerm failed-upgrade old-version Error unwind, for both the above cases: - old-postinst abort-upgrade new-version + old-postinst abort-upgrade new-version

@@ -2945,15 +2944,15 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr package and --auto-deconfigure is specified, call, for each such package: - deconfigured's-prerm deconfigure \ - in-favour package-being-installed version \ - removing conflicting-package version + deconfigured's-prerm deconfigure \ + in-favour package-being-installed version \ + removing conflicting-package version Error unwind: - deconfigured's-postinst abort-deconfigure \ - in-favour package-being-installed-but-failed version \ - removing conflicting-package version + deconfigured's-postinst abort-deconfigure \ + in-favour package-being-installed-but-failed version \ + removing conflicting-package version The deconfigured packages are marked as requiring configuration, so that if @@ -2963,12 +2962,12 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

To prepare for removal of the conflicting package, call: - conflictor's-prerm remove in-favour package new-version + conflictor's-prerm remove in-favour package new-version Error unwind: - conflictor's-postinst abort-remove \ - in-favour package new-version + conflictor's-postinst abort-remove \ + in-favour package new-version

@@ -2981,7 +2980,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

If the package is being upgraded, call: - new-preinst upgrade old-version + new-preinst upgrade old-version

@@ -2990,19 +2989,19 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr files from a previous version installed (ie, it is in the `configuration files only' state): - new-preinst install old-version + new-preinst install old-version

Otherwise (ie, the package was completely purged): - new-preinst install + new-preinst install Error unwind versions, respectively: - new-postrm abort-upgrade old-version - new-postrm abort-install old-version - new-postrm abort-install + new-postrm abort-upgrade old-version + new-postrm abort-install old-version + new-postrm abort-install

@@ -3068,17 +3067,17 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

If the package is being upgraded, call - old-postrm upgrade new-version + old-postrm upgrade new-version

If this fails, dpkg will attempt: - new-postrm failed-upgrade old-version + new-postrm failed-upgrade old-version Error unwind, for both cases: - old-preinst abort-upgrade new-version + old-preinst abort-upgrade new-version

@@ -3112,9 +3111,10 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

dpkg calls: - disappearer's-postrm disappear \ - overwriter overwriter-version -

+ disappearer's-postrm disappear \ + overwriter overwriter-version + +

The package's maintainer scripts are removed. @@ -3181,7 +3181,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr --install, or with --configure), we first update the conffiles and then call: - postinst configure most-recently-configured-version + postinst configure most-recently-configured-version

@@ -3205,9 +3205,11 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

-

- prerm remove -

+

+ + prerm remove + +

@@ -3216,7 +3218,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

- postrm remove + postrm remove

@@ -3238,7 +3240,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

- postrm purge + postrm purge

@@ -3275,8 +3277,8 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

The field's format is as follows: - Description: single line synopsis - extended description over several lines + Description: single line synopsis + extended description over several lines

@@ -3421,26 +3423,26 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

- Package: smail - Version: 3.1.29.1-13 - Maintainer: Ian Jackson <iwj10@cus.cam.ac.uk> - Recommends: pine | mailx | elm | emacs | mail-user-agent - Suggests: metamail - Depends: cron, libc5 - Conflicts: sendmail - Provides: mail-transport-agent - Description: Electronic mail transport system. - Smail is the recommended mail transport agent (MTA) for Debian. - . - An MTA is the innards of the mail system - it takes messages from - user-friendly mailer programs and arranges for them to be delivered - locally or passed on to other systems as required. - . - In order to make use of it you must have one or more user level - mailreader programs such as elm, pine, mailx or Emacs (which has Rmail - and VM as mailreaders) installed. If you wish to send messages other - than just to other users of your system you must also have appropriate - networking support, in the form of IP or UUCP. + Package: smail + Version: 3.1.29.1-13 + Maintainer: Ian Jackson <iwj10@cus.cam.ac.uk> + Recommends: pine | mailx | elm | emacs | mail-user-agent + Suggests: metamail + Depends: cron, libc5 + Conflicts: sendmail + Provides: mail-transport-agent + Description: Electronic mail transport system. + Smail is the recommended mail transport agent (MTA) for Debian. + . + An MTA is the innards of the mail system - it takes messages from + user-friendly mailer programs and arranges for them to be delivered + locally or passed on to other systems as required. + . + In order to make use of it you must have one or more user level + mailreader programs such as elm, pine, mailx or Emacs (which has Rmail + and VM as mailreaders) installed. If you wish to send messages other + than just to other users of your system you must also have appropriate + networking support, in the form of IP or UUCP.

@@ -3517,9 +3519,9 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

For example: - Package: metamail - Version: 2.7-3 - Depends: libc5 (>= 5.2.18-4), mime-support, csh | tcsh + Package: metamail + Version: 2.7-3 + Depends: libc5 (>= 5.2.18-4), mime-support, csh | tcsh

@@ -3848,13 +3850,13 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr packages which provide it. This is so that, for example, supposing we have - Package: vm - Depends: emacs + Package: vm + Depends: emacs and someone else releases an xemacs package they can say - Package: xemacs - Provides: emacs + Package: xemacs + Provides: emacs and all will work in the interim (until a purely virtual package name is decided on and the emacs and vm packages are changed to use it). @@ -4001,14 +4003,14 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

For example, consider the set of packages: - Package: glibcdoc - Recommends: info-browser - - Package: info - Provides: info-browser - - Package: emacs - Provides: info-browser + Package: glibcdoc + Recommends: info-browser + + Package: info + Provides: info-browser + + Package: emacs + Provides: info-browser

@@ -4017,8 +4019,8 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr same priority then dselect's choice is essentially random. Better would be - Package: glibcdoc - Recommends: info | info-browser + Package: glibcdoc + Recommends: info | info-browser so that dselect defaults to selecting the lightweight standalone info browser. @@ -4262,10 +4264,10 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr supposing that a smailwrapper package wishes to install a wrapper around /usr/sbin/smail: - if [ install = "$1" ]; then - dpkg-divert --package smailwrapper --add --rename \ - --divert /usr/sbin/smail.real /usr/sbin/smail - fi + if [ install = "$1" ]; then + dpkg-divert --package smailwrapper --add --rename \ + --divert /usr/sbin/smail.real /usr/sbin/smail + fi Testing $1 is necessary so that the script doesn't try to add the diversion again when smailwrapper is upgraded. The --package @@ -4277,10 +4279,10 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

The postrm has to do the reverse: - if [ remove = "$1" ]; then - dpkg-divert --package smailwrapper --remove --rename \ - --divert /usr/sbin/smail.real /usr/sbin/smail - fi + if [ remove = "$1" ]; then + dpkg-divert --package smailwrapper --remove --rename \ + --divert /usr/sbin/smail.real /usr/sbin/smail + fi

@@ -4385,7 +4387,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

Each line is of the form: - library-name version-or-soname dependencies ... + library-name version-or-soname dependencies ...

@@ -4417,7 +4419,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr 1.2.3-1, then the package's shlibs could say: - libfoo 1 foo (>= 1.2.3-1) + libfoo 1 foo (>= 1.2.3-1)

@@ -4531,7 +4533,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr debian/rules file. If your package contains only binaries (e.g. no scripts) use: - dpkg-shlibdeps debian/tmp/usr/bin/* debian/tmp/usr/sbin/* + dpkg-shlibdeps debian/tmp/usr/bin/* debian/tmp/usr/sbin/* If dpkg-shlibdeps doesn't complain, you're done. If it does complain you might need to create your @@ -4545,7 +4547,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr Create a debian/shlibs file and let debian/rules install it in the control area: - install -m644 debian/shlibs debian/tmp/DEBIAN + install -m644 debian/shlibs debian/tmp/DEBIAN If your package contains additional binaries see above.

@@ -4566,18 +4568,18 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr Let's assume you are packaging a binary foo. Your output in building the package might look like this. - $ ldd foo - libbar.so.1 => /usr/X11R6/lib/libbar.so.1.0 - libc.so.5 => /lib/libc.so.5.2.18 - libX11.so.6 => /usr/X11R6/lib/libX11.so.6.0 + $ ldd foo + libbar.so.1 => /usr/X11R6/lib/libbar.so.1.0 + libc.so.5 => /lib/libc.so.5.2.18 + libX11.so.6 => /usr/X11R6/lib/libX11.so.6.0 And when you ran dpkg-shlibdeps - $ dpkg-shlibdeps -o foo - dpkg-shlibdeps: warning: unable to find dependency information - for shared library libbar - (soname 1, path /usr/X11R6/lib/libbar.so.1.0, dependency field Depends) - shlibs:Depends=elf-x11r6lib, libc5 (>= 5.2.18) + $ dpkg-shlibdeps -o foo + dpkg-shlibdeps: warning: unable to find dependency information + for shared library libbar + (soname 1, path /usr/X11R6/lib/libbar.so.1.0, dependency field Depends) + shlibs:Depends=elf-x11r6lib, libc5 (>= 5.2.18) The foo binary depends on the libbar shared library, but no package seems @@ -4588,10 +4590,10 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

- $ dpkg -S /usr/X11R6/lib/libbar.so.1.0 - bar1: /usr/X11R6/lib/libbar.so.1.0 - $ dpkg -s bar1 | grep Version - Version: 1.0-1 + $ dpkg -S /usr/X11R6/lib/libbar.so.1.0 + bar1: /usr/X11R6/lib/libbar.so.1.0 + $ dpkg -s bar1 | grep Version + Version: 1.0-1 This tells us that the bar1 package, version 1.0-1 is the one we are using. Now we can create our own @@ -4599,7 +4601,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr problem. Include the following line into your debian/shlibs.local file. - libbar 1 bar1 (>= 1.0-1) + libbar 1 bar1 (>= 1.0-1) Now your package build should work. As soon as the maintainer of libbar1 provides a @@ -4723,7 +4725,7 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr

names will be formatted as a list of lines, each containing: - sequence method summary + sequence method summary

@@ -4820,9 +4822,9 @@ dpkg --fsys-tarfile filename.deb | tar xof usr/doc/\*copyr appropriate details, and a local variables entry to the bottom to set Emacs to the right mode: - Local variables: - mode: debian-changelog - End: + Local variables: + mode: debian-changelog + End:

-- 2.39.2