summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.dan10
-rw-r--r--doc/PKGBUILD.540
-rw-r--r--doc/makepkg.8570
-rw-r--r--doc/pacman.8488
-rw-r--r--doc/pacman.conf.5137
-rwxr-xr-xscripts/makepkg2
-rw-r--r--src/pacman/pacman.c4
7 files changed, 504 insertions, 747 deletions
diff --git a/TODO.dan b/TODO.dan
index 16deb883..eecb6ad1 100644
--- a/TODO.dan
+++ b/TODO.dan
@@ -62,8 +62,8 @@ by other distributions which may want to change the defaults. Also, review what
needs to be in config.h and what does not. There may be excess #depends which
are hard coded into the sources. (from TODO.autoconf)
-Quick hits:
-===========
+Other ideas:
+============
unsigned int vs. unsigned- determine a standard and stick with it
@@ -88,4 +88,8 @@ terribly wrong, which I hope it won't
autogen.sh / autoclean.sh - these seem messy. Can we clean this up?
-
+Refine makepkg error codes. Each kind of failure could have its own code:
+ --package already built
+ --failed integ checks
+ --failed build
+ --etc.
diff --git a/doc/PKGBUILD.5 b/doc/PKGBUILD.5
index 8575a476..4a296e6e 100644
--- a/doc/PKGBUILD.5
+++ b/doc/PKGBUILD.5
@@ -2,31 +2,32 @@
.ds DS Arch Linux
.ds PB PKGBUILD
.ds VR 3.0.0
-.TH PKGBUILD 5 "Feb 06, 2007" "PKGBUILD version \*(VR" "\*(DS Files"
+.TH \*(PB 5 "Feb 07, 2007" "\*(PB version \*(VR" "\*(DS Files"
.SH NAME
-PKGBUILD \- \*(DS package build description file
+\*(PB \- \*(DS package build description file
+
.SH DESCRIPTION
-This manual page is meant to describe general rules about PKGBUILDs. Once
-a PKGBUILD is written, the actual package is built using \fBmakepkg\fR and
+This manual page is meant to describe general rules about \*(PBs. Once
+a \*(PB is written, the actual package is built using \fBmakepkg\fR and
installed with \fBpacman\fR.
\fBNOTE:\fR If you have a local copy of the Arch Build System (ABS) tree
-on your computer, you can copy the PKGBUILD.proto file to your new package
+on your computer, you can copy the \*(PB.proto file to your new package
build directory and edit it from there. To acquire/sync the ABS tree, use
the \fBabs\fR script included with pacman/makepkg.
-.SS Quick PKGBUILD Explanation
-For an example of a PKGBUILD, see the \fBEXAMPLE\fR section.
+.SS Quick \*(PB Explanation
+For an example of a \*(PB, see the \fBEXAMPLE\fR section.
\fIpkgname\fR defines the package name. It should not contain any uppercase
letters. \fIpkgversion\fR defines the actual package version as given by the
developers of the package. No dashes are allowed. \fIpkgrel\fR allows for
-\*(DS-specific changes to the package or corrections to a PKGBUILD
+\*(DS-specific changes to the package or corrections to a \*(PB
without an upstream version change. The value should be an integer.
\fIpkgdesc\fR is a short one-line description for the package, usually taken
from the project's homepage or manpage. It is preferable to keep the length to
one line for displaying during searches. These four variables are required in
-every PKGBUILD. \fIurl\fR is also highly recommended so users can find more
+every \*(PB. \fIurl\fR is also highly recommended so users can find more
information on the package if needed.
\fIdepends\fR and \fImakedepends\fR are bash arrays which define the
@@ -49,7 +50,7 @@ together. Sometimes this is as simple as a configure, make, make install (to
$startdir/pkg). However, some customizations are often needed during the build
process.
-Once your PKGBUILD is created, you can run \fBmakepkg\fR from the build
+Once your \*(PB is created, you can run \fBmakepkg\fR from the build
directory. \fBmakepkg\fR will check dependencies and look for the source files
required to build. If some are missing it will attempt to download them,
provided there is a fully-qualified URL in the \fIsource()\fR array.
@@ -100,14 +101,14 @@ licenses are applied, use the array form: \fBlicenses=('GPL' 'FDL')\fR
.TP
.B install
Specifies a special install script that is to be included in the package.
-This file should reside in the same directory as the PKGBUILD, and will be
+This file should reside in the same directory as the \*(PB, and will be
copied into the package by makepkg. It does not need to be included in the
\fIsource\fR array. (eg, install=pkgname.install)
.TP
.B source \fI(array)\fR
The \fIsource\fR line is an array of source files required to build the
-package. Source files must reside in the same directory as the PKGBUILD
+package. Source files must reside in the same directory as the \*(PB
file, unless they have a fully-qualified URL.
.TP
@@ -122,8 +123,8 @@ which use compressed data which id downloaded via the \fIsource\fR array.
If this field is present, it should contain an MD5 hash for every source file
specified in the \fIsource\fR array (in the same order). \fImakepkg\fR will use
this to verify source file integrity during subsequent builds. To easily
-generate md5sums, first build using the PKGBUILD then run
-\fBmakepkg -g >>PKGBUILD\fR. Then you can edit the PKGBUILD and move the
+generate md5sums, first build using the \*(PB then run
+\fBmakepkg -g >>\*(PB\fR. Then you can edit the \*(PB and move the
\fImd5sums\fR line from the bottom to an appropriate location.
\fBNOTE:\fR makepkg supports multiple integrity algorithms and their
corresponding arrays (i.e. sha1sums for the SHA1 algorithm), however official
@@ -221,7 +222,7 @@ script is run right after files are removed.
.P
To use this feature, just create a file (eg, pkgname.install) and put it in
-the same directory as the PKGBUILD script. Then use the \fIinstall\fR
+the same directory as the \*(PB script. Then use the \fIinstall\fR
directive:
install=pkgname.install
@@ -230,7 +231,7 @@ The install script does not need to be specified in the \fIsource\fR array.
A template install file is available in your ABS tree (/var/abs/install.proto).
.SH EXAMPLE
-The following is an example PKGBUILD for the 'modutils' package. For more
+The following is an example \*(PB for the 'modutils' package. For more
examples, look through the ABS tree.
.nf
@@ -265,17 +266,18 @@ build() {
.SH SEE ALSO
.BR makepkg (8),
-.BR makepkg.conf (5),
.BR pacman (8)
-.BR pacman.conf (5)
See the Arch Linux website at <http://www.archlinux.org> for more current
-information on the distribution, and
+information on the distribution and the \fBpacman\fP family of tools, and
<http://wiki.archlinux.org/index.php/Arch_Packaging_Standards> for
recommendations on packaging standards.
+
.SH AUTHORS
+.nf
Judd Vinet <jvinet@zeroflux.org>
Aurelien Foret <aurelien@archlinux.org>
Aaron Griffin <aaron@archlinux.org>
Dan McGee <dan@archlinux.org>
See the 'AUTHORS' file for additional contributors.
+.fi
diff --git a/doc/makepkg.8 b/doc/makepkg.8
index 51cb50ce..90944d93 100644
--- a/doc/makepkg.8
+++ b/doc/makepkg.8
@@ -1,455 +1,145 @@
-.TH makepkg 8 "January 30, 2006" "makepkg #VERSION#" ""
+." the string declarations are a start to try and make distro independent
+.ds DS Arch Linux
+.ds PB PKGBUILD
+.ds VR 3.0.0
+.TH makepkg 8 "Feb 07, 2007" "makepkg version \*(VR" "\*(DS Utilities"
.SH NAME
makepkg \- package build utility
-.SH SYNOPSIS
-\fBmakepkg [options]\fP
-.SH DESCRIPTION
-\fBmakepkg\fP will build packages for you. All it needs is
-a build-capable linux platform, wget, and some build scripts. The advantage
-to a script-based build is that you only really do the work once. Once you
-have the build script for a package, you just need to run makepkg and it
-will do the rest: download and validate source files, check dependencies,
-configure the buildtime settings, build the package, install the package
-into a temporary root, make customizations, generate meta-info, and package
-the whole thing up for \fBpacman\fP to use.
-
-\fBmakeworld\fP can be used to rebuild an entire package group or the
-entire build tree. See \fBmakeworld --help\fP for syntax.
-.SH BUILD PROCESS (or How To Build Your Own Packages)
-Start in an isolated directory (ie, it's not used for anything other
-than building this package). The build script should be called PKGBUILD
-and it should bear resemblance to the example below.
-
-\fBNOTE:\fP If you have a local copy of the Arch Build System (ABS) tree
-on your computer, you can copy the PKGBUILD.proto file to your new package
-build directory and edit it from there. To acquire/sync the ABS tree, use
-the \fBabs\fP script included with pacman/makepkg.
-
-.TP
-.TP
-.SH PKGBUILD Example:
-.RS
-.nf
-pkgname=modutils
-pkgver=2.4.25
-pkgrel=1
-pkgdesc="Utilities for inserting and removing modules from the linux kernel"
-url="http://www.kernel.org"
-backup=(etc/modules.conf)
-makedepends=('bash' 'mawk')
-depends=('glibc' 'zlib')
-source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/v2.4/$pkgname-$pkgver.tar.bz2 \\
- modules.conf)
-md5sums=('2c0cca3ef6330a187c6ef4fe41ecaa4d' \\
- '35175bee593a7cc7d6205584a94d8625')
-
-build() {
- cd $startdir/src/$pkgname-$pkgver
- ./configure --prefix=/usr --enable-insmod-static
- make || return 1
- make prefix=$startdir/pkg/usr install
- mv $startdir/pkg/usr/sbin $startdir/pkg
- mkdir -p $startdir/pkg/etc
- cp ../modules.conf $startdir/pkg/etc
-}
-.fi
-.RE
-
-As you can see, the setup is fairly simple. The first three lines define
-the package name and version info. They also define the final package name
-which will be of the form \fI$pkgname-$pkgver-$pkgrel.pkg.tar.gz\fP. The fourth
-line provides a brief description of the package. These four lines should
-be present in every PKGBUILD script.
-
-The line with \fIbackup=\fP specifies files that should be treated specially
-when removing or upgrading packages. See \fBHANDLING CONFIG FILES\fP in
-the \fIpacman\fP manpage for more information on this.
-
-Lines 7 and 8 list the dependencies for this package. The \fIdepends\fP array
-specifies the run-time dependencies and \fImakedepends\fP specifies the build-time
-dependencies. In order to run the package, \fIdepends\fP must be satisfied. To
-build the package, \fBall\fP dependencies must be satisifed first. makepkg
-will check this before attempting to build the package.
-
-The \fIsource\fP array tells makepkg which files to download/extract before compiling
-begins. The \fImd5sums\fP array provides md5sums for each of these files. These
-are used to validate the integrity of the source files.
-
-Once your PKGBUILD is created, you can run \fImakepkg\fP from the build directory.
-makepkg will then check dependencies and look for the source files required to
-build. If some are missing it will attempt to download them, provided there is
-a fully-qualified URL in the \fIsource\fP array.
-
-The sources are then extracted into a directory called ./src and
-the \fIbuild\fP function is called. This is where all package configuration,
-building, and installing should be done. Any customization will likely take
-place here.
-
-After a package is built, the \fIbuild\fP function must install the package
-files into a special package root, which can be referenced by \fB$startdir/pkg\fP
-in the \fIbuild\fP function. The typical way to do this is one of the following:
-.RS
-.nf
-
-make DESTDIR=$startdir/pkg install
-
-or
-
-make prefix=$startdir/pkg/usr install
-
-.fi
-.RE
-Notice that the "/usr" portion should be present with "prefix", but not "DESTDIR".
-"DESTDIR" is the favorable option to use, but not all Makefiles support it. Use
-"prefix" only when "DESTDIR" is unavailable.
-
-Once the package is successfully installed into the package root, \fImakepkg\fP
-will remove some directories (as per Arch Linux package guidelines; if you use
-this elsewhere, feel free to change it) like /usr/doc and /usr/info. It will
-then strip debugging info from libraries and binaries and generate a meta-info
-file. Finally, it will compress everything into a .pkg.tar.gz file and leave it
-in the directory you ran \fBmakepkg\fP from.
-
-At this point you should have a package file in the current directory, named
-something like name-version-release.pkg.tar.gz. Done!
-
-.SH Install/Upgrade/Remove Scripting
-Pacman has the ability to store and execute a package-specific script when it
-installs, removes, or upgrades a package. This allows a package to "configure
-itself" after installation and do the opposite right before it is removed.
-
-The exact time the script is run varies with each operation:
-.TP
-.B pre_install
-script is run right before files are extracted.
-
-.TP
-.B post_install
-script is run right after files are extracted.
-
-.TP
-.B pre_upgrade
-script is run right before files are extracted.
-
-.TP
-.B post_upgrade
-script is run after files are extracted.
-
-.TP
-.B pre_remove
-script is run right before files are removed.
-
-.TP
-.B post_remove
-script is run right after files are removed.
-
-.RE
-To use this feature, just create a file (eg, pkgname.install) and put it in
-the same directory as the PKGBUILD script. Then use the \fIinstall\fP directive:
-.RS
-.nf
-install=pkgname.install
-.fi
-.RE
-
-The install script does not need to be specified in the \fIsource\fP array.
-
-.TP
-.TP
-.SH Install scripts must follow this format:
-.RS
-.nf
-# arg 1: the new package version
-pre_install() {
- #
- # do pre-install stuff here
- #
- /bin/true
-}
-
-# arg 1: the new package version
-post_install() {
- #
- # do post-install stuff here
- #
- /bin/true
-}
-
-# arg 1: the new package version
-# arg 2: the old package version
-pre_upgrade() {
- #
- # do pre-upgrade stuff here
- #
- /bin/true
-}
-
-# arg 1: the new package version
-# arg 2: the old package version
-post_upgrade() {
- #
- # do post-upgrade stuff here
- #
- /bin/true
-}
-
-# arg 1: the old package version
-pre_remove() {
- #
- # do pre-remove stuff here
- #
- /bin/true
-}
-
-# arg 1: the old package version
-post_remove() {
- #
- # do post-remove stuff here
- #
- /bin/true
-}
-
-op=$1
-shift
-$op $*
-.fi
-.RE
-
-This template is also available in your ABS tree (/var/abs/install.proto).
-
-.SH PKGBUILD Directives
-.TP
-.B pkgname
-The name of the package. This has be a unix-friendly name as it will be
-used in the package filename.
-
-.TP
-.B pkgver
-This is the version of the software as released from the author (eg, 2.7.1).
-.TP
-.B pkgrel
-This is the release number specific to Arch Linux packages.
-
-.TP
-.B pkgdesc
-This should be a brief description of the package and its functionality.
-
-.TP
-.B options
-This array allows you to override some of makepkg's default behaviour
-when building packages. To set an option, just include the option name
-in the \fBoptions\fP array.
-.TP
-.RS
-\fIAvailable Options:\fP
-.RS
-.TP
-.B FORCE
-force the package to be upgraded by \fB--sysupgrade\fP, even
-if its an older version.
-.TP
-.B KEEPDOCS
-do not remove /usr/share/doc and /usr/share/info directories.
-.TP
-.B NOSTRIP
-do not strip debugging symbols from binaries and libraries.
-.RE
-.RE
-
-.TP
-.B url
-This field contains an optional URL that is associated with the piece of software
-being packaged. This is typically the project's website.
-
-.TP
-.B license
-This field specifies the license(s) that apply to the package. Commonly-used
-licenses are typically found in \fI/usr/share/licenses/common\fP. If you
-see the package's license there, simply reference it in the license field
-(eg, \fBlicense="GPL"\fP). If the package provides a license not found in
-\fI/usr/share/licenses/common\fP, then you should include the license in
-the package itself and set \fBlicense="custom"\fP or \fBlicense="custom:LicenseName"\fP.
-The license itself should be placed in a directory called
-\fI$startdir/pkg/usr/share/licenses/$pkgname\fP.
-.TP
-.RE
-If multiple licenses are applied, use the array form: \fBlicense=('GPL' 'FDL')\fP
-
-.TP
-.B install
-Specifies a special install script that is to be included in the package.
-This file should reside in the same directory as the PKGBUILD, and will be
-copied into the package by makepkg. It does not need to be included in the
-\fIsource\fP array. (eg, install=modutils.install)
-
-.TP
-.B source \fI(array)\fP
-The \fIsource\fP line is an array of source files required to build the
-package. Source files must reside in the same directory as the PKGBUILD
-file, unless they have a fully-qualified URL. Then if the source file
-does not already exist in /var/cache/pacman/src, the file is downloaded
-by wget.
-
-.TP
-.B md5sums \fI(array)\fP
-If this field is present, it should contain an MD5 hash for every source file
-specified in the \fIsource\fP array (in the same order). makepkg will use
-this to verify source file integrity during subsequent builds. To easily
-generate md5sums, first build using the PKGBUILD then run
-\fBmakepkg -g >>PKGBUILD\fP. Then you can edit the PKGBUILD and move the
-\fImd5sums\fP line from the bottom to an appropriate location.
-
-.TP
-.B groups \fI(array)\fP
-This is an array of symbolic names that represent groups of packages, allowing
-you to install multiple packages by requesting a single target. For example,
-one could install all KDE packages by installing the 'kde' group.
-
-.TP
-.B backup \fI(array)\fP
-A space-delimited array of filenames (without a preceding slash). The
-\fIbackup\fP line will be propagated to the package meta-info file for
-pacman. This will designate all files listed there to be backed up if this
-package is ever removed from a system. See \fBHANDLING CONFIG FILES\fP in
-the \fIpacman\fP manpage for more information.
-
-.TP
-.B depends \fI(array)\fP
-An array of packages that this package depends on to build and run. Packages
-in this list should be surrounded with single quotes and contain at least the
-package name. They can also include a version requirement of the form
-\fBname<>version\fP, where <> is one of these three comparisons: \fB>=\fP
-(greater than equal to), \fB<=\fP (less than or equal to), or \fB=\fP (equal to).
-See the PKGBUILD example above for an example of the \fIdepends\fP directive.
-
-.TP
-.B makedepends \fI(array)\fP
-An array of packages that this package depends on to build (ie, not required
-to run). Packages in this list should follow the same format as \fIdepends\fP.
-
-.TP
-.B conflicts \fI(array)\fP
-An array of packages that will conflict with this package (ie, they cannot both
-be installed at the same time). This directive follows the same format as
-\fIdepends\fP except you cannot specify versions here, only package names.
-
-.TP
-.B provides \fI(array)\fP
-An array of "virtual provisions" that this package provides. This allows a package
-to provide dependency names other than it's own package name. For example, the
-kernel-scsi and kernel-ide packages can each provide 'kernel' which allows packages
-to simply depend on 'kernel' rather than "kernel-scsi OR kernel-ide OR ..."
-
-.TP
-.B replaces \fI(array)\fP
-This is an array of packages that this package should replace, and can be used to handle
-renamed/combined packages. For example, if the kernel package gets renamed
-to kernel-ide, then subsequent 'pacman -Syu' calls will not pick up the upgrade, due
-to the differing package names. \fIreplaces\fP handles this.
+.SH SYNOPSIS
+.B makepkg
+[\fIoptions\fR]
-.SH MAKEPKG OPTIONS
-.TP
-.B "\-b, \-\-builddeps"
-Build missing dependencies from source. When makepkg finds missing build-time or
-run-time dependencies, it will look for the dependencies' PKGBUILD files under
-$ABSROOT (set in your /etc/makepkg.conf). If it finds them it will
-run another copy of makepkg to build and install the missing dependencies.
-The child makepkg calls will be made with the \fB-b\fP and \fB-i\fP options.
-.TP
-.B "\-B, \-\-noccache"
-Do not use ccache during build.
-.TP
-.B "\-c, \-\-clean"
-Clean up leftover work files/directories after a successful build.
-.TP
-.B "\-C, \-\-cleancache"
-Removes all source files from the cache directory to free up diskspace.
-.TP
-.B "\-d, \-\-nodeps"
-Do not perform any dependency checks. This will let you override/ignore any
-dependencies required. There's a good chance this option will break the build
-process if all of the dependencies aren't installed.
-.TP
-.B "\-e, \-\-noextract"
-Do not extract source files. Instead, use whatever already exists in the
-src/ directory. This is handy if you want to go into src and manually
-patch/tweak code, then make a package out of the result.
-.TP
-.B "\-f, \-\-force"
-\fBmakepkg\fP will not build a package if a \fIpkgname-pkgver-pkgrel.pkg.tar.gz\fP
-file already exists in the build directory. You can override this behaviour with
-the \fB--force\fP switch.
-.TP
-.B "\-g, \-\-genmd5"
-Download all source files (if required) and use \fImd5sum\fP to generate md5 hashes
-for each of them. You can then redirect the output into your PKGBUILD for source
-validation (makepkg -g >>PKGBUILD).
-.TP
-.B "\-h, \-\-help"
-Output syntax and commandline options.
-.TP
-.B "\-i, \-\-install"
-Install/Upgrade the package after a successful build.
-.TP
-.B "\-j <jobs>"
-Sets MAKEFLAGS="-j<jobs>" before building the package. This is useful for overriding
-the MAKEFLAGS setting in /etc/makepkg.conf.
-.TP
-.B "\-m, \-\-nocolor"
-Disable color in output messages
-.TP
-.B "\-n, \-\-nostrip"
-Do not strip binaries and libraries.
-.TP
-.B "\-o, \-\-nobuild"
-Download and extract files only, do not build.
-.TP
-.B "\-p <buildscript>"
-Read the package script \fI<buildscript>\fP instead of the default (\fIPKGBUILD\fP).
-.TP
-.B "\-r, \-\-rmdeps"
-Upon successful build, remove any dependencies installed by makepkg/pacman during
-dependency auto-resolution (using \fB-b\fP or \fB-s\fP).
-.TP
-.B "\-s, \-\-syncdeps"
-Install missing dependencies using pacman. When makepkg finds missing build-time
-or run-time dependencies, it will run pacman to try and resolve them. If successful,
-pacman will download the missing packages from a package repository and
-install them for you.
-.TP
-.B "\-S, \-\-sudosync"
-Install missing dependencies using pacman and sudo. This is the same as \fB-s\fP
-except that makepkg will call pacman with sudo. This means you don't have to
+.SH DESCRIPTION
+\fBmakepkg\fP is a script to automate the building of packages. All it needs is
+a build-capable Linux platform and a custom build script for each package you
+wish to build (known as a \fB\*(PB\fP). The advantage to a script-based build
+is that the work is only done once. Once you have the build script for a
+package, makepkg will do the rest: download and validate source files, check
+dependencies, configure the build-time settings, build the package, install the
+package into a temporary root, make customizations, generate meta-info, and
+package the whole thing up for \fBpacman\fP to use.
+
+\fBmakeworld\fP can be used to rebuild an entire package group or the entire
+build tree. See \fBmakeworld --help\fP for syntax.
+
+.SH OPTIONS
+.TP
+.B \-b, --builddeps
+Build missing dependencies from source. When \fBmakepkg\fP finds missing
+build-time or run-time dependencies, it will look for the dependencies'
+\fB\*(PB\fP files under \fIABSROOT\fP (set in \fBmakepkg.conf\fP). If it finds
+them it will call \fBmakepkg\fP to build and install the missing dependencies.
+The child calls will be made with the \fB-b\fP and \fB-i\fP options.
+.TP
+.B \-B, --noccache
+Disable the use of \fBccache\fP during build (useful for select packages that
+have problems with \fBccache\fP).
+.TP
+.B \-c, --clean
+Clean up leftover work files and directories after a successful build.
+.TP
+.B \-C, --cleancache
+Removes all cached source files from the directory specified in \fISRCDEST\fP
+in \fBmakepkg.conf\fP.
+.TP
+.B \-d, --nodeps
+Do not perform any dependency checks. This will let you override and ignore any
+dependencies required. There is a good chance this option will break the build
+process if all of the dependencies are not installed.
+.TP
+.B \-e, --noextract
+Do not extract source files; use whatever source already exists in the src/
+directory. This is handy if you want to go into src and manually patch or tweak
+code, then make a package out of the result. Keep in mind that creating a patch
+may be a better solution to allow others to use your \fB\*(PB\fP.
+.TP
+.B \-f, --force
+\fBmakepkg\fP will not build a package if a built package already exists in the
+\fIPKGDEST\fP (set in \fBmakepkg.conf\fP) directory, which may default to the
+current directory. This allows the built package to be overwritten.
+.TP
+.B \-g, --geninteg
+For each source file in the source array of \fB\*(PB\fP, download the file if
+required and generate integrity checks. The integrity checks generated are
+determined by the value of the \fIINTEGRITY_CHECK\fP array in makepkg.conf.
+This output can be redirected into your \fB\*(PB\fP for source validation
+(makepkg -g >> \*(PB).
+.TP
+.B \-h, --help
+Output syntax and command line options.
+.TP
+.B \-i, --install
+Install or upgrade the package after a successful build using \fBpacman\fP.
+.TP
+.B \-j \fIjobs\fP
+Sets MAKEFLAGS="-j\fIjobs\fP" before building the package. This is useful for
+overriding the \fIMAKEFLAGS\fP setting in \fBmakepkg.conf\fP.
+.TP
+.B \-m, --nocolor
+Disable color in output messages.
+.TP
+.B \-o, --nobuild
+Download and extract files only, but do not build them. Useful with the
+\fB--noextract\fP option if you wish to tweak the files in src/ before
+building.
+.TP
+.B \-p \fIbuildscript\fP
+Read the package script \fIbuildscript\fP instead of the default, \fI\*(PB\fP.
+.TP
+.B \-r, --rmdeps
+Upon successful build, remove any dependencies installed by \fBmakepkg\fP
+during dependency auto-resolution (using \fB-b\fP or \fB-s\fP).
+.TP
+.B \-R, --repackage
+Repackage contents of pkg/ without rebuilding the package. This is useful if
+you forgot a depend or install file in your \fB\*(PB\fP and the build itself
+will not change.
+.TP
+.B \-s, --syncdeps
+Install missing dependencies using \fBpacman\fP. When missing build-time or
+run-time dependencies are found, \fBpacman\fP will try to resolve them. If
+successful, the missing packages will be downloaded and installed.
+.TP
+.B \-S, --sudosync
+Install missing dependencies using \fBpacman\fP and \fBsudo\fP. This is the
+same as \fB-s\fP except that \fBsudo\fP is used, meaning you do not have to
build as root to use dependency auto-resolution.
.TP
-.B "\-w <destdir>"
-Write the resulting package file to the directory \fI<destdir>\fP instead of the
-current working directory.
-.TP
-.B "\-\-noconfirm"
-When calling pacman to resolve dependencies or conflicts, makepkg can pass
-the \fI--noconfirm\fP option to it so it does not wait for any user
-input before proceeding with operations.
+.B \--noconfirm
+(Passed to \fBpacman\fP) Prevent \fBpacman\fP from waiting for user input
+before proceeding with operations.
.TP
-.B "\-\-noprogressbar"
-When calling pacman, makepkg can pass the \fI--noprogressbar\fP option to it.
-This is useful if one is directing makepkg's output to a non-terminal (ie, a file).
+.B \--noprogressbar
+(Passed to \fBpacman\fP) Prevent \fBpacman\fP from displaying a progress bar;
+useful if you are redirecting makepkg output to file.
.SH CONFIGURATION
-Configuration options are stored in \fI/etc/makepkg.conf\fP. This file is parsed
-as a bash script, so you can export any special compiler flags you wish
-to use. This is helpful for building for different architectures, or with
-different optimizations.
+Configuration options are stored in \fBmakepkg.conf\fP. This file is sourced,
+so you can include any special compiler flags you wish to use. This is helpful
+for building for different architectures, or with different optimizations.
+
+\fBNOTE:\fP This does not guarantee that all package Makefiles will use your
+exported variables. Some of them are non-standard...
+
+The file is fairly well commented, so follow directions given there for
+customization.
-\fBNOTE:\fP This does not guarantee that all package Makefiles will use
-your exported variables. Some of them are flaky...
.SH SEE ALSO
-\fBpacman\fP is the package manager that uses packages built by makepkg.
+.BR makepkg.conf (5),
+.BR \*(PB (5),
+.BR pacman (8)
+
+See the Arch Linux website at <http://www.archlinux.org> for more current
+information on the distribution and the \fBpacman\fP family of tools, and
+<http://wiki.archlinux.org/index.php/Arch_Packaging_Standards> for
+recommendations on packaging standards.
-See the Arch Linux Documentation for package-building guidelines if you wish
-to contribute packages to the Arch Linux project.
-.SH AUTHOR
+.SH AUTHORS
.nf
Judd Vinet <jvinet@zeroflux.org>
+Aurelien Foret <aurelien@archlinux.org>
+Aaron Griffin <aaron@archlinux.org>
+Dan McGee <dan@archlinux.org>
+See the 'AUTHORS' file for additional contributors.
.fi
diff --git a/doc/pacman.8 b/doc/pacman.8
index 15f48b60..b9ded2e9 100644
--- a/doc/pacman.8
+++ b/doc/pacman.8
@@ -1,334 +1,258 @@
-.TH pacman 8 "January 21, 2006" "pacman @PACKAGE_VERSION@" ""
+." the string declarations are a start to try and make distro independent
+.ds DS Arch Linux
+.ds PB PKGBUILD
+.ds VR 3.0.0
+.TH pacman 8 "Feb 07, 2007" "pacman version \*(VR" "\*(DS Utilities"
.SH NAME
pacman \- package manager utility
+
.SH SYNOPSIS
-\fBpacman <operation> [options] <package> [package] ...\fP
+.B pacman
+<\fIoperation\fR> [\fIoptions\fR] [\fIpackages\fR]
+
.SH DESCRIPTION
\fBpacman\fP is a \fIpackage management\fP utility that tracks installed
-packages on a linux system. It has simple dependency support and the ability
-to connect to a remote ftp server and automatically upgrade packages on
-the local system. pacman package are \fIgzipped tar\fP format.
+packages on a Linux system. It has dependency support, package groups, install
+and uninstall hooks, and the ability to sync your local machine with a remote
+ftp server to automatically upgrade packages. \fBpacman\fP packages are a
+zipped tar format.
+
.SH OPERATIONS
.TP
-.B "\-A, \-\-add"
-Add a package to the system. Package will be uncompressed
-into the installation root and the database will be updated.
-.TP
-.B "\-F, \-\-freshen"
-This is like --upgrade except that, unlike --upgrade, this will only
-upgrade packages that are already installed on your system.
-.TP
-.B "\-Q, \-\-query"
-Query the package database. This operation allows you to
-view installed packages and their files, as well as meta-info
-about individual packages (dependencies, conflicts, install date,
-build date, size). This can be run against the local package
-database or can be used on individual .tar.gz packages. See
-\fBQUERY OPTIONS\fP below.
-.TP
-.B "\-R, \-\-remove"
-Remove a package from the system. Files belonging to the
-specified package will be deleted, and the database will
-be updated. Most configuration files will be saved with a
-\fI.pacsave\fP extension unless the \fB--nosave\fP option was
-used.
-.TP
-.B "\-S, \-\-sync"
-Synchronize packages. With this function you can install packages
-directly from the ftp servers, complete with all dependencies required
-to run the packages. For example, \fBpacman -S qt\fP will download
-qt and all the packages it depends on and install them. You could also use
-\fBpacman -Su\fP to upgrade all packages that are out of date (see below).
-.TP
-.B "\-U, \-\-upgrade"
-Upgrade a package. This is essentially a "remove-then-add"
-process. See \fBHANDLING CONFIG FILES\fP for an explanation
-on how pacman takes care of config files.
-.TP
-.B "\-V, \-\-version"
+.B \-A, --add (deprecated)
+Add a package to the system. Package will be uncompressed into the installation
+root and the database will be updated. The package will not be installed if
+another version is already installed. Please use \fB--upgrade\fP in place of
+this option.
+.TP
+.B \-F, --freshen
+This is like \fB--upgrade\fP except it will only upgrade packages already
+installed on the system.
+.TP
+.B \-Q, --query
+Query the package database. This operation allows you to view installed
+packages and their files, as well as meta-info about individual packages
+(dependencies, conflicts, install date, build date, size). This can be run
+against the local package database or can be used on individual .tar.gz
+packages. See \fBQUERY OPTIONS\fP below.
+.TP
+.B \-R, --remove
+Remove a package from the system. Files belonging to the specified package
+will be deleted, and the database will be updated. Most configuration files
+will be saved with a \fI.pacsave\fP extension unless the \fB--nosave\fP option
+is used. See \fBREMOVE OPTIONS\fP below.
+.TP
+.B \-S, --sync
+Synchronize packages. Packages are installed directly from the ftp servers,
+complete with all dependencies required to run the packages. For example,
+\fBpacman -S qt\fP will download and install \fBqt\fP and all the packages it
+depends on. You can also use \fBpacman -Su\fP to upgrade all packages that are
+out of date. See \fBSYNC OPTIONS\fP below.
+.TP
+.B \-U, --upgrade
+Upgrade or add a package to the system. This is a "remove-then-add" process.
+See \fBHANDLING CONFIG FILES\fP for an explanation on how pacman takes care of
+config files.
+.TP
+.B \-V, --version
Display version and exit.
.TP
-.B "\-h, \-\-help"
-Display syntax for the given operation. If no operation was
-supplied then the general syntax is shown.
+.B \-h, --help
+Display syntax for the given operation. If no operation was supplied then the
+general syntax is shown.
+
.SH OPTIONS
.TP
-.B "\-d, \-\-nodeps"
-Skips all dependency checks. Normally, pacman will always check
-a package's dependency fields to ensure that all dependencies are
-installed and there are no package conflicts in the system. This
-switch disables these checks.
-.TP
-.B "\-f, \-\-force"
-Bypass file conflict checks, overwriting conflicting files. If the
-package that is about to be installed contains files that are already
-installed, this option will cause all those files to be overwritten.
-This option should be used with care, ideally not at all.
-.TP
-.B "\-r, \-\-root <path>"
-Specify alternative installation root (default is "/"). This
-should \fInot\fP be used as a way to install software into
-e.g. /usr/local instead of /usr. Instead this should be used
-if you want to install a package on a temporary mounted partition,
-which is "owned" by another system. By using this option you not only
-specify where the software should be installed, but you also
-specify which package database to use.
-.TP
-.B "\-v, \-\-verbose"
-Output more status and error messages.
-.TP
-.B "\-\-config <path>"
+.B \-d, --nodeps
+Skips all dependency checks. Normally, pacman will always check a package's
+dependency fields to ensure that all dependencies are installed and there are
+no package conflicts in the system.
+.TP
+.B \-f, --force
+Bypass file conflict checks and overwrite conflicting files. If the package
+that is about to be installed contains files that are already installed, this
+option will cause all those files to be overwritten. This option should be
+used with care, ideally not at all.
+.TP
+.B \-r, --root \fIpath\fP
+Specify alternative installation root (default is "/"). However, this should
+\fInot\fP be used as a way to install software into /usr/local instead of /usr,
+for example. This option should be used if you want to install a package on a
+temporary mounted partition, which is "owned" by another system. By using this
+option you not only specify where the software should be installed, but you
+also specify which package database to use.
+.TP
+.B \-v, --verbose
+Output more status messages, such as the Root and DBPath.
+.TP
+.B \--config \fIfilepath\fP
Specify an alternate configuration file.
.TP
-.B "\-\-noconfirm"
-Bypass any and all "Are you sure?" messages. It's not a good idea to do this
+.B \--noconfirm
+Bypass any and all "Are you sure?" messages. It's not a good idea to do this
unless you want to run pacman from a script.
.TP
-.B "\-\-noprogressbar"
-Do not show a progress bar when downloading files. This can be useful for
+.B \--noprogressbar
+Do not show a progress bar when downloading files. This can be useful for
scripts that call pacman and capture the output.
-.SH SYNC OPTIONS
+
+.SH QUERY OPTIONS
.TP
-.B "\-c, \-\-clean"
-Remove old packages from the cache. When pacman downloads packages,
-it saves them in \fI/var/cache/pacman/pkg\fP. If you need to free up
-diskspace, you can remove these packages by using the --clean option.
-Using one --clean (or -c) switch will only remove \fIold\fP packages.
-Use it twice to remove \fIall\fP packages from the cache.
+.B \-e, --orphans
+List all packages that were pulled in by a previously installed package but no
+longer required by any installed package.
.TP
-.B "\-g, \-\-groups"
-Display all the members for each package group specified. If no group
-names are provided, all groups will be listed.
+.B \-g, --groups
+Display all package members of a named group, or all grouped packages if
+no name is specified.
.TP
-.B "\-i, \-\-info"
-Display dependency information for a given package. This will search
-through all repositories for a matching package and display the
-dependencies, conflicts, etc.
+.B \-i, --info
+Display information on a given package. The \fB-p\fP option can be used if
+querying a package file instead of the local database.
.TP
-.B "\-l, \-\-list"
-List all files in the specified repositories. Multiple repositories can
-be specified on the command line.
+.B \-l, --list
+List all files owned by a given package. Multiple packages can be specified on
+the command line.
.TP
-.B "\-p, \-\-print-uris"
-Print out URIs for each package that will be installed, including any
-dependencies that have yet to be installed. These can be piped to a
-file and downloaded at a later time, using a program like wget.
-.TP
-.B "\-s, \-\-search <regexp>"
-This will search each package in the package list for names or descriptions
-that matches <regexp>.
-.TP
-.B "\-u, \-\-sysupgrade"
-Upgrades all packages that are out of date. pacman will examine every
-package installed on the system, and if a newer package exists on the
-server it will upgrade. pacman will present a report of all packages
-it wants to upgrade and will not proceed without user confirmation.
-Dependencies are automatically resolved at this level and will be
-installed/upgraded if necessary.
-.TP
-.B "\-w, \-\-downloadonly"
-Retrieve all packages from the server, but do not install/upgrade anything.
+.B \-m, --foreign
+List all packages that were not found in the sync database(s). Typically these
+are packages that were downloaded manually and installed with \fB--upgrade\fP.
.TP
-.B "\-y, \-\-refresh"
-Download a fresh copy of the master package list from the ftp server
-defined in \fI/etc/pacman.conf\fP. This should typically be used each
-time you use \fB--sysupgrade\fP.
+.B \-o, --owns \fIfile\fP
+Search for the package that owns \fIfile\fP.
.TP
-.B "\-\-ignore <pkg>"
-This option functions exactly the same as the \fBIgnorePkg\fP configuration
-directive. Sometimes it can be handy to skip some package updates without
-having to edit \fIpacman.conf\fP each time.
+.B \-p, --file
+Signifies that the package supplied on the command line is a file and not an
+entry in the database. The file will be decompressed and queried. This is
+useful with \fB--info\fP and \fB--list\fP.
+.TP
+.B \-s, --search \fIregexp\fP
+This will search each locally-installed package for names or descriptions that
+matche \fIregexp\fP.
+.TP
+.B \-u, --upgrades
+Lists all packages that are out of date on the local system. This option works best if the sync database is refreshed using \fB-Sy\fP.
+
.SH REMOVE OPTIONS
.TP
-.B "\-c, \-\-cascade"
-Remove all target packages, as well as all packages that depend on one
-or more target packages. This operation is recursive.
-.TP
-.B "\-k, \-\-keep"
-Removes the database entry only. Leaves all files in place.
-.TP
-.B "\-n, \-\-nosave"
-Instructs pacman to ignore file backup designations. Normally, when
-a file is about to be \fIremoved\fP from the system the database is first
-checked to see if the file should be renamed to a .pacsave extension. If
-\fB--nosave\fP is used, these designations are ignored and the files are
-removed.
-.TP
-.B "\-s, \-\-recursive"
-For each target specified, remove it and all its dependencies, provided
-that (A) they are not required by other packages; and (B) they were not
-explicitly installed by the user.
-This option is analagous to a backwards --sync operation.
-.SH QUERY OPTIONS
+.B \-c, --cascade
+Remove all target packages, as well as all packages that depend on one or more
+target packages. This operation is recursive.
.TP
-.B "\-e, \-\-orphans"
-List all packages that were explicitly installed (ie, not pulled in
-as a dependency by other packages) and are not required by any other
-packages.
+.B \-k, --keep
+Removes the database entry only. Leaves all files in place.
.TP
-.B "\-g, \-\-groups"
-Display all package members of a named group, or all grouped packages if
-no name is specified.
+.B \-n, --nosave
+Instructs pacman to ignore file backup designations. Normally, when a file is
+removed from the system the database is checked to see if the file should be
+renamed with a .pacsave extension.
.TP
-.B "\-i, \-\-info"
-Display information on a given package. If it is used with the \fB-p\fP
-option then the .PKGINFO file will be printed.
+.B \-s, --recursive
+For each target specified, remove it and all its dependencies, provided that
+(A) they are not required by other packages; and (B) they were not explicitly
+installed by the user. This option is analogous to a backwards \fB--sync\fP
+operation.
+
+.SH SYNC OPTIONS
.TP
-.B "\-l, \-\-list"
-List all files owned by <package>. Multiple packages can be specified on
-the command line.
+.B \-c, --clean
+Remove old packages from the cache to free up disk space. When \fBpacman\fP
+downloads packages, it saves them in \fI/var/cache/pacman/pkg\fP. Use one
+\fB--clean\fP switch to remove \fIold\fP packages; use two to remove \fIall\fP
+packages from the cache.
.TP
-.B "\-m, \-\-foreign"
-List all packages that were not found in the sync database(s). Typically these
-are packages that were downloaded manually and installed with --add.
+.B \-g, --groups
+Display all the members for each package group specified. If no group names are
+provided, all groups will be listed.
+.TP
+.B \-i, --info
+Display dependency and other information for a given package. This will search
+through all repositories for a matching package.
+.TP
+.B \-l, --list
+List all packages in the specified repositories. Multiple repositories can be
+specified on the command line.
.TP
-.B "\-o, \-\-owns <file>"
-Search for the package that owns <file>.
+.B \-p, --print-uris
+Print out URIs for each package that will be installed, including any
+dependencies that have yet to be installed. These can be piped to a file and
+downloaded at a later time, using a program like wget.
+.TP
+.B \-s, --search \fIregexp\fP
+This will search each package in the sync databases for names or descriptions
+that match \fIregexp\fP.
.TP
-.B "\-p, \-\-file"
-Tells pacman that the package supplied on the command line is a
-file, not an entry in the database. Pacman will decompress the
-file and query it. This is useful with \fB--info\fP and \fB--list\fP.
+.B \-u, --sysupgrade
+Upgrades all packages that are out of date. Each currently-installed package
+will be examined and upgraded if a newer package exists. A report of all
+packages to upgrade will be presented and the operation will not proceed
+without user confirmation. Dependencies are automatically resolved at this
+level and will be installed/upgraded if necessary.
+.TP
+.B \-w, --downloadonly
+Retrieve all packages from the server, but do not install/upgrade anything.
.TP
-.B "\-s, \-\-search <regexp>"
-This will search each locally-installed package for names or descriptions
-that matches <regexp>.
+.B \-y, --refresh
+Download a fresh copy of the master package list from the server(s) defined in
+\fBpacman.conf\fP. This should typically be used each time you use
+\fB--sysupgrade\fP.
+.TP
+.B \--ignore \fIpackage\fP
+Directs \fBpacman\fP to ignore upgrades of \fIpackage\fP even if there is one
+available.
+
.SH HANDLING CONFIG FILES
-pacman uses the same logic as rpm to determine action against files
-that are designated to be backed up. During an upgrade, it uses 3
-md5 hashes for each backup file to determine the required action:
-one for the original file installed, one for the new file that's about
-to be installed, and one for the actual file existing on the filesystem.
-After comparing these 3 hashes, the follow scenarios can result:
+pacman uses the same logic as rpm to determine action against files that are
+designated to be backed up. During an upgrade, 3 md5 hashes are used for each
+backup file to determine the required action: one for the original file
+installed, one for the new file that's about to be installed, and one for the
+actual file existing on the filesystem. After comparing these 3 hashes, the
+follow scenarios can result:
.TP
original=\fBX\fP, current=\fBX\fP, new=\fBX\fP
-All three files are the same, so we win either way. Install the new file.
+All three files are the same, so overwrites are not an issue Install the new
+file.
.TP
original=\fBX\fP, current=\fBX\fP, new=\fBY\fP
-The current file is un-altered from the original but the new one is
-different. Since the user did not ever modify the file, and the new
-one may contain improvements/bugfixes, we install the new file.
+The current file is the same as the original but the new one differs. Since
+the user did not ever modify the file, and the new one may contain improvements
+or bugfixes, install the new file.
.TP
original=\fBX\fP, current=\fBY\fP, new=\fBX\fP
-Both package versions contain the exact same file, but the one
-on the filesystem has been modified since. In this case, we leave
-the current file in place.
+Both package versions contain the exact same file, but the one on the
+filesystem has been modified. Leave the current file in place.
.TP
original=\fBX\fP, current=\fBY\fP, new=\fBY\fP
-The new one is identical to the current one. Win win. Install the new file.
+The new file is identical to the current file. Install the new file.
.TP
original=\fBX\fP, current=\fBY\fP, new=\fBZ\fP
-All three files are different, so we install the new file with a .pacnew
-extension and warn the user, so she can manually move the file into place
-after making any necessary customizations.
-.SH CONFIGURATION
-pacman will attempt to read \fI/etc/pacman.conf\fP each time it is invoked. This
-configuration file is divided into sections or \fIrepositories\fP. Each section
-defines a package repository that pacman can use when searching for packages in
---sync mode. The exception to this is the \fIoptions\fP section, which defines
-global options.
-.TP
-.SH Example:
-.RS
-.nf
-[options]
-NoUpgrade = etc/passwd etc/group etc/shadow
-NoUpgrade = etc/fstab
-
-Include = /etc/pacman.d/current
+All three files are different, so install the new file with a .pacnew extension
+and warn the user. The user must then manually merge any necessary changes into
+the original file.
-[custom]
-Server = file:///home/pkgs
-
-.fi
-.RE
-.SH CONFIG: OPTIONS
-.TP
-.B "DBPath = path/to/db/dir"
-Overrides the default location of the toplevel database directory. The default is
-\fIvar/lib/pacman\fP.
-.B "CacheDir = path/to/cache/dir"
-Overrides the default location of the package cache directory. The default is
-\fIvar/cache/pacman\fP.
-.TP
-.TP
-.B "HoldPkg = <package> [package] ..."
-If a user tries to \fB--remove\fP a package that's listed in HoldPkg, pacman
-will ask for confirmation before proceeding.
-.TP
-.B "IgnorePkg = <package> [package] ..."
-Instructs pacman to ignore any upgrades for this package when performing a
-\fB--sysupgrade\fP.
-.TP
-.B "Include = <path>"
-Include another config file. This config file can include repositories or
-general configuration options.
-.TP
-.B "ProxyServer = <host|ip>[:port]"
-If set, pacman will use this proxy server for all ftp/http transfers.
-.TP
-.B "XferCommand = /path/to/command %u"
-If set, pacman will use this external program to download all remote files.
-All instances of \fB%u\fP will be replaced with the URL to be downloaded. If
-present, instances of \fB%o\fP will be replaced with the local filename, plus a
-".part" extension, which allows programs like wget to do file resumes properly.
+.SH CONFIGURATION
+See
+.BR pacman.conf (5)
+for more details on configuring pacman using the \fBpacman.conf\fP file.
-This option is useful for users who experience problems with pacman's built-in http/ftp
-support, or need the more advanced proxy support that comes with utilities like
-wget.
-.TP
-.B "NoPassiveFtp"
-Disables passive ftp connections when downloading packages. (aka Active Mode)
-.TP
-.B "NoUpgrade = <file> [file] ..."
-All files listed with a \fBNoUpgrade\fP directive will never be touched during a package
-install/upgrade. \fINote:\fP do not include the leading slash when specifying files.
-.TP
-.B "NoExtract = <file> [file] ..."
-All files listed with a \fBNoExtract\fP directive will never be extracted from
-a package into the filesystem. This can be useful when you don't want part of
-a package to be installed. For example, if your httpd root uses an index.php,
-then you would not want the index.html file to be extracted from the apache
-package.
-.TP
-.B "UseSyslog"
-Log action messages through syslog(). This will insert pacman log entries into your
-/var/log/messages or equivalent.
-.TP
-.B "LogFile = /path/to/file"
-Log actions directly to a file, usually /var/log/pacman.log.
+.SH BUGS
+Bugs? You must be kidding, there are no bugs in this software. But if we happen
+to be wrong, send us an email with as much detail as possible to
+<pacman-dev@archlinux.org>.
-.SH CONFIG: REPOSITORIES
-Each repository section defines a section name and at least one location where the packages
-can be found. The section name is defined by the string within square brackets (eg, the two
-above are 'current' and 'custom'). Locations are defined with the \fIServer\fP directive and
-follow a URL naming structure. Currently only ftp is supported for remote servers. If you
-want to use a local directory, you can specify the full path with a 'file://' prefix, as
-shown above.
-The order of repositories in the file matters; repositories listed first will
-take precidence over those listed later in the file when packages in two
-repositories have identical names, regardless of version number.
-.SH USING YOUR OWN REPOSITORY
-Let's say you have a bunch of custom packages in \fI/home/pkgs\fP and their respective PKGBUILD
-files are all in \fI/var/abs/local\fP. All you need to do is generate a compressed package database
-in the \fI/home/pkgs\fP directory so pacman can find it when run with --refresh.
+.SH SEE ALSO
+.BR pacman.conf (5),
+.BR makepkg (8),
+.BR libalpm (3)
-.RS
-.nf
-# gensync /var/abs/local /home/pkgs/custom.db.tar.gz
-.fi
-.RE
+See the Arch Linux website at <http://www.archlinux.org> for more current
+information on the distribution and the \fBpacman\fP family of tools.
-The above command will read all PKGBUILD files in /var/abs/local and generate a compressed
-database called /home/pkgs/custom.db.tar.gz. Note that the database must be of the form
-\fI{treename}.db.tar.gz\fP, where {treename} is the name of the section defined in the
-configuration file.
-That's it! Now configure your \fIcustom\fP section in the configuration file as shown in the
-config example above. Pacman will now use your package repository. If you add new packages to
-the repository, remember to re-generate the database and use pacman's --refresh option.
-.SH SEE ALSO
-\fBmakepkg\fP is the package-building tool that comes with pacman.
-.SH AUTHOR
+.SH AUTHORS
.nf
Judd Vinet <jvinet@zeroflux.org>
+Aurelien Foret <aurelien@archlinux.org>
+Aaron Griffin <aaron@archlinux.org>
+Dan McGee <dan@archlinux.org>
+See the 'AUTHORS' file for additional contributors.
.fi
diff --git a/doc/pacman.conf.5 b/doc/pacman.conf.5
new file mode 100644
index 00000000..3a94f801
--- /dev/null
+++ b/doc/pacman.conf.5
@@ -0,0 +1,137 @@
+." the string declarations are a start to try and make distro independent
+.ds DS Arch Linux
+.ds PB PKGBUILD
+.ds VR 3.0.0
+.TH \*(PB 5 "Feb 07, 2007" "pacman.conf version \*(VR" "\*(DS Files"
+.SH NAME
+pacman.conf \- pacman package manager configuration file
+
+.SH DESCRIPTION
+
+\fBpacman\fP will attempt to read \fBpacman.conf\fP each time it is invoked.
+This configuration file is divided into sections or \fIrepositories\fP. Each
+section defines a package repository that \fBpacman\fP can use when searching
+for packages in \fB--sync\fP mode. The exception to this is the \fIoptions\fP
+section, which defines global options.
+
+.SH EXAMPLE
+.RS
+.nf
+#
+# pacman.conf
+#
+[options]
+NoUpgrade = etc/passwd etc/group etc/shadow
+NoUpgrade = etc/fstab
+
+[current]
+Include = /etc/pacman.d/current
+
+[custom]
+Server = file:///home/pkgs
+.fi
+.RE
+
+.SH OPTIONS
+.TP
+.B DBPath = path/to/db/dir
+Overrides the default location of the toplevel database directory. The default
+is \fIvar/lib/pacman\fP.
+.TP
+.B CacheDir = path/to/cache/dir
+Overrides the default location of the package cache directory. The default is
+\fIvar/cache/pacman\fP.
+.TP
+.B HoldPkg = \fIpackage\fP ...
+If a user tries to \fB--remove\fP a package that's listed in \fBHoldPkg\fI,
+\fBpacman\fP will ask for confirmation before proceeding.
+.TP
+.B IgnorePkg = \fIpackage\fP ...
+Instructs \fBpacman\fP to ignore any upgrades for this package when performing a
+\fB--sysupgrade\fP.
+.TP
+.B Include = \fIpath\fP
+Include another config file. This file can include repositories or general
+configuration options.
+.TP
+.B ProxyServer = <\fIhost\fP|\fIip\fP>[:\fIport\fP]
+If set, \fBpacman\fP will use this proxy server for all ftp/http transfers.
+.TP
+.B XferCommand = \fI/path/to/command %u\fP
+If set, an external program will be used to download all remote files. All
+instances of \fB%u\fP will be replaced with the download URL. If present,
+instances of \fB%o\fP will be replaced with the local filename, plus a ".part"
+extension, which allows programs like wget to do file resumes properly.
+
+This option is useful for users who experience problems with built-in
+http/ftp support, or need the more advanced proxy support that comes with
+utilities like wget.
+.TP
+.B NoPassiveFtp
+Disables passive ftp connections when downloading packages. (aka Active Mode)
+.TP
+.B NoUpgrade = \fIfile\fP ...
+All files listed with a \fBNoUpgrade\fP directive will never be touched during
+a package install/upgrade. Do \fInot\fP include the leading slash when
+specifying files.
+.TP
+.B NoExtract = \fIfile\fP ...
+All files listed with a \fBNoExtract\fP directive will never be extracted from
+a package into the filesystem. This can be useful when you don't want part of a
+package to be installed. For example, if your httpd root uses an index.php,
+then you would not want the index.html file to be extracted from the
+\fBapache\fP package.
+.TP
+.B UseSyslog
+Log action messages through \fBsyslog()\fP. This will insert log entries into
+\fI/var/log/messages\fP or equivalent.
+.TP
+.B LogFile = \fI/path/to/file\fP
+Log actions directly to a file. Default is \fI/var/log/pacman.log\fP.
+
+.SH REPOSITORY SECTIONS
+Each repository section defines a section name and at least one location where
+the packages can be found. The section name is defined by the string within
+square brackets (the two above are 'current' and 'custom'). Locations are
+defined with the \fBServer\fP directive and follow a URL naming structure. If
+you want to use a local directory, you can specify the full path with
+a 'file://' prefix, as shown above.
+
+The order of repositories in the file matters; repositories listed first will
+take precedence over those listed later in the file when packages in two
+repositories have identical names, regardless of version number.
+
+.SH USING YOUR OWN REPOSITORY
+If you have numerous custom packages of your own, it is often easier to generate your own custom local repository than install them all with the \fB--upgrade\fP option. All you need to do is generate a compressed package database in the directory with these packages so \fBpacman\fP can find it when run with \fB--refresh\fP.
+
+.RS
+.nf
+repo-add /home/pkgs/custom.db.tar.gz /home/pkgs/*.pkg.tar.gz
+.fi
+.RE
+
+The above command will generate a compressed database named
+\fI/home/pkgs/custom.db.tar.gz\fP. Note that the database must be of the form
+\fI{treename}.db.tar.gz\fP, where {treename} is the name of the section defined
+in the configuration file. That's it! Now configure your \fIcustom\fP section
+in the configuration file as shown in the config example above. Pacman will
+now use your package repository. If you add new packages to the repository,
+remember to re-generate the database and use \fBpacman\fP's --refresh option.
+
+For more information on the \fBrepo-add\fP command, use \fB repo-add --help\fP.
+
+.SH SEE ALSO
+.BR pacman (8),
+.BR libalpm (3)
+
+See the Arch Linux website at <http://www.archlinux.org> for more current
+information on the distribution and the \fBpacman\fP family of tools.
+
+.SH AUTHORS
+.nf
+Judd Vinet <jvinet@zeroflux.org>
+Aurelien Foret <aurelien@archlinux.org>
+Aaron Griffin <aaron@archlinux.org>
+Dan McGee <dan@archlinux.org>
+See the 'AUTHORS' file for additional contributors.
+.fi
diff --git a/scripts/makepkg b/scripts/makepkg
index d61335df..124f8d71 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -346,7 +346,7 @@ usage() {
echo " -p <buildscript> Use an alternate build script (instead of '$BUILDSCRIPT')"
echo " -r, --rmdeps Remove installed dependencies after a successful build"
# fix flyspray feature request #2978
- echo " -R, --repackage Repackage contents of <startdir>/pkg without building"
+ echo " -R, --repackage Repackage contents of pkg/ without building"
echo " -s, --syncdeps Install missing dependencies with pacman"
echo " -S, --sudosync Install missing dependencies with pacman and sudo"
echo
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 8619fd94..48c986a2 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -88,11 +88,11 @@ static void usage(int op, char *myname)
printf(_("usage: %s {-h --help}\n"), myname);
printf(_(" %s {-V --version}\n"), myname);
printf(_(" %s {-A --add} [options] <file>\n"), myname);
- printf(_(" %s {-R --remove} [options] <package>\n"), myname);
- printf(_(" %s {-U --upgrade} [options] <file>\n"), myname);
printf(_(" %s {-F --freshen} [options] <file>\n"), myname);
printf(_(" %s {-Q --query} [options] [package]\n"), myname);
+ printf(_(" %s {-R --remove} [options] <package>\n"), myname);
printf(_(" %s {-S --sync} [options] [package]\n"), myname);
+ printf(_(" %s {-U --upgrade} [options] <file>\n"), myname);
printf(_("\nuse '%s --help' with other options for more syntax\n"), myname);
} else {
if(op == PM_OP_ADD) {