298 lines
11 KiB
HTML
298 lines
11 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
|
|
|
<title>APT HOWTO (Obsolete Documentation) - Very useful helpers</title>
|
|
|
|
<link href="index.en.html" rel="start">
|
|
<link href="ch-apt-get.en.html" rel="prev">
|
|
<link href="ch-search.en.html" rel="next">
|
|
<link href="index.en.html#contents" rel="contents">
|
|
<link href="index.en.html#copyright" rel="copyright">
|
|
<link href="ch1.en.html" rel="chapter" title="1 Introduction">
|
|
<link href="ch-basico.en.html" rel="chapter" title="2 Basic Configuration">
|
|
<link href="ch-apt-get.en.html" rel="chapter" title="3 Managing packages">
|
|
<link href="ch-helpers.en.html" rel="chapter" title="4 Very useful helpers">
|
|
<link href="ch-search.en.html" rel="chapter" title="5 Getting information about packages.">
|
|
<link href="ch-sourcehandling.en.html" rel="chapter" title="6 Working with source packages">
|
|
<link href="ch-erros.en.html" rel="chapter" title="7 How to deal with errors">
|
|
<link href="ch-distros.en.html" rel="chapter" title="8 What distributions support APT?">
|
|
<link href="ch-agradecimentos.en.html" rel="chapter" title="9 Credits">
|
|
<link href="ch-novas.en.html" rel="chapter" title="10 New versions of this tutorial">
|
|
<link href="ch-basico.en.html#s-sources.list" rel="section" title="2.1 The /etc/apt/sources.list file">
|
|
<link href="ch-basico.en.html#s-dpkg-scanpackages" rel="section" title="2.2 How to use APT locally">
|
|
<link href="ch-basico.en.html#s-netselect" rel="section" title="2.3 Deciding which mirror is the best to include in the sources.list file: netselect, netselect-apt">
|
|
<link href="ch-basico.en.html#s-cdrom" rel="section" title="2.4 Adding a CD-ROM to the sources.list file">
|
|
<link href="ch-apt-get.en.html#s-update" rel="section" title="3.1 Updating the list of available packages">
|
|
<link href="ch-apt-get.en.html#s-install" rel="section" title="3.2 Installing packages">
|
|
<link href="ch-apt-get.en.html#s-remove" rel="section" title="3.3 Removing packages">
|
|
<link href="ch-apt-get.en.html#s-upgrade" rel="section" title="3.4 Upgrading packages">
|
|
<link href="ch-apt-get.en.html#s-dist-upgrade" rel="section" title="3.5 Upgrading to a new release">
|
|
<link href="ch-apt-get.en.html#s-clean" rel="section" title="3.6 Removing unused package files: apt-get clean and autoclean">
|
|
<link href="ch-apt-get.en.html#s-dselect-upgrade" rel="section" title="3.7 Using APT with dselect">
|
|
<link href="ch-apt-get.en.html#s-default-version" rel="section" title="3.8 How to keep a mixed system">
|
|
<link href="ch-apt-get.en.html#s-apt-show-versions" rel="section" title="3.9 How to upgrade packages from specific versions of Debian">
|
|
<link href="ch-apt-get.en.html#s-pin" rel="section" title="3.10 How to keep specific versions of packages installed (complex)">
|
|
<link href="ch-helpers.en.html#s-equivs" rel="section" title="4.1 How to install locally compiled packages: equivs">
|
|
<link href="ch-helpers.en.html#s-localepurge" rel="section" title="4.2 Removing unused locale files: localepurge">
|
|
<link href="ch-helpers.en.html#s-helper-show-versions" rel="section" title="4.3 How to know what packages may be upgraded">
|
|
<link href="ch-search.en.html#s-cache" rel="section" title="5.1 Discovering package names">
|
|
<link href="ch-search.en.html#s-dpkg-search" rel="section" title="5.2 Using dpkg to find package names">
|
|
<link href="ch-search.en.html#s-auto-apt" rel="section" title="5.3 How to install packages "on demand"">
|
|
<link href="ch-search.en.html#s-apt-file" rel="section" title="5.4 How to discover to which package a file belongs">
|
|
<link href="ch-search.en.html#s-apt-listchanges" rel="section" title="5.5 How to keep informed about the changes in the packages.">
|
|
<link href="ch-sourcehandling.en.html#s-source" rel="section" title="6.1 Downloading source packages">
|
|
<link href="ch-sourcehandling.en.html#s-build-dep" rel="section" title="6.2 Packages needed for compiling a source package">
|
|
<link href="ch-erros.en.html#s-erros-comuns" rel="section" title="7.1 Common errors">
|
|
<link href="ch-erros.en.html#s-help" rel="section" title="7.2 Where can I find help?">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p><a name="ch-helpers"></a></p>
|
|
<hr>
|
|
|
|
<p>
|
|
[ <a href="ch-apt-get.en.html">previous</a> ]
|
|
[ <a href="index.en.html#contents">Contents</a> ]
|
|
[ <a href="ch1.en.html">1</a> ]
|
|
[ <a href="ch-basico.en.html">2</a> ]
|
|
[ <a href="ch-apt-get.en.html">3</a> ]
|
|
[ 4 ]
|
|
[ <a href="ch-search.en.html">5</a> ]
|
|
[ <a href="ch-sourcehandling.en.html">6</a> ]
|
|
[ <a href="ch-erros.en.html">7</a> ]
|
|
[ <a href="ch-distros.en.html">8</a> ]
|
|
[ <a href="ch-agradecimentos.en.html">9</a> ]
|
|
[ <a href="ch-novas.en.html">10</a> ]
|
|
[ <a href="ch-search.en.html">next</a> ]
|
|
</p>
|
|
|
|
<hr>
|
|
|
|
<h1>
|
|
APT HOWTO (Obsolete Documentation)
|
|
<br>Chapter 4 - Very useful helpers
|
|
</h1>
|
|
|
|
<hr>
|
|
|
|
<h2><a name="s-equivs"></a>4.1 How to install locally compiled packages: equivs</h2>
|
|
|
|
<p>
|
|
Sometimes, people want to use a specific version of a program available only on
|
|
source code, with no Debian package. But the packaging system can be a trouble
|
|
when doing this. Suppose you want to compile a new version of your email
|
|
server. All is fine, but many packages in Debian depend on an MTA (Mail
|
|
Transport Agent). Since you installed something you compiled by yourself, the
|
|
packaging system doesn't know about it.
|
|
</p>
|
|
|
|
<p>
|
|
That's where <code>equivs</code> enters the scene. To use it, install the
|
|
package with that name. Equivs creates an empty package that fullfills
|
|
dependencies, making the package system believe that the dependencies are
|
|
satisfied.
|
|
</p>
|
|
|
|
<p>
|
|
Before we begin, it is good to remind you that there are safer ways of
|
|
compiling a program which is already packaged for Debian with different
|
|
options, and that one should not use equivs to replace dependencies if you
|
|
don't know what you are doing. See section <a
|
|
href="ch-sourcehandling.en.html">Working with source packages, Chapter 6</a>
|
|
for more information.
|
|
</p>
|
|
|
|
<p>
|
|
Let's continue with the MTA example, you just installed your new compiled
|
|
<code>postfix</code> and goes on for installing <code>mutt</code>. Suddenly
|
|
you discover that <code>mutt</code> wants to install another MTA. But you
|
|
already have yours.
|
|
</p>
|
|
|
|
<p>
|
|
Go to some directory (<code>/tmp</code>, for example) and run:
|
|
</p>
|
|
|
|
<pre>
|
|
# equivs-control <var>name</var>
|
|
</pre>
|
|
|
|
<p>
|
|
Replace <var>name</var> for the name of the control file you want to create.
|
|
The file will be created as follows:
|
|
</p>
|
|
|
|
<pre>
|
|
Section: misc
|
|
Priority: optional
|
|
Standards-Version: 3.0.1
|
|
|
|
Package: <enter package name; defaults to equivs-dummy>
|
|
Version: <enter version here; defaults to 1.0>
|
|
Maintainer: <your name and email address; defaults to username>
|
|
Pre-Depends: <packages>
|
|
Depends: <packages>
|
|
Recommends: <packages>
|
|
Suggests: <package>
|
|
Provides: <(virtual)package>
|
|
Architecture: all
|
|
Copyright: <copyright file; defaults to GPL2>
|
|
Changelog: <changelog file; defaults to a generic changelog>
|
|
Readme: <README.Debian file; defaults to a generic one>
|
|
Extra-Files: <additional files for the doc directory, comma-separated>
|
|
Description: <short description; defaults to some wise words>
|
|
long description and info
|
|
.
|
|
second paragraph
|
|
</pre>
|
|
|
|
<p>
|
|
We just need modify this to do what we want. Have a look at the field's format
|
|
and to their descriptions, there's no need to explain each one here, let's do
|
|
what's required:
|
|
</p>
|
|
|
|
<pre>
|
|
Section: misc
|
|
Priority: optional
|
|
Standards-Version: 3.0.1
|
|
|
|
Package: mta-local
|
|
Provides: mail-transport-agent
|
|
</pre>
|
|
|
|
<p>
|
|
Yes, that's all. <code>mutt</code> depends on
|
|
<code>mail-transport-agent</code>, that is a virtual package provided by all
|
|
MTAs, I could simply name the package <code>mail-transport-agent</code>, but I
|
|
preferred to use the virtual package's schema, using Provides.
|
|
</p>
|
|
|
|
<p>
|
|
Now you only need to build the package:
|
|
</p>
|
|
|
|
<pre>
|
|
# equivs-build <var>name</var>
|
|
dh_testdir
|
|
touch build-stamp
|
|
dh_testdir
|
|
dh_testroot
|
|
dh_clean -k
|
|
# Add here commands to install the package into debian/tmp.
|
|
touch install-stamp
|
|
dh_testdir
|
|
dh_testroot
|
|
dh_installdocs
|
|
dh_installchangelogs
|
|
dh_compress
|
|
dh_fixperms
|
|
dh_installdeb
|
|
dh_gencontrol
|
|
dh_md5sums
|
|
dh_builddeb
|
|
dpkg-deb: building package `<var>name</var>' in `../<var>name</var>_1.0_all.deb'.
|
|
|
|
The package has been created.
|
|
Attention, the package has been created in the current directory,
|
|
</pre>
|
|
|
|
<p>
|
|
And install the resulting <samp>.deb</samp>.
|
|
</p>
|
|
|
|
<p>
|
|
As one can see, there are several uses for <code>equivs</code>. One can even
|
|
crate a <samp>my-favorites</samp> package, which depends on the programs you
|
|
usually installs, for example. Just free your imagination, but be careful.
|
|
</p>
|
|
|
|
<p>
|
|
It is important to note that there are example control files in
|
|
<code>/usr/share/doc/equivs/examples</code>. Check them out.
|
|
</p>
|
|
|
|
<hr>
|
|
|
|
<h2><a name="s-localepurge"></a>4.2 Removing unused locale files: localepurge</h2>
|
|
|
|
<p>
|
|
Many Debian users use only one locale. A Brazilian Debian user, for example,
|
|
usually uses the <samp>pt_BR</samp> locale all the time and doesn't care about
|
|
the <samp>es</samp> one.
|
|
</p>
|
|
|
|
<p>
|
|
<code>localepurge</code> is a very useful tool for these users. You can free
|
|
lots of space by having only the locales that you really use. Just
|
|
<samp>apt-get install localepurge</samp>.
|
|
</p>
|
|
|
|
<p>
|
|
It is very easy to configure it, debconf questions guide the user in a
|
|
step-by-step configuration. Be very careful on answering the first question
|
|
though, wrong answers may remove all the locales files, even the ones you use.
|
|
The only way to recover these files is reinstalling all the packages that
|
|
provide them.
|
|
</p>
|
|
|
|
<hr>
|
|
|
|
<h2><a name="s-helper-show-versions"></a>4.3 How to know what packages may be upgraded</h2>
|
|
|
|
<p>
|
|
<code>apt-show-versions</code> is a program that shows what packages in the
|
|
system may be updated and several useful information. The <samp>-u</samp>
|
|
option displays a list of upgradeable packages:
|
|
</p>
|
|
|
|
<pre>
|
|
$ apt-show-versions -u
|
|
libeel0/unstable upgradeable from 1.0.2-5 to 1.0.2-7
|
|
libeel-data/unstable upgradeable from 1.0.2-5 to 1.0.2-7
|
|
</pre>
|
|
|
|
<hr>
|
|
|
|
<p>
|
|
[ <a href="ch-apt-get.en.html">previous</a> ]
|
|
[ <a href="index.en.html#contents">Contents</a> ]
|
|
[ <a href="ch1.en.html">1</a> ]
|
|
[ <a href="ch-basico.en.html">2</a> ]
|
|
[ <a href="ch-apt-get.en.html">3</a> ]
|
|
[ 4 ]
|
|
[ <a href="ch-search.en.html">5</a> ]
|
|
[ <a href="ch-sourcehandling.en.html">6</a> ]
|
|
[ <a href="ch-erros.en.html">7</a> ]
|
|
[ <a href="ch-distros.en.html">8</a> ]
|
|
[ <a href="ch-agradecimentos.en.html">9</a> ]
|
|
[ <a href="ch-novas.en.html">10</a> ]
|
|
[ <a href="ch-search.en.html">next</a> ]
|
|
</p>
|
|
|
|
<hr>
|
|
|
|
<p>
|
|
APT HOWTO (Obsolete Documentation)
|
|
</p>
|
|
|
|
<address>
|
|
1.8.11 - August 2005<br>
|
|
<br>
|
|
Gustavo Noronha Silva <code><a href="mailto:kov@debian.org">kov@debian.org</a></code><br>
|
|
<br>
|
|
</address>
|
|
<hr>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|