* Nice overhaul of manpages. It is at least a start.

* Alphabetized options in pacman usage.
This commit is contained in:
Dan McGee 2007-02-08 05:24:17 +00:00
parent 306914793c
commit a7df172bee
7 changed files with 475 additions and 718 deletions

View File

@ -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 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) are hard coded into the sources. (from TODO.autoconf)
Quick hits: Other ideas:
=========== ============
unsigned int vs. unsigned- determine a standard and stick with it 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? 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.

View File

@ -2,31 +2,32 @@
.ds DS Arch Linux .ds DS Arch Linux
.ds PB PKGBUILD .ds PB PKGBUILD
.ds VR 3.0.0 .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 .SH NAME
PKGBUILD \- \*(DS package build description file \*(PB \- \*(DS package build description file
.SH DESCRIPTION .SH DESCRIPTION
This manual page is meant to describe general rules about PKGBUILDs. Once This manual page is meant to describe general rules about \*(PBs. Once
a PKGBUILD is written, the actual package is built using \fBmakepkg\fR and a \*(PB is written, the actual package is built using \fBmakepkg\fR and
installed with \fBpacman\fR. installed with \fBpacman\fR.
\fBNOTE:\fR If you have a local copy of the Arch Build System (ABS) tree \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 build directory and edit it from there. To acquire/sync the ABS tree, use
the \fBabs\fR script included with pacman/makepkg. the \fBabs\fR script included with pacman/makepkg.
.SS Quick PKGBUILD Explanation .SS Quick \*(PB Explanation
For an example of a PKGBUILD, see the \fBEXAMPLE\fR section. For an example of a \*(PB, see the \fBEXAMPLE\fR section.
\fIpkgname\fR defines the package name. It should not contain any uppercase \fIpkgname\fR defines the package name. It should not contain any uppercase
letters. \fIpkgversion\fR defines the actual package version as given by the letters. \fIpkgversion\fR defines the actual package version as given by the
developers of the package. No dashes are allowed. \fIpkgrel\fR allows for 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. without an upstream version change. The value should be an integer.
\fIpkgdesc\fR is a short one-line description for the package, usually taken \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 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 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. information on the package if needed.
\fIdepends\fR and \fImakedepends\fR are bash arrays which define the \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 $startdir/pkg). However, some customizations are often needed during the build
process. 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 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, 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. 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 .TP
.B install .B install
Specifies a special install script that is to be included in the package. 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 copied into the package by makepkg. It does not need to be included in the
\fIsource\fR array. (eg, install=pkgname.install) \fIsource\fR array. (eg, install=pkgname.install)
.TP .TP
.B source \fI(array)\fR .B source \fI(array)\fR
The \fIsource\fR line is an array of source files required to build the 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. file, unless they have a fully-qualified URL.
.TP .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 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 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 this to verify source file integrity during subsequent builds. To easily
generate md5sums, first build using the PKGBUILD then run generate md5sums, first build using the \*(PB then run
\fBmakepkg -g >>PKGBUILD\fR. Then you can edit the PKGBUILD and move the \fBmakepkg -g >>\*(PB\fR. Then you can edit the \*(PB and move the
\fImd5sums\fR line from the bottom to an appropriate location. \fImd5sums\fR line from the bottom to an appropriate location.
\fBNOTE:\fR makepkg supports multiple integrity algorithms and their \fBNOTE:\fR makepkg supports multiple integrity algorithms and their
corresponding arrays (i.e. sha1sums for the SHA1 algorithm), however official corresponding arrays (i.e. sha1sums for the SHA1 algorithm), however official
@ -221,7 +222,7 @@ script is run right after files are removed.
.P .P
To use this feature, just create a file (eg, pkgname.install) and put it in 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: directive:
install=pkgname.install 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). A template install file is available in your ABS tree (/var/abs/install.proto).
.SH EXAMPLE .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. examples, look through the ABS tree.
.nf .nf
@ -265,17 +266,18 @@ build() {
.SH SEE ALSO .SH SEE ALSO
.BR makepkg (8), .BR makepkg (8),
.BR makepkg.conf (5),
.BR pacman (8) .BR pacman (8)
.BR pacman.conf (5)
See the Arch Linux website at <http://www.archlinux.org> for more current 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 <http://wiki.archlinux.org/index.php/Arch_Packaging_Standards> for
recommendations on packaging standards. recommendations on packaging standards.
.SH AUTHORS .SH AUTHORS
.nf
Judd Vinet <jvinet@zeroflux.org> Judd Vinet <jvinet@zeroflux.org>
Aurelien Foret <aurelien@archlinux.org> Aurelien Foret <aurelien@archlinux.org>
Aaron Griffin <aaron@archlinux.org> Aaron Griffin <aaron@archlinux.org>
Dan McGee <dan@archlinux.org> Dan McGee <dan@archlinux.org>
See the 'AUTHORS' file for additional contributors. See the 'AUTHORS' file for additional contributors.
.fi

View File

@ -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 .SH NAME
makepkg \- package build utility makepkg \- package build utility
.SH SYNOPSIS .SH SYNOPSIS
\fBmakepkg [options]\fP .B makepkg
[\fIoptions\fR]
.SH DESCRIPTION .SH DESCRIPTION
\fBmakepkg\fP will build packages for you. All it needs is \fBmakepkg\fP is a script to automate the building of packages. All it needs is
a build-capable linux platform, wget, and some build scripts. The advantage a build-capable Linux platform and a custom build script for each package you
to a script-based build is that you only really do the work once. Once you wish to build (known as a \fB\*(PB\fP). The advantage to a script-based build
have the build script for a package, you just need to run makepkg and it is that the work is only done once. Once you have the build script for a
will do the rest: download and validate source files, check dependencies, package, makepkg will do the rest: download and validate source files, check
configure the buildtime settings, build the package, install the package dependencies, configure the build-time settings, build the package, install the
into a temporary root, make customizations, generate meta-info, and package package into a temporary root, make customizations, generate meta-info, and
the whole thing up for \fBpacman\fP to use. package the whole thing up for \fBpacman\fP to use.
\fBmakeworld\fP can be used to rebuild an entire package group or the \fBmakeworld\fP can be used to rebuild an entire package group or the entire
entire build tree. See \fBmakeworld --help\fP for syntax. 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.
.SH OPTIONS
.TP .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 .TP
.SH PKGBUILD Example: .B \-B, --noccache
.RS Disable the use of \fBccache\fP during build (useful for select packages that
.nf have problems with \fBccache\fP).
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 .TP
.B pre_install .B \-c, --clean
script is run right before files are extracted. Clean up leftover work files and directories after a successful build.
.TP .TP
.B post_install .B \-C, --cleancache
script is run right after files are extracted. Removes all cached source files from the directory specified in \fISRCDEST\fP
in \fBmakepkg.conf\fP.
.TP .TP
.B pre_upgrade .B \-d, --nodeps
script is run right before files are extracted. 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 .TP
.B post_upgrade .B \-e, --noextract
script is run after files are extracted. 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 .TP
.B pre_remove .B \-f, --force
script is run right before files are removed. \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 .TP
.B post_remove .B \-g, --geninteg
script is run right after files are removed. 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
.RE determined by the value of the \fIINTEGRITY_CHECK\fP array in makepkg.conf.
To use this feature, just create a file (eg, pkgname.install) and put it in This output can be redirected into your \fB\*(PB\fP for source validation
the same directory as the PKGBUILD script. Then use the \fIinstall\fP directive: (makepkg -g >> \*(PB).
.RS
.nf
install=pkgname.install
.fi
.RE
The install script does not need to be specified in the \fIsource\fP array.
.TP .TP
.B \-h, --help
Output syntax and command line options.
.TP .TP
.SH Install scripts must follow this format: .B \-i, --install
.RS Install or upgrade the package after a successful build using \fBpacman\fP.
.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 .TP
.B pkgname .B \-j \fIjobs\fP
The name of the package. This has be a unix-friendly name as it will be Sets MAKEFLAGS="-j\fIjobs\fP" before building the package. This is useful for
used in the package filename. overriding the \fIMAKEFLAGS\fP setting in \fBmakepkg.conf\fP.
.TP .TP
.B pkgver .B \-m, --nocolor
This is the version of the software as released from the author (eg, 2.7.1). Disable color in output messages.
.TP .TP
.B pkgrel .B \-o, --nobuild
This is the release number specific to Arch Linux packages. 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 .TP
.B pkgdesc .B \-p \fIbuildscript\fP
This should be a brief description of the package and its functionality. Read the package script \fIbuildscript\fP instead of the default, \fI\*(PB\fP.
.TP .TP
.B options .B \-r, --rmdeps
This array allows you to override some of makepkg's default behaviour Upon successful build, remove any dependencies installed by \fBmakepkg\fP
when building packages. To set an option, just include the option name during dependency auto-resolution (using \fB-b\fP or \fB-s\fP).
in the \fBoptions\fP array.
.TP .TP
.RS .B \-R, --repackage
\fIAvailable Options:\fP Repackage contents of pkg/ without rebuilding the package. This is useful if
.RS you forgot a depend or install file in your \fB\*(PB\fP and the build itself
will not change.
.TP .TP
.B FORCE .B \-s, --syncdeps
force the package to be upgraded by \fB--sysupgrade\fP, even Install missing dependencies using \fBpacman\fP. When missing build-time or
if its an older version. run-time dependencies are found, \fBpacman\fP will try to resolve them. If
successful, the missing packages will be downloaded and installed.
.TP .TP
.B KEEPDOCS .B \-S, --sudosync
do not remove /usr/share/doc and /usr/share/info directories. Install missing dependencies using \fBpacman\fP and \fBsudo\fP. This is the
.TP same as \fB-s\fP except that \fBsudo\fP is used, meaning you do not have to
.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 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
build as root to use dependency auto-resolution. build as root to use dependency auto-resolution.
.TP .TP
.B "\-w <destdir>" .B \--noconfirm
Write the resulting package file to the directory \fI<destdir>\fP instead of the (Passed to \fBpacman\fP) Prevent \fBpacman\fP from waiting for user input
current working directory. before proceeding with operations.
.TP .TP
.B "\-\-noconfirm" .B \--noprogressbar
When calling pacman to resolve dependencies or conflicts, makepkg can pass (Passed to \fBpacman\fP) Prevent \fBpacman\fP from displaying a progress bar;
the \fI--noconfirm\fP option to it so it does not wait for any user useful if you are redirecting makepkg output to file.
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).
.SH CONFIGURATION .SH CONFIGURATION
Configuration options are stored in \fI/etc/makepkg.conf\fP. This file is parsed Configuration options are stored in \fBmakepkg.conf\fP. This file is sourced,
as a bash script, so you can export any special compiler flags you wish so you can include any special compiler flags you wish to use. This is helpful
to use. This is helpful for building for different architectures, or with for building for different architectures, or with different optimizations.
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 .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 Documentation for package-building guidelines if you wish See the Arch Linux website at <http://www.archlinux.org> for more current
to contribute packages to the Arch Linux project. information on the distribution and the \fBpacman\fP family of tools, and
.SH AUTHOR <http://wiki.archlinux.org/index.php/Arch_Packaging_Standards> for
recommendations on packaging standards.
.SH AUTHORS
.nf .nf
Judd Vinet <jvinet@zeroflux.org> 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 .fi

View File

@ -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 .SH NAME
pacman \- package manager utility pacman \- package manager utility
.SH SYNOPSIS .SH SYNOPSIS
\fBpacman <operation> [options] <package> [package] ...\fP .B pacman
<\fIoperation\fR> [\fIoptions\fR] [\fIpackages\fR]
.SH DESCRIPTION .SH DESCRIPTION
\fBpacman\fP is a \fIpackage management\fP utility that tracks installed \fBpacman\fP is a \fIpackage management\fP utility that tracks installed
packages on a linux system. It has simple dependency support and the ability packages on a Linux system. It has dependency support, package groups, install
to connect to a remote ftp server and automatically upgrade packages on and uninstall hooks, and the ability to sync your local machine with a remote
the local system. pacman package are \fIgzipped tar\fP format. ftp server to automatically upgrade packages. \fBpacman\fP packages are a
zipped tar format.
.SH OPERATIONS .SH OPERATIONS
.TP .TP
.B "\-A, \-\-add" .B \-A, --add (deprecated)
Add a package to the system. Package will be uncompressed Add a package to the system. Package will be uncompressed into the installation
into the installation root and the database will be updated. 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 .TP
.B "\-F, \-\-freshen" .B \-F, --freshen
This is like --upgrade except that, unlike --upgrade, this will only This is like \fB--upgrade\fP except it will only upgrade packages already
upgrade packages that are already installed on your system. installed on the system.
.TP .TP
.B "\-Q, \-\-query" .B \-Q, --query
Query the package database. This operation allows you to Query the package database. This operation allows you to view installed
view installed packages and their files, as well as meta-info packages and their files, as well as meta-info about individual packages
about individual packages (dependencies, conflicts, install date, (dependencies, conflicts, install date, build date, size). This can be run
build date, size). This can be run against the local package against the local package database or can be used on individual .tar.gz
database or can be used on individual .tar.gz packages. See packages. See \fBQUERY OPTIONS\fP below.
\fBQUERY OPTIONS\fP below.
.TP .TP
.B "\-R, \-\-remove" .B \-R, --remove
Remove a package from the system. Files belonging to the Remove a package from the system. Files belonging to the specified package
specified package will be deleted, and the database will will be deleted, and the database will be updated. Most configuration files
be updated. Most configuration files will be saved with a will be saved with a \fI.pacsave\fP extension unless the \fB--nosave\fP option
\fI.pacsave\fP extension unless the \fB--nosave\fP option was is used. See \fBREMOVE OPTIONS\fP below.
used.
.TP .TP
.B "\-S, \-\-sync" .B \-S, --sync
Synchronize packages. With this function you can install packages Synchronize packages. Packages are installed directly from the ftp servers,
directly from the ftp servers, complete with all dependencies required complete with all dependencies required to run the packages. For example,
to run the packages. For example, \fBpacman -S qt\fP will download \fBpacman -S qt\fP will download and install \fBqt\fP and all the packages it
qt and all the packages it depends on and install them. You could also use depends on. You can also use \fBpacman -Su\fP to upgrade all packages that are
\fBpacman -Su\fP to upgrade all packages that are out of date (see below). out of date. See \fBSYNC OPTIONS\fP below.
.TP .TP
.B "\-U, \-\-upgrade" .B \-U, --upgrade
Upgrade a package. This is essentially a "remove-then-add" Upgrade or add a package to the system. This is a "remove-then-add" process.
process. See \fBHANDLING CONFIG FILES\fP for an explanation See \fBHANDLING CONFIG FILES\fP for an explanation on how pacman takes care of
on how pacman takes care of config files. config files.
.TP .TP
.B "\-V, \-\-version" .B \-V, --version
Display version and exit. Display version and exit.
.TP .TP
.B "\-h, \-\-help" .B \-h, --help
Display syntax for the given operation. If no operation was Display syntax for the given operation. If no operation was supplied then the
supplied then the general syntax is shown. general syntax is shown.
.SH OPTIONS .SH OPTIONS
.TP .TP
.B "\-d, \-\-nodeps" .B \-d, --nodeps
Skips all dependency checks. Normally, pacman will always check Skips all dependency checks. Normally, pacman will always check a package's
a package's dependency fields to ensure that all dependencies are dependency fields to ensure that all dependencies are installed and there are
installed and there are no package conflicts in the system. This no package conflicts in the system.
switch disables these checks.
.TP .TP
.B "\-f, \-\-force" .B \-f, --force
Bypass file conflict checks, overwriting conflicting files. If the Bypass file conflict checks and overwrite conflicting files. If the package
package that is about to be installed contains files that are already that is about to be installed contains files that are already installed, this
installed, this option will cause all those files to be overwritten. option will cause all those files to be overwritten. This option should be
This option should be used with care, ideally not at all. used with care, ideally not at all.
.TP .TP
.B "\-r, \-\-root <path>" .B \-r, --root \fIpath\fP
Specify alternative installation root (default is "/"). This Specify alternative installation root (default is "/"). However, this should
should \fInot\fP be used as a way to install software into \fInot\fP be used as a way to install software into /usr/local instead of /usr,
e.g. /usr/local instead of /usr. Instead this should be used for example. This option should be used if you want to install a package on a
if you want to install a package on a temporary mounted partition, temporary mounted partition, which is "owned" by another system. By using this
which is "owned" by another system. By using this option you not only option you not only specify where the software should be installed, but you
specify where the software should be installed, but you also also specify which package database to use.
specify which package database to use.
.TP .TP
.B "\-v, \-\-verbose" .B \-v, --verbose
Output more status and error messages. Output more status messages, such as the Root and DBPath.
.TP .TP
.B "\-\-config <path>" .B \--config \fIfilepath\fP
Specify an alternate configuration file. Specify an alternate configuration file.
.TP .TP
.B "\-\-noconfirm" .B \--noconfirm
Bypass any and all "Are you sure?" messages. It's not a good idea to do this 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. unless you want to run pacman from a script.
.TP .TP
.B "\-\-noprogressbar" .B \--noprogressbar
Do not show a progress bar when downloading files. This can be useful for Do not show a progress bar when downloading files. This can be useful for
scripts that call pacman and capture the output. scripts that call pacman and capture the output.
.SH SYNC 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.
.TP
.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 information for a given package. This will search
through all repositories for a matching package and display the
dependencies, conflicts, etc.
.TP
.B "\-l, \-\-list"
List all files in the specified repositories. Multiple repositories 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.
.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.
.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.
.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 .SH QUERY OPTIONS
.TP .TP
.B "\-e, \-\-orphans" .B \-e, --orphans
List all packages that were explicitly installed (ie, not pulled in List all packages that were pulled in by a previously installed package but no
as a dependency by other packages) and are not required by any other longer required by any installed package.
packages.
.TP .TP
.B "\-g, \-\-groups" .B \-g, --groups
Display all package members of a named group, or all grouped packages if Display all package members of a named group, or all grouped packages if
no name is specified. no name is specified.
.TP .TP
.B "\-i, \-\-info" .B \-i, --info
Display information on a given package. If it is used with the \fB-p\fP Display information on a given package. The \fB-p\fP option can be used if
option then the .PKGINFO file will be printed. querying a package file instead of the local database.
.TP .TP
.B "\-l, \-\-list" .B \-l, --list
List all files owned by <package>. Multiple packages can be specified on List all files owned by a given package. Multiple packages can be specified on
the command line. the command line.
.TP .TP
.B "\-m, \-\-foreign" .B \-m, --foreign
List all packages that were not found in the sync database(s). Typically these List all packages that were not found in the sync database(s). Typically these
are packages that were downloaded manually and installed with --add. are packages that were downloaded manually and installed with \fB--upgrade\fP.
.TP .TP
.B "\-o, \-\-owns <file>" .B \-o, --owns \fIfile\fP
Search for the package that owns <file>. Search for the package that owns \fIfile\fP.
.TP .TP
.B "\-p, \-\-file" .B \-p, --file
Tells pacman that the package supplied on the command line is a Signifies that the package supplied on the command line is a file and not an
file, not an entry in the database. Pacman will decompress the entry in the database. The file will be decompressed and queried. This is
file and query it. This is useful with \fB--info\fP and \fB--list\fP. useful with \fB--info\fP and \fB--list\fP.
.TP .TP
.B "\-s, \-\-search <regexp>" .B \-s, --search \fIregexp\fP
This will search each locally-installed package for names or descriptions This will search each locally-installed package for names or descriptions that
that matches <regexp>. matche \fIregexp\fP.
.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:
.TP .TP
original=\fBX\fP, current=\fBX\fP, new=\fBX\fP .B \-u, --upgrades
All three files are the same, so we win either way. Install the new file. 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.
.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.
.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.
.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.
.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 .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
removed from the system the database is checked to see if the file should be
renamed with a .pacsave extension.
.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 analogous to a backwards \fB--sync\fP
operation.
[custom] .SH SYNC OPTIONS
Server = file:///home/pkgs
.fi
.RE
.SH CONFIG: OPTIONS
.TP .TP
.B "DBPath = path/to/db/dir" .B \-c, --clean
Overrides the default location of the toplevel database directory. The default is Remove old packages from the cache to free up disk space. When \fBpacman\fP
\fIvar/lib/pacman\fP. downloads packages, it saves them in \fI/var/cache/pacman/pkg\fP. Use one
.B "CacheDir = path/to/cache/dir" \fB--clean\fP switch to remove \fIold\fP packages; use two to remove \fIall\fP
Overrides the default location of the package cache directory. The default is packages from the cache.
\fIvar/cache/pacman\fP.
.TP .TP
.B \-g, --groups
Display all the members for each package group specified. If no group names are
provided, all groups will be listed.
.TP .TP
.B "HoldPkg = <package> [package] ..." .B \-i, --info
If a user tries to \fB--remove\fP a package that's listed in HoldPkg, pacman Display dependency and other information for a given package. This will search
will ask for confirmation before proceeding. through all repositories for a matching package.
.TP .TP
.B "IgnorePkg = <package> [package] ..." .B \-l, --list
Instructs pacman to ignore any upgrades for this package when performing a List all packages in the specified repositories. Multiple repositories 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 \fIregexp\fP
This will search each package in the sync databases for names or descriptions
that match \fIregexp\fP.
.TP
.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 \-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. \fB--sysupgrade\fP.
.TP .TP
.B "Include = <path>" .B \--ignore \fIpackage\fP
Include another config file. This config file can include repositories or Directs \fBpacman\fP to ignore upgrades of \fIpackage\fP even if there is one
general configuration options. available.
.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.
This option is useful for users who experience problems with pacman's built-in http/ftp .SH HANDLING CONFIG FILES
support, or need the more advanced proxy support that comes with utilities like pacman uses the same logic as rpm to determine action against files that are
wget. 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 .TP
.B "NoPassiveFtp" original=\fBX\fP, current=\fBX\fP, new=\fBX\fP
Disables passive ftp connections when downloading packages. (aka Active Mode) All three files are the same, so overwrites are not an issue Install the new
file.
.TP .TP
.B "NoUpgrade = <file> [file] ..." original=\fBX\fP, current=\fBX\fP, new=\fBY\fP
All files listed with a \fBNoUpgrade\fP directive will never be touched during a package The current file is the same as the original but the new one differs. Since
install/upgrade. \fINote:\fP do not include the leading slash when specifying files. the user did not ever modify the file, and the new one may contain improvements
or bugfixes, install the new file.
.TP .TP
.B "NoExtract = <file> [file] ..." original=\fBX\fP, current=\fBY\fP, new=\fBX\fP
All files listed with a \fBNoExtract\fP directive will never be extracted from Both package versions contain the exact same file, but the one on the
a package into the filesystem. This can be useful when you don't want part of filesystem has been modified. Leave the current file in place.
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 .TP
.B "UseSyslog" original=\fBX\fP, current=\fBY\fP, new=\fBY\fP
Log action messages through syslog(). This will insert pacman log entries into your The new file is identical to the current file. Install the new file.
/var/log/messages or equivalent.
.TP .TP
.B "LogFile = /path/to/file" original=\fBX\fP, current=\fBY\fP, new=\fBZ\fP
Log actions directly to a file, usually /var/log/pacman.log. 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.
.SH CONFIG: REPOSITORIES .SH CONFIGURATION
Each repository section defines a section name and at least one location where the packages See
can be found. The section name is defined by the string within square brackets (eg, the two .BR pacman.conf (5)
above are 'current' and 'custom'). Locations are defined with the \fIServer\fP directive and for more details on configuring pacman using the \fBpacman.conf\fP file.
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.
.RS .SH BUGS
.nf Bugs? You must be kidding, there are no bugs in this software. But if we happen
# gensync /var/abs/local /home/pkgs/custom.db.tar.gz to be wrong, send us an email with as much detail as possible to
.fi <pacman-dev@archlinux.org>.
.RE
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 .SH SEE ALSO
\fBmakepkg\fP is the package-building tool that comes with pacman. .BR pacman.conf (5),
.SH AUTHOR .BR makepkg (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 .nf
Judd Vinet <jvinet@zeroflux.org> 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 .fi

137
doc/pacman.conf.5 Normal file
View File

@ -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

View File

@ -346,7 +346,7 @@ usage() {
echo " -p <buildscript> Use an alternate build script (instead of '$BUILDSCRIPT')" echo " -p <buildscript> Use an alternate build script (instead of '$BUILDSCRIPT')"
echo " -r, --rmdeps Remove installed dependencies after a successful build" echo " -r, --rmdeps Remove installed dependencies after a successful build"
# fix flyspray feature request #2978 # 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, --syncdeps Install missing dependencies with pacman"
echo " -S, --sudosync Install missing dependencies with pacman and sudo" echo " -S, --sudosync Install missing dependencies with pacman and sudo"
echo echo

View File

@ -88,11 +88,11 @@ static void usage(int op, char *myname)
printf(_("usage: %s {-h --help}\n"), myname); printf(_("usage: %s {-h --help}\n"), myname);
printf(_(" %s {-V --version}\n"), myname); printf(_(" %s {-V --version}\n"), myname);
printf(_(" %s {-A --add} [options] <file>\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 {-F --freshen} [options] <file>\n"), myname);
printf(_(" %s {-Q --query} [options] [package]\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 {-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); printf(_("\nuse '%s --help' with other options for more syntax\n"), myname);
} else { } else {
if(op == PM_OP_ADD) { if(op == PM_OP_ADD) {