~asac/live-build/virtual-hdd-mtab-hack

« back to all changes in this revision

Viewing changes to includes/etch/common/doc/FAQ/html/ch-pkg_basics.en.html

  • Committer: Daniel Baumann
  • Date: 2009-11-22 13:38:00 UTC
  • Revision ID: git-v1:a62f12110b19a52a58d7eae871012202cfa16055
Renaming categories to archive areas (Closes: #519690).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
 
2
 
 
3
<html>
 
4
 
 
5
<head>
 
6
 
 
7
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
 
8
 
 
9
<title>The Debian GNU/Linux FAQ - Basics of the Debian package management system</title>
 
10
 
 
11
<link href="index.en.html" rel="start">
 
12
<link href="ch-ftparchives.en.html" rel="prev">
 
13
<link href="ch-pkgtools.en.html" rel="next">
 
14
<link href="index.en.html#contents" rel="contents">
 
15
<link href="index.en.html#copyright" rel="copyright">
 
16
<link href="ch-basic_defs.en.html" rel="chapter" title="1 Definitions and overview">
 
17
<link href="ch-getting.en.html" rel="chapter" title="2 Getting and installing Debian GNU/Linux">
 
18
<link href="ch-choosing.en.html" rel="chapter" title="3 Choosing a Debian distribution">
 
19
<link href="ch-compat.en.html" rel="chapter" title="4 Compatibility issues">
 
20
<link href="ch-software.en.html" rel="chapter" title="5 Software available in the Debian system">
 
21
<link href="ch-ftparchives.en.html" rel="chapter" title="6 The Debian FTP archives">
 
22
<link href="ch-pkg_basics.en.html" rel="chapter" title="7 Basics of the Debian package management system">
 
23
<link href="ch-pkgtools.en.html" rel="chapter" title="8 The Debian package management tools">
 
24
<link href="ch-uptodate.en.html" rel="chapter" title="9 Keeping your Debian system up-to-date">
 
25
<link href="ch-kernel.en.html" rel="chapter" title="10 Debian and the kernel">
 
26
<link href="ch-customizing.en.html" rel="chapter" title="11 Customizing your installation of Debian GNU/Linux">
 
27
<link href="ch-support.en.html" rel="chapter" title="12 Getting support for Debian GNU/Linux">
 
28
<link href="ch-contributing.en.html" rel="chapter" title="13 Contributing to the Debian Project">
 
29
<link href="ch-redistrib.en.html" rel="chapter" title="14 Redistributing Debian GNU/Linux in a commercial product">
 
30
<link href="ch-nexttime.en.html" rel="chapter" title="15 Changes expected in the next major release of Debian">
 
31
<link href="ch-faqinfo.en.html" rel="chapter" title="16 General information about the FAQ">
 
32
<link href="ch-basic_defs.en.html#s-whatisfaq" rel="section" title="1.1 What is this FAQ?">
 
33
<link href="ch-basic_defs.en.html#s-whatisdebian" rel="section" title="1.2 What is Debian GNU/Linux?">
 
34
<link href="ch-basic_defs.en.html#s-linux" rel="section" title="1.3 OK, now I know what Debian is... what is Linux?!">
 
35
<link href="ch-basic_defs.en.html#s-non-linux" rel="section" title="1.4 Does Debian just do GNU/Linux?">
 
36
<link href="ch-basic_defs.en.html#s-difference" rel="section" title="1.5 What is the difference between Debian GNU/Linux and other Linux distributions? Why should I choose Debian over some other distribution?">
 
37
<link href="ch-basic_defs.en.html#s-gnu" rel="section" title="1.6 How does the Debian project fit in or compare with the Free Software Foundation's GNU project?">
 
38
<link href="ch-basic_defs.en.html#s-pronunciation" rel="section" title="1.7 How does one pronounce Debian and what does this word mean?">
 
39
<link href="ch-getting.en.html#s-version" rel="section" title="2.1 What is the latest version of Debian?">
 
40
<link href="ch-getting.en.html#s-updatestable" rel="section" title="2.2 Are there package upgrades in `stable'?">
 
41
<link href="ch-getting.en.html#s-boot-floppies" rel="section" title="2.3 Where/how can I get the Debian installation disks?">
 
42
<link href="ch-getting.en.html#s-cdrom" rel="section" title="2.4 How do I install the Debian from CD-ROMs?">
 
43
<link href="ch-getting.en.html#s-cdimage-symlinks" rel="section" title="2.5 Why does the official stable released CD-ROM contain symlinks for `frozen' and `unstable'? I thought this CD contains just `stable'!">
 
44
<link href="ch-getting.en.html#s-remoteinstall" rel="section" title="2.6 Can I get and install Debian directly from a remote Internet site?">
 
45
<link href="ch-getting.en.html#s-alternativebootinstaller" rel="section" title="2.7 Are there any alternative strategies for booting the system installer?">
 
46
<link href="ch-choosing.en.html#s3.1" rel="section" title="3.1 Which Debian distribution (stable/testing/unstable) is better for me?">
 
47
<link href="ch-choosing.en.html#s3.2" rel="section" title="3.2 But what about Knoppix, Linex, Ubuntu, and others?">
 
48
<link href="ch-compat.en.html#s-arches" rel="section" title="4.1 On what hardware architectures/systems does Debian GNU/Linux run?">
 
49
<link href="ch-compat.en.html#s-otherdistribs" rel="section" title="4.2 How compatible is Debian with other distributions of Linux?">
 
50
<link href="ch-compat.en.html#s-otherunices" rel="section" title="4.3 How source code compatible is Debian with other Unix systems?">
 
51
<link href="ch-compat.en.html#s-otherpackages" rel="section" title="4.4 Can I use Debian packages (&quot;.deb&quot; files) on my Red Hat/Slackware/... Linux system? Can I use Red Hat packages (&quot;.rpm&quot; files) on my Debian GNU/Linux system?">
 
52
<link href="ch-compat.en.html#s-non-debian-programs" rel="section" title="4.5 How should I install a non-Debian program?">
 
53
<link href="ch-compat.en.html#s-termcap" rel="section" title="4.6 Why can't I compile programs that require libtermcap?">
 
54
<link href="ch-compat.en.html#s-accelx" rel="section" title="4.7 Why can't I install AccelX?">
 
55
<link href="ch-compat.en.html#s-motifnls" rel="section" title="4.8 Why do my old XFree 2.1 Motif applications crash?">
 
56
<link href="ch-software.en.html#s-apps" rel="section" title="5.1 What types of applications and development software are available for Debian GNU/Linux?">
 
57
<link href="ch-software.en.html#s-softwareauthors" rel="section" title="5.2 Who wrote all that software?">
 
58
<link href="ch-software.en.html#s-pkglist" rel="section" title="5.3 How can I get a current list of programs that have been packaged for Debian?">
 
59
<link href="ch-software.en.html#s-buildenv" rel="section" title="5.4 How can I install a developer's environment to build packages?">
 
60
<link href="ch-software.en.html#s-missing" rel="section" title="5.5 What is missing from Debian GNU/Linux?">
 
61
<link href="ch-software.en.html#s-no-devs" rel="section" title="5.6 Why do I get &quot;ld: cannot find -lfoo&quot; messages when compiling programs? Why aren't there any libfoo.so files in Debian library packages?">
 
62
<link href="ch-software.en.html#s-java" rel="section" title="5.7 (How) Does Debian support Java?">
 
63
<link href="ch-software.en.html#s-isitdebian" rel="section" title="5.8 How can I check that I am using a Debian system, and what version is it?">
 
64
<link href="ch-software.en.html#s-nonenglish" rel="section" title="5.9 How does Debian support non-English languages?">
 
65
<link href="ch-software.en.html#s-pine" rel="section" title="5.10 Where is pine?">
 
66
<link href="ch-software.en.html#s-qmail" rel="section" title="5.11 Where is qmail/ezmlm/djbdns?">
 
67
<link href="ch-software.en.html#s-flash" rel="section" title="5.12 Where is a player for Flash (SWF)?">
 
68
<link href="ch-software.en.html#s-googleearth" rel="section" title="5.13 Where is Google Earth?">
 
69
<link href="ch-software.en.html#s-voip" rel="section" title="5.14 Where is VoIP software?">
 
70
<link href="ch-software.en.html#s-nonfreewireless" rel="section" title="5.15 I have a wireless network card which doesn't work with Linux. What should I do?">
 
71
<link href="ch-ftparchives.en.html#s-dists" rel="section" title="6.1 How many Debian distributions are there?">
 
72
<link href="ch-ftparchives.en.html#s-codenames" rel="section" title="6.2 What are all those names like etch, lenny, etc.?">
 
73
<link href="ch-ftparchives.en.html#s-sid" rel="section" title="6.3 What about &quot;sid&quot;?">
 
74
<link href="ch-ftparchives.en.html#s-stable" rel="section" title="6.4 What does the stable directory contain?">
 
75
<link href="ch-ftparchives.en.html#s-testing" rel="section" title="6.5 What does the testing distribution contain?">
 
76
<link href="ch-ftparchives.en.html#s-unstable" rel="section" title="6.6 What does the unstable distribution contain?">
 
77
<link href="ch-ftparchives.en.html#s-dirtree" rel="section" title="6.7 What are all those directories at the Debian FTP archives?">
 
78
<link href="ch-ftparchives.en.html#s-archsections" rel="section" title="6.8 What are all those directories inside <samp>dists/stable/main</samp>?">
 
79
<link href="ch-ftparchives.en.html#s-source" rel="section" title="6.9 Where is the source code?">
 
80
<link href="ch-ftparchives.en.html#s-pools" rel="section" title="6.10 What's in the <samp>pool</samp> directory?">
 
81
<link href="ch-ftparchives.en.html#s-incoming" rel="section" title="6.11 What is &quot;incoming&quot;?">
 
82
<link href="ch-ftparchives.en.html#s-ownrepository" rel="section" title="6.12 How do I set up my own apt-able repository?">
 
83
<link href="ch-pkg_basics.en.html#s-package" rel="section" title="7.1 What is a Debian package?">
 
84
<link href="ch-pkg_basics.en.html#s-deb-format" rel="section" title="7.2 What is the format of a Debian binary package?">
 
85
<link href="ch-pkg_basics.en.html#s-pkgname" rel="section" title="7.3 Why are Debian package file names so long?">
 
86
<link href="ch-pkg_basics.en.html#s-controlfile" rel="section" title="7.4 What is a Debian control file?">
 
87
<link href="ch-pkg_basics.en.html#s-conffile" rel="section" title="7.5 What is a Debian conffile?">
 
88
<link href="ch-pkg_basics.en.html#s-maintscripts" rel="section" title="7.6 What is a Debian preinst, postinst, prerm, and postrm script?">
 
89
<link href="ch-pkg_basics.en.html#s-priority" rel="section" title="7.7 What is an <em>Essential</em>, <em>Required</em>, <em>Important</em>, <em>Standard</em>, <em>Optional</em>, or <em>Extra</em> package?">
 
90
<link href="ch-pkg_basics.en.html#s-virtual" rel="section" title="7.8 What is a Virtual Package?">
 
91
<link href="ch-pkg_basics.en.html#s-depends" rel="section" title="7.9 What is meant by saying that a package <em>Depends</em>, <em>Recommends</em>, <em>Suggests</em>, <em>Conflicts</em>, <em>Replaces</em> or <em>Provides</em> another package?">
 
92
<link href="ch-pkg_basics.en.html#s-pre-depends" rel="section" title="7.10 What is meant by Pre-Depends?">
 
93
<link href="ch-pkg_basics.en.html#s-pkgstatus" rel="section" title="7.11 What is meant by <em>unknown</em>, <em>install</em>, <em>remove</em>, <em>purge</em> and <em>hold</em> in the package status?">
 
94
<link href="ch-pkg_basics.en.html#s-puttingonhold" rel="section" title="7.12 How do I put a package on hold?">
 
95
<link href="ch-pkg_basics.en.html#s-sourcepkgs" rel="section" title="7.13 How do I install a source package?">
 
96
<link href="ch-pkg_basics.en.html#s-sourcebuild" rel="section" title="7.14 How do I build binary packages from a source package?">
 
97
<link href="ch-pkg_basics.en.html#s-creatingdebs" rel="section" title="7.15 How do I create Debian packages myself?">
 
98
<link href="ch-pkgtools.en.html#s-pkgprogs" rel="section" title="8.1 What programs does Debian provide for managing its packages?">
 
99
<link href="ch-pkgtools.en.html#s-updaterunning" rel="section" title="8.2 Debian claims to be able to update a running program; how is this accomplished?">
 
100
<link href="ch-pkgtools.en.html#s-whatpackages" rel="section" title="8.3 How can I tell what packages are already installed on a Debian system?">
 
101
<link href="ch-pkgtools.en.html#s-listfiles" rel="section" title="8.4 How to display the files of a package installed?">
 
102
<link href="ch-pkgtools.en.html#s-filesearch" rel="section" title="8.5 How can I find out what package produced a particular file?">
 
103
<link href="ch-pkgtools.en.html#s-datapackages" rel="section" title="8.6 Why doesn't get `foo-data' removed when I uninstall `foo'? How do I make sure old unused library-packages get purged?">
 
104
<link href="ch-uptodate.en.html#s-howtocurrent" rel="section" title="9.1 How can I keep my Debian system current?">
 
105
<link href="ch-uptodate.en.html#s-upgradesingle" rel="section" title="9.2 Must I go into single user mode in order to upgrade a package?">
 
106
<link href="ch-uptodate.en.html#s-savedebs" rel="section" title="9.3 Do I have to keep all those .deb archive files on my disk?">
 
107
<link href="ch-uptodate.en.html#s-keepingalog" rel="section" title="9.4 How can I keep a log of the packages I added to the system? I'd like to know when which package upgrades and removals have occured!">
 
108
<link href="ch-uptodate.en.html#s-autoupdate" rel="section" title="9.5 Can I automatically update the system?">
 
109
<link href="ch-uptodate.en.html#s-aptproxy" rel="section" title="9.6 I have several machines how can I download the updates only one time?">
 
110
<link href="ch-kernel.en.html#s-non-debian-kernel" rel="section" title="10.1 Can I install and compile a kernel without some Debian-specific tweaking?">
 
111
<link href="ch-kernel.en.html#s-customkernel" rel="section" title="10.2 What tools does Debian provide to build custom kernels?">
 
112
<link href="ch-kernel.en.html#s-custombootdisk" rel="section" title="10.3 How can I make a custom boot floppy?">
 
113
<link href="ch-kernel.en.html#s-modules" rel="section" title="10.4 What special provisions does Debian provide to deal with modules?">
 
114
<link href="ch-kernel.en.html#s-removeoldkernel" rel="section" title="10.5 Can I safely de-install an old kernel package, and if so, how?">
 
115
<link href="ch-customizing.en.html#s-papersize" rel="section" title="11.1 How can I ensure that all programs use the same paper size?">
 
116
<link href="ch-customizing.en.html#s-hardwareaccess" rel="section" title="11.2 How can I provide access to hardware peripherals, without compromising security?">
 
117
<link href="ch-customizing.en.html#s-consolefont" rel="section" title="11.3 How do I load a console font on startup the Debian way?">
 
118
<link href="ch-customizing.en.html#s-appdefaults" rel="section" title="11.4 How can I configure an X11 program's application defaults?">
 
119
<link href="ch-customizing.en.html#s-booting" rel="section" title="11.5 Every distribution seems to have a different boot-up method. Tell me about Debian's.">
 
120
<link href="ch-customizing.en.html#s-custombootscripts" rel="section" title="11.6 It looks as if Debian does not use <samp>rc.local</samp> to customize the boot process; what facilities are provided?">
 
121
<link href="ch-customizing.en.html#s-interconffiles" rel="section" title="11.7 How does the package management system deal with packages that contain configuration files for other packages?">
 
122
<link href="ch-customizing.en.html#s-divert" rel="section" title="11.8 How do I override a file installed by a package, so that a different version can be used instead?">
 
123
<link href="ch-customizing.en.html#s-localpackages" rel="section" title="11.9 How can I have my locally-built package included in the list of available packages that the package management system knows about?">
 
124
<link href="ch-customizing.en.html#s-diverse" rel="section" title="11.10 Some users like mawk, others like gawk; some like vim, others like elvis; some like trn, others like tin; how does Debian support diversity?">
 
125
<link href="ch-support.en.html#s-debiandocs" rel="section" title="12.1 What other documentation exists on and for a Debian system?">
 
126
<link href="ch-support.en.html#s-onlineresources" rel="section" title="12.2 Are there any on-line resources for discussing Debian?">
 
127
<link href="ch-support.en.html#s-searchtools" rel="section" title="12.3 Is there a quick way to search for information on Debian GNU/Linux?">
 
128
<link href="ch-support.en.html#s-buglogs" rel="section" title="12.4 Are there logs of known bugs?">
 
129
<link href="ch-support.en.html#s-bugreport" rel="section" title="12.5 How do I report a bug in Debian?">
 
130
<link href="ch-contributing.en.html#s-contrib" rel="section" title="13.1 How can I become a Debian software developer?">
 
131
<link href="ch-contributing.en.html#s-contribresources" rel="section" title="13.2 How can I contribute resources to the Debian project?">
 
132
<link href="ch-contributing.en.html#s-supportingorganizations" rel="section" title="13.3 How can I contribute financially to the Debian project?">
 
133
<link href="ch-redistrib.en.html#s-sellcds" rel="section" title="14.1 Can I make and sell Debian CDs?">
 
134
<link href="ch-redistrib.en.html#s-packagednonfree" rel="section" title="14.2 Can Debian be packaged with non-free software?">
 
135
<link href="ch-redistrib.en.html#s-childistro" rel="section" title="14.3 I am making a special Linux distribution for a &quot;vertical market&quot;. Can I use Debian GNU/Linux for the guts of a Linux system and add my own applications on top of it?">
 
136
<link href="ch-redistrib.en.html#s-commercialdebs" rel="section" title="14.4 Can I put my commercial program in a Debian &quot;package&quot; so that it installs effortlessly on any Debian system?">
 
137
<link href="ch-nexttime.en.html#s-i18n" rel="section" title="15.1 Extended support for non-English users">
 
138
<link href="ch-nexttime.en.html#s-dependencybasedboot" rel="section" title="15.2 Faster booting: Dependency based boot sequence">
 
139
<link href="ch-nexttime.en.html#s-di" rel="section" title="15.3 Improvements in the Debian Installer">
 
140
<link href="ch-nexttime.en.html#s-morearches" rel="section" title="15.4 More architectures">
 
141
<link href="ch-nexttime.en.html#s-morekernels" rel="section" title="15.5 More kernels">
 
142
<link href="ch-faqinfo.en.html#s-authors" rel="section" title="16.1 Authors">
 
143
<link href="ch-faqinfo.en.html#s-feedback" rel="section" title="16.2 Feedback">
 
144
<link href="ch-faqinfo.en.html#s-latest" rel="section" title="16.3 Availability">
 
145
<link href="ch-faqinfo.en.html#s-docformat" rel="section" title="16.4 Document format">
 
146
<link href="ch-choosing.en.html#s3.1.1" rel="subsection" title="3.1.1 You asked me to install stable, but in stable so and so hardware is not detected/working. What should I do?">
 
147
<link href="ch-choosing.en.html#s3.1.2" rel="subsection" title="3.1.2 Will there be different different versions of packages in different distributions?">
 
148
<link href="ch-choosing.en.html#s3.1.3" rel="subsection" title="3.1.3 The stable distributions really contains outdated packages. Just look at Kde, Gnome, Xorg or even the kernel. They are very old. Why is it so?">
 
149
<link href="ch-choosing.en.html#s3.1.4" rel="subsection" title="3.1.4 If I were to decide to change to another distribution, Can I do that?">
 
150
<link href="ch-choosing.en.html#s3.1.5" rel="subsection" title="3.1.5 Could you tell me whether to install testing or unstable?">
 
151
<link href="ch-choosing.en.html#s3.1.6" rel="subsection" title="3.1.6 You are talking about testing being broken. What do you mean by that?">
 
152
<link href="ch-choosing.en.html#s3.1.7" rel="subsection" title="3.1.7 Why is it that testing could be broken for months? Wont the fixes introduced in unstable flow directly down into testing?">
 
153
<link href="ch-choosing.en.html#s3.1.8" rel="subsection" title="3.1.8 From an administrator's point of view, Which distribution requires more attention?">
 
154
<link href="ch-choosing.en.html#s3.1.9" rel="subsection" title="3.1.9 What happens when a new release is made?">
 
155
<link href="ch-choosing.en.html#s3.1.10" rel="subsection" title="3.1.10 I have a working Desktop/cluster with Debian installed. How do I know which distribution I am running?">
 
156
<link href="ch-choosing.en.html#s3.1.11" rel="subsection" title="3.1.11 I am currently tracking stable. Can I change to testing or unstable? If so, How?">
 
157
<link href="ch-choosing.en.html#s3.1.12" rel="subsection" title="3.1.12 I am currently tracking testing (lenny). What will happen when a release is made? Will I still be tracking testing or will my machine be running the new stable distribution?">
 
158
<link href="ch-choosing.en.html#s3.1.13" rel="subsection" title="3.1.13 I am still confused. What did you say I should install?">
 
159
<link href="ch-choosing.en.html#s3.2.1" rel="subsection" title="3.2.1 I know that Knoppix/Linex/Ubuntu/... is Debian-based. So after installing it on the hard disk, can I use 'apt' package tools on it?">
 
160
<link href="ch-choosing.en.html#s3.2.2" rel="subsection" title="3.2.2 I installed Knoppix/Linex/Ubuntu/... on my hard disk. Now I have a problem. What should I do?">
 
161
<link href="ch-choosing.en.html#s3.2.3" rel="subsection" title="3.2.3 I'm using Knoppix/Linex/Ubuntu/... and now I want to use Debian. How do I migrate?">
 
162
<link href="ch-ftparchives.en.html#s-oldcodenames" rel="subsection" title="6.2.1 Which other codenames have been used in the past?">
 
163
<link href="ch-ftparchives.en.html#s-sourceforcodenames" rel="subsection" title="6.2.2 Where do these codenames come from?">
 
164
<link href="ch-ftparchives.en.html#s-frozen" rel="subsection" title="6.5.1 What about &quot;testing&quot;? How is it `frozen'?">
 
165
<link href="ch-pkgtools.en.html#s-dpkg" rel="subsection" title="8.1.1 dpkg">
 
166
<link href="ch-pkgtools.en.html#s-apt-get" rel="subsection" title="8.1.2 APT">
 
167
<link href="ch-pkgtools.en.html#s-aptitude" rel="subsection" title="8.1.3 aptitude">
 
168
<link href="ch-pkgtools.en.html#s-synaptic" rel="subsection" title="8.1.4 synaptic">
 
169
<link href="ch-pkgtools.en.html#s-tasksel" rel="subsection" title="8.1.5 tasksel">
 
170
<link href="ch-pkgtools.en.html#s-dpkg-extra" rel="subsection" title="8.1.6 Other package management tools">
 
171
<link href="ch-pkgtools.en.html#s-dselect" rel="subsection" title="8.1.6.1 dselect">
 
172
<link href="ch-pkgtools.en.html#s-dpkg-deb" rel="subsection" title="8.1.6.2 dpkg-deb">
 
173
<link href="ch-pkgtools.en.html#s-dpkg-split" rel="subsection" title="8.1.6.3 dpkg-split">
 
174
<link href="ch-uptodate.en.html#s-aptitude-upgrade" rel="subsection" title="9.1.1 aptitude">
 
175
<link href="ch-uptodate.en.html#s-apt" rel="subsection" title="9.1.2 apt-get, dselect and apt-cdrom">
 
176
<link href="ch-uptodate.en.html#s-update_aptitude" rel="subsection" title="9.1.3 aptitude">
 
177
<link href="ch-uptodate.en.html#s-mirror" rel="subsection" title="9.1.4 mirror">
 
178
<link href="ch-uptodate.en.html#s-dpkg-mountable" rel="subsection" title="9.1.5 dpkg-mountable">
 
179
<link href="ch-support.en.html#s12.2.1" rel="subsection" title="12.2.1 Mailing lists">
 
180
<link href="ch-support.en.html#s-mailinglistconduct" rel="subsection" title="12.2.1.1 What is the code of conduct for the mailing lists?">
 
181
<link href="ch-support.en.html#s12.2.2" rel="subsection" title="12.2.2 Web forums">
 
182
<link href="ch-support.en.html#s12.2.3" rel="subsection" title="12.2.3 Wiki">
 
183
<link href="ch-support.en.html#s12.2.4" rel="subsection" title="12.2.4 Maintainers">
 
184
<link href="ch-support.en.html#s12.2.5" rel="subsection" title="12.2.5 Usenet newsgroups">
 
185
<link href="ch-contributing.en.html#s-SPI" rel="subsection" title="13.3.1 Software in the Public Interest">
 
186
<link href="ch-contributing.en.html#s-FSF" rel="subsection" title="13.3.2 Free Software Foundation">
 
187
 
 
188
</head>
 
189
 
 
190
<body>
 
191
 
 
192
<p><a name="ch-pkg_basics"></a></p>
 
193
<hr>
 
194
 
 
195
<p>
 
196
[ <a href="ch-ftparchives.en.html">previous</a> ]
 
197
[ <a href="index.en.html#contents">Contents</a> ]
 
198
[ <a href="ch-basic_defs.en.html">1</a> ]
 
199
[ <a href="ch-getting.en.html">2</a> ]
 
200
[ <a href="ch-choosing.en.html">3</a> ]
 
201
[ <a href="ch-compat.en.html">4</a> ]
 
202
[ <a href="ch-software.en.html">5</a> ]
 
203
[ <a href="ch-ftparchives.en.html">6</a> ]
 
204
[ 7 ]
 
205
[ <a href="ch-pkgtools.en.html">8</a> ]
 
206
[ <a href="ch-uptodate.en.html">9</a> ]
 
207
[ <a href="ch-kernel.en.html">10</a> ]
 
208
[ <a href="ch-customizing.en.html">11</a> ]
 
209
[ <a href="ch-support.en.html">12</a> ]
 
210
[ <a href="ch-contributing.en.html">13</a> ]
 
211
[ <a href="ch-redistrib.en.html">14</a> ]
 
212
[ <a href="ch-nexttime.en.html">15</a> ]
 
213
[ <a href="ch-faqinfo.en.html">16</a> ]
 
214
[ <a href="ch-pkgtools.en.html">next</a> ]
 
215
</p>
 
216
 
 
217
<hr>
 
218
 
 
219
<h1>
 
220
The Debian GNU/Linux FAQ
 
221
<br>Chapter 7 - Basics of the Debian package management system
 
222
</h1>
 
223
 
 
224
<hr>
 
225
 
 
226
<p>
 
227
This chapter touches on some lower level internals of Debian package
 
228
management.  If you're interested mainly in <em>usage</em> of the relevant
 
229
tools, skip to chapters <a href="ch-pkgtools.en.html">The Debian package
 
230
management tools, Chapter 8</a> and/or <a href="ch-uptodate.en.html">Keeping
 
231
your Debian system up-to-date, Chapter 9</a>.
 
232
</p>
 
233
 
 
234
<hr>
 
235
 
 
236
<h2><a name="s-package"></a>7.1 What is a Debian package?</h2>
 
237
 
 
238
<p>
 
239
Packages generally contain all of the files necessary to implement a set of
 
240
related commands or features.  There are two types of Debian packages:
 
241
</p>
 
242
<ul>
 
243
<li>
 
244
<p>
 
245
<em>Binary packages</em>, which contain executables, configuration files,
 
246
man/info pages, copyright information, and other documentation.  These packages
 
247
are distributed in a Debian-specific archive format (see <a
 
248
href="#s-deb-format">What is the format of a Debian binary package?, Section
 
249
7.2</a>); they are usually distinguished by having a '.deb' file extension.
 
250
Binary packages can be unpacked using the Debian utility <samp>dpkg</samp>
 
251
(possibly via a frontend like <code>aptitude</code>); details are given in its
 
252
manual page.
 
253
</p>
 
254
</li>
 
255
</ul>
 
256
<ul>
 
257
<li>
 
258
<p>
 
259
<em>Source packages</em>, which consist of a <samp>.dsc</samp> file describing
 
260
the source package (including the names of the following files), a
 
261
<samp>.orig.tar.gz</samp> file that contains the original unmodified source in
 
262
gzip-compressed tar format and usually a <samp>.diff.gz</samp> file that
 
263
contains the Debian-specific changes to the original source.  The utility
 
264
<samp>dpkg-source</samp> packs and unpacks Debian source archives; details are
 
265
provided in its manual page.  (The program <code>apt-get</code> can get used a
 
266
frontend for <samp>dpkg-source</samp>.)
 
267
</p>
 
268
</li>
 
269
</ul>
 
270
 
 
271
<p>
 
272
Installation of software by the package system uses &quot;dependencies&quot;
 
273
which are carefully designed by the package maintainers.  These dependencies
 
274
are documented in the <samp>control</samp> file associated with each package.
 
275
For example, the package containing the GNU C compiler (<code>gcc</code>)
 
276
&quot;depends&quot; on the package <code>binutils</code> which includes the
 
277
linker and assembler.  If a user attempts to install <code>gcc</code> without
 
278
having first installed <code>binutils</code>, the package management system
 
279
(dpkg) will send an error message that it also needs <code>binutils</code>, and
 
280
stop installing <code>gcc</code>.  (However, this facility can be overridden by
 
281
the insistent user, see <code>dpkg(8)</code>.) See more in <a
 
282
href="#s-depends">What is meant by saying that a package <em>Depends</em>,
 
283
<em>Recommends</em>, <em>Suggests</em>, <em>Conflicts</em>, <em>Replaces</em>
 
284
or <em>Provides</em> another package?, Section 7.9</a> below.
 
285
</p>
 
286
 
 
287
<p>
 
288
Debian's packaging tools can be used to:
 
289
</p>
 
290
<ul>
 
291
<li>
 
292
<p>
 
293
manipulate and manage packages or parts of packages,
 
294
</p>
 
295
</li>
 
296
</ul>
 
297
<ul>
 
298
<li>
 
299
<p>
 
300
administer local overrides of files in a package,
 
301
</p>
 
302
</li>
 
303
</ul>
 
304
<ul>
 
305
<li>
 
306
<p>
 
307
aid developers in the construction of package archives, and
 
308
</p>
 
309
</li>
 
310
</ul>
 
311
<ul>
 
312
<li>
 
313
<p>
 
314
aid users in the installation of packages which reside on a remote FTP site.
 
315
</p>
 
316
</li>
 
317
</ul>
 
318
 
 
319
<hr>
 
320
 
 
321
<h2><a name="s-deb-format"></a>7.2 What is the format of a Debian binary package?</h2>
 
322
 
 
323
<p>
 
324
A Debian &quot;package&quot;, or a Debian archive file, contains the executable
 
325
files, libraries, and documentation associated with a particular suite of
 
326
program or set of related programs.  Normally, a Debian archive file has a
 
327
filename that ends in <samp>.deb</samp>.
 
328
</p>
 
329
 
 
330
<p>
 
331
The internals of this Debian binary packages format are described in the
 
332
<code>deb(5)</code> manual page.  This internal format is subject to change
 
333
(between major releases of Debian GNU/Linux), therefore please always use
 
334
<code>dpkg-deb(1)</code> if you need to do lowlevel manipulations on
 
335
<samp>.deb</samp> files.
 
336
</p>
 
337
 
 
338
<hr>
 
339
 
 
340
<h2><a name="s-pkgname"></a>7.3 Why are Debian package file names so long?</h2>
 
341
 
 
342
<p>
 
343
The Debian binary package file names conform to the following convention:
 
344
&lt;foo&gt;_&lt;VersionNumber&gt;-&lt;DebianRevisionNumber&gt;_&lt;DebianArchitecture&gt;.deb
 
345
</p>
 
346
 
 
347
<p>
 
348
Note that <samp>foo</samp> is supposed to be the package name.  As a check, one
 
349
can learn the package name associated with a particular Debian archive file
 
350
(.deb file) in one of these ways:
 
351
</p>
 
352
<ul>
 
353
<li>
 
354
<p>
 
355
inspect the &quot;Packages&quot; file in the directory where it was stored at a
 
356
Debian FTP archive site.  This file contains a stanza describing each package;
 
357
the first field in each stanza is the formal package name.
 
358
</p>
 
359
</li>
 
360
</ul>
 
361
<ul>
 
362
<li>
 
363
<p>
 
364
use the command <samp>dpkg --info foo_VVV-RRR_AAA.deb</samp> (where VVV, RRR
 
365
and AAA are the version, revision and architecture of the package in question,
 
366
respectively).  This displays, among other things, the package name
 
367
corresponding to the archive file being unpacked.
 
368
</p>
 
369
</li>
 
370
</ul>
 
371
 
 
372
<p>
 
373
The <samp>VVV</samp> component is the version number specified by the upstream
 
374
developer.  There are no standards in place here, so the version number may
 
375
have formats as different as &quot;19990513&quot; and &quot;1.3.8pre1&quot;.
 
376
</p>
 
377
 
 
378
<p>
 
379
The <samp>RRR</samp> component is the Debian revision number, and is specified
 
380
by the Debian developer (or an individual user if he chooses to build the
 
381
package himself).  This number corresponds to the revision level of the Debian
 
382
package, thus, a new revision level usually signifies changes in the Debian
 
383
Makefile (<samp>debian/rules</samp>), the Debian control file
 
384
(<samp>debian/control</samp>), the installation or removal scripts
 
385
(<samp>debian/p*</samp>), or in the configuration files used with the package.
 
386
</p>
 
387
 
 
388
<p>
 
389
The <samp>AAA</samp> component identifies the processor for which the package
 
390
was built.  This is commonly <samp>i386</samp>, which refers to chips
 
391
compatible to Intel's 386 or later versions.  For other possibilities review
 
392
Debian's FTP directory structure at <a
 
393
href="ch-ftparchives.en.html#s-dirtree">What are all those directories at the
 
394
Debian FTP archives?, Section 6.7</a>.  For details, see the description of
 
395
&quot;Debian architecture&quot; in the manual page
 
396
<code>dpkg-architecture(1)</code>.
 
397
</p>
 
398
 
 
399
<hr>
 
400
 
 
401
<h2><a name="s-controlfile"></a>7.4 What is a Debian control file?</h2>
 
402
 
 
403
<p>
 
404
Specifics regarding the contents of a Debian control file are provided in the
 
405
Debian Policy Manual, section 5, see <a
 
406
href="ch-support.en.html#s-debiandocs">What other documentation exists on and
 
407
for a Debian system?, Section 12.1</a>.
 
408
</p>
 
409
 
 
410
<p>
 
411
Briefly, a sample control file is shown below for the Debian package hello:
 
412
</p>
 
413
 
 
414
<pre>
 
415
     Package: hello
 
416
     Priority: optional
 
417
     Section: devel
 
418
     Installed-Size: 45
 
419
     Maintainer: Adam Heath &lt;doogie@debian.org&gt;
 
420
     Architecture: i386
 
421
     Version: 1.3-16
 
422
     Depends: libc6 (&gt;= 2.1)
 
423
     Description: The classic greeting, and a good example
 
424
      The GNU hello program produces a familiar, friendly greeting.  It
 
425
      allows nonprogrammers to use a classic computer science tool which
 
426
      would otherwise be unavailable to them.
 
427
      .
 
428
      Seriously, though: this is an example of how to do a Debian package.
 
429
      It is the Debian version of the GNU Project's `hello world' program
 
430
      (which is itself an example for the GNU Project).
 
431
</pre>
 
432
 
 
433
<p>
 
434
The Package field gives the package name.  This is the name by which the
 
435
package can be manipulated by the package tools, and usually similar to but not
 
436
necessarily the same as the first component string in the Debian archive file
 
437
name.
 
438
</p>
 
439
 
 
440
<p>
 
441
The Version field gives both the upstream developer's version number and (in
 
442
the last component) the revision level of the Debian package of this program as
 
