1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
|
.TH SVN\-BUILDPACKAGE "1" "September 2003" "svn\-buildpackage 0.1" "Debian utilities"
.SH NAME
svn\-buildpackage \- build Debian packages from SVN repository
.SH SYNOPSIS
.B svn\-buildpackage
[ \fIOPTIONS\fR... ] [ \fIOPTIONS for dpkg\-buildpackage \fR]
.SH DESCRIPTION
Builds a Debian package from a Subversion repository. The source code
repository must be in the format created by svn\-inject, and this script
must be executed from the working directory (trunk/package).
.PP
By default, the working directory is used as the main source directory
(assuming the whole upstream source is being stored in the repository). The
alternative is so called "merge mode". With this method, only the debian
directory (and maybe some other modified files) are stored in the repository.
At build time, the contents of the svn trunk are copied to the extracted
tarball contents (and can overwrite parts of it). To choose this working model,
set the svn property mergeWithUpstream on the Debian directory
("svn propset mergeWithUpstream 1 debian").
.PP
The default behaviour is as follows:
.P
Check the working directory, complain on uncommited files (also see \-\-svn\-ignore\-new)
.P
Copy the orig tarball to the build area if necessary (also see \-\-svn\-no\-links)
.P
Extract the tarball (in merge mode) or export the svn work directory to the build directory (also see below and \-\-svn\-no\-links)
.P
Build with dpkg-buildpackage (also see \-\-svn\-builder, \-\-svn\-lintian, etc.)
.P
Create a changelog entry for the future version
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
Show the help message
.TP
\fB\-\-svn\-verbose\fR
More verbose program output
.TP
\fB\-\-svn\-dont\-clean\fR
Don't run debian/rules clean (default: clean first)
.TP
\fB\-\-svn\-dont\-purge\fR
Don't remove the build directory when the build is done. (Default:
remove after successful build)
.TP
\fB\-\-svn\-export\fR
Just export the working directory and do neccessary code merge operations, then exit.
.TP
\fB\-\-svn\-no\-links\fR
Don't use file links but try to export or do hard copies of the working
directory (default: use links where possible). This is useful if your package fails
to build because some files, empty directories, broken links, ... cannot not
be transported with in the default link-copy mode.
.TP
\fB\-\-svn\-ignore\-new\fR, \fB\-\-svn\-ignore\fR
Don't stop on svn conflicts or new/changed files. To set this behaviour for
single files set the "deb:ignoreM" property to 1 on them. Also see documentation of the svn:ignore property in the SVN book.
.TP
\fB\-\-svn\-tag\fR
Final build: Tag, export, build cleanly & make
new changelog entry
.TP
\fB\-\-svn\-tag\-only, \-\-svn\-only\-tag\fR
Don't build the package, do only the tag copy
.TP
\fB\-\-svn\-retag\fR
If an existing target directory has been found while trying to create the tag
copy, remove the target directory first.
.TP
\fB\-\-svn\-reuse\fR
If possible, reuse an existing build directory in subsequent builds. The build
directory is not purged after the build, it is not renamed when a build starts
and the files are just copied over into it. Useful in mergeWithUpstream mode
with large packages.
.TP
\fB\-\-svn\-lintian\fR, \fB\-\-svn\-linda\fR
Run lintian or linda on the resulting changes file when done.
.TP
\fB\-\-svn\-move\fR
When done, move the created files (as listed in .changes) to the parent
directory, relative to the one where svn-buildpackage was started.
.TP
\fB\-\-svn\-move-to\fR=...
Specifies the target directory to move generated files to.
.TP
\fB\-\-svn\-pkg\fR=packagename
Overrides the detected package name. Use with caution \- it could be set too
late during the processing (eg. still have the old value when expanding shell
variables).
.TP
\fB\-\-svn\-override\fR=var=value,anothervar=value
Overrides any config variable that has been autodetected or found in .svn/deb\-layout.
.TP
\fB\-\-svn\-builder\fR=COMMAND
Specifies alternative build command instead of dpkg-buildpackage, eg. debuild,
pdebuild, etc.
WARNING: shell quotation rules do not completely apply here, better use
wrappers for complex constructs. Using this option may break --svn-lintian,
--svn-linda and --svn-move functionality. Some functions may be disabled when a
custom build command is used because the output file location is not
predictable.
.TP
\fB\-\-svn\-pass\-diff\fR
Experimental function to generate the .diff.gz contents using svn and pass it
to dpkg-buildpackage. Requires a hacked dpkg-buildpackage script.
.TP
\fB \-\-svn\-prebuild, \-\-svn\-postbuild, \-\-svn\-pretag, \-\-svn\-posttag\fR
Commands (hooks) to be executed before/after the build/tag command invocations.
Examples to fetch the orig tarball from a local pool (trying pool/libX/... to):
.TP
\fB \-\-svn\-noninteractive\fR
With this parameter svn-buildpackage will not interact with use
.P
.RS
.PD 0
svn-buildpackage
--svn-prebuild='a="wget -c http://mymirror/debian/main/pool/";
b="/$package/${package}_${upstream_version}.orig.tar.gz";
$a$(echo $package|cut -c0-1)$b || $a$(echo $package | cut -c0-4)$b'
.P
Multiple retries with a bashism:
.P
svn-buildpackage --svn-prebuild='wget -c http://mymirror/debian/main/pool/{`echo $package | cut -c0-1`,`echo $package | cut -c0-4`}/$package/${package}_${upstream_version}.orig.tar.gz'
.P
Or using a bounty, see below...
.P
svn-b --svn-prebuild="wget http://mymirror/debian/main/pool/$guess_loc"
.RE
.TP
\fB \-\-svn\-noninteractive\fR
With this parameter svn-buildpackage will not interact with the user
.SH CONFIGURATION FILE
svn\-buildpackage's behaviour can be modified using the file
\fB~/.svn\-buildpackage.conf\fR. Additional parts can be added in each package
working directory using the file \fB.svn/svn\-buildpackage.conf\fR.
It is essentially a list of the long command line options (without leading
minus signs), one argument per line (without quotes surrounding
multi-word arguments). The variables are expanded with the system shell if
shell variables are found there. Avoid ~ sign because of unreliable
expansion: it is better to use $HOME instead.
Example:
.RS
.PD 0
svn-builder=debuild -EPATH
.P
svn-no-links
.P
svn-override=origDir=$HOME/debian/upstream/$PACKAGE
.P
# svn-ignore-new
.P
#svn-lintian
.PD
.RE
.SH DIRECTORY LAYOUT HANDLING
By default, svn-buildpackage expects a configuration file with path/url
declaration, .svn/deb\-layout. The values there can be overridden with the
\fB\-\-svn\-override\fR
option, see above. If a config file could not be found, the settings are
autodetected following the usual assumptions about local directories and
repository layout. In addition, the contents of a custom file
debian/svn\-deblayout will be imported during the initial configuration. Package
maintainers can store this file in the repository to pass correct defaults to
new svn-buildpackage users. The format is the same as in the file .svn/deb\-layout.
As an alternative to the debian/svn\-deblayout file, maintainers can set
Subversion properties for the debian/ directory; any properties of debian/
which have a name of the form svn\-bp:PROP will be the source of a PROP
setting which has the value indicated by the first line of the property value.
.SH ENVIRONMENT VARIABLES
The following environment variables are exported by \fBsvn-buildpackage\fR and can
be used in hook commands or the package build system.
.TP
\fBPACKAGE\fR, \fBpackage\fR
The source package name
.TP
\fBSVN\_BUILDPACKAGE\fR
Version of svn-buildpackage
.TP
\fBTAG\_VERSION\fR, \fBdebian\_version\fR
The complete Debian version string, also used for the tag copy
.TP
\fBnon\_epoch\_version\fR
Same as debian\_version but without any epoch strings
.TP
\fBupstream\_version\fR
Same as debian\_version but without Debian extensions
.TP
\fBguess\_loc\fR
Guessed upstream source package name in the pool, something like libm/libmeta-html-perl_3.2.1.0.orig.tar.gz
.TP
\fBDIFFSRC\fR
(experimental) shows the location of generated diff file
.P
The following variables are understood by svn-buildpackage:
.TP
\fBFORCETAG\fR
Ignore the signs of an incomplete changelog and tag the repository anyway
.TP
\fBFORCEEXPORT\fR
Export upstream source from the repository even if mergeWithUpstream property is set
.TP
\fBDEBIAN_FRONTEND\fR
If DEBIAN_FRONTEND is set to 'noninteractive' --svn-noninteractive is called
silently
.SH RECOMMENDATIONS
Use shell aliases. Here are some examples for Bash:
.RS
.PD 0
alias svn-b="svn-buildpackage -us -uc -rfakeroot --svn-ignore";
alias svn-br="svn-b --svn-dont-purge --svn-reuse";
alias svn-bt="svn-buildpackage --svn-tag -rfakeroot";
.PD
.RE
Those commands have respective meanings:
.RS
.PD 0
build regardless of new or changed files;
build regardless of new or changed files and reuse the build directory;
build (for upload) and tag.
.PD
.RE
.P
SSH is the easiest way to access remote repositories, although it usually
requires entering a password more frequently with svn\-buildpackage.
Workarounds include using an ssh key without a passphrase (although this is
insecure and still relatively slow), or the SSH connection caching feature
present in recent versions of SSH. For details, see the svn\-buildpackage
manual.
.P
Another way to get a remote link is using the Subversion DAV module (with SSL
and Apache user authentication), see the svn\-buildpackage HOWTO manual for details.
.SH "SEE ALSO"
The svn\-buildpackage HOWTO manual (in /usr/share/doc/svn-buildpackage/),
svn\-inject(1), svn\-upgrade(1), svn(1), dpkg\-buildpackage(1), lintian(1).
|