© Richard Petersen 2018
Richard PetersenBeginning Fedora Desktophttps://doi.org/10.1007/978-1-4842-3882-0_4

4. Installing and Updating Software: DNF, GNOME Software, Packages, DnfDragora, and RPM

Richard Petersen1 
(1)
Alameda, California, USA
 
Fedora software is distributed through an online Fedora software repository. Table 4-1 lists Fedora software information and site locations. Software is added to your system by accessing software repositories with the DNF package manager. The DNF package manager replaces the YUM (Yellowdog Update, Modified) software package manager. Use the dnf command in place of yum. Options remain much the same, and you can still use the yum command instead. The commonly used Fedora software repositories are listed in Table 4-2.
Table 4-1

Fedora Software Information and Sites

Internet Site

Description

https://getfedora.org

Fedora distribution disks, download links for all formats

https://rpmfusion.org

RPM Fusion repository for third-party multimedia and driver Fedora-compliant software (Fedora Project extension)

https://fedoraproject.org/wiki/ForbiddenItems

Packages not included in the main Fedora software repository

https://fedoraproject.org/wiki/Multimedia

Information on multimedia packages available for Fedora

https://negativo17.org

Negativo17.​org repository for third-party multimedia and driver Fedora-compliant software

Software applications, with all the needed programs, configuration files, and supporting library binaries, are combined into packages by the RPM Package Manager that will install all the components into the appropriate system folders. DNF manages all these RPM packages for your system, keeping track of updates and what collection of packages belong to different systems and collections such as your desktop or office suite. It also keeps track of dependencies, such as what supporting software an application may need. Multimedia applications may need sound support. To easily manage DNF operations you can use desktop frontends, such as GNOME Software, PackageKit, and DnfDragora. GNOME Software lets you manage software by topic, whereas Packages searches for particular RPM packages. DnfDragora does both.

Fedora provides only open source applications in its own repository. For proprietary applications such as NVIDIA’s own graphics drivers, or multimedia applications that may have patent issues, you must use a third-party repository like RPM Fusion. The list of forbidden items for the official Fedora repository can be found at https://www.fedoraproject.org/wiki/ForbiddenItems . The list includes such items as the NVIDIA graphics drivers.

Software Repositories

For Fedora, you can add software to your system by accessing software repositories supporting DNF. In addition, many software applications, particularly multimedia ones, have potential licensing conflicts. By leaving such software in third-party repositories, Fedora avoids possible legal issues. Many of the popular multimedia applications, such as video and digital music support, can be obtained from third-party repositories using the same simple dnf commands you use with Fedora-sponsored software. The commonly used Fedora software repositories are listed in Table 4-2.
Table 4-2

Fedora and Fedora-Compliant Software Repositories

Internet Site

Description

https://download.fedoraproject.org

Links are provided to the best available mirror.

https://rpmfusion.org/Configuration

Fedora applications not included with the distribution, due to licensing and other restrictions, are provided. Go to the Configuration page to download the DNF configuration files.

https://negativo17.org

Negativo17.​org repository for third-party multimedia and driver Fedora-compliant software.

https://get.adobe.com/flashplayer/

The Adobe repository. Select the Linux for YUM to download the Adobe YUM configuration file. Select YUM for Linux from the drop-down menu.

https://www.google.com/linuxrepositories/

Provides Google repositories for accessing Google software.

Most software is now located on the Internet-connected repositories. With the integration of DNF into your Fedora system, you can now think of that software as an easily installed extension of your current collection. You can find out more about how DNF is used on “Fedora Software Management Guide”.

You could also browse many of these repositories and download packages individually, although this is not recommended, as you would lose the automatic updating support provided by DNF.

Fedora Software Repositories

The Fedora Linux distribution provides a comprehensive selection of software, ranging from office and multimedia applications to Internet servers and administration services. The complete set is available on the Fedora repository. During installation, DNF is configured on your system, to access the Fedora repository. Some third-party applications with licensing issues are not included, though Fedora-compliant versions are provided on associated software repositories.

For Fedora, you can update to the latest software from the Fedora DNF repository using GNOME Software or PackageKit's Package Updater. They are already configured to access the Fedora repositories.

RPM Fusion

