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