443
explained in <a href="#s-pkgname">Why are Debian package file names so long?,
 
444
Section 7.3</a>.
 
445
</p>
 
446
 
 
447
<p>
 
448
The Architecture field specifies the chip for which this particular binary was
 
449
compiled.
 
450
</p>
 
451
 
 
452
<p>
 
453
The Depends field gives a list of packages that have to be installed in order
 
454
to install this package successfully.
 
455
</p>
 
456
 
 
457
<p>
 
458
The Installed-Size indicates how much disk space the installed package will
 
459
consume.  This is intended to be used by installation front-ends in order to
 
460
show whether there is enough disk space available to install the program.
 
461
</p>
 
462
 
 
463
<p>
 
464
The Section line gives the &quot;section&quot; where this Debian package is
 
465
stored at the Debian FTP sites.
 
466
</p>
 
467
 
 
468
<p>
 
469
The Priority indicates how important is this package for installation, so that
 
470
semi-intelligent software like dselect or aptitude can sort the package into a
 
471
category of e.g.  packages optionally installed.  See <a
 
472
href="#s-priority">What is an <em>Essential</em>, <em>Required</em>,
 
473
<em>Important</em>, <em>Standard</em>, <em>Optional</em>, or <em>Extra</em>
 
474
package?, Section 7.7</a>.
 