Due to licensing restrictions, multimedia support for popular operations such as MP3, DVD, and DivX is not included with Fedora distributions. The Fedora Project associated site, RPM Fusion ( https://rpmfusion.org ), does provide support for these functions. Here, you can download support for MP3, DVD, and DivX software. This repository integrates support previously provided by Livna, Freshrpms, and Dribble. Fedora does include the generic X.​org NVIDIA drivers, which will provide all the capabilities most people need. You do not have to use the NVIDIA proprietary drivers.

The Fedora-compliant repositories, such as RPM Fusion, will have Fedora-compliant DNF configuration files that you can download and install as an RPM package. You can then use the GNOME Software, PackageKit (Packages), DnfDragora, or the dnf command to select, download, and install software from the associated repository directly.

Adobe and Livna

Two smaller additional third-party repositories are often configured for desktop users: the Adobe repository and the Livna repository. The Adobe repository holds packages for the Linux version of the Adobe Flash software. (Two alternative Flash-compatible open source versions are already available, swfdec and gnash.) The Livna repository provides the commercial DVD video codec, libdvdcss. The repository contains only this one package. If you want to play commercial DVD video disks, you have to configure access to this repository so that you can install the codec.

Third-Party Linux Software Archives

Though almost all applications should be included in the Fedora software repository or its associated repositories, such as https://rpmfusion.org , you could download and install software from third-party software archives. Always check to see if the software you want is already in the Fedora or Fedora-associated repositories. If it is not available, you can download it from a third-party online site.

Several third-party repositories make it easy to locate and find information about an application. Of particular note are https://www.sourceforge.net and https://www.linux-apps.com/ . Sites for Linux software are listed in Table 4-3, along with several specialized sites, such as those for commercial and game software. When downloading software packages, always check to see if the versions are packaged as RPM packages and if they are already available on the Fedora and RPM Fusion repositories.
Table 4-3

Third-Party Linux Software Archives

URL

Internet Site

https://sourceforge.net

SourceForge, open source software development site for Linux applications

https://www.linux-apps.com/

Linux software repository

www.gnu.org

GNU archive

https://lgdb.org/

Linux games

https://www.fluendo.com

Licensed multimedia codecs for Linux, including free MP3 code

Updating Fedora: GNOME Software and Software Update

New updates are continually being prepared for particular software packages. These are posted as updates that you can download from software repositories and install on your system. They include new versions of applications, servers, and even the kernel. Such updates may range from single software packages to whole components.

Updating your Linux system has become a very simple procedure, using the automatic update tools. For Fedora, you can update your system by accessing software repositories supporting the DNF (Dandified YUM) update methods. DNF uses RPM headers to determine which packages need to be updated.

If updates are detected, GNOME Software will display an update message in the message tray (see Figure 4-1). Clicking the entry button opens a dialog prompting you to restart and install the updates. Clicking the Restart & Install button immediately shuts down your system, then restarts, and, as part of the startup process, downloads and installs updates. Once installed, a message is displayed.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig1_HTML.jpg
Figure 4-1

Update notification message and icon

To perform manual updates, you can use either GNOME Software to perform updates (the default), or you can use the older Package Updater. Package Updater is a graphical update interface for DNF (part of PackageKit), which performs all updates from the desktop. From a command line, you can perform updates using the dnf upgrade command.

Updating Fedora with GNOME Software Update

GNOME Software is the primary update tool for Fedora . You can view updates by using the Updates tab on GNOME Software (see Figure 4-2). The tab will display the number of updates. Clicking an update opens a dialog showing information about the update. Some entries, such as OS Updates, will have several packages that have to be updated (see Figure 4-3). When you are ready, click the Restart & Update button on the header bar to shut down your system and install the updates as it restarts.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig2_HTML.jpg
Figure 4-2

GNOME Software Updates tab

../images/326960_3_En_4_Chapter/326960_3_En_4_Fig3_HTML.jpg
Figure 4-3

GNOME Software: Update information dialog

Updating Fedora with Package Updater (PackageKit)

If you install PackageKit (Packages), the Package Updater package will also have been installed. You can, if you wish, use it to update your system, instead of using GNOME Software. You can open Package Updater from the Applications overview. Package Updater displays the Package Updater dialog showing your updates (see Figure 4-4).
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig4_HTML.jpg
Figure 4-4

Software Update: Selected package with displayed description

The number of updates is shown at the top, along with Install Updates button on the right side of the title bar. To perform the updates, click the Install Updates button. If you want to review the updates and perhaps deselect certain updates, you scroll through the list of updates, selecting the ones you want more information on. All needed updates are selected automatically when Software Update starts up. The check boxes for each entry let you deselect particular packages you may not want to update. At the bottom of the dialog is an expandable entry name Details. This entry becomes active when you select a package. Expanding the Details entry display information about this package's update. The displayed information includes features such as the version and repository.

Click the Install Updates button to start updating. During the update, a status message is displayed at the bottom of the dialog for the different update stages along with a progress bar.

Update with the dnf Command

To perform a complete update of all your installed packages, you use the dnf command with the upgrade option.
sudo dnf upgrade
To update just a particular package, specify that package. The following would update an already installed Gnumeric package.
sudo dnf upgrade gnumeric
You can use the updateinfo option to see what packages need to be updated. With no option just a count of the kinds of updates is listed. With the --list option, the packages to be updated are shown. For details about each update, use the --info option.
dnf updateinfo
dnf updateinfo --list
dnf updateinfo --info

Automatic DNF Updates with dnf-automatic

If you want updates performed automatically, you can install the dnf-automatic package . This package installs timers and services for three automatic update options: notifyonly, download, and install. The download option notifies and downloads only. The install option notifies, downloads, and installs. To designate an option, you enable and start its timer. The three timers are:
dnf-automatic-notifyonly.timer
dnf-automatic-download.timer
dnf-automatic-install.timer
To choose the download and notify option, you would enter the following in a terminal window.
sudo systemctl enable dnf-automatic-download.timer
sudo systemctl start dnf-automatic-download.timer
To notify, download, and install, enable and start the install timer.
sudo systemctl start dnf-automatic-install.timer
To change from one option to another, be sure to disable the current one.
sudo systemctl disable dnf-automatic-install.timer
sudo systemctl enable dnf-automatic-notifyonly.timer
sudo systemctl start dnf-automatic-notifyonly.timer

Configuration for dnf-automatic is held in the /etc/dnf/automatic.conf file. The default entries for updates, download_updates and apply_updates, are overridden by the timer you have enabled. You can customize other entries such as those for email. Check the man page for dnf.automatic for configuration details.

Installing Software Packages

Installing software is an administrative function performed by a user with administrative access. Unless you chose to install all your packages during your installation, only some of the many applications and utilities available to Linux users were installed on your system. On Fedora, you can install or remove software from your system with the GNOME Software software manager or the dnf install command. You could also use the PackageKit (Packages) and DnfDragora package managers (not installed by default). Alternatively, you can install software as individual packages, with the rpm command or by downloading and compiling its source code. The procedure for installing software using its source code has been simplified to just a few commands, though you have a great deal of flexibility in tailoring an application to your specific system.

The dnf command remains the best way to access all available packages. GNOME Software and PackageKit do not detect and display all the packages available, such as the server software. They focus primarily on desktop applications.

An RPM software package operates like its own installation program for a software application. A Linux software application often consists of several files that must be installed in different directories. The program is most likely placed in a directory called /usr/bin; online manual files go in another directory; and library files go in yet another directory. In addition, the installation may require modification of certain configuration files on your system. The RPM software packages perform all these tasks for you. Also, if you later decide you don’t want a specific application, you can uninstall packages to remove all the files and configuration information from your system.

The software packages on your install disk, as extensive as they are, represent only some of the software packages available for Fedora Linux. Most reside on the Fedora Software repository, a repository whose packages are available for automatic download using the GNOME Software application. Many additional multimedia applications and support libraries can be found at the RPM Fusion repository ( https://rpmfusion.org ) and, once configured, downloaded directly with DNF and GNOME Software. Table 4-2 lists several Fedora software repositories. Fedora and RPM Fusion are DNF-supported, meaning that a simple DNF configuration enables you to directly download and install software from those sites using the dnf command, GNOME Software, and any other software manager that supports DNF, such as PackageKit and DnfDragora. Fedora repository configuration was performed during the installation of your Fedora system. PackageKit and DnfDragora include repository configuration when installed. RPM Fusion provides DNF configuration files that you download and install manually from its website.

Managing Software with DNF

Downloading Fedora software or software from any Fedora repository is a simple matter of using the Dandified YUM (DNF) package manager ( http://fedoraproject.org/wiki/Features/DNF ). DNF uses many of the same commands and options as YUM, which it replaces. GNOME Software and Packages (PackageKit) provide desktop interfaces for the DNF package manager.

You can use the dnf command, in a terminal window or command-line interface, to access Fedora repositories and install new software . To use the dnf command, enter the dnf command with the install option on a command line. The package will be detected, along with any dependent software, and you will be asked to confirm installation. The download and installation is automatic. For query operations such as list, you do not need administrative access. But for actions such as install and remove, you do need administrative access, for which you use the sudo command. The following command installs Gnumeric:
sudo dnf install gnumeric
You can also remove packages, as well as search for packages and list packages by different criteria, such as those for update, those on the repository not yet installed, and those already installed. The following example lists all installed packages:
dnf list installed
The available option shows uninstalled packages.
dnf list available
To quickly to see if a package is available, you can use the list command. The list command works on a package name. Add the asterisk for a pattern search.
dnf list vsftpd
dnf list *ftp*
dnf list bind*
To search package descriptions, use the search command and a pattern .
dnf search wine
For details about a package, use the repoquery command with the -i option. The -l option lists the files the package will install.
dnf repoquery -i gnumeric
When removing a package, in some rare cases, the entire GNOME desktop, along with the GDM and Packages, could be selected and accidently removed. If this is the case, you should reinstall GNOME, GDM, and GNOME Software with dnf commands in a terminal window or by using the command-line interface. You might also have to reinstall graphics drivers. You can use group to install the entire GNOME desktop. The group list command displays groups.
sudo dnf group install gnome-desktop
sudo dnf install gdm
sudo dnf install gnome-software

GNOME Software (Software)

GNOME Software is the GNOME software management frontend for DNF. It is designed to be a cross-distribution package manager that can be used on any DNF-supported Linux distribution. GNOME Software performs a variety of different software tasks, including installation, removal, updating of software, as well as the management of system add-ons such as codecs, fonts, drivers, and desktop (shell) extensions. See https://fedoraproject.org/wiki/Changes/AppInstaller for more information.

GNOME Software is currently designed to install client and system applications. It does not install server software, such as the DNS name server or the Apache Web server. It also does not install many of the older system configuration tools, such as system-config-samba. To manage such software, you will have to install using the dnf command in a terminal.

To use GNOME Software, click the Software icon on the Activities dash or on the Applications overview. GNOME Software will start up by gathering information on all your packages. A window opens with three tabs at the top, for All, Installed, and Updates. You can install applications from the All tab which displays a collection of category buttons, a search button on the title bar you can click to display a search box, and several sets of picks to choose from (Editor, Recent Releases, Recommended Games, and Recommended Productivity Applications) (see Figure 4-5).
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig5_HTML.jpg
Figure 4-5

GNOME Software

The category buttons are Audio & Video, Games, Communication & News, Graphics & Photography, Productivity, and Add-ons. Click on any category button to open a dialog with subcategories. The Add-ons category covers enhancements to your desktop, such as codecs, fonts, drivers, and desktop (shell) extensions.

Categories allow you to further filter the selection using a Show menu. The Graphics & Photography category has filters such as Vector Graphics, Scanning, and Photography (Figure 4-6). A Sort menu lets you also sort items by name or rating. The software in each category is listed as icons. A few featured packages are listed at the top. Packages already installed have a checkmark on a packet emblem displayed in the upper-right corner of the package icon.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig6_HTML.jpg
Figure 4-6

GNOME Software: Graphics category

Click a software icon to open its description page , which provides a brief description of the software and a link to its related website (see Figure 4-7). Uninstalled software displays an Install button below the software's name, and installed software shows a Remove button. To the right of the name is a star rating with the number of reviews.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig7_HTML.jpg
Figure 4-7

GNOME Software: Software descriptor page

Click the Install button to install the software . As the software is installed, an Installing progress bar appears (see Figure 4-8). When it’s complete, the Launch and Remove buttons are displayed below the name. You can use these to start or uninstall the software.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig8_HTML.jpg
Figure 4-8

GNOME Software: Installing software

You can also search for a package using the search box on the All tab. Enter part of the name or a term to describe the package (see Figure 4-9). Results are listed, showing an icon, name, and description. Click on an entry to open its description page where you can perform possible actions such as install, remove, or launch.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig9_HTML.jpg
Figure 4-9

GNOME Software: using the search box

The Installed tab lists your installed software (see Figure 4-10). If the applications are located on the overview within a folder, that folder name is listed under the application name. The applications are organized into three sections: Applications, System Applications, and Add-ons. To remove an application, click its Remove button. You can also use the Installed tab to organize the applications overview, creating new category folders on the overview or moving applications into existing folders. Click on the check box at the right on the title bar on the Installed tab. Round check boxes will appear to the left of each software entry, which you can click to select that application (see Figure 4-11). Three buttons are listed at the bottom of the window, labeled Add to Folder, Move to Folder, and Remove from Folder. When you select an item, the possible buttons become active. Initially, most applications are not in folders, so when you select and application, only the Add to Folder button becomes active. Clicking on it opens an Add to Applications Folder dialog, which lists possible folder to move the application to. Clicking on the plus icon below the list opens a dialog where you can create a new folder with a name of your choosing. Click the Cancel button at the top right when you are finished. This feature lets you organize your Applications Overview using folders of your choosing.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig10_HTML.png
Figure 4-10

GNOME Software: Installed tab

../images/326960_3_En_4_Chapter/326960_3_En_4_Fig11_HTML.jpg
Figure 4-11

GNOME Software: Installed tab, organize applications overview

Using the Add-ons category, you can easily manage your fonts, graphics drivers, multimedia codecs, and any additional third-party apps or features you want installed on your system. Clicking on the Add-ons category on the All tab opens the Add-ons dialog with tabs for Codecs, Fonts, Hardware Drivers, Input Sources , Localization, and Shell Extensions (see Figure 4-12). Installed software will show an emblem with a checkmark in the top-right corner of their icons. To install or remove an add-on, click on its icon to open a description dialog. Installed add-ons will show a Remove button, and uninstalled ones will show an Install button.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig12_HTML.jpg
Figure 4-12

GNOME Software: Add-ons tab

The Shell Extensions tab shows extensions you can add to your desktop (see Figure 4-13). You are warned to install them at your own risk. Clicking on the Shell Extensions button allows you to turn on support for application indicators on the top bar. The button then becomes an Extension Settings button, which you can use to display the extensions you have installed and turn them on or off (see Figure 4-14).
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig13_HTML.jpg
Figure 4-13

GNOME Software: Add-ons tab, Shell Extensions

../images/326960_3_En_4_Chapter/326960_3_En_4_Fig14_HTML.jpg
Figure 4-14

GNOME Software: Installed shell extension management

Many of the shell extensions are designed to operate as indicators on the top bar. Others add features to the desktop, such as Dash to Dock, which adds a dash-like dock to the main screen, letting you start favorite applications directly from the desktop. Keep in mind that the extensions are not guaranteed to work. Some extensions are already installed but not turned on, such as the Applications menu, which can add the GNOME Classic applications menu to the top bar in place of the Activities button. Some of the extensions will have a configuration button you can click to display features you can set such as that for the Background Logo, which sets the position, size, opacity, and border of the Fedora logo on your desktop (see Figure 4-15). You can even change the logo. To remove the logo, just turn off the extension.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig15_HTML.jpg
Figure 4-15

GNOME Software: Installed Shell Extension Configuration

PackageKit (Packages)

PackageKit is an older software management frontend for DNF. It is designed to be a cross-distribution package manager that can be used on any DNF-supported Linux distribution. See www.packagekit.org for more information. PackageKit provides a variety of applications for different software tasks, including installation, removal, updates, repository management, logs, and install of an individual RPM file (see Table 4-4). The primary PackageKit application is gpk-application, accessible as Packages. The gpk-update-viewer (Software Update) lets you examine and select updates. The gpk-log displays a list of all your previous install, removal, and update operations, including major updates and individual package installs (accessible on PackageKit from the Applications menu [top bar], as the Software Log menu item).
Table 4-4

PackageKit Applications

Application

Description

gpk-application

Packages

gpk-update-viewer

Updates your system with Package Updater

gpk-prefs

Configures repositories with Package Sources

gpk-log

Views history of updates and installs

To use PackageKit, click the Packages icon on the Applications overview. PackageKit will start up by gathering information on all your packages. A Software window opens with a search box at the top and packages listed below (see Figure 4-16). Before you install any packages, it is advisable to first refresh your software lists. This is a listing of software packages available on your enabled repositories. Select Refresh Package Lists from the PackageKit applications menu.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig16_HTML.jpg
Figure 4-16

PackageKit (Packages)

Search for packages by entering the package name or descriptive term in the search box. Packages searches package descriptions, not just the filename. Uninstalled packages have faded package icons with an empty check box, and installed packages have a solid color with a checkmark in the check box.

To access information about a particular package, select it. A pane then opens at the bottom and displays a description of the software and a button bar to the right, with buttons to install the package (or remove if already installed),for the software’s website (Homepage), and a list of installed files (Files). The Homepage button opens your browser to the package home page where you can find more detailed information about it. The Files button opens a window that lists all the files the package installs. This can be helpful for tracking down the command names and location of the configuration files.

To install a package, first click its check box (see Figure 4-17). The box is checked, and a plus sign (+) appears on the package icon. You can click several packages to select them for installation. Once you are ready to install, click the Apply Changes button (upper right). A progress bar will show the install task’s progress. The PackageKit task messages are displayed at the top-center on the title bar. During the download phase, a Cancel button is displayed on the left side of the title bar, letting you cancel the install. Once the package is installed, the package icon color will change from faded to a solid color, and a checkmark will be displayed in its check box. If dependent or additional packages are required by the software you want to install, these are listed, and you are prompted to confirm their installation. Click Continue.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig17_HTML.jpg
Figure 4-17

Package information

If you choose to remove an installed package, click its check box. The check box becomes empty, and a wastebasket image is displayed on the package icon. Then click Apply Changes to uninstall. Once the package is removed, the package icon color becomes faded. You could also just select it and click the Remove button in its description.

Instead of showing all your available packages, both installed and uninstalled, you can filter the package listings. Two filter options are available from the PackageKit GNOME applications menu. You can filter by newest versions and native packages. Native packages are those for your system architecture, such as 64-bit (x86_64) or 32-bit (i686).

PackageKit also has a CLI (command-line interface) version called pkcon. You can use the pkcon command in a terminal window to install and remove packages.
sudo pkcon install inkscape
sudo pkcon remove inkscape
The get-packages option lists all your packages and the get-files option lists all the files installed by a package. The get-details option displays the package description.
sudo pkcon get-packages
sudo pkcon get-details inkscape
sudo pkcon get-files inkscape

Managing Repositories

DNF is the primary package-management tool . When you install a package, DNF is invoked and automatically selects and downloads the package from the appropriate repository. After having installed your system, when you then want to install additional packages, GNOME Software and Packages will use DNF to install from a repository. This will include all active DNF online repositories you have configured, such as sites like https://rpmfusion.org , not just the Fedora and update repositories configured during installation. You can manage your repositories, enabling or disabling them, with GNOME Software, Packages, DnfDragora, and the dnf command.

You can enable or disable your configured DNF repositories using GNOME Software's Software Repositories dialog (choose Software Repositories from the GNOME Software application's menu). From the Software GNOME application’s menu, select Software Sources. Click the Software Sources tab to see a list of your configured repositories (see Figure 4-18).
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig18_HTML.jpg
Figure 4-18

Software Repositories: Configured software repositories (GNOME Software)

The repositories listed have DNF configuration files in the /etc/yum.repos.d directory, holding information such as URLs, GPG keys , and descriptions. The Fedora repository names include the release number and the platform, such as x86_64 for the 64-bit version. Fedora and Fedora Update repositories will be enabled. If you want to see the package from just one repository, you can deactivate the others. For example, if you wanted to see only the RPM Fusion repository, you could deactivate all others, including Fedora. You can reactivate the other repositories later.

On GNOME Software's Software Sources dialog, all configured repositories are listed along with their status, disabled or enabled. To enable a disabled repository, click on its entry to display an Enable button, which you can click to enable the repository. For enabled repositories, a Disable button is shown, when their entry is clicked. Also, when you click a repository entry, the URL of its repository is displayed.

Repositories also have specialized repositories for development, debugging, and source code files. Here you find applications under development that may be useful, as well as the latest revisions. Some will have testing repositories for applications not yet completely validated for the current release. These applications might not work well. Source, Test, and Debug repositories will normally be disabled. Test is the development repository for a future release currently under development. The source repositories hold source code packages.

Fedora Linux designated certain repositories as third-party repositories, as listed at:

https://fedoraproject.org/wiki/Workstation/Third_Party_Software_Repositories

These include PyCharm (Python development environment), Google Chrome, the RPM Fusion NVIDIA graphics driver repository, and the RPM Fusion Steam client repository. When you first start GNOME Software, a notice asks you if you want to enable these repositories, as shown here.

../images/326960_3_En_4_Chapter/326960_3_En_4_Figa_HTML.jpg
A Third Party Repositories section for those repositories is displayed at the top of the Software Repositories dialog. A Third Party Repositories noticeg at the top of the dialog has a Remove All button (see Figure 4-19), which you can click to remove these repositories, including their configuration files from /etc/yum.repos.d. Upon removal, the button becomes an Install button, which you can use to restore these repositories. The Remove and Install actions only affect these repositories, not any other third-party repositories you may have installed, such as Livna and the free and non-free RPM Fusion repositories.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig19_HTML.jpg
Figure 4-19

Software repositories: Third-party repositories (GNOME Software)

Using the Package's Package Sources dialog (choose Package Sources from the Packages application's menu), you can also enable and disable repositories (see Figure 4-20). Enabled repositories are checked. You can disable a repository by unchecking it. A check box at the bottom of the dialog lets you hide debug and development repositories, showing just the main repositories.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig20_HTML.jpg
Figure 4-20

Package Sources: Configured software repositories (Packages)

You can also manage repositories using the dnf config-manager command with the --set-enabled and --set-disabled options. The following disables the RPM Fusion non-free repository.
sudo dnf config-manager --set-enabled rpmfusion-nonfree
You could later then enable it.
sudo dnf config-manager --set-enable rpmfusion-nonfree

To remove a repository, use the dnf remove command. This is a permanent removal.

Using the RPM Fusion Repository

The RPM Fusion repository ( https://rpmfusion.org ) holds popular third-party drivers and codecs. These include the vendor graphics drivers for Linux, when they become available, such as those provided by NVIDIA. Also included are multimedia codecs with licensing issues, such as MP3, AC3, and MPEG2 codecs, as well as MPEG4 and DivX (Xvid).

To access the RPM Fusion repository, you first must download and install both its DNF configuration file and its GPG authentication key. These are both included in RPM Fusion’s rpmfusion-free package. Simply download and install this package using your web browser. The package is located at https://rpmfusion.org/Configuration (see Figure 4-21). Click the Configuration link at the top of the page to go to the Configuration page . There are free and non-free packages, with links for each. Be sure to install the free package first. The non-free package is optional. On the section titled “Graphical Setup via Firefox Web Browser,” click the link labeled “RPM Fusion Free for Fedora 28” to download the rpmfusion-free configuration package. When you click the link, Fedora detects that it is a software package and opens a dialog with the option to install it directly.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig21_HTML.jpg
Figure 4-21

RPM Fusion repository configuration file downloaded from rpmfusion.​org

After installing the free package, you can install the non-free package if you wish. Click the link labeled RPM Fusion Nonfree for Fedora28, listed under the second paragraph in the Graphical Setup section, then proceed with the install.

The page also tells you how to perform an installation of both free and non-free RPM Fusion configuration packages from the command line using the dnf command. The command is extensive and, instead of typing it on a command line in a terminal window, you can copy and paste the entire command from the web page to a terminal window. Click and drag the command on the web page to select it, then press Ctrl+c to copy it to the clipboard. Open a terminal window and press Ctrl+Shift+v to paste the command to the current command line. Then press Enter to run the command.

Once the repository is installed, you can open Software Sources to check that the RPM Fusion repository is enabled. On GNOME Software, select Software Repositories from its application menu to open the Software Repositories dialog and scroll down to the RPM Fusion for Fedora 28 entries. The ones for free and non-free should be enabled. On Packages, select Package Sources from its applications menu to open the Package Sources dialog, which should have the entries for Fedora 28 checked, both free and non-free.

With the RPM Fusion repository now enabled, you can use GNOME Software and Packages to search, select, and install any packages on its repository. Both RPM Fusion and the Fedora repositories have their packages intertwined on the GNOME Software and Packages software listings. When you first install the repository configuration, be sure to update your Packages package lists so that the new repository packages will be listed. From the Packages Applications menu, select Refresh Package Lists.

DnfDragora

DnfDragora is the replacement for the YUM Extender (dnf-yumex). It is an alternative desktop interface for managing software packages on your DNF repositories (see Figure 4-22). DnfDragora provides detailed package information and allows you to turn repositories on and off directly.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig22_HTML.jpg
Figure 4-22

DnfDragora (dnfdragora)

DnfDragora displays three panes: a side pane for listing groups, a right pane for listing packages, and a bottom pane for display information about a selected package. A toolbar above the pane lets you organize and refine the display of your packages. The first menu button lets you choose to view all packages or to organize them by groups and display just those in the group (see Figure 4-23). The second menu lets you choose the type of packages you want displayed (All, Installed, To Be Updated, and Not Installed). For the searches you can search in package names, descriptions, summaries, or their filenames. Clicking a package displays detailed information about it, including a list of dependencies, files included with the package, a link to its repository, and the change log, if available. To install a selected package, click the Apply button at the bottom of the window.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig23_HTML.jpg
Figure 4-23

DnfDragora groups

To manage your repositories, choose the Repositories entry from the File menu. The top pane lists your available repositories with checkmarks next to the ones that are enabled (see Figure 4-24). To enable other repositories, click their check boxes. Disable a repository, click its check box to remove the checkmark. Clicking on any repository entry displays details about the repository, such as the location of the cache it uses, if it is enabled, its gpgkey, the number of retries allowed, and the repository type.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig24_HTML.jpg
Figure 4-24

DnfDragora Repository Management

Installing Individual Packages with Your Browser

You can use your browser to download an individual package from a site directly. You should use this method only for packages not already available from DNF-supported repositories. This is true for certain packages, such as the RPM Fusion DNF configuration packages you need to install before you can access the RPM Fusion repository. You also have to install any needed dependent packages manually, as well as check system compatibility. Your Fedora web browsers will let you perform a download and install in one simple operation. A dialog opens that prompts you to open with the package installer, which invokes GNOME Software (see Figure 4-25, left). The package is downloaded, and you are asked if you want to install the file (see Figure 4-25, right). Subsequent dialogs show the installation progress.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig25_HTML.jpg
Figure 4-25

Web browser package install

On a GNOME desktop, packages that have already been downloaded can be installed with a simple right-click, then choose the install selection from the menu invoking GNOME Software, to perform the installation (gnome-software). As with the browser download, you are prompted to install the package.

Installing Some Popular Third-Party Software

For most third-party multimedia packages, you first install the DNF configuration file for a repository that carries them. Once configured, installation is a simple matter of using Software to search for and install packages. DNF downloads the package and performs the installation. It will also be careful to select the package for your architecture, such as x86_64 for 64-bit or i686 for 32-bit. DNF will ask for confirmation before installing, listing any dependent packages that will also have to be installed.

Multimedia Packages

For your third-party packages, you can use RPM Fusion, which carries collections of multimedia packages, including GStreamer and MPlayer. DVD/MPEG video players you might want include Xine, MPlayer, and VideoLAN. All support DVD, DVB, HDTV, H264, and MP3, provided the needed codecs are installed.

Tip

For information on multimedia applications available for Fedora, go to https://fedoraproject.org/wiki/Multimedia .

Many of the following packages are automatically selected and installed for you as dependents when you install MPlayer . It may be simpler to just install one of these, rather than try to install all the added packages separately.

For audio, you may want HDTV audio, DVD/MPEG2 audio support, DTS, and MP3. Search for the following RPM Fusion packages using Software.

a52dec

HDTV audio (ATSC A/52, AC3)

faad2

MPEG2/4 AAC audio decoding, high quality

faac

MPEG2/4 AAC sound encoding and decoding

libdca

DTS Coherent Acoustics playback capability

lame

MPEG1 and MPEG2 audio decoding

For video, you may want DVD video capability, MPEG and MPEG2 playback, DVB/HDTV playback, and H264 (HD media) decoding capability.

libdvbpsi

MPEG TS stream (DVB and PSI) decoding and encoding

vlc

DVD video playback capability, VideoLAN project

libdvdnav

DVD video menu navigation

libdvdcss

DVD video commercial decoding, Livna repo ( http://rpm.livna.org )

x264

H264/AVC decoding and encoding (high-definition media)

For all GStreamer supported applications, you will want the bad and ugly packages.

gstreamer-plugins-bad

Not fully reliable codecs and tools for GStreamer, some with possible licensing issues

gstreamer-plugins-ugly

Reliable video and audio codecs for GStreamer that may have licensing issues

The Win32 codecs are not available on the Fedora repositories. Keep in mind that wmv files and Win32 codecs are already supported by the ffmpeg Linux codecs and will play on Totem and Dragon Player. You can download the Win32 codecs separately from the MPlayer website ( www.mplayerhq.hu/MPlayer/releases/codecs ).

Vendor Video Driver Support

You can obtain the NVIDIA vendor graphics drivers from RPM Fusion (the non-free repository). You can download and install them with DNF. RPM Fusion is the best repository for specialized kernel drivers and modules. Keep in mind, however, that due to open sourcing of some of the NVIDIA vendor driver software, the X.​org and Nouveau open source versions are becoming almost as effective, especially for 2D display support. For normal usage, you might not need vendor driver support.

Installing the NVIDIA drivers can be a complex operation depending on what graphics card you have. The drivers are located on the RPM Fusion repository, not on Fedora. Check the RPM Fusion site for instructions on installing the NVIDIA drivers.

https://rpmfusion.org/Howto/Nvidia

For a simple install, a search on nvidia displays NVIDIA modules for each kernel version. The vendor graphic drivers use two packages, one for the supporting software and another for the kernel. The kernel modules are specific to the kernel you are using. Each time you update to a new kernel, you will require a new graphics kernel module created specifically for that kernel. This will be automatically downloaded and installed for you as a dependent package when you update your kernel (the RPM Fusion non-free repository must be active). The driver package is named xorg-x11-drv-nvidia, and the kernel module generator is named akmod-nvidia.
xorg-x11-drv-nvidia
akmod-nvidia
You can use a dnf list command entered in a terminal window with nvidia* to list all NVIDIA packages.
dnf list nvidia*
AMD drivers have been fully open sourced. You can download and install the driver from the Fedora repository. The name of the driver is amdgpu.
xorg-x11-drv-amdgpu
You can also install the drivers using GNOME Software's Add-ons Hardware Drivers tab (see Figure 4-26). Be sure that third-party repositories are enabled (Software Repositories dialog). Click on the driver you have determined that you need, such as the NVIDIA driver. This opens a GNOME Software software description dialog with an Install button and a description of the software including its version, its repository, and whether it is proprietary or free (License). Once you have installed the driver, the Install button changes to a Remove button. On the Hardware Drivers tab, a checkmark emblem appears on the upper-right corner of the driver icon, indicating that it is installed.
../images/326960_3_En_4_Chapter/326960_3_En_4_Fig26_HTML.jpg
Figure 4-26

Video Drivers install: GNOME Software Add-ons Hardware Drivers tab and install dialog

Using Repositories

A few repositories provide much of the software you will normally require. The main Fedora software repository will most likely contain the software you want. Always check this repository first, before trying a third-party repository. Some specialized applications, such as vendor-supplied graphics drivers, as well as third-party multimedia support, can be located at http://rpmfusion.org and at https://negativo17.org . These repositories make up a set of software sites that you can use to provide most of the functionality users expect from a desktop system. All are DNF-compliant, with DNF configuration files designed for specific Fedora releases.

To see what packages are available, you can use your web browser to access the sites. Fedora and RPM Fusion provide repodata directories for detailed listings.

To use DNF on a software repository, DNF has to be configured to access them. This is a simple matter of listing the site’s URL, both its web address and directory location. Configurations for repositories are placed in repo files located in the /etc/yum.repos.d directory on your Linux system. The repo files for Fedora are already installed. You must add repo files for RPM Fusion before you can access them with DNF. RPM Fusion provides RPM packages, free and non-free collections, named rpmfusion-free-release-28.noarch.rpm and rpmfusion-nonfree-release-28.noarch.rpm, on their website. When these are installed, they automatically set up the DNF configuration files. For RPM Fusion, these are rpmfusion-free.repo and rpmfusion-nonfree.repo, with corresponding update and development repo files.

The repository sites and their repo files are:

https://download.fedoraproject.org

The Fedora Repository, mirror link: Fedora-compliant software, fedora.repo

https://download1.rpmfusion.org

RPM Fusion: Repository for driver, multimedia, and other Fedora packages, rpmfusion-free.repo and rpmfusion-nonfree.repo

https://negativo17.org/repos/

negativo17.org : Repository for driver, multimedia, and other Fedora packages, fedora-negativo17.repo

Repository Repo Package Files

When you are installing packages, PackageKit , Yumex, and the dnf command automatically use the repo files to check your enabled repositories. One important exception to this rule is the initial install of the repository configuration files from third-party repositories. These configuration files (repo files) are usually contained in their own RPM packages. You download and install a repo package directly from the repository website, using your web browser. For example, the repo package for the RPM Fusion third-party Fedora DNF repository is rpmfusion-free-release-28.noarch.rpm. You download and install this package directly, using a web browser. Repository configuration files are located in the /etc/yum.repos.d directory and have the extension .repo.

Fedora Repository

The Fedora repository is already configured for use by DNF. To download any Fedora package, simply use GNOME Software, Packages, or enter the dnf command with the install option on a command line. The package will be detected, along with any dependent software, and you will be asked to confirm installation. The download and installation will be automatic. The first time you install a package from the Fedora repository, you are prompted to install the Fedora GPG key, used to authenticate the packages. Just click Yes to install the key.

A section of the following Fedora repo file (/etc/yum.repos.d/fedora.repo) lists several repository options. The name is Fedora, with releasever and basearch used to determine the release and architecture parts of the name. The mirrorlist option is used instead of baseurl, which is commented out (metalink provides mirror access, selecting the fastest available mirror). Again, the releasever is used to specify the release. The gpgkey used, RPM-GPG-KEY-fedora, is already installed in the /etc/pki/rpm-gpg directory. The skip_if_unavailable option is set to False so that the Fedora repository must always be checked.
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/basearch/os/
metalink=http://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata expire=7d
repo-gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
skip_if_unavailable=False

RPM Fusion

The https://rpmfusion.org site provides access to popular software for many software applications, including multimedia applications such as MPlayer, as well as those not included with Fedora, due to licensing issues. Several of the more popular packages include the vendor NVIDIA graphics drivers (when available). RPM Fusion specializes in configuring sometimes difficult drivers for compatibility with Fedora. For example, you can download the NVIDIA Linux driver directly from the NVIDIA website and try to install it on your Fedora system. But there can be complications, and the driver could require additional configuration. As an alternative, RPM Fusion provides a version of the driver that has already been configured for Fedora.

To configure DNF on your system to access https://rpmfusion.org , just install the rpmfusion-free-release and rpmfusion-nonfree-release packages for your version of Fedora. These will install the rpmfusion-free.repo and rpmfusion-nonfree.repo configuration files in the /etc/yum.repos.d directory, as well as download the RPM Fusion GPG key. You can install the GPG manually or just wait until you install a package from RPM Fusion, in which case, DNF will install it for you, after prompting for approval. Check the RPM Fusion configuration page at http://rpmfusion.org for details. The name of the package will be something like rpmfusion-free-release.

You can download and install the package directly with the rpm command from within a terminal window. Use a preceding sudo command for administrative access. The RPM Fusion site’s configuration page provides a detailed example.

The GPG keys are included in the packages and installed automatically in the /etc/pki/rpm-gpg directory. They are named RPM-GPG-Key-rpmfusion-free-fedora and RPM-GPG-Key-rpmfusion-nonfree-fedora.

To see which packages are available on RPM Fusion, use your web browser to go to https://download1.rpmfusion.org . Here, you will find a listing of directories for each supported release. After selecting your release directory, you then choose your architecture, such as i386 (32-bit) or x86_64 (64-bit). Here, you will see a simple file listing of all available packages. Alternatively, on PackageKit, you could deselect all software sources except RPM Fusion, so that only the RPM Fusion packages are listed in the Software window.

Part of the rpmfusion-free.repo configuration file installed by the rpmfusion-free-release package is shown here. The configuration specifies the mirror list located at http://mirrors.rpmfusion.org .
[rpmfusion-free]
name=RPM Fusion for Fedora $releasever - Free
#baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-$releasever&arch=$basearch
enabled=1
enabled-metadata=1
metadata expire=14d
gpgcheck=1
repo-gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
The corresponding part of the rpmfusion-nonfree.repo configuration file installed by the rpmfusion-nonfree-release package is shown here:
[rpmfusion-nonfree]
name=RPM Fusion for Fedora $releasever - NonFree
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-$releasever&arch=$basearch
enabled=1
enabled-metadata=1
metadata expire=14d
gpgcheck=1
repo-gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

Livna (dvdcss)

The Livna repository ( http://rpm.livna.org ) provides access to one package, the commercial DVD video codec, called libdvdcss. Install the livna-release.rpm package. It contains the repository file, livna.repo.
[livna]
name=rpm.livna.org for $releasever - $basearch
#baseurl=http://rpm.livna.org/repo/$releasever/$basearch/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/rpm.livna.org/repo/$releasever/$basearch/
mirrorlist=http://rpm.livna.org/mirrorlist
failovermethod=roundrobin
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna

Adobe (Flash)

The Adobe repository provides access to the Adobe proprietary version of the Adobe Flash player for Linux. Adobe provides 32- and 64-bit software. The Fedora project Flash wiki explains the procedure in detail (see https://fedoraproject.org/wiki/Flash ).

First, download the RPM package for the repository configuration. Select YUM for Linux.

https://get.adobe.com/flashplayer/

Then install the repository configuration package, called adobe-release. You can do this directly from the web browser by choosing to install and then clicking Yes, when prompted, to install the unsigned software, as the package key is not yet installed (it is included in the repository package). You could also first download the package, then install it with the following rpm command in a terminal window for the 64-bit version:
sudo su -c 'rpm -vhi adobe-release-x86_64-1.0-1.noarch.rpm'
This installs the /etc/yum.repos.d/adobe-linux-x86_64.repo file, shown here:
[adobe-linux-x86_64]
name=Adobe Systems Incorporated
baseurl=http://linuxdownload.adobe.com/linux/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

Software Sources will list the repository as Adobe Systems Incorporated. You can then use GNOME Software and Packages to search for Flash and select the Flash package for installation. The Flash plugin package is flash-plugin and has the title “Adobe Flash Player”.

The first time you install any package from the Adobe repository, you will be prompted to install its package key. A dialog will be displayed with the message “Do You Trust the Source of the Packages?”. Click Yes to install the Adobe repository package key.

Alternatively, you can manually install the Adobe repository package key with the following command:
sudo su -c 'rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux'

Restart Firefox to enable your Flash plugin. On the Tools ➤ Add-ons Plug-ins tab, you will find an entry for Flash.

Google

For Linux-compatible Google applications , you should configure access to the Google repository, which allows you to install applications such as Picasa from PackageKit. Google installs a separate repository file for each major application. Google Chrome has a google-chrome.repo file, and Google Earth has a google-earth.repo file. The signing key is installed automatically. Follow the instructions for the RPM at: https://www.google.com/linuxrepositories/ .

Installation is performed using a terminal window. Click and drag to select the wget command on the browser.
wget https://dl-ssl.google.com/linux/linux_signing_key.pub
Then open a terminal window and press Ctrl+Shift+v to copy the command to that window. The signing key is then installed. Next, import the key with the following rpm command.
sudo rpm --import linux_signing_key.pub
A copy of the google-chrome.repo file follows:
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linus/linux_signing_key.pub

DNF Configuration

DNF options are configured in the /etc/dnf/dnf.conf file, and the /etc/yum.repos.d directory holds repository (repo) files that list accessible DNF repositories. The repository files have the extension .repo. Check the dnf.conf man page for a listing of the different DNF options, along with entry formats. The dnf.conf file consists of different segments separated by bracket-encased headers, the first of which is always the main segment. Segments for different DNF server repositories can follow, beginning with the repository label encased in brackets. On Fedora, however, these are currently placed in separate repository files in the /etc/yum.repos.d directory. In addition to dnf.conf, DNF also supports an /etc/dnf directory that can hold additional configuration information.

/etc/dnf/dnf.conf

The dnf.conf file contains the main segment with settings for DNF options, as shown here:
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True

gpgcheck is a repository option that is set globally for the repo files. It checks for GPG software signatures. The installonly_limit option limits the number of packages that can be installed concurrently. The clean_requirements_on_remove option checks for and removes unused dependent packages (packages installed only as dependencies).

There are also general DNF options, such as logdir, which lists the location of DNF logs, and pluginspath, which specifies the location of DNF plugins. You can elect to keep the downloaded packages with keepcache.

Repository Files: /etc/yum.repos.d

The repository entries in the repo files begin with a bracket-enclosed server ID, a single-word unique name. Repository-specific options govern the access of software repositories. These include gpgcheck, which checks for GPG software signatures; gpgkey, which specifies the location of the signature; metalink, which references fast links from a mirror list; and mirrorlist, which references a URL holding mirror sites. The repository-specific name option provides a name for the repository. The URL reference is then assigned to the baseurl option. There should be only one baseurl option, but you can list several URLs for it, each on its own line. With the mirrorlist option, you can just list a URL for a list of mirrors, instead of listing each mirror separately in the baseurl option. The URL entries often use special variables, releasever and basearch. The releasever obtains the release information from the distroverpkg option set in the main segment. The basearch variable specifies the architecture you are using, as determined by DNF, such as i386. The enabled option actually turns on access to the repository. By setting it to 0, you choose not to access a specific repository. The gpgcheck option specifies that you should perform a GPG authentication check to make sure the download is intact. The enabled option will enable a repository, allowing DNF to use it. You can set the enable bit to 0 or 1 to turn off or on access to the repository.

The gpgkey option provides an authentication check on the package to make sure you have downloaded the appropriate version. Downloads can sometimes be intercepted and viruses inserted. The GPG key check protects against such attacks. It can also check to make sure the download is not corrupt or incomplete. The Fedora public GPG key may already be installed on your system. If you have already used DNF, you have already downloaded it. The Fedora GPG key allows you to access Fedora packages. The RPM Fusion free and non-free repositories use their own public keys, referenced with the gpgkey option in their repos files. The keys for all these repositories will be installed in the /etc/pki/rpmgpg directory.

Managing DNF Caches

With the keepcache option enabled, DNF will keep its downloaded packages in the /var/cache/dnf directory. Should you want to save or copy any particular packages, you can locate them there. Caching lets you easily uninstall and reinstall packages without having to download them again. The package is retained in the cache. If caching is disabled, the packages are automatically deleted after they are installed.

Your cache can increase rapidly, so you may want to clean it out on occasion. If you just want to delete these packages, as they are already installed, you can use the clean packages option.
dnf clean packages

Manually Installing Packages with rpm

You can use the rpm command to install individual RPM packages that are not part of a DNF repository. Keep in mind that most software resides on DNF-supported, Fedora-compliant repositories. For such software, you use the dnf command or the Packages frontend. DNF has the advantage of automatically installing any dependent packages, whereas the rpm command, although it will detect needed packages, will not install them. Using only the rpm command, you would have to separately install any dependent packages in the correct order.

The rpm command is useful for packages that are not part of any DNF-supported repository, such as custom-made packages, and that have few or no dependent packages. You can also use the rpm command to bypass DNF, forcing installation of a particular package, instead of from DNF repositories.

The rpm command performs installation, removal, and verification of software packages. An RPM package is an archive of software files. Each archive has a name that ends with .rpm, indicating it is a software package that can be installed by the Red Hat Package Manager.

The rpm command uses a set of options to determine what action to take. The -i option installs the specified software package, and the -U option updates a package. With an -e option, rpm uninstalls the package. A q placed before an i (-qi) queries the system to see if a software package is already installed and displays information about the software (-qpi queries an uninstalled package file). The rpm command with no options provides a complete list of rpm options. A set of commonly used options is shown in Table 4-5.
Table 4-5

rpm Command Options

Option

Action

-U

Updates a package

-i

Installs a package

-e

Removes a package

-qi

Displays information for an installed package

-ql

Displays a file list for an installed package

-qpi

Displays information from an RPM package file (used for uninstalled packages)

-qpl

Displays the file list from an RPM package file (used for uninstalled packages)

-K

Authenticates and performs an integrity check on a package

The software package name includes information about the version and release date. In the next example, the user installs the xvidcore package using the rpm command. Notice that the full filename is entered. In most cases, you would install packages with the -U option, for update. If the package is not already installed, -U will install it. The following examples use the DivX xvidcore RPM packages downloaded from http://rpmfusion.org .
$ rpm -Uvh xvidcore-1.3.5-1.fc28.x86_64.rpm
To list the full name, you can use the ls command with the first few characters and an asterisk (*), as follows:
ls xvid*
You can also use the * to match the remainder of the name, as in the following:
ls xvidccore-1*.rpm
When RPM performs an installation, it first checks for any dependent packages. These are other software packages with programs the application you are installing has to use. If other dependent packages must be installed first, RPM cancels the installation and lists those packages. You can install those packages and then repeat the installation of the application. To determine if a package is already installed, use the -qi option with rpm. The -q stands for query. To obtain a list of all the files the package has installed, as well as the directories it installed to, use the -ql option. To query package files, add the p option. The -qpi option displays information about a package, and -qpl lists the files in it. The following example lists all the files in the xvidcore package:
$ rpm -qpl xvidcore-1.3.5-1.fc28.x86_64.rpm
To remove a software package from your system, first use rpm -qi to make sure it is actually installed, then use the -e option to uninstall it. As with the -qi and -e options, you needn’t use the full name of the installed file. You only need the name of the application. In the following example, the user removes the DivX xvidcore package from the system:
$ rpm -e xvidcore

Package Security Check

DNF automatically performs integrity and authentication checks on all software downloaded from Fedora-compliant repositories, confirming that the package was obtained from a valid source, and that it has not been modified. Each repository configuration file in the /etc/yum.repos.d directory will have its gpgcheck option set to 1. Should you want to turn off this check for a particular repository, you can set its gpgcheck option to 0.

For packages not downloaded from a DNF repository, you may want to manually check their integrity and authentication. To authenticate a package, you check its digital signature. Packages are signed with encrypted digital keys that can be decrypted using the public key provided by the author of the package. This public key has to be downloaded and installed on the encryption tool used on your system. Fedora, along with most Linux distributions, uses the GNU Privacy Guard (GPG) encryption tool. To use a public key to authenticate an RPM package, you first must install it in the RPM key database. For all RPM packages that are part of the Fedora distribution, you can use the Fedora public key, placed during installation in the /etc/pki/rpm-gpg/ directory. Here, you will find the RPM GPG keys for all your configured repositories, including RPM Fusion.

The Fedora key is RPM-GPG-KEY-fedora-28-primary. Several keys are links to this key, such as RPM-GPG-KEY-28-fedora and RPM-GPG-KEY-fedora-28-x86_64. The RPM Fusion keys will have the same structure, with a primary key, such as RPM-GPG-KEY-rpmfusion-free-fedora-28-primary, and links to it, such as RPM-GPG-KEY-rpmfusion-free-fedora-28.

You must import the key to the RPM database before you can check Fedora RPM packages. The first time you use PackageKit to install a package, you will be prompted to import the GPG key. Once imported, you need not import it again. Alternatively, you can manually import the key, as follows:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

If you have downloaded an RPM package from another site, you can also download and install its public key, with which you can authenticate that package. For example, there are public keys for both the RPM Fusion free and non-free Fedora DNF repositories. These are included in the RPM Fusion DNF configuration files, which you can download and install, such as rpmfusion-free-release-28.noarch.rpm for RPM Fusion repositories. The keys will be automatically installed with the configuration.

Once the public key is installed, you can check the package authentication using the rpm command with the -K option.
rpm -K xvidcore-1.3.5-1.fc28.x86_64.rpm
To see a list of all the keys you have imported, you can use the -qa option and match the gpg-pubkey* pattern. Using rpm with the -qi option and the public key, you can display detailed information about the key. The following example shows the Fedora public key:
$ rpm -qa gpg-pubkey*
gpg-pubkey-4f2a6fd2-3f9d9d3b
gpg-pubkey-db42a60e-37ea5438
You can manually check a package’s integrity with the rpm command with the -K and the --nosignature options. A value called the MD5 digest measures the contents of a package. If the value is incorrect, the package has been tampered with. Some packages provide just digest values, allowing only integrity checks. In the next example, the user checks whether the xvidcore package has been tampered with. The --nosignature option says not to perform authentication, performing the integrity check only.
rpm -K --nosignature xvidcore-1.3.5-1.fc28.x86_64.rpm

Installing Source Code Applications

Some applications are available for Linux in source code format. These programs are stored in a compressed archive that you have to decompress and then extract. The resulting source code can then be configured, compiled, and installed on your system. Always check the README and INSTALL files that come with the source code to check the appropriate method for creating and installing that software. Be sure that you have installed all development packages onto your system. Development packages contain the key components, such as the compiler, GNOME and KDE headers and libraries, and preprocessors. You cannot compile the source code software without them.

Several tools you may need for installing and managing source code are already be installed. To install the full set of tool, use the groupinstall option with “Development Tools” and “C Development Tools and Libraries”.
sudo dnf groupinstall "Development Tools"
sudo dnf groupinstall "C Development Tools and Libraries"

Extracting the Archive: Archive Manager (File Roller)

From the desktop, you can extract compressed archives with Archive Manager. Archive Manager is the Fileroller application. Archive Manager displays the top-level contents of the archive, which you can browse if you want, even reading such text files as README and INSTALL. You also can see which files will be installed. To extract the archive, click Extract.

Alternatively, on a command line (terminal window), you can use the tar command to extract archives. On the command line, enter the tar command with the xvjf options (j for bz2 and z for gz), as in the following:
tar xvjf freeciv-2.6.1.tar.bz2

Configure, Compile, and Install

Extracting the archive creates a directory with the name of the software , in this case, freeciv-2.3.4. Once it is extracted, you must configure, compile, and install the software, using command-line commands (terminal window).

Change to the software directory with the cd command.
cd freeciv-2.6.1
Run the command ./configure to generate a compiler configuration for your particular system (creates a custom makefile used to compile the source code).
./configure
Compile the software with the make command.
make
Then install the program with the make install command .
make install
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.233.26