%% $Header: /cvsroot/lcdp/lpic/general-linux-2/slides/102-5.tex,v 1.2 2003/05/30 06:06:18 waratah Exp $

\input{gl2.slide-header.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80->
\begin{slide} %================================================================
\begin{center} \Huge \textsf{-- General Linux 1 -- } \\[2mm]
\large  \textsf{(Linux Professional Institute Certification)}\\[5mm]
\Large \textsf{ 102-2 Use Debian Package management [5]} \\
\normalsize\end{center}

\footnote{Copyright \copyright\ 2002 Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation---either version 2 of the License or (at your option) any later version.}
 
\scriptsize
\begin{verbatim} 
   .~.    
   /V\     by: geoffrey robertson        
  // \\        geoffrey@zip.com.au
  @._.@ 
\end{verbatim} 
\tiny
\begin{verbatim}
$Id: 102-5.tex,v 1.2 2003/05/30 06:06:18 waratah Exp $ 
\end{verbatim} 
\normalsize  
\vfill \end{slide} %-----------------------------------------------------------
%----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80->

%==============================================================================
\begin{slide} %ghr
  \listofslides
\vfill \end{slide}
%------------------------------------------------------------------------------

%==============================================================================
%==============================================================================
\begin{slide} %ghr
\slideheading{Use Debian Package Management} 

\slidesubheading{Objective}

Candidates should be able to perform Debian package management. This
objective includes being able to use command-line and interactive
tools to install, upgrade, or uninstall packages, as well as find
packages containing specific files or software (such packages might or
might not be installed). This objective also includes being able to
obtain package information like version, content, dependencies,
package integrity and installation status (whether or not the package
is installed).

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide} %ghr
  \slidesubheading{Key files, terms and utilities}
  
