Acrobat PDF

Tutorial Introduction to Aptitude

You must be logged in to download this document
Reviews
Shared by: techmaster
Stats
views:
62
rating:
not rated
reviews:
0
posted:
10/29/2008
language:
English
pages:
0
Tutorial Introduction to Aptitude Karl Hegbloom March 7, 2005 1 2 Aptitude is a software package selection and installation interface for Debian Linux, a Free Software distribution. Aptitude allows a computer administrator to quickly and interactively locate, choose, download, and install software drawn from a large on-line repository. Debian is a free operating system and application software set for personal computers that can be downloaded from the Internet and installed, free of charge, on as many computers as you like. The Debian Project’s software distribution consists of a large set of software packages that are kept in a well-organized archive on a group of Internet servers. At last count, this bountiful trove of Open Source Software had well over 9,000 packages available! Imagine pulling down all of that software over your Internet connection, and then looking through all of it to find what you need. Obviously, that would be quite the chore! In order to render it tractable, a tool is required that presents a well organized view of what is available, what is already installed, and what actions will be performed after the selections are made. Aptitude is a user-interface tool that fulfills those requirements. This document is a tutorial introduction to aptitude, which also has a detailed manual that is available both from within the program itself, and as an HTML document. The HTML version will be installed as part of this tutorial, along with instructions for accessing it using a web browser. 1 Introduction It is necessary to possess some foundation-knowledge that will help you build a realistic mental picture of what packages are, and of how the package management system operates. Aptitude probably won’t make as much sense to you otherwise, because certain things are bound to occur that could pose a quite frustrating and intractable conundrum. But in the context of this simple prerequisite foundation-knowledge, you’ll be easily caught by the solution, softly and intuitively. Software systems are complex and interdependent. In order to control the amazing complexity, software is placed in discrete packages that are handled individually. The actual package installation is performed by the package manager, dpkg, which is a low-level tool that is executed under the auspices of aptitude. A database of useful information about each package is maintained by aptitude and dpkg. Both of these tools keep their own set of state information regarding installed and available software packages. 1.1 Shared Object Libraries Computer software is written by a programmer much like a writer drafts an essay. It is expressed in a special language and stored as a set of text files generically referred to as source code. Those text files are processed by a program called a compiler that churns out object code which is what is actually executed by the computer when you launch an application. There are certain chunks of program text that are useful to more than one particular software program. You can think of them as something like the text of definitions of the “big” words in a dictionary, where the “small” words are part of the language itself. Each definition is named, like the words defined in the dictionary are, and programs refer to them by name. This prevents programmers from having to write and rewrite huge amounts of duplicate source code. Imagine if you had to include the full definition of every “big” word you used in every essay you’ve written, instead of simply assuming your readers own dictionaries! Groups of these “definitions” that logically belong together — that are perhaps related to a particular set of software features — are stored together in a special file called a shared object library. Many programs can be linked against the shared library of definitions. 1.2 Packages A software package is a specialized kind of archive file that contains the set of files — program binary files, auxiliary files, and configuration files (conffile in Debian jargon) — that make up a software application or set of shared libraries. The shared object libraries are placed into separate 3 packages from one another and from the application software, so they can be used by multiple applications. Aside from the program files, a package also contains meta-data — data about the data in the package — regarding its contents. For any particular software application, it declares, among other things, what shared library packages must be installed along with the program in order for it to operate correctly. It also contains a brief one-line package description along with a long description. 1.3 Dependencies A program simply cannot run unless all of the shared libraries it is linked against are already installed on the computer. A program depends on the shared library packages that it is linked against, and part of the purpose of the package meta-data is to describe those dependencies. The figure below illustrates package dependencies. Here, the package called coreutils requires libc6 and libacl1, which in turn requires libattr1, and so forth. Since the actual Debian software archive contains well over 8,000 packages, a diagram of the real thing would require a large poster sized piece of paper, and there would be so many lines between ovals that it would be virtually impossible to decipher. Figure 1: Simple dependency diagram. findutils depends on libc6. 1.4 Meta-data Out on the archive server, each package is scanned and its meta-data is extracted. This information is then consolidated into one large file named Packages. The packages file lists each package by name, along with its associated meta-data. Aptitude downloads the packages file, and uses the information in it to populate its interface display. Aptitude can display information about every available package without needing to download all of them, since doing so would take all day on a very fast connection. That would be very impractical and inefficient. Most people only need to install a small fraction of the available software. 1.5 Conffiles A system-software configuration file is called a conffile. These are small files stored under the /etc directory. They contain configuration options for system-wide (vs. per-user, eg. “desktop”) software programs such as the mail or web servers. To change software settings, the system administrator must edit the conffile with a text editor or special purpose configuration utility. The 4 configuration languages tend to be very simple, easy to understand, and generally self-explanatory. Once it has been configured correctly, most system-software configuration rarely needs to be modified again. Often enough, the default configuration is sufficient, and the computer operator never needs to edit the file at all. When a package is first installed, the package manager creates and stores a checksum of each conffile. Later, when the package is upgraded, dpkg checksums the file again, and compares the new checksum against the stored one. If they are different, it knows that someone (or something) has modified the file, perhaps having changed a configuration setting therein. A checksum is sort of like assigning a numeric value to each character in a file, then “adding” them up in a special way such that transposing characters changes the resulting checksum. Simply adding them in the normal fashion would not work, since addition is commutative, i.e. 2 + 3 = 3 + 2. If the file has not been modified, the package manager can simply replace it with the new conffile from the upgrade package. If it has been modified however, it cannot so simple-mindedly do so, since that would wipe out the local customizations. In this case, the operator will be presented with a short prompt, offering several choices. The main choice is to choose to keep the version that is already on the file system, or replace it with the new one. It is almost always fine to keep the old version when unsure. If the old copy is kept, the new one will be installed right beside it, with a file name extension of “.dpkg-dist”. If the new one is installed instead, the old one will be kept, renamed with a file name extension of “.dpkg-old ”. This makes it possible for the system adminstrator to use (advanced) text editing tools to merge the two versions of the file. 1.6 Maintainer Scripts Packages also contain setup scripts that are run by the package manager at specific times during installation, removal, or configuration. There are prerm, postrm, preinst, and postinst scripts. The details of when each script is run are better left to more specific documentation, such as the Debian Policy Manual [JS98, Ch. 6]. It is not necessary to know all of the nitty-gritty details unless you are assisting the developer in trouble-shooting a packaging error or creating packages of your own software. Some packages have a debconf config script that requests information from the operator when the software is installed. The answers are used to create the initial configuration or set up defaults for the software. It is usually safe to accept the default setting when you are not sure. 1.7 Package States When software is installed on the computer, the dpkg package manager keeps a database of status information. It keeps track of what software is known to be available, and what is already installed. Aptitude uses that data to colorize and decorate the display with flags that indicate that status. These flags are briefly documented in the help screen accessible via the F1 key, and detailed in the “aptitude User’s Manual” [Bur04]. 1.8 Conclusion If you understand all of that, you are probably prepared now to understand what you read in the “aptitude User’s Manual” [Bur04]. You should read it now, before using aptitude for the first time. 2 Tutorial Editor Note: When I initially conceived of and began writing this document, I had it in mind that it would contain a full tutorial on using aptitude. While writing the previous section, however, I reviewed the “aptitude User’s Manual”, which I had not read since several versions ago, and found that it already contains most of the information that I’d planned for the section you are now reading. Additionally, I’m 5 low on time, as the end of the term is eminent. Therefore, I’ve decided to cut this short for the time being, and hand in the assignment as it now stands, rather than rushing to finish the planned tutorial section. Editor Note: I have it in mind to submit this document to the aptitude author for use in the user’s manual. Perhaps he will include the material from my introductory section, and flesh out the tutorial a little more, making that document into something more like what I had originally envisioned this one to be. — karlheg 6 References [Bur04] Daniel Burrows. Aptitude User’s Manual. http://doc2.inf.elte.hu/doc/aptitude/html/en/. 5 [JS98] The Debian Project, 2004. Ian Jackson and Christian Schwarz. Debian Policy Manual. The Debian Project, 1998. http://www.debian.org/doc/debian-policy/. 5 7