475
</p>
 
476
 
 
477
<p>
 
478
The Maintainer field gives the e-mail address of the person who is currently
 
479
responsible for maintaining this package.
 
480
</p>
 
481
 
 
482
<p>
 
483
The Description field gives a brief summary of the package's features.
 
484
</p>
 
485
 
 
486
<p>
 
487
For more information about all possible fields a package can have, please see
 
488
the Debian Policy Manual, section 5., &quot;Control files and their
 
489
fields&quot;.
 
490
</p>
 
491
 
 
492
<hr>
 
493
 
 
494
<h2><a name="s-conffile"></a>7.5 What is a Debian conffile?</h2>
 
495
 
 
496
<p>
 
497
Conffiles is a list of configuration files (usually placed in
 
498
<samp>/etc</samp>) that the package management system will not overwrite when
 
499
the package is upgraded.  This ensures that local values for the contents of
 
500
these files will be preserved, and is a critical feature enabling the in-place
 
501
upgrade of packages on a running system.
 
502
</p>
 
503
 
 
504
<p>
 
505
To determine exactly which files are preserved during an upgrade, run:
 
506
</p>
 
507
 
 
508
<pre>
 
509
     dpkg --status package
 
510
</pre>
 
511
 
 
512
<p>
 
513
And look under &quot;Conffiles:&quot;.
 