\begin{minipage}[t]{55mm}
  \begin{itemize}
    \item \texttt{/etc/dpkg/dpkg.cfg}
    \item \texttt{/var/lib/dpkg/*}
    \item \texttt{/etc/apt/apt.conf}
    \item \texttt{/etc/apt/sources.list} 
  \end{itemize}
\end{minipage}
\begin{minipage}[t]{50mm}
  \begin{itemize}
    \item \texttt{dpkg}
    \item \texttt{dselect}
    \item \texttt{dpkg-reconfigure}
    \item \texttt{apt-get}
    \item \texttt{alien}
  \end{itemize}
\end{minipage}
 
\slidesubheading{Resources}
\begin{description}
  \item[The Debian GNU/Linux FAQ] :
  \begin{alltt}
http://www.debian.org/doc/FAQ/index.html  
  \end{alltt}
\end{description}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
  \Slidecontents
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slideheading{Debian Packages---debs}
\begin{description}
  \item[General format:] 
\begin{alltt}
package_version-build\_architecture.deb
\end{alltt}
\item[Example deb:] 
\begin{alltt}
disc-cover\_1.0.1-3.deb
\end{alltt}
\item[Task Packages] Package containing only a large number of dependencies. Used to install a software bundle. 
\item[Task Package Example:]
\begin{alltt}
kde\_2.2.25\_all.deb
\end{alltt}
\end{description}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
  \Slidecontents
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slideheading{Using \texttt{dpkg}}

\texttt{dpkg} is the core Debian package tool. 

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Installing Packages Using \texttt{dpkg}}

\begin{description}
  \item[To install a package]: 
\begin{alltt}
\rootcmd{dpkg --install bpalogin_2.0-1.deb} 
\end{alltt}
or
\begin{alltt}
\rootcmd{dpkg -i bpalogin_2.0-1.deb} 
\end{alltt}

\item[Example]: 
\begin{alltt}
\rootcmd{dpkg -i bpalogin_2.0-1.deb}
Selecting previously deselected package bpalogin.
(Reading database ... 
110224 files and directories currently installed.)
Unpacking bpalogin (from bpalogin_2.0-1.deb) ...
Setting up bpalogin (2.0-1) ...
Starting bpalogin: bpalogin.
\end{alltt}
\end{description}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Install Dependencies Using \texttt{dpkg}}


\vfill \end{slide} %-----------------------------------------------------------



%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Force options for \texttt{dpkg}}


\vfill \end{slide} %-----------------------------------------------------------



%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Removing Packages Using \texttt{dpkg}}

Removing a package does not remove any configuration files.

\begin{description}
  \item[To remove a package]: 
\begin{alltt}
\rootcmd{dpkg --remove bpalogin} 
\end{alltt}
or
\begin{alltt}
\rootcmd{dpkg -r bpalogin} 
\end{alltt}

\item[Example]: 
\begin{alltt}
\rootcmd{dpkg -r bpalogin}
(Reading database ... 
110235 files and directories currently installed.)
Removing bpalogin ...
Stopping bpalogin: bpalogin.
\end{alltt}
\end{description}
\vfill \end{slide} %-----------------------------------------------------------


%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Removing Packages with Dependencies Using \texttt{dpkg}}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Purging Packages Using \texttt{dpkg}}

Purging a package removes all configuration files.

\begin{description}
  \item[To purge a package]: 
\begin{alltt}
\rootcmd{dpkg --purge bpalogin} 
\end{alltt}
or (notice the Upper case \textbf{P})
\begin{alltt}
\rootcmd{dpkg -P bpalogin} 
\end{alltt}

\item[Example]: 
\begin{alltt}
\rootcmd{dpkg -P bpalogin}
(Reading database ... 
110235 files and directories currently installed.)
Removing bpalogin ...
Stopping bpalogin: bpalogin.
\end{alltt}
\end{description}
\vfill \end{slide} %-----------------------------------------------------------



%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Querying Packages Using \texttt{dpkg}}

\begin{description}
  \item[To purge a package]: 
\begin{alltt}
\rootcmd{dpkg --print-avail bpalogin} 
\end{alltt}
or (notice the lower case \textbf{p})
\begin{alltt}
\rootcmd{dpkg -p bpalogin} 
\end{alltt}

\vfill
\newpage

\item[Package Query Example]: 
\scriptsize
\begin{alltt}
\rootcmd{dpkg -p bpalogin}
Package: bpalogin
Priority: extra
Section: net
Installed-Size: 120
Maintainer: Robert Graham Merkel <rgmerk@mira.net>
Architecture: i386
Version: 2.0-1
Depends: libc6 (>= 2.1.94)
Recommends: dhcp-client
Size: 15306
Description: Login client for Telstra(TM) BPA cable users
 This daemon lets Telstra(TM) Big Pond(TM) Advance(TM) cable
 customers log in to their accounts.  It uses the BIDS2 protocol.
 Please note that this client is not officially supported
 by Telstra.
 .
 You need some kind of DHCP client to use the service.
\end{alltt}
\end{description}
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Listing Packages Using \texttt{dpkg}}

\begin{description}
  \item[To purge a package]: 
\begin{alltt}
\rootcmd{dpkg --list apache*} 
\end{alltt}
or
\begin{alltt}
\rootcmd{dpkg -l apache*} 
\end{alltt}

\item[Example]:
{\tiny 
\begin{alltt}
\rootcmd{dpkg -l apache*}
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name             Version          Description
+++-================-================-================================================
ii  apache           1.3.24-3         Versatile, high-performance HTTP server
ii  apache-common    1.3.24-3         Support files for all Apache webservers
un  apache-dev       <none>           (no description available)
un  apache-doc       <none>           (no description available)
un  apache-modules   <none>           (no description available)
un  apache-perl      <none>           (no description available)
ii  apache-ssl       1.3.24.3+1.48-2  Versatile, high-performance HTTP server with SSL

\end{alltt}}
\end{description}
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slidesubheading{Showing Package Status Using \texttt{dpkg}}
 
\begin{description}
  \item[To purge a package]: 
\begin{alltt}
\rootcmd{dpkg --status package_name} 
\end{alltt}
or
\begin{alltt}
\rootcmd{dpkg -s package_name} 
\end{alltt}

\vfill
\newpage

\item[Example of Package Status]:
{\scriptsize
\begin{alltt}
\rootcmd{dpkg -s eterm}
Package: eterm
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 1040
Maintainer: Laurence J. Lane <ljlane@debian.org>
Version: 0.9.1-2
Replaces: eterm-ml, eterm-backgrounds
Provides: x-terminal-emulator, eterm-backgrounds
Depends: ncurses-term, libast1, libc6 (>= 2.2.4-2), libimlib2, 
libttf2, xlibs (>> 4.1.0)
Conflicts: eterm-backgrounds, eterm-ml

Description: Enlightened Terminal Emulator
 A terminal emulator in the spirit of xterm or rxvt, eterm uses an
 Enlightenment style config file, as well as themes.  The Imlib 
 graphics engine is used to render images.  This version supports 
 background images, pixmapped scrollbars, pseudo-transparency, 
 POSIX threads, and unicode support.
\end{alltt}}
\end{description}
\vfill \end{slide} %-----------------------------------------------------------


%==============================================================================
\begin{slide}{} %
\slidesubheading{}


\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================
\begin{slide}{} %ghr
  \Slidecontents
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slideheading{dselect}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
  \Slidecontents
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slideheading{apt-get}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slideheading{apt-cache}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
  \Slidecontents
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\slideheading{alien}

\vfill \end{slide} %-----------------------------------------------------------

 %==============================================================================
\begin{slide}{} %ghr
  \Slidecontents
\vfill \end{slide} %-----------------------------------------------------------

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%==============================================================================
\begin{slide}{}
\slideheading{}


\vfill \end{slide} %-----------------------------------------------------------

=============================================================================
\begin{slide}{}

\end{slide} %------------------------------------------------------------------

