Apt HowTo-Chapter 4 A few very useful tools

xiaoxiao2021-03-06  52

Apt HowTo

Chapter 4 A few very useful tools

4.1 How to install local compilation package: Equivs

=====================================

Sometimes users want to use specific versions of certain software, they only exist in the form of source code, without ready-made Debian packages. Package management systems may have problems when processing such transactions. Suppose you want to compile new version of the mail server, compile, install everything, but the package management system does not know what you compile yourself in the system, in the Debian, MTA (Mail Transport Agent Mail Transfer Agent) The package doesn't know this.

It is time for Equivs. Use it to install the package, what it does is to create a new empty package to achieve the association, so that the package management system believes that the association is implemented.

Before we started, I must remind you that compiling a software is the safest way is to recompile the existing Debian package for this software. If you don't know what you are doing, please don't use the Equivs replacement association package. See Chapter 6 Source Package for more information.

Continue the above example, you have installed the newly compiled postfix, then plan to install MUTT, suddenly you find that Mutt wants to associate with another MTA, and you want to use the new MTA you just installed.

Go to a directory (such as / tmp) execute:

# Equivs-Control Name

Replace Name to create the management file you created, the management file is created as follows:

Section: Misc

Priority: Optional

Standards-Version: 3.0.1

Package:

Version:

Maintainer:

Pre-Depends:

Depends:

Recommends:

Suggests:

Provides: <(Virtual) Package>

Architecture: allitecture: All

Copyright:

Changelog:

Readme:

Extra-Files:

Description:

Long Description and Info

.

SECOND Paragraph

We just need to modify the relevant project according to your needs. Each project in the file is clearly described, we don't have to explain them here. Start modifying now: section: Misc

Priority: Optional

Standards-Version: 3.0.1

Package: MTA-LOCAL

Provides: Mail-Transport-Agent

This is the case. MUTT is to be associated with Mail-Transport-Agent, which is a virtual package for all MTA shared (Virtual package), I can simply name this package Mil-Transport-Agent, but I am more willing to use the virtual package program of the system. Use the Provides option.

Now you can start creating a package:

# Equivs-build name

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 `name 'in` ../name_1.0_all.deb'.

The package has been created.

Attention, The Package Has Been Created In The Current Directory,

Then install this newly created .deb.

As we all know, there is a lot of use of Equivs, and it can even create personalized versions for the underlying association package of common software. Let's play your imagination, but be careful.

Important: The sample file of the Control Files is in the / usr / share / doc / equivs / examples directory.

4.2 Removing Useless Locale Files File: LocalePurge

===================================================

Many Debian users use Debian only in fixed areas. For example, in Brazilian Debian users, usually use the PT_BR region profile (Locale File) without care for the ES area profile.

For such users, LocalePurge is a very useful tool that you can only keep the area profile you are using, delete other useless files, and release a large number of hard disk space. Run the Apt-Get Install LocalePurge.

It is very easy to configure, DebConf's question will boot user step by step to complete the setting. Be careful when answering the first question, if you answer, the system may delete all regional profiles, including this you are using. The only way to restore their is to reload those packages.

4.3 How to know which packages can be upgraded

============================== Apt-show-version tool can tell you which packages can be updated and other useful information. -u options can display available software package lists:

$ 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

转载请注明原文地址:https://www.9cbs.com/read-70967.html

New Post(0)