514
</p>
 
515
 
 
516
<hr>
 
517
 
 
518
<h2><a name="s-maintscripts"></a>7.6 What is a Debian preinst, postinst, prerm, and postrm script?</h2>
 
519
 
 
520
<p>
 
521
These files are executable scripts which are automatically run before or after
 
522
a package is installed.  Along with a file named <samp>control</samp>, all of
 
523
these files are part of the &quot;control&quot; section of a Debian archive
 
524
file.
 
525
</p>
 
526
 
 
527
<p>
 
528
The individual files are:
 
529
</p>
 
530
<dl>
 
531
<dt>preinst</dt>
 
532
<dd>
 
533
<p>
 
534
This script executes before that package will be unpacked from its Debian
 
535
archive (&quot;.deb&quot;) file.  Many 'preinst' scripts stop services for
 
536
packages which are being upgraded until their installation or upgrade is
 
537
completed (following the successful execution of the 'postinst' script).
 
538
</p>
 
539
</dd>
 
540
</dl>
 
541
<dl>
 
542
<dt>postinst</dt>
 
543
<dd>
 
544
<p>
 
545
This script typically completes any required configuration of the package
 
546
<samp>foo</samp> once <samp>foo</samp> has been unpacked from its Debian
 
547
archive (&quot;.deb&quot;) file.  Often, 'postinst' scripts ask the user for
 
