• Aucun résultat trouvé

Software Sources

Dans le document Ubuntu The Complete Reference ® (Page 149-154)

With the Software Sources tool, you can enable or disable repository sections as well as add new entries. This tool edits the /etc/apt/sources.list file directly. Choose System | Administration | Software Sources. This opens the Software Sources window with five tabs: Ubuntu Software, Third-Party Software, Updates, Authentication, and Statistics (see Figure 6-14). The Ubuntu Software tab lists all your current repository section entries. These include the main repository, universe, restricted, and multiverse, as well as source code.

Those that are enabled will be checked. You can enable or disable a repository section by checking or unchecking its entry. You can select the server to use from the Download From drop-down list. To install software from a CD/DVD, just insert it and begin.

On the Third-Party Software tab, you can add repositories for third-party software. The repository for Ubuntu Software Partners will already be listed, but not checked. Check that entry if you want access software from the partners. To add a third-party repository click the Add button. This opens a dialog where you enter the complete APT entry, starting with the DEB format, followed by the URL, distribution, and components or packages. This line will appear in the /etc/apt/sources.list file. Once entered, click the Add Channel button.

The Updates tab lets you configure how updates are handled (see Figure 6-15). The tab specifies both your update sources and how automatic updates are handled. You can install Important Security Updates (hardy-security), Recommended Updates (hardy-updates), Pre-released Updates (hardy-proposed), and Unsupported Updates (hardy-backports).

The Important Security and Recommended updates will already be selected; these cover updates for the entire Ubuntu repository. Pre-released and Unsupported updates are useful if you have installed any packages from the backports or development repositories.

Your system is already configured to check for updates automatically on a daily basis.

You can opt not to check for updates at all by removing the check mark from the Check For

FIGURE 6-14 Software Sources Ubuntu Software repository sections

PAR T II

Updates option. You also have options for how updates are handled. You can install any security updates automatically, without confirmation; download updates in the background;

or be notified of available updates and then manually choose to install them when you want.

The options are exclusive.

The Authentication tab shows the repository software signature keys that are installed on your system (see Figure 6-16). Signature keys will already be installed for Ubuntu repositories, including your CD/DVD-ROM. If you are adding a third-party repository, you will need to add its signature key. Click the Import Key File button to browse for and locate a downloaded signature key file.

Ubuntu requires a signature key for any package that it installs. Signature keys for all the Ubuntu repositories are already installed and are listed on this panel. For third-party repositories, you will have to locate their signature key on their Web site, download it to a file, and then import that file. Most repositories will provide a signature key file for you to download and import. Click the Import Key File to open a file browser, where you can select the downloaded key file. As described in Chapter 7, this procedure is the same as the apt-key add operation. Both add keys that APT then uses to verify DEB software packages downloaded from repositories before it installs them.

NOTE

NOTE For added repositories, be sure you have installed the correct signature key as well as a valid URL for the repository.

The Statistics tab lets you provide Ubuntu with software usage information to let it know what software is being used.

FIGURE 6-15 Software Sources Update confi guration

After you have made changes and clicked the Close button, the Software Sources tool will notify you that your software package information is out of date, displaying a Reload button. Click the Reload button to make the new repositories or components available on package managers such as the Synaptic Package Manager. If you do not click Reload, you can run apt-get update or perform the check operation on the Synaptic Package Manager to reload the repository configuration.

CAUTION

CAUTION Though it is possible to add the Debian Linux distribution repository, it is not advisable.

Packages are designed for specific distributions. Combining them can lead to unresolvable conflicts.

Ubuntu Repository Configuration File: sources.list

Repository configuration is managed by APT using configuration files in the /etc/apt directory. The /etc/apt/sources.list file holds repository entries. The main and restricted sections are enabled by default. An entry consists of a single line with the following format:

format URI distribution component

The format is normally deb, for Debian package format. The URI (universal resource identifier) provides the location of the repository, such as an FTP or Web URL. The

distribution is the official name of a particular Ubuntu distribution such as dapper or gutsy.

Ubuntu 8.04 uses the name hardy. The component can be one or more terms that identify a section in that distribution repository, such as main for the main repository and restricted for the restricted section. You can also list individual packages if you want. Here’s an example:

deb http://archive.ubuntu.com/ubuntu/ hardy main restricted FIGURE 6-16 Software Sources Authentication, package signature keys

PAR T II

Corresponding source code repositories will use a deb-src format:

deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted Update sections of a repository are referenced by the -updates suffix, as in hardy-updates:

deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted Security sections for a repository have the suffix -security:

deb http://archive.ubuntu.com/ubuntu/ hardy-security main restricted Both universe and multiverse repositories should already be enabled. Each will have an updates repository as well as corresponding source code repositories, such as those shown here for universe:

deb http://us.archive.ubuntu.com/ubuntu/ hardy universe deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe

Comments begin with a # mark. You can add comments if you wish. Commenting an entry effectively disables that component of a repository. Placing a # mark before a repository entry will effectively disable it.

Commented entries are included for the backports and Canonical partners repositories.

Backports holds applications being developed for future Ubuntu releases and may not work. Partners include companies such as VMWare and Parallels. To activate these

repositories, just edit the /etc/apt/sources.list file using any text editor, and then remove the

# at the beginning of the line. Here’s an example comment:

# deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports main \ restricted universe multiverse

You can edit the file directly with the following command:

gksu gedit /etc/apt/sources.list

7

Software Management

Dans le document Ubuntu The Complete Reference ® (Page 149-154)

Documents relatifs