Related docs
Covansys aptitude 3
Views: 8  |  Downloads: 0
Introduction and Tutorial
Views: 11  |  Downloads: 0
Python Tutorial
Views: 35  |  Downloads: 1
Tutorial on
Views: 56  |  Downloads: 3
Tutorial A
Views: 230  |  Downloads: 5
Tutorial
Views: 99  |  Downloads: 5
Tutorial
Views: 68  |  Downloads: 4
Tutorial
Views: 32  |  Downloads: 0
TUTORIAL
Views: 32  |  Downloads: 0
Tutorial
Views: 225  |  Downloads: 21
Tutorial #
Views: 68  |  Downloads: 5
Tutorial
Views: 74  |  Downloads: 3
Tutorial
Views: 50  |  Downloads: 2
� A Tutorial �
Views: 56  |  Downloads: 7
premium docs
Other docs by techmaster
Contracts admitting new members
Views: 226  |  Downloads: 4
Sample lock box agreement
Views: 214  |  Downloads: 2
Prepared food franchise agreement
Views: 338  |  Downloads: 28
Storage Contract
Views: 400  |  Downloads: 18
ajij[0]
Views: 118  |  Downloads: 0
Asset freezing rules
Views: 139  |  Downloads: 1
Assignment of share of deceased partner
Views: 185  |  Downloads: 1
President George Washington info
Views: 178  |  Downloads: 0
Transcript of Dred Scott v Sanford
Views: 231  |  Downloads: 2
Transcript of Surrender of Japan
Views: 150  |  Downloads: 0
Exclusive listing contract to obtain tenant
Views: 416  |  Downloads: 3
Authorization to Release Information
Views: 200  |  Downloads: 1
Voting Rights Act 1965 info
Views: 243  |  Downloads: 1