548
input, and/or warn the user that if he accepts default values, he should
 
549
remember to go back and re-configure that package as the situation warrants.
 
550
Many 'postinst' scripts then execute any commands necessary to start or restart
 
551
a service once a new package has been installed or upgraded.
 
552
</p>
 
553
</dd>
 
554
</dl>
 
555
<dl>
 
556
<dt>prerm</dt>
 
557
<dd>
 
558
<p>
 
559
This script typically stops any daemons which are associated with a package.
 
560
It is executed before the removal of files associated with the package.
 
561
</p>
 
562
</dd>
 
563
</dl>
 
564
<dl>
 
565
<dt>postrm</dt>
 
566
<dd>
 
567
<p>
 
568
This script typically modifies links or other files associated with
 
569
<samp>foo</samp>, and/or removes files created by the package.  (Also see <a
 
570
href="#s-virtual">What is a Virtual Package?, Section 7.8</a>.)
 
571
</p>
 
572
</dd>
 
573
</dl>
 
574
 
 
575
<p>
 
576
Currently all of the control files can be found in directory
 
577
<samp>/var/lib/dpkg/info</samp>.  The files relevant to package
 
578
<samp>foo</samp> begin with the name &quot;foo&quot; and have file extensions
 
579
of &quot;preinst&quot;, &quot;postinst&quot;, etc., as appropriate.  The file
 
