chiark / gitweb /
devscripts (2.10.69+squeeze4) stable-security; urgency=high
[devscripts.git] / scripts / debi.1
1 .TH DEBI 1 "Debian Utilities" "DEBIAN" \" -*- nroff -*-
2 .SH NAME
3 debi \- install current version of generated Debian package
4 .SH SYNOPSIS
5 \fBdebi\fP [\fIoptions\fR] [\fIchanges file\fR] [\fIpackage\fR ...]
6 .SH DESCRIPTION
7 \fBdebi\fR figures out the current version of a package and installs
8 it.  If a \fI.changes\fR file is specified on the command line, the
9 filename must end with \fI.changes\fR, as this is how the program
10 distinguishes it from package names.  If not, then \fBdebi\fR has to
11 be called from within the source code directory tree.  In this case,
12 it will look for the \fI.changes\fR file corresponding to the current
13 package version (by determining the name and version number from the
14 changelog, and the architecture in the same way as
15 \fBdpkg-buildpackage\fR(1) does).  It then runs \fBdebpkg \-i\fR on
16 every \fI.deb\fR archive listed in the \fI.changes\fR file to install
17 them, assuming that all of the \fI.deb\fR archives live in the same
18 directory as the \fI.changes\fR file.  Note that you probably don't
19 want to run this program on a \fI.changes\fR file relating to a
20 different architecture after cross-compiling the package!
21 .PP
22 If a list of packages is given on the command line, then only those
23 debs with names in this list of packages will be installed.
24 .PP
25 Since installing a package requires root privileges, \fBdebi\fR calls
26 \fBdebpkg\fR rather than \fBdpkg\fR directly.  Thus \fBdebi\fR will
27 only be useful if it is either being run as root or \fBdebpkg\fR can
28 be run as root.  See \fBdebpkg\fR(1) for more details.
29 .SH "Directory name checking"
30 In common with several other scripts in the \fBdevscripts\fR package,
31 \fBdebi\fR will climb the directory tree until it finds a
32 \fIdebian/changelog\fR file.  As a safeguard against stray files
33 causing potential problems, it will examine the name of the parent
34 directory once it finds the \fIdebian/changelog\fR file, and check
35 that the directory name corresponds to the package name.  Precisely
36 how it does this is controlled by two configuration file variables
37 DEVSCRIPTS_CHECK_DIRNAME_LEVEL and DEVSCRIPTS_CHECK_DIRNAME_REGEX, and
38 their corresponding command-line options \fB\-\-check-dirname-level\fR
39 and \fB\-\-check-dirname-regex\fR.
40 .PP
41 DEVSCRIPTS_CHECK_DIRNAME_LEVEL can take the following values:
42 .TP
43 .B 0
44 Never check the directory name.
45 .TP
46 .B 1
47 Only check the directory name if we have had to change directory in
48 our search for \fIdebian/changelog\fR.  This is the default behaviour.
49 .TP
50 .B 2
51 Always check the directory name.
52 .PP
53 The directory name is checked by testing whether the current directory
54 name (as determined by \fBpwd\fR(1)) matches the regex given by the
55 configuration file option DEVSCRIPTS_CHECK_DIRNAME_REGEX or by the
56 command line option \fB\-\-check-dirname-regex\fR \fIregex\fR.  Here
57 \fIregex\fR is a Perl regex (see \fBperlre\fR(3perl)), which will be
58 anchored at the beginning and the end.  If \fIregex\fR contains a '/',
59 then it must match the full directory path.  If not, then it must
60 match the full directory name.  If \fIregex\fR contains the string
61 \'PACKAGE', this will be replaced by the source package name, as
62 determined from the changelog.  The default value for the regex is:
63 \'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and
64 PACKAGE-version.
65 .SH OPTIONS
66 .TP
67 \fB\-a\fIdebian-architecture\fR, \fB\-t\fIGNU-system-type\fR
68 See \fBdpkg-architecture\fR(1) for a description of these options.
69 They affect the search for the \fI.changes\fR file.  They are provided
70 to mimic the behaviour of \fBdpkg-buildpackage\fR when determining the
71 name of the \fI.changes\fR file.
72 .TP
73 \fB\-\-debs\-dir\fR \fIDIR\fR
74 Look for the \fI.changes\fR and \fI.deb\fR files in directory
75 \fIDIR\fR instead of the parent of the source directory.  This should
76 either be an absolute path or relative to the top of the source
77 directory.
78 .TP
79 \fB\-\-upgrade\fR
80 Only upgrade packages already installed on the system, rather than
81 installing all packages listed in the \fI.changes\fR file.
82 Useful for multi-binary packages when you don't want to have all the
83 binaries installed at once.
84 .TP
85 \fB\-\-check-dirname-level\fR \fIN\fR
86 See the above section "Directory name checking" for an explanation of
87 this option.
88 .TP
89 \fB\-\-check-dirname-regex\fR \fIregex\fR
90 See the above section "Directory name checking" for an explanation of
91 this option.
92 .TP
93 \fB\-\-no-conf\fR, \fB\-\-noconf\fR
94 Do not read any configuration files.  This can only be used as the
95 first option given on the command-line.
96 .TP
97 \fB\-\-help\fR, \fB\-\-version\fR
98 Show help message and version information respectively.
99 .SH "CONFIGURATION VARIABLES"
100 The two configuration files \fI/etc/devscripts.conf\fR and
101 \fI~/.devscripts\fR are sourced in that order to set configuration
102 variables.  Command line options can be used to override configuration
103 file settings.  Environment variable settings are ignored for this
104 purpose.  The currently recognised variables are:
105 .TP
106 .B DEBRELEASE_DEBS_DIR
107 This specifies the directory in which to look for the \fI.changes\fR
108 and \fI.deb\fR files, and is either an absolute path or relative to
109 the top of the source tree.  This corresponds to the
110 \fB\-\-debs\-dir\fR command line option.  This directive could be
111 used, for example, if you always use \fBpbuilder\fR or
112 \fBsvn-buildpackage\fR to build your packages.  Note that it also
113 affects \fBdebrelease\fR(1) in the same way, hence the strange name of
114 the option.
115 .TP
116 .BR DEVSCRIPTS_CHECK_DIRNAME_LEVEL ", " DEVSCRIPTS_CHECK_DIRNAME_REGEX
117 See the above section "Directory name checking" for an explanation of
118 these variables.  Note that these are package-wide configuration
119 variables, and will therefore affect all \fBdevscripts\fR scripts
120 which check their value, as described in their respective manpages and
121 in \fBdevscripts.conf\fR(5).
122 .SH "SEE ALSO"
123 .BR debpkg (1)
124 and
125 .BR devscripts.conf (5).
126 .SH AUTHOR
127 \fBdebi\fR was originally written by Christoph Lameter
128 <clameter@debian.org>.  The now-defunct script \fBdebit\fR was
129 originally written by James R. Van Zandt <jrv@vanzandt.mv.com>.  They
130 have been moulded into one script together with \fBdebc\fR(1) and
131 parts extensively modified by Julian Gilbey <jdg@debian.org>.