test: Refactor ar handling into m4 macros
[dpkg.git] / man / dpkg-realpath.pod
blobf801d8ee95aadc2af178288d4944cec919725721
1 # dpkg manual page - dpkg-realpath(1)
3 # Copyright © 2020-2021 Guillem Jover <guillem@debian.org>
5 # This is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
18 =encoding utf8
20 =head1 NAME
22 dpkg-realpath - print the resolved pathname with DPKG_ROOT support
24 =head1 SYNOPSIS
26 B<dpkg-realpath> [I<option>...] I<pathname>
28 =head1 DESCRIPTION
30 B<dpkg-realpath> is a tool (since dpkg 1.20.1) to resolve a pathname,
31 that takes the L<dpkg(1)> root directory into account, either implicitly
32 from the B<DPKG_ROOT> environment variable or from the command-line
33 B<--root> or B<--instdir> options, and returns an absolute I<pathname>
34 relative to the root directory.
35 The root directory must not be prefixed to the I<pathname> to be resolved.
37 This is intended to be used by other B<dpkg> helpers, or by maintainer
38 scripts instead of using L<realpath(1)> or L<readlink(1)> to canonicalize
39 pathnames, as these latter commands do not support canonicalization
40 relative to a different root than F</>.
42 This program was introduced in dpkg 1.20.1.
44 =head1 OPTIONS
46 =over
48 =item B<-z>, B<--zero>
50 Use a NUL byte to end output lines instead of a new line character
51 (since dpkg 1.20.6).
53 =item B<--instdir> I<directory>
55 =item B<--root> I<directory>
57 Set the root directory to I<directory>, which is the base directory
58 that pathnames get canonicalized against.
59 Defaults to «B</>» if B<DPKG_ROOT> has not been set.
61 =item B<-?>, B<--help>
63 Show the usage message and exit.
65 =item B<--version>
67 Show the version and exit.
69 =back
71 =head1 ENVIRONMENT
73 =over
75 =item B<DPKG_ROOT>
77 If set and the B<--instdir> or B<--root> options have not been
78 specified, it will be used as the filesystem root directory.
80 =item B<DPKG_COLORS>
82 Sets the color mode.
83 The currently accepted values are: B<auto> (default), B<always> and B<never>.
85 =item B<DPKG_NLS>
87 If set, it will be used to decide whether to activate Native Language Support,
88 also known as internationalization (or i18n) support (since dpkg 1.22.7).
89 The accepted values are: B<0> and B<1> (default).
91 =back
93 =head1 SEE ALSO
95 L<realpath(1)>,
96 L<readlink(1)>.