580
<samp>foo.list</samp> in that directory lists all of the files that were
 
581
installed with the package <samp>foo</samp>.  (Note that the location of these
 
582
files is a dpkg internal; you should not rely on it.)
 
583
</p>
 
584
 
 
585
<hr>
 
586
 
 
587
<h2><a name="s-priority"></a>7.7 What is an <em>Essential</em>, <em>Required</em>, <em>Important</em>, <em>Standard</em>, <em>Optional</em>, or <em>Extra</em> package?</h2>
 
588
 
 
589
<p>
 
590
Each Debian package is assigned a <em>priority</em> by the distribution
 
591
maintainers, as an aid to the package management system.  The priorities are:
 
592
</p>
 
593
<ul>
 
594
<li>
 
595
<p>
 
596
<strong>Required</strong>: packages that are necessary for the proper
 
597
functioning of the system.
 
598
</p>
 
599
 
 
600
<p>
 
601
This includes all tools that are necessary to repair system defects.  You must
 
602
not remove these packages or your system may become totally broken and you may
 
603
probably not even be able to use dpkg to put things back.  Systems with only
 
604
the Required packages are probably unusable, but they do have enough
 
605
functionality to allow the sysadmin to boot and install more software.
 
606
</p>
 
607
</li>
 
608
</ul>
 
609
<ul>
 
610
<li>
 
611
<p>
 
612
<strong>Important</strong> packages should be found on any Unix-like system.
 
613
</p>
 
614
 
 
615
<p>
 
616
Other packages which the system will not run well or be usable without will be
 
617
here.  This does <em>NOT</em> include Emacs or X or TeX or any other large
 
618
applications.  These packages only constitute the bare infrastructure.
 
619
</p>
 
620
</li>
 
621
</ul>
 
622
<ul>
 
623
<li>
 
624
<p>
 
625
<strong>Standard</strong> packages are standard on any Linux system, including
 
626
a reasonably small but not too limited character-mode system.  Tools are
 
627
included to be able to browse the web (using w3m), send e-mail (with mutt) and
 
628
download files from FTP servers.
 
629
</p>
 
630
 
 
631
<p>
 
632
This is what will install by default if users do not select anything else.  It
 
633
does not include many large applications, but it does include the Python
 
634
interpreter and some server software like OpenSSH (for remote administration),
 
635
Exim (for mail delivery, although it can be configured for local delivery
 
636
only), an identd server (pidentd) and the RPC portmapper
 
637
(<samp>portmap</samp>).  It also includes some common generic documentation
 
638
that most users will find helpful.
 
639
</p>
 
640
</li>
 
641
</ul>
 
642
<ul>
 
643
<li>
 
644
<p>
 
645
<strong>Optional</strong> packages include all those that you might reasonably
 
646
want to install if you did not know what it was, or do not have specialized
 
647
requirements.
 
648
</p>
 
649
 
 
650
<p>
 
651
This includes X, a full TeX distribution, and lots of applications.
 
652
</p>
 
653
</li>
 
654
</ul>
 
655
<ul>
 
656
<li>
 
657
<p>
 
658
<strong>Extra</strong>: packages that either conflict with others with higher
 
659
priorities, are only likely to be useful if you already know what they are, or
 
660
have specialized requirements that make them unsuitable for
 
661
&quot;Optional&quot;.
 
662
</p>
 
663
</li>
 
664
</ul>
 
665
 
 
666
<p>
 
667
If you do a default Debian installation all the packages of priority
 
668
<strong>Standard</strong> or higher will be installed in your system.  If you
 
669
select pre-defined tasks you will get lower priority packages too.
 
670
</p>
 
671
 
 
672
<p>
 
673
Additionally, some packages are marked as <strong>Essential</strong> since they
 
674
are absolutely necessary for the proper functioning of the system.  The package
 
675
management tools will refuse to remove these.
 
676
</p>
 
677
 
 
678
<hr>
 
679
 
 
680
<h2><a name="s-virtual"></a>7.8 What is a Virtual Package?</h2>
 
681
 
 
682
<p>
 
683
A virtual package is a generic name that applies to any one of a group of
 
684
packages, all of which provide similar basic functionality.  For example, both
 
685
the <samp>tin</samp> and <samp>trn</samp> programs are news readers, and should
 
686
therefore satisfy any dependency of a program that required a news reader on a
 
687
system, in order to work or to be useful.  They are therefore both said to
 
688
provide the &quot;virtual package&quot; called <samp>news-reader</samp>.
 
689
</p>
 
690
 
 
691
<p>
 
692
Similarly, <samp>smail</samp> and <samp>sendmail</samp> both provide the
 
693
functionality of a mail transport agent.  They are therefore said to provide
 
694
the virtual package, &quot;mail transport agent&quot;.  If either one is
 
695
installed, then any program depending on the installation of a
 
