% $Id: a4-pkgsrc-en.tex,v 1.4 2007/04/07 14:54:49 hubertf Exp $
% written by Stefan Schumacher, <stefan [at] net-tex.de>, 2006-01-08
% Die Urheberrechtshinweise dürfen nicht entfernt werden.
\documentclass[9pt,a4paper]{article}
\usepackage[pdftex]{graphicx}
\usepackage{multicol,type1cm}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[nofancy]{rcsinfo}

\usepackage{kopf}


\usepackage{geometry}
\geometry{margin=8mm}

\setlength{\parindent}{0pt}
%
% mySection  
% 
\newcommand{\mySection}[1]{\begin{center}\large{\sffamily\bfseries #1}\end{center}}

\begin{document}

\pagestyle{empty}
% Header
\KopfPkgsrcAVier[18]{A Framework for Portable ~\\[2mm] Software Management}
% Body
\begin{multicols}{2} \setlength{\columnseprule}{0.3pt}
\mySection{What is Pkgsrc?}
Pkgsrc (\textit{Package Source}) is a software management framework originally developed for
NetBSD. It has since been ported to several other operating systems, including Linux,
Solaris, AIX, OSF/1, DragonflyBSD and even MS Windows with Interix! It is a  well 
ordered hierarchy of directories
and Makefiles, used to install software and all its dependencies from source or binary
packages. Additionally, several programs are available to automate maintenence tasks.

With pkgsrc, you can consolidate your whole software management process in heterogenous
networks. 


\mySection{Supported Operating Systems}
Supported operating systems include, but are not limited to:~\\
\begin{minipage}{0.45\columnwidth}
\begin{itemize}%\itemsep-1ex
\item AIX
\item BSD/OS
\item Bluewall Linux
\item Darwin PowerPC 
\item Debian GNU/Linux
\item DragonFlyBSD
\item Fedora Core
\item FreeBSD
\item IRIX
\item Interix
\end{itemize}
\end{minipage}
\begin{minipage}{0.45\columnwidth}
\begin{itemize}%\itemsep-1ex
\item NetBSD
\item OSF/1
\item OpenBSD
\item PC-BSD
\item ROOT Linux
\item Red Hat Enterprise Linux
\item Slackware Linux
\item Solaris
\item OpenSUSE Linux
\end{itemize}
\end{minipage}

% \columnbreak
\mySection{Why do you need Pkgsrc?}
On modern computers, several hundred software applications are installed. All this
software has to be maintained -- e.g. updated, checked for security holes, compiled from
source and so on. With the increasing dependencies between software packages, the
amount of work to be done tends to explode. Doing all that work by hand is almost
impossible -- especially if one has to maintain different operating systems on different
architectures and in different versions. 

To install software by hand, one needs to know the whole required toolchain -- 
including several versions of \textit{configure}, several hundred versions of 
\textit{Make} and so on. No one wants to spend a whole workday just to figure out which
build toolchain is required to install that piece of software. 

Wit pkgsrc, all these tasks can be automated and consolidated -- even in a heterogenous
network with different operating systems and architectures! \


\mySection{Separate the Packages from the OS}
Some operating systems or distributions mix up configuration
files for the base OS with those of the packages. This makes
maintenance much harder than it already is.

Pkgrsc separates the operating system from the packages -- everything has its own place
under /usr/pkg/. From man pages to configuration files and binaries -- /usr/pkg/ holds a
well ordered hierarchy of directory to be used exclusively by packages.

\end{multicols}

\begin{minipage}{\textwidth}
\begin{minipage}{0.35\textwidth}
\centering
\includegraphics[scale=0.6]{struktur.pdf}~\\
\small \textit{An extract of the pkgsrc hierarchy}
\end{minipage}
\begin{minipage}{0.65\textwidth}
\centering
\includegraphics[scale=1.6]{ps300.jpg}
\\ \small \textit{pkg\_select, a curses based interface for pkgsrc\\}
\end{minipage}
\end{minipage}



% Footer 
{\scriptsize
\rule{\textwidth}{0.5pt}\\%
All rights reserved. Created by Stefan Schumacher (\texttt{http://www.net-tex.de})}
% Do not remove my copyright notice!

\clearpage

\pagestyle{empty}
% Header
\KopfPkgsrcAVier[18]{A Framework for Portable ~\\[2mm] Software Management}
%
% Body
\begin{multicols}{2} \setlength{\columnseprule}{0.3pt}

\mySection{Precompiled Binary Packages or Compilation from Source?}
No matter how you prefer your software -- pkgsrc will help you. If you want installation
exclusively from precompiled binary packages, just adjust one environment variable and
pkgsrc will use binaries. A lot of enthusiasts from all over the world compile software
with pkgsrc for different operating systems and different platforms. Those packages are
uploaded to ftp://ftp.pkgsrc.org and freely available to all pkgsrc users. 

Compiling from source is as easy as using binary packages. Pkgsrc will automatically solve
all dependencies, fetch the required software and install it. Pkgsrc can also be used to
create binary packages. Those packages can be installed on other machines. So it is
possible to build packages for slower machines on a dedicated build server. Even crosscompiling 
of packages can be done on selected architectures!

\mySection{One File to Rule them All!}
The complete build process is controlled via one single text file!
In /etc/mk.conf, all required environment variables can be adjusted. Those variables determine global
options, like which compiler and which directories should be used during
compilation or where the man pages of packages shall be installed. In addition to the
global options, package specific options can be used to configure packages, e.g. which
dependencies or which version should be used. 

\mySection{How do I use Pkgsrc?}
Fetch pkgsrc from pkgsrc.org via CVS or FTP and extract it on your hard drive. Pkgsrc is a
hierarchy of directories and files, ordered by categories. To install a package, simply
enter the specific directory and type \textit{make install clean clean-depends} -- pkgsrc will do the
rest for you!

\mySection{Which Make-Targets do Exist?}
\begin{itemize}\itemsep-1ex
\item {\tt make fetch}: fetch sources 
\item {\tt make checksum}: check the sources' integrity
\item {\tt make install-depends}: Install all dependencies
\item {\tt make extract}:  extract sources
\item {\tt make patch}:  apply patches to the source files
\item {\tt make configure}: configure the sources
\item {\tt make build}: compile sources
\item {\tt make install}: install and register packages
\item {\tt make package}: create a binary package from sources
\item {\tt make clean}: clean the working directories
\item {\tt make clean-depends}: clean the working directories of dependencies
\item {\tt make deinstall}: deinstall package
\item {\tt make replace}: replace package with newer version
\item {\tt make update}: update package and dependencies
\item {\tt make fetch-list}: generate a shell script to fetch sources via ftp 
\item {\tt make show-options}: show available packages
\end{itemize}



\mySection{Additional Programs}
\begin{itemize}\itemsep-1ex
\item \texttt{pkg\_admin} perform various administrative tasks
\item \texttt{pkg\_add, pkg\_delete} install and upgrade software packages
\item \texttt{pkg\_chk} check, and optionally update, installed packages
\item \texttt{pkg\_tarup} tars up installed software packages 
\item \texttt{pkgfind} search for packages by keyword 
\item \texttt{pkg\_view} install packages in a chroot
\item \texttt{cdpack} create CDs with binary packages, solves dependencies
\item \texttt{pkg\_select} a text based user interface for pkgsrc
\end{itemize}


\mySection{Security}
Like the NetBSD project, Pkgsrc emphasizes security. All source files and patches are
signed both with a SHA1 and RipeMD160 checksum. Both checksums are checked before the
sources are extracted, and the install process will stop if the checksums do not match. 

In addition to checksums, OpenPGP signatures can be used to check the integrity of
source files. With this procedure enabled, it is almost impossible to plant trojan horses
in packages.

To find insecure packages easily, the pkgsrc project maintains a vulnerability list. This
text file contains a list of insecure packages and their vulnerabilities. With the
program \textit{audit\_packages}, the list can be fetched and automatically compared to
the installed packages. This task can be automated with cron and can improve your systems security
dramatically. 

% \mySection{Package Views}
% Usually one only has one version of a specific package installed. But what if you need a
% developer and a stable version in parallel? No problem with pkgsrc and its
% \textit{pkg\_view} facility. Pkg\_view will set up a chroot environment and install as many
% versions of a package in parallel as you want. So you can happily hack on your developer's
% version, while you still use the stable one for everyday business.
% 
% With \textit{mksandbox}, you can automatically create a sandbox, where new packages are
% compiled in. This is a useful tool to test if new package versions and all dependencies
% can be built. 

\mySection{Installation as User}
With pkgsrc, a user without root-privileges can install packages into his home directory.
\mySection{Comprehensive Documentation}
The whole system is documented. The pkgsrc guide is freely available at
{\tt http://www.NetBSD.org/Documentation/pkgsrc/} or as pkgsrc/doc/pkgsrc.txt.

% \mySection{Third Party Packages}
% Many of the most important and well-engineered security software
% packages available can be installed flawlessly via NetBSD's pkgsrc.
% Some of those packages are snort, Tripwire, CFS, Nessus, Amap, GnuPG and honeyd.
\end{multicols}


\begin{center}
\rule{\textwidth}{0.5pt}\\%
{\fontsize{30}{30pt}\selectfont \textbf{www.pkgsrc.org}}
\rule{\textwidth}{0.5pt}\\%
\end{center}


% Footer 
%
\rcsInfo $Id: a4-pkgsrc-en.tex,v 1.4 2007/04/07 14:54:49 hubertf Exp $
{\scriptsize Version \rcsInfoRevision\ as of
\rcsInfoYear-\rcsInfoMonth-\rcsInfoDay. See \texttt{http://www.net-tex.de/netbsd/advocacy} All rights reserved. Created by Stefan Schumacher
(\texttt{http://www.net-tex.de})}
% Do not remove my copyright notice!
\end{document}

