summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/.gitignore1
-rw-r--r--doc/Makefile.am4
-rw-r--r--doc/PKGBUILD-example.txt23
-rw-r--r--doc/PKGBUILD.5.txt132
-rw-r--r--doc/footer.txt2
-rw-r--r--doc/makepkg-template.1.txt120
-rw-r--r--doc/makepkg.8.txt7
-rw-r--r--doc/pacman.8.txt147
8 files changed, 292 insertions, 144 deletions
diff --git a/doc/.gitignore b/doc/.gitignore
index a96ddb30..ad496ce0 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1,6 +1,7 @@
PKGBUILD.5
libalpm.3
makepkg.8
+makepkg-template.1
makepkg.conf.5
pacman.8
pacman-key.8
diff --git a/doc/Makefile.am b/doc/Makefile.am
index bcb05b74..cb012551 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -6,6 +6,7 @@
ASCIIDOC_MANS = \
pacman.8 \
makepkg.8 \
+ makepkg-template.1 \
repo-add.8 \
vercmp.8 \
pkgdelta.8 \
@@ -21,6 +22,7 @@ DOXYGEN_MANS = $(wildcard man3/*.3)
HTML_MANPAGES = \
pacman.8.html \
makepkg.8.html \
+ makepkg-template.1.html \
repo-add.8.html \
vercmp.8.html \
pkgdelta.8.html \
@@ -46,6 +48,7 @@ EXTRA_DIST = \
asciidoc-override.css \
pacman.8.txt \
makepkg.8.txt \
+ makepkg-template.1.txt \
repo-add.8.txt \
vercmp.8.txt \
pkgdelta.8.txt \
@@ -147,6 +150,7 @@ $(HTML_OTHER): asciidoc.conf Makefile.am
# Dependency rules
pacman.8 pacman.8.html: pacman.8.txt
makepkg.8 makepkg.8.html: makepkg.8.txt
+makepkg-template.1 makepkg-template.1.html: makepkg-template.1.txt
repo-add.8 repo-add.8.html: repo-add.8.txt
vercmp.8 vercmp.8.html: vercmp.8.txt
pkgdelta.8 pkgdelta.8.html: pkgdelta.8.txt
diff --git a/doc/PKGBUILD-example.txt b/doc/PKGBUILD-example.txt
index 9ab5dff9..910fd068 100644
--- a/doc/PKGBUILD-example.txt
+++ b/doc/PKGBUILD-example.txt
@@ -1,24 +1,27 @@
# Maintainer: Joe User <joe.user@example.com>
pkgname=patch
-pkgver=2.5.4
-pkgrel=3
+pkgver=2.7.1
+pkgrel=1
pkgdesc="A utility to apply patch files to original sources"
arch=('i686' 'x86_64')
url="https://www.gnu.org/software/patch/patch.html"
license=('GPL')
groups=('base-devel')
-depends=('glibc' 'ed')
-source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz)
-md5sums=('ee5ae84d115f051d87fcaaef3b4ae782')
+depends=('glibc')
+makedepends=('ed')
+optdepends=('ed: for "patch -e" functionality')
+source=("ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
+md5sums=('e9ae5393426d3ad783a300a338c09b72'
+ 'SKIP')
build() {
- cd "$srcdir"/$pkgname-$pkgver
- ./configure --prefix=/usr
- make
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
}
package() {
- cd "$srcdir"/$pkgname-$pkgver
- make prefix="$pkgdir"/usr install
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install
}
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index e78a8e5a..1b229aaf 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -48,10 +48,12 @@ similar to `$_basekernver`.
The version of the software as released from the author (e.g., '2.7.1').
The variable is not allowed to contain colons or hyphens.
+
-The `pkgver` variable can be automatically updated by providing a `pkgver()` function
-in the PKGBUILD that outputs the new package version. This is run after downloading
-and extracting the sources so can use those files in determining the new `pkgver`.
-This is most useful when used with sources from version control systems (see below).
+The `pkgver` variable can be automatically updated by providing a `pkgver()`
+function in the PKGBUILD that outputs the new package version.
+This is run after downloading and extracting the sources so it can use those
+files in determining the new `pkgver`.
+This is most useful when used with sources from version control systems (see
+below).
*pkgrel*::
This is the release number specific to the Arch Linux release. This
@@ -62,7 +64,8 @@ This is most useful when used with sources from version control systems (see bel
*pkgdesc*::
This should be a brief description of the package and its functionality.
- Try to keep the description to one line of text and not use the package's name.
+ Try to keep the description to one line of text and to not use the package's
+ name.
*epoch*::
Used to force the package to be seen as newer than any previous versions
@@ -75,7 +78,7 @@ This is most useful when used with sources from version control systems (see bel
*url*::
This field contains a URL that is associated with the software being
- packaged. Typically the project's website.
+ packaged. This is typically the project's web site.
*license (array)*::
This field specifies the license(s) that apply to the package.
@@ -91,13 +94,13 @@ This is most useful when used with sources from version control systems (see bel
*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
+ 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 source array (e.g., `install=$pkgname.install`).
*changelog*::
Specifies a changelog file that is to be included in the package.
- This file should reside in the same directory as the PKGBUILD, and will
+ 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 source array (e.g., `changelog=$pkgname.changelog`).
@@ -105,10 +108,10 @@ This is most useful when used with sources from version control systems (see bel
An array of source files required to build the package. Source files
must either reside in the same directory as the PKGBUILD, or be a
fully-qualified URL that makepkg can use to download the file.
- To make the PKGBUILD as useful as possible, use the `$pkgname` and `$pkgver`
- variables if possible when specifying the download location. Compressed files
- will be extracted automatically unless found in
- the noextract array described below.
+ To simplify the maintenance of PKGBUILDs, use the `$pkgname` and `$pkgver`
+ variables when specifying the download location, if possible.
+ Compressed files will be extracted automatically unless found in the
+ noextract array described below.
+
It is also possible to change the name of the downloaded file, which is helpful
with weird URLs and for handling multiple source files with the same
@@ -118,12 +121,12 @@ makepkg also supports building developmental versions of packages using sources
downloaded from version control systems (VCS). For more information, see
<<VCS,Using VCS Sources>> below.
+
-Files in the source array with extensions `.sig`, `.sign` or `.asc` are recognized by
-makepkg as PGP signatures and will be automatically used to verify the integrity
-of the corresponding source file.
+Files in the source array with extensions `.sig`, `.sign` or, `.asc` are
+recognized by makepkg as PGP signatures and will be automatically used to verify
+the integrity of the corresponding source file.
*noextract (array)*::
- An array of filenames corresponding to those from the source array. Files
+ An array of file names corresponding to those from the source array. Files
listed here will not be extracted with the rest of the source files. This
is useful for packages that use compressed data directly.
@@ -152,10 +155,10 @@ of the corresponding source file.
files should use `arch=('any')`.
*backup (array)*::
- An array of filenames, without preceding slashes, that
+ An array of file names, without preceding slashes, that
should be backed up if the package is removed or upgraded. This is
- commonly used for packages placing configuration files in /etc. See
- Handling Config Files in linkman:pacman[8] for more information.
+ commonly used for packages placing configuration files in '/etc'. See
+ `"Handling Config Files"` in linkman:pacman[8] for more information.
*depends (array)*::
An array of packages this package depends on to run. Entries in
@@ -168,7 +171,7 @@ of the corresponding source file.
If the dependency name appears to be a library (ends with .so), makepkg will
try to find a binary that depends on the library in the built package and
append the version needed by the binary. Appending the version yourself
-disables auto detection.
+disables automatic detection.
*makedepends (array)*::
An array of packages this package depends on to build but are not
@@ -209,7 +212,7 @@ only specific versions of a package may be provided.
+
If the provision name appears to be a library (ends with .so), makepkg will
try to find the library in the built package and append the correct
-version. Appending the version yourself disables auto detection.
+version. Appending the version yourself disables automatic detection.
*replaces (array)*::
An array of packages this package should replace. This can be used
@@ -289,13 +292,13 @@ Packaging Functions
-------------------
In addition to the above directives, PKGBUILDs require a set of functions that
-provide instructions to build and install the package. As a minimum, the PKGBUILD
-must contain a package() function which installs all the package's files into the
-packaging directory, with optional prepare(), build() and check() being used to
-create those files from source.
+provide instructions to build and install the package. As a minimum, the
+PKGBUILD must contain a `package()` function which installs all the package's
+files into the packaging directory, with optional `prepare()`, `build()`, and
+`check()` functions being used to create those files from source.
*package() Function*::
- The package() function is used to install files into the directory that
+ The `package()` function is used to install files into the directory that
will become the root directory of the built package and is run after all
the optional functions listed below. When specified in combination with
the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakeroot usage
@@ -303,41 +306,41 @@ create those files from source.
be run as the user calling makepkg.
*prepare() Function*::
- An optional prepare() function can be specified in which operations that
- are to be run in order to prepare the sources for building (such as
- patching) are performed. This function is run after the source extraction
- and before the build() function and is skipped when source extraction is
- skipped.
+ An optional `prepare()` function can be specified in which operations to
+ prepare the sources for building, such as patching, are performed. This
+ function is run after the source extraction and before the `build()`
+ function. The `prepare()` function is skipped when source extraction
+ is skipped.
*build() Function*::
- The optional build() function is use to compile and/or adjust the source
- files in preparation to be installed by the package() function. This is
- directly sourced and executed by makepkg, so anything that bash or the
+ The optional `build()` function is use to compile and/or adjust the source
+ files in preparation to be installed by the `package()` function. This is
+ directly sourced and executed by makepkg, so anything that Bash or the
system has available is available for use here. Be sure any exotic
- commands used are covered by `makedepends`.
+ commands used are covered by the `makedepends` array.
+
-If you create any variables of your own in the build function, it is
-recommended to use the bash `local` keyword to scope the variable to inside
-the build function.
+If you create any variables of your own in the `build()` function, it is
+recommended to use the Bash `local` keyword to scope the variable to inside
+the `build()` function.
*check() Function*::
- An optional check() function can be specified in which a package's
- test-suite may be run. This function is run between the build() and
- package() functions. Be sure any exotic commands used are covered by
- `checkdepends`.
+ An optional `check()` function can be specified in which a package's
+ test-suite may be run. This function is run between the `build()` and
+ `package()` functions. Be sure any exotic commands used are covered by the
+ `checkdepends` array.
-All of the above variables such as `$pkgname` and `$pkgver` are available for use
-in the build function. In addition, makepkg defines the following variables for use
-during the build and install process:
+All of the above variables such as `$pkgname` and `$pkgver` are available for
+use in the `build()` function. In addition, makepkg defines the following
+variables for use during the build and install process:
*srcdir*::
- This contains the directory where makepkg extracts, or copies, all source
- files.
+ This contains the directory where makepkg extracts, or copies, all source
+ files.
*pkgdir*::
- This contains the directory where makepkg bundles the installed package
- (this directory will become the root directory of your built package).
- This variable should only be used in the package() function.
+ This contains the directory where makepkg bundles the installed package.
+ This directory will become the root directory of your built package. This
+ variable should only be used in the `package()` function.
*startdir*::
This contains the absolute path to the directory where the PKGBUILD is
@@ -362,8 +365,8 @@ An optional global directive is available when building a split package:
*pkgbase*::
The name used to refer to the group of packages in the output of makepkg
- and in the naming of source-only tarballs. If not specified, the first
- element in the `pkgname` array is used. The variable is not allowed to
+ and in the naming of source-only tarballs. If not specified, the first
+ element in the `pkgname` array is used. The variable is not allowed to
begin with a hyphen.
Install/Upgrade/Remove Scripting
@@ -377,7 +380,7 @@ self-explanatory. Note that during an upgrade operation, none of the install
or remove scripts will be called.
Scripts are passed either one or two ``full version strings'', where a full
-version string is either 'pkgver-pkgrel' or 'epoch:pkgver-pkgrel' if epoch is
+version string is either 'pkgver-pkgrel' or 'epoch:pkgver-pkgrel', if epoch is
non-zero.
*pre_install*::
@@ -415,10 +418,12 @@ reference with all of the available functions defined.
Using VCS Sources[[VCS]]
------------------------
-Building a developmental version of a package using sources from a version control
-system (VCS) is enabled by specifying the source in the form
-`source=('folder::url#fragment')`. Currently makepkg supports the `bzr`, `git`, `hg` and
-`svn` protocols.
+Building a developmental version of a package using sources from a version
+control system (VCS) is enabled by specifying the source in the form
+`source=('folder::url#fragment')`. Currently makepkg supports the Bazaar, Git,
+Subversion, and Mercurial version control systems. For other version control
+systems, manual cloning of upstream repositories must be done in the `prepare()`
+function.
The source URL is divided into three components:
@@ -427,11 +432,12 @@ The source URL is divided into three components:
source into.
*url*::
- The url to the VCS repo. This must include the the vcs in the URL protocol for
- makepkg to recognize this as a VCS source. If the protocol does not include
- the VCS name, it can be added by prefixing the URL with `vcs+`. For example,
- using a git repository over `http` would have a source URL in the form
- `git+http://...`.
+ The URL to the VCS repository. This must include the VCS in the URL protocol
+ for makepkg to recognize this as a VCS source. If the protocol does not
+ include the VCS name, it can be added by prefixing the URL with `vcs+`. For
+ example, using a Git repository over HTTPS would have a source URL in the
+ form:
+ `git+https://...`.
*fragment*::
(optional) Allows specifying a revision number or branch for makepkg to checkout
@@ -455,7 +461,7 @@ Example
-------
The following is an example PKGBUILD for the 'patch' package. For more
examples, look through the build files of your distribution's packages. For
-those using Arch Linux, consult the ABS tree.
+those using Arch Linux, consult the Arch Build System (ABS) tree.
[source,sh]
-------------------------------
diff --git a/doc/footer.txt b/doc/footer.txt
index ccb931ce..af19304e 100644
--- a/doc/footer.txt
+++ b/doc/footer.txt
@@ -8,7 +8,7 @@ information on pacman and its related tools.
Bugs
----
-Bugs? You must be kidding, there are no bugs in this software. But if we
+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
mailto:pacman-dev@archlinux.org[].
diff --git a/doc/makepkg-template.1.txt b/doc/makepkg-template.1.txt
new file mode 100644
index 00000000..8fa5c2e1
--- /dev/null
+++ b/doc/makepkg-template.1.txt
@@ -0,0 +1,120 @@
+/////
+vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
+/////
+makepkg-template(1)
+===================
+
+Name
+----
+makepkg-template - package build templating utility
+
+
+Synopsis
+--------
+'makepkg-template' [options]
+
+
+Description
+-----------
+
+'makepkg-template' is a script to ease the work of maintaining multiple similar
+PKGBUILDs. It allows you to move most of the code from the PKGBUILD into a
+template file and uses markers to allow in-place updating of existing PKGBUILDs
+if the template has been changed.
+
+Template files can contain any code allowed in a PKGBUILD. You can think of
+them like external files included with "." or "source", but they will be
+inlined into the PKGBUILD by 'makepkg-template' so you do not depend on the
+template file when building the package.
+
+Markers are bash comments in the form of:
+
+ # template start; key=value; key2=value2; ...
+
+and
+
+ # template end;
+
+Currently used keys are: name (mandatory) and version. Template names are limited to
+alphanumerics, "@", "+", ".", "-" and "_". Versions are limited to numbers and ".".
+
+For initial creation there is a one line short cut which does not need an end marker:
+
+ # template input; key=value;
+
+Using this short-cut will result in 'makepkg-template' replacing it with start
+and end markers and the template code on the first run.
+
+Template files should be stored in one directory and filenames should be
+"$template_name-$version.template" with a symlink "$template_name.template"
+pointing to the most recent template. If the version is not set in the marker,
+'makepkg-template' will automatically use the most recent version of the
+template, otherwise the specified version will be used. This allows for easier
+verification of untrusted PKGBUILDs if the template is trusted. You verify the
+non-template code and then use a command similar to this:
+
+ diff -u <(makepkg-template -o -) PKGBUILD
+
+Template files may also contain markers leading to nested templates in the
+resulting PKGBUILD. If you use markers in a template, please set the version
+you used/tested with in the start/input marker so other people can properly
+recreate from templates.
+
+Options
+-------
+
+*-p, \--input* <build script>::
+ Read the package script `build script` instead of the default.
+
+*-o, \--output* <build script>::
+ Write the updated file to `build script` instead of overwriting the input file.
+
+*-n, \--newest*::
+ Always use the newest available template file.
+
+*\--template-dir* <dir>::
+ Change the dir where we are looking for template files.
+
+Example PKGBUILD
+----------------
+
+ pkgname=perl-config-simple
+ pkgver=4.58
+ pkgrel=1
+ pkgdesc="simple configuration file class"
+ arch=('any')
+ license=('PerlArtistic' 'GPL')
+ depends=('perl')
+ source=("http://search.cpan.org/CPAN/authors/id/S/SH/SHERZODR/Config-Simple-${pkgver}.tar.gz")
+ md5sums=('f014aec54f0a1e2e880d317180fce502')
+ _distname="Config-Simple"
+
+ # template start; name=perl-module; version=1.0;
+ _distdir="${_distname}-${pkgver}"
+ url="https://metacpan.org/release/${_distname}"
+ options+=('!emptydirs')
+
+ build() {
+ cd "$srcdir/$_distdir"
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ }
+
+ check() {
+ cd "$srcdir/$_distdir"
+ make test
+ }
+
+ package() {
+ cd "$srcdir/$_distdir"
+ make DESTDIR="$pkgdir" install
+ }
+ # template end;
+
+
+
+See Also
+--------
+linkman:makepkg[8], linkman:PKGBUILD[5]
+
+include::footer.txt[]
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
index 53a78677..899858e4 100644
--- a/doc/makepkg.8.txt
+++ b/doc/makepkg.8.txt
@@ -165,6 +165,9 @@ Options
*\--nocheck*::
Do not run the check() function in the PKGBUILD or handle the checkdepends.
+*\--noprepare*::
+ Do not run the prepare() function in the PKGBUILD.
+
*\--sign*::
Sign the resulting package with gpg, overriding the setting in
linkman:makepkg.conf[5].
@@ -226,6 +229,10 @@ Environment Variables
Folder where the package will be built. Overrides the corresponding
value defined in linkman:makepkg.conf[5].
+**CARCH=**"(i686|x86_64)"::
+ Force build for a specific architecture. Useful for cross-compiling.
+ Overrides the corresponding value defined in linkman:makepkg.conf[5].
+
Configuration
-------------
See linkman:makepkg.conf[5] for more details on configuring makepkg using the
diff --git a/doc/pacman.8.txt b/doc/pacman.8.txt
index 189e1137..1cc1eaa4 100644
--- a/doc/pacman.8.txt
+++ b/doc/pacman.8.txt
@@ -17,17 +17,17 @@ Description
-----------
Pacman is a package management utility that tracks installed packages on a Linux
system. It features dependency support, package groups, install and uninstall
-hooks, and the ability to sync your local machine with a remote ftp server to
+hooks, and the ability to sync your local machine with a remote repository to
automatically upgrade packages. Pacman packages are a zipped tar format.
-Since version 3.0.0, pacman has been the frontend to linkman:libalpm[3], the
+Since version 3.0.0, pacman has been the front-end to linkman:libalpm[3], the
``Arch Linux Package Management'' library. This library allows alternative
-front ends to be written (for instance, a GUI front end).
+front-ends to be written (for instance, a GUI front-end).
Invoking pacman involves specifying an operation with any potential options and
-targets to operate on. A 'target' is usually a package name, filename, URL, or
+targets to operate on. A 'target' is usually a package name, file name, URL, or
a search string. Targets can be provided as command line arguments.
-Additionally, if stdin is not from a terminal and a single dash (-) is passed
+Additionally, if stdin is not from a terminal and a single hyphen (-) is passed
as an argument, targets will be read from stdin.
@@ -44,7 +44,7 @@ Operations
packages and their files, as well as meta-information 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. In the first case, if no package names
+ individual package files. In the first case, if no package names
are provided in the command line, all installed packages will be
queried. Additionally, various filters can be applied on the package
list. See <<QO,Query Options>> below.
@@ -58,19 +58,19 @@ Operations
See <<RO,Remove Options>> below.
*-S, \--sync*::
- Synchronize packages. Packages are installed directly from the ftp
- servers, including all dependencies required to run the packages. For
+ Synchronize packages. Packages are installed directly from the remote
+ repositories, including all dependencies required to run the packages. For
example, `pacman -S qt` will download and install qt and all the
- packages it depends on. If a package name exists in more than one repo, the
- repo can be explicitly specified to clarify the package to install:
- `pacman -S testing/qt`. You can also specify version requirements:
- `pacman -S "bash>=3.2"`. (Quotes are needed, otherwise your shell
- interprets ">" as redirection to file.)
+ packages it depends on. If a package name exists in more than one
+ repository, the repository can be explicitly specified to clarify the
+ package to install: `pacman -S testing/qt`. You can also specify version
+ requirements: `pacman -S "bash>=3.2"`. Quotes are needed, otherwise the
+ shell interprets ">" as redirection to a file.
+
In addition to packages, groups can be specified as well. For example, if
gnome is a defined package group, then `pacman -S gnome` will provide a
prompt allowing you to select which packages to install from a numbered list.
-The package selection is specified using a space and/or comma separated list of
+The package selection is specified using a space- and/or comma-separated list of
package numbers. Sequential packages may be selected by specifying the first
and last package numbers separated by a hyphen (`-`). Excluding packages is
achieved by prefixing a number or range of numbers with a caret (`^`).
@@ -81,7 +81,7 @@ provide the same functionality as foo will be searched for. If any package is
found, it will be installed. A selection prompt is provided if multiple packages
providing foo are found.
+
-You can also use `pacman -Su` to upgrade all packages that are out of date. See
+You can also use `pacman -Su` to upgrade all packages that are out-of-date. See
<<SO,Sync Options>> below. When upgrading, pacman performs version comparison
to determine which packages need upgrading. This behavior operates as follows:
@@ -91,7 +91,7 @@ to determine which packages need upgrading. This behavior operates as follows:
1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
+
Additionally, version strings can have an 'epoch' value defined that will
-overrule any version comparison (unless the epoch values are equal). This is
+overrule any version comparison, unless the epoch values are equal. This is
specified in an `epoch:version-rel` format. For example, `2:1.0-1` is always
greater than `1:3.6-1`.
@@ -104,16 +104,16 @@ greater than `1:3.6-1`.
*-U, \--upgrade*::
Upgrade or add package(s) to the system and install the required
- dependencies from sync repos. Either a URL or file path can be
+ dependencies from sync repositories. Either a URL or file path can be
specified. This is a ``remove-then-add'' process. See <<UO,Upgrade
Options>> below; also see <<HCF,Handling Config Files>> for an explanation
- on how pacman takes care of config files.
+ on how pacman takes care of configuration files.
*-V, \--version*::
Display version and exit.
*-h, \--help*::
- Display syntax for the given operation. If no operation was supplied
+ Display syntax for the given operation. If no operation was supplied,
then the general syntax is shown.
@@ -121,16 +121,17 @@ Options
-------
*-b, \--dbpath* <path>::
Specify an alternative database location (a typical default is
- +{localstatedir}/lib/pacman+). This should not be used unless you know what you are
- doing. *NOTE*: if specified, this is an absolute path and the root path is
+ +{localstatedir}/lib/pacman+). This should not be used unless you know what
+ you are doing.
+ *NOTE*: if specified, this is an absolute path, and the root path is
not automatically prepended.
*-r, \--root* <path>::
Specify an alternative installation root (default is `/`). This should
not be used as a way to install software into `/usr/local` instead of
`/usr`. This option is used if you want to install a package on a
- temporary mounted partition that is "owned" by another system.
- *NOTE*: if database path or logfile are not specified on either the
+ temporarily mounted partition that is "owned" by another system.
+ *NOTE*: If database path or log file are not specified on either the
command line or in linkman:pacman.conf[5], their default location will
be inside this root path.
@@ -142,14 +143,15 @@ Options
*\--cachedir* <dir>::
Specify an alternative package cache location (a typical default is
- +{localstatedir}/cache/pacman/pkg+). Multiple cache directories can be specified,
- and they are tried in the order they are passed to pacman. *NOTE*: this
- is an absolute path, the root path is not automatically prepended.
+ +{localstatedir}/cache/pacman/pkg+). Multiple cache directories can be
+ specified, and they are tried in the order they are passed to pacman.
+ *NOTE*: This is an absolute path, and the root path is not automatically
+ prepended.
*\--color* <when>::
- Specify when to enable coloring, can be 'always', 'never' or 'auto'. Always
- forces colours on, never forces colours off, and auto only automatically enables
- colours when outputting onto a tty.
+ Specify when to enable coloring. Valid options are 'always', 'never', or
+ 'auto'. 'always' forces colors on; 'never' forces colors off; and 'auto' only
+ automatically enables colors when outputting onto a tty.
*\--config* <file>::
Specify an alternate configuration file.
@@ -163,8 +165,8 @@ Options
typical default is +{sysconfdir}/pacman.d/gnupg+). This directory should contain
two files: `pubring.gpg` and `trustdb.gpg`. `pubring.gpg` holds the public keys
of all packagers. `trustdb.gpg` contains a so-called trust database, which
- specifies that the keys are authentic and trusted. *NOTE*: this is an absolute
- path, the root path is not automatically prepended.
+ specifies that the keys are authentic and trusted. *NOTE*: This is an absolute
+ path, and the root path is not automatically prepended.
*\--logfile* <file>::
Specify an alternate log file. This is an absolute path, regardless of
@@ -183,7 +185,7 @@ Transaction Options (apply to '-S', '-R' and '-U')
system. Specify this option twice to skip all dependency checks.
*\--dbonly*::
- Adds/Removes the database entry only, leaves all files in place.
+ Adds/removes the database entry only, leaving all files in place.
*\--noprogressbar*::
Do not show a progress bar when downloading files. This can be useful
@@ -197,12 +199,12 @@ Transaction Options (apply to '-S', '-R' and '-U')
Only print the targets instead of performing the actual operation (sync,
remove or upgrade). Use '\--print-format' to specify how targets are
displayed. The default format string is "%l", which displays URLs with
- '-S', filenames with '-U' and pkgname-pkgver with '-R'.
+ '-S', file names with '-U', and pkgname-pkgver with '-R'.
*\--print-format* <format>::
Specify a printf-like format to control the output of the '\--print'
operation. The possible attributes are: %n for pkgname, %v for pkgver,
- %l for location, %r for repo and %s for size.
+ %l for location, %r for repo, and %s for size.
Upgrade Options (apply to '-S' and '-U')[[UO]]
--------------------------------------------
@@ -217,7 +219,7 @@ Upgrade Options (apply to '-S' and '-U')[[UO]]
*\--asdeps*::
Install packages non-explicitly; in other words, fake their install reason
to be installed as a dependency. This is useful for makepkg and other
- build from source tools that need to install dependencies before building
+ build-from-source tools that need to install dependencies before building
the package.
*\--asexplicit*::
@@ -232,12 +234,12 @@ Upgrade Options (apply to '-S' and '-U')[[UO]]
with a comma.
*\--ignoregroup* <group>::
- Directs pacman to ignore upgrades of all packages in 'group' even if
+ Directs pacman to ignore upgrades of all packages in 'group', even if
there is one available. Multiple groups can be specified by
separating them with a comma.
*\--needed*::
- Do not reinstall the targets that are already up to date.
+ Do not reinstall the targets that are already up-to-date.
Query Options[[QO]]
@@ -269,8 +271,8 @@ Query Options[[QO]]
*-k \--check*::
Check that all files owned by the given package(s) are present on the
system. If packages are not specified or filter flags are not provided,
- check all installed packages. Specifying this option twice will perform
- more detailed file checking (including permissions, file sizes and
+ check all installed packages. Specifying this option twice will perform
+ more detailed file checking (including permissions, file sizes, and
modification times) for packages that contain the needed mtree file.
*-l, \--list*::
@@ -279,16 +281,16 @@ Query Options[[QO]]
*-m, \--foreign*::
Restrict or filter output to packages that were not found in the sync
- database(s). Typically these are packages that were downloaded manually
+ database(s). Typically these are packages that were downloaded manually
and installed with '\--upgrade'.
*-n, \--native*::
Restrict or filter output to packages that are found in the sync
- database(s). This is the inverse filter of '\--foreign'.
+ database(s). This is the inverse filter of '\--foreign'.
*-o, \--owns* <file>::
Search for packages that own the specified file(s). The path can be
- relative or absolute and one or more files can be specified.
+ relative or absolute, and one or more files can be specified.
*-p, \--file*::
Signifies that the package supplied on the command line is a file and
@@ -296,8 +298,8 @@ Query Options[[QO]]
This is useful in combination with '\--info' and '\--list'.
*-q, \--quiet*::
- Show less information for certain query operations. (This is useful when
- pacman's output is processed in a script.) Search will only show package
+ Show less information for certain query operations. This is useful when
+ pacman's output is processed in a script. Search will only show package
names and not version, group, and description information; owns will
only show package names instead of "file is owned by pkg" messages; group
will only show package names and omit group names; list will only show
@@ -315,9 +317,9 @@ Query Options[[QO]]
installed package.
*-u, \--upgrades*::
- Restrict or filter output to packages that are out of date on the local
- system. (Only package versions are used to find outdated packages,
- replacements are not checked here.) This option works best if the sync
+ Restrict or filter output to packages that are out-of-date on the local
+ system. Only package versions are used to find outdated packages;
+ replacements are not checked here. This option works best if the sync
database is refreshed using '-Sy'.
@@ -325,19 +327,19 @@ Remove Options[[RO]]
--------------------
*-c, \--cascade*::
Remove all target packages, as well as all packages that depend on one
- or more target packages. This operation is recursive, and must be used
- with care since it can remove many potentially needed packages.
+ or more target packages. This operation is recursive and must be used
+ with care, since it can remove many potentially needed packages.
*-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 is removed from the system, the database is checked to see if the
file should be renamed with a '.pacsave' extension.
*-s, \--recursive*::
Remove each target specified including all of their dependencies, provided
that (A) they are not required by other packages; and (B) they were not
explicitly installed by the user. This operation is recursive and analogous
- to a backwards '\--sync' operation, and helps keep a clean system without
+ to a backwards '\--sync' operation, and it helps keep a clean system without
orphans. If you want to omit condition (B), pass this option twice.
*-u, \--unneeded*::
@@ -352,7 +354,7 @@ Sync Options[[SO]]
Remove packages that are no longer installed from the cache as well as
currently unused sync databases to free up disk space. When pacman
downloads packages, it saves them in a cache directory. In addition,
- databases are saved for every sync DB you download from, and are not
+ databases are saved for every sync DB you download from and are not
deleted even if they are removed from the configuration file
linkman:pacman.conf[5]. Use one '\--clean' switch to only remove
packages that are no longer installed; use two to remove all files
@@ -377,9 +379,9 @@ linkman:pacman.conf[5].
can be specified on the command line.
*-q, \--quiet*::
- Show less information for certain sync operations. (This is useful when
- pacman's output is processed in a script.) Search will only show package
- names and not repo, version, group, and description information; list
+ Show less information for certain sync operations. This is useful when
+ pacman's output is processed in a script. Search will only show package
+ names and not repository, version, group, and description information; list
will only show package names and omit databases and versions; group will
only show package names and omit group names.
@@ -390,16 +392,16 @@ linkman:pacman.conf[5].
be returned.
*-u, \--sysupgrade*::
- Upgrades all packages that are out of date. Each currently-installed
+ 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
+ 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.
+
-Pass this option twice to enable package downgrade; in this case pacman will
-select sync packages whose version does not match with the local version. This
-can be useful when the user switches from a testing repo to a stable one.
+Pass this option twice to enable package downgrades; in this case, pacman will
+select sync packages whose versions do not match with the local versions. This
+can be useful when the user switches from a testing repository to a stable one.
+
Additional targets can also be specified manually, so that '-Su foo' will do a
system upgrade and install/upgrade the foo package in the same operation.
@@ -411,17 +413,17 @@ system upgrade and install/upgrade the foo package in the same operation.
Download a fresh copy of the master package list from the server(s)
defined in linkman:pacman.conf[5]. This should typically be used each time
you use '\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y' flags
- will force a refresh of all package lists even if they appear to be up
- to date.
+ will force a refresh of all package lists, even if they appear to be up-
+ to-date.
Handling Config Files[[HCF]]
----------------------------
-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
+Pacman uses the same logic as 'rpm' to determine action against files that are
+designated to be backed up. During an upgrade, three 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 is about to be installed, and one for the
+actual file existing on the file system. After comparing these three hashes, the
follow scenarios can result:
original=X, current=X, new=X::
@@ -429,13 +431,13 @@ original=X, current=X, new=X::
new file.
original=X, current=X, new=Y::
- The current file is the same as the original but the new one differs.
+ 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.
+ improvements or bug fixes, install the new file.
original=X, current=Y, new=X::
Both package versions contain the exact same file, but the one on the
- filesystem has been modified. Leave the current file in place.
+ file system has been modified. Leave the current file in place.
original=X, current=Y, new=Y::
The new file is identical to the current file. Install the new file.
@@ -445,6 +447,11 @@ original=X, current=Y, new=Z::
extension and warn the user. The user must then manually merge any
necessary changes into the original file.
+original=NULL, current=Y, new=Z::
+ The package was not previously installed, and the file already exists on the
+ file system. Save the current file with a '.pacorig' extension, install the
+ new file, and warn the user.
+
Examples
--------