696
<samp>mail-transport-agent</samp> will be satisfied by the existence of this
 
697
virtual package.
 
698
</p>
 
699
 
 
700
<p>
 
701
Debian provides a mechanism so that, if more than one package which provide the
 
702
same virtual package is installed on a system, then system administrators can
 
703
set one as the preferred package.  The relevant command is
 
704
<samp>update-alternatives</samp>, and is described further in <a
 
705
href="ch-customizing.en.html#s-diverse">Some users like mawk, others like gawk;
 
706
some like vim, others like elvis; some like trn, others like tin; how does
 
707
Debian support diversity?, Section 11.10</a>.
 
708
</p>
 
709
 
 
710
<hr>
 
711
 
 
712
<h2><a name="s-depends"></a>7.9 What is meant by saying that a package <em>Depends</em>, <em>Recommends</em>, <em>Suggests</em>, <em>Conflicts</em>, <em>Replaces</em> or <em>Provides</em> another package?</h2>
 
713
 
 
714
<p>
 
715
The Debian package system has a range of package &quot;dependencies&quot; which
 
716
are designed to indicate (in a single flag) the level at which Program A can
 
717
operate independently of the existence of Program B on a given system:
 
718
</p>
 
719
<ul>
 
720
<li>
 
721
<p>
 
722
Package A <em>depends</em> on Package B if B absolutely must be installed in
 
723
order to run A.  In some cases, A depends not only on B, but on a version of B.
 
724
In this case, the version dependency is usually a lower limit, in the sense
 
725
that A depends on any version of B more recent than some specified version.
 
726
</p>
 
727
</li>
 
728
</ul>
 
729
<ul>
 
730
<li>
 
731
<p>
 
732
Package A <em>recommends</em> Package B, if the package maintainer judges that
 
733
most users would not want A without also having the functionality provided by
 
734
B.
 
735
</p>
 
736
</li>
 
737
</ul>
 
738
<ul>
 
739
<li>
 
740
<p>
 
741
Package A <em>suggests</em> Package B if B contains files that are related to
 
742
(and usually enhance) the functionality of A.
 
743
</p>
 
744
</li>
 
745
</ul>
 
746
<ul>
 
747
<li>
 
748
<p>
 
749
Package A <em>conflicts</em> with Package B when A will not operate if B is
 
750
installed on the system.  Most often, conflicts are cases where A contains
 
751
files which are an improvement over those in B.  &quot;Conflicts&quot; are
 
752
often combined with &quot;replaces&quot;.
 
753
</p>
 
754
</li>
 
755
</ul>
 
756
<ul>
 
757
<li>
 
758
<p>
 
759
Package A <em>replaces</em> Package B when files installed by B are removed and
 
760
(in some cases) over-written by files in A.
 
761
</p>
 
762
</li>
 
763
</ul>
 
764
<ul>
 
765
<li>
 
766
<p>
 
767
Package A <em>provides</em> Package B when all of the files and functionality
 
768
of B are incorporated into A.  This mechanism provides a way for users with
 
769
constrained disk space to get only that part of package A which they really
 
770
need.
 
771
</p>
 
772
</li>
 
773
</ul>
 
774
 
 
775
<p>
 
776
More detailed information on the use of each these terms can be found in the
 
777
Policy manual.
 
778
</p>
 
779
 
 
780
<hr>
 
781
 
 
782
<h2><a name="s-pre-depends"></a>7.10 What is meant by Pre-Depends?</h2>
 
783
 
 
784
<p>
 
785
&quot;Pre-Depends&quot; is a special dependency.  In the case of most packages,
 
786
<samp>dpkg</samp> will unpack its archive file (i.e., its <samp>.deb</samp>
 
787
file) independently of whether or not the files on which it depends exist on
 
788
the system.  Simplistically, unpacking means that <samp>dpkg</samp> will
 
789
extract the files from the archive file that were meant to be installed on your
 
790
file system, and put them in place.  If those packages <em>depend</em> on the
 
791
existence of some other packages on your system, <samp>dpkg</samp> will refuse
 
792
to complete the installation (by executing its &quot;configure&quot; action)
 
793
until the other packages are installed.
 
794
</p>
 
795
 
 
796
<p>
 
797
However, for some packages, <samp>dpkg</samp> will refuse even to unpack them
 
798
until certain dependencies are resolved.  Such packages are said to
 
799
&quot;Pre-depend&quot; on the presence of some other packages.  The Debian
 
800
project provided this mechanism to support the safe upgrading of systems from
 
801
<samp>a.out</samp> format to <samp>ELF</samp> format, where the <em>order</em>
 
802
in which packages were unpacked was critical.  There are other large upgrade
 
803
situations where this method is useful, e.g.  the packages with the required
 
804
priority and their LibC dependency.
 
805
</p>
 
806
 
 
807
<p>
 
808
As before, more detailed information about this can be found in the Policy
 
809
manual.
 
810
</p>
 
811
 
 
812
<hr>
 
813
 
 
814
<h2><a name="s-pkgstatus"></a>7.11 What is meant by <em>unknown</em>, <em>install</em>, <em>remove</em>, <em>purge</em> and <em>hold</em> in the package status?</h2>
 
815
 
 
816
<p>
 
817
These &quot;want&quot; flags tell what the user wanted to do with a package (as
 
818
indicated either by the user's actions in the &quot;Select&quot; section of
 
819
<samp>dselect</samp>, or by the user's direct invocations of
 
820
<samp>dpkg</samp>).
 
821
</p>
 
822
 
 
823
<p>
 
824
Their meanings are:
 
825
</p>
 
826
<ul>
 
827
<li>
 
828
<p>
 
829
unknown - the user has never indicated whether he wants the package
 
830
</p>
 
831
</li>
 
832
</ul>
 
833
<ul>
 
834
<li>
 
835
<p>
 
836
install - the user wants the package installed or upgraded
 
837
</p>
 
838
</li>
 
839
</ul>
 
840
<ul>
 
841
<li>
 
842
<p>
 
843
remove - the user wants the package removed, but does not want to remove any
 
844
existing configuration files.
 
845
</p>
 
846
</li>
 
847
</ul>
 
848
<ul>
 
849
<li>
 
850
<p>
 
851
purge - the user wants the package to be removed completely, including its
 
852
configuration files.
 
853
</p>
 
854
</li>
 
855
</ul>
 
856
<ul>
 
857
<li>
 
858
<p>
 
859
hold - the user wants this package not to be processed, i.e., he wants to keep
 
860
the current version with the current status whatever that is.
 
861
</p>
 
862
</li>
 
863
</ul>
 
864
 
 
865
<hr>
 
866
 
 
867
<h2><a name="s-puttingonhold"></a>7.12 How do I put a package on hold?</h2>
 
868
 
 
869
<p>
 
870
There are three ways of holding back packages, with dpkg, aptitude or with
 
871
dselect.
 
872
</p>
 
873
 
 
874
<p>
 
875
With dpkg, you have to export the list of package selections, with:
 
876
</p>
 
877
 
 
878
<pre>
 
879
     dpkg --get-selections \* &gt; selections.txt
 
880
</pre>
 
881
 
 
882
<p>
 
883
Then edit the resulting file <code>selections.txt</code>, change the line
 
884
containing the package you wish to hold, e.g.  <code>libc6</code>, from this:
 
885
</p>
 
886
 
 
887
<pre>
 
888
     libc6                                           install
 
889
</pre>
 
890
 
 
891
<p>
 
892
to this:
 
893
</p>
 
894
 
 
895
<pre>
 
896
     libc6                                           hold
 
897
</pre>
 
898
 
 
899
<p>
 
900
Save the file, and reload it into dpkg database with:
 
901
</p>
 
902
 
 
903
<pre>
 
904
     dpkg --set-selections &lt; selections.txt
 
905
</pre>
 
906
 
 
907
<p>
 
908
With aptitude, you can hold a package using
 
909
</p>
 
910
 
 
911
<pre>
 
912
     aptitude hold package_name
 
913
</pre>
 
914
 
 
915
<p>
 
916
and remove the hold with
 
917
</p>
 
918
 
 
919
<pre>
 
920
     aptitude unhold package_name
 
921
</pre>
 
922
 
 
923
<p>
 
924
With dselect, you have to enter the [S]elect screen, find the package you wish
 
925
to hold in its present state, and press the `=' key (or `H').  The changes will
 
926
go live immediately after you exit the [S]elect screen.
 
927
</p>
 
928
 
 
929
<hr>
 
930
 
 
931
<h2><a name="s-sourcepkgs"></a>7.13 How do I install a source package?</h2>
 
932
 
 
933
<p>
 
934
Debian source packages can't actually be &quot;installed&quot;, they are just
 
935
unpacked in whatever directory you want to build the binary packages they
 
936
produce.
 
937
</p>
 
938
 
 
939
<p>
 
940
Source packages are distributed on most of the same mirrors where you can
 
941
obtain the binary packages.  If you set up your APT's
 
942
<code>sources.list(5)</code> to include the appropriate &quot;deb-src&quot;
 
943
lines, you'll be able to easily download any source packages by running
 
944
</p>
 
945
 
 
946
<pre>
 
947
     apt-get source foo
 
948
</pre>
 
949
 
 
950
<p>
 
951
To help you in actually building the source package, Debian source package
 
952
provide the so-called build-dependencies mechanism.  This means that the source
 
953
package maintainer keeps a list of other packages that are required to build
 
954
their package.  To see how this is useful, run
 
955
</p>
 
956
 
 
957
<pre>
 
958
     apt-get build-dep foo
 
959
</pre>
 
960
 
 
961
<p>
 
962
before building the source.
 
963
</p>
 
964
 
 
965
<hr>
 
966
 
 
967
<h2><a name="s-sourcebuild"></a>7.14 How do I build binary packages from a source package?</h2>
 
968
 
 
969
<p>
 
970
The preferred way to do this is by using various wrapper tools.  We'll show how
 
971
it's done using the <samp>devscripts</samp> tools.  Install this package if you
 
972
haven't done so already.
 
973
</p>
 
974
 
 
975
<p>
 
976
Now, first get the source package:
 
977
</p>
 
978
 
 
979
<pre>
 
980
     apt-get source foo
 
981
</pre>
 
982
 
 
983
<p>
 
984
and change to the source tree:
 
985
</p>
 
986
 
 
987
<pre>
 
988
     cd foo-*
 
989
</pre>
 
990
 
 
991
<p>
 
992
Then install needed build-dependencies (if any):
 
993
</p>
 
994
 
 
995
<pre>
 
996
     sudo apt-get build-dep foo
 
997
</pre>
 
998
 
 
999
<p>
 
1000
Then create a dedicated version of your own build (so that you won't get
 
1001
confused later when Debian itself releases a new version)
 
1002
</p>
 
1003
 
 
1004
<pre>
 
1005
     dch -l local 'Blah blah blah'
 
1006
</pre>
 
1007
 
 
1008
<p>
 
1009
And finally build your package
 
1010
</p>
 
1011
 
 
1012
<pre>
 
1013
     debuild -us -uc
 
1014
</pre>
 
1015
 
 
1016
<p>
 
1017
If everything worked out fine, you should now be able to install your package
 
1018
by running
 
1019
</p>
 
1020
 
 
1021
<pre>
 
1022
     sudo dpkg -i ../*.deb
 
1023
</pre>
 
1024
 
 
1025
<p>
 
1026
If you prefer to do things manually, and don't want to use
 
1027
<samp>devscripts</samp>, follow this procedure:
 
1028
</p>
 
1029
 
 
1030
<p>
 
1031
You will need all of foo_*.dsc, foo_*.tar.gz and foo_*.diff.gz to compile the
 
1032
source (note: there is no .diff.gz for some packages that are native to
 
1033
Debian).
 
1034
</p>
 
1035
 
 
1036
<p>
 
1037
Once you have them (<a href="#s-sourcepkgs">How do I install a source package?,
 
1038
Section 7.13</a>), if you have the <code>dpkg-dev</code> package installed, the
 
1039
following command:
 
1040
</p>
 
1041
 
 
1042
<pre>
 
1043
     dpkg-source -x foo_version-revision.dsc
 
1044
</pre>
 
1045
 
 
1046
<p>
 
1047
will extract the package into a directory called <samp>foo-version</samp>.
 
1048
</p>
 
1049
 
 
1050
<p>
 
1051
If you want just to compile the package, you may cd into
 
1052
<samp>foo-version</samp> directory and issue the command
 
1053
</p>
 
1054
 
 
1055
<pre>
 
1056
     dpkg-buildpackage -rfakeroot -b
 
1057
</pre>
 
1058
 
 
1059
<p>
 
1060
to build the package (note that this also requires the <code>fakeroot</code>
 
1061
package), and then
 
1062
</p>
 
1063
 
 
1064
<pre>
 
1065
     dpkg -i ../foo_version-revision_arch.deb
 
1066
</pre>
 
1067
 
 
1068
<p>
 
1069
to install the newly-built package(s).
 
1070
</p>
 
1071
 
 
1072
<hr>
 
1073
 
 
1074
<h2><a name="s-creatingdebs"></a>7.15 How do I create Debian packages myself?</h2>
 
1075
 
 
1076
<p>
 
1077
For a more detailed description on this, read the New Maintainers' Guide,
 
1078
available in the <code>maint-guide</code> package, or at <code><a
 
1079
href="http://www.debian.org/doc/devel-manuals#maint-guide">http://www.debian.org/doc/devel-manuals#maint-guide</a></code>.
 
1080
</p>
 
1081
 
 
1082
<hr>
 
1083
 
 
1084
<p>
 
1085
[ <a href="ch-ftparchives.en.html">previous</a> ]
 
1086
[ <a href="index.en.html#contents">Contents</a> ]
 
1087
[ <a href="ch-basic_defs.en.html">1</a> ]
 
1088
[ <a href="ch-getting.en.html">2</a> ]
 
1089
[ <a href="ch-choosing.en.html">3</a> ]
 
1090
[ <a href="ch-compat.en.html">4</a> ]
 
1091
[ <a href="ch-software.en.html">5</a> ]
 
1092
[ <a href="ch-ftparchives.en.html">6</a> ]
 
1093
[ 7 ]
 
1094
[ <a href="ch-pkgtools.en.html">8</a> ]
 
1095
[ <a href="ch-uptodate.en.html">9</a> ]
 
1096
[ <a href="ch-kernel.en.html">10</a> ]
 
1097
[ <a href="ch-customizing.en.html">11</a> ]
 
1098
[ <a href="ch-support.en.html">12</a> ]
 
1099
[ <a href="ch-contributing.en.html">13</a> ]
 
1100
[ <a href="ch-redistrib.en.html">14</a> ]
 
1101
[ <a href="ch-nexttime.en.html">15</a> ]
 
1102
[ <a href="ch-faqinfo.en.html">16</a> ]
 
1103
[ <a href="ch-pkgtools.en.html">next</a> ]
 
1104
</p>
 
1105
 
 
1106
<hr>
 
1107
 
 
1108
<p>
 
1109
The Debian GNU/Linux FAQ
 
1110
</p>
 
1111
 
 
1112
<address>
 
1113
version 4.0.3, 6 August 2008<br>
 
1114
<br>
 
1115
Authors are listed at <a href="ch-faqinfo.en.html#s-authors">Debian FAQ Authors</a><br>
 
1116
<br>
 
1117
</address>
 
1118
<hr>
 
1119
 
 
1120
</body>
 
1121
 
 
1122
</html>
 
1123