8
8
Builds Debian package within the SVN repository. The source code
9
9
repository must be in the format created by svn\-inject, and this script
10
10
must be executed from the work directory (trunk/package).
12
By default, the working directory is used as the main source directory
13
(assuming the whole upstream source is beeing stored in the repository). The
14
alternative is so called "merge mode". With this method, only the debian
15
directory (and maybe some other modified files) are stored in the repository.
16
At build time, the contents of the svn trunk are copied to the extracted
17
tarball contents (and can overwrite parts of it). To choose this working model,
18
set the svn property mergeWithUpstream on the Debian directory
19
("svn propset mergeWithUpstream 1 debian").
21
The default behaviour is following:
23
Check the working directory, complain on uncommited files (also see \-\-svn\-ignore\-new)
25
Copy the orig tarball to the build area if neccessary (also see \-\-svn\-no\-links)
27
Extract the tarball (in merge mode) or export the svn work directory to the build directory (also see below and \-\-svn\-no\-links)
29
Build with dpkg-buildpackage (also see \-\-svn\-builder, \-\-svn\-lintian, etc.)
31
Create a changelog entry for the future version
12
34
\fB\-h\fR, \fB\-\-help\fR
13
35
Show the help message
37
\fB\-\-svn\-verbose\fR
38
More verbose program output
15
40
\fB\-\-svn\-dont\-clean\fR
16
41
Don't run debian/rules clean (default: clean first)
19
44
Don't run remove the build directory when the build is done. (Default:
20
45
wipe after successfull build)
48
Just export the working directory and do neccessary code merge operations, then exit.
22
50
\fB\-\-svn\-no\-links\fR
23
Don't use file links (default: use where possible)
51
Don't use file links but try to export or do hard copies of the working
52
directory (default: use links where possible). This is useful if your package fails
53
to build because some files, empty directories, broken links, ... cannot not
54
be transported with in the default link-copy mode.
25
56
\fB\-\-svn\-ignore\-new\fR
26
57
Don't stop on svn conflicts or new/changed files
28
\fB\-\-svn\-verbose\fR
29
More verbose program output
32
60
Final build: Tag, export, build cleanly & make
33
61
new changelog entry
63
\fB\-\-svn\-tag\-only, \-\-svn\-only\-tag\fR
64
Don't build the package, do only the tag copy
67
If an existing target directory has been found while trying to create the tag
68
copy, remove the target directory first.
35
70
\fB\-\-svn\-lintian\fR
36
71
Run lintian in the build area when done
39
74
When done, move the created files (as listed in .changes) to the parent
40
75
directory, relativ to the one where svn-buildpackage was started.
77
\fB\-\-svn\-move-to\fR=...
78
Specifies the target directory to move generated files to.
80
\fB\-\-svn\-pkg\fR=packagename
81
Overrides the detected package name, use with caution. May be set too late
82
during the processing (ie. still have the old value when expanding shell
42
85
\fB\-\-svn\-override\fR=var=value,anothervar=value
43
86
Overrides any config variable that has been autodetected or found in .svn/deb\-layout.
45
88
\fB\-\-svn\-builder\fR=COMMAND
46
89
Specifies alternative build command instead of dpkg-buildpackage, eg.
47
debuild, pdebuild... WARNING: shell quotation rules do not apply here,
48
better use wrappers for complex constructs. Using this option may break
90
debuild, pdebuild... WARNING: shell quotation rules do not completely apply
91
here, better use wrappers for complex constructs. Using this option may break
49
92
--svn-lintian and --svn-move functionality.
51
If debian/ is the only directory in the Debian source, or the file
52
debian/merge\-with\-upstream has been found, svn\-buildpackage will extract
53
\&.orig.tar.gz file first and add the Debian files to it.
94
\fB\-\-svn\-pass\-diff\fR
95
Experimental function to generate the .diff.gz contents using svn and pass it
96
to dpkg-buildpackage. Requires a hacked dpkg-buildpackage script.
98
\fB \-\-svn\-prebuild, \-\-svn\-postbuild, \-\-svn\-pretag, \-\-svn\-posttag\fR
99
Commands (hooks) to be executed before/after the build/tag command invocations.
100
Examples to fetch the orig tarball from a local pool (trying pool/libX/... to):
104
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'
106
Multiple retries with a bashism:
108
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'
110
Or using a bounty, see below...
112
svn-b --svn-prebuild="wget http://mymirror/debian/main/pool/$guess_loc"
54
114
.SH CONFIGURATION FILE
55
115
svn\-buildpackage's behaviour can be modified using the file
56
116
\fB~/.svn\-buildpackage.conf\fR.
57
117
It is basicaly a list of the long command line options (without leading
58
118
minus signs), one argument per line (but without quotes embrassing
59
multi-word arguments). WARNING: shell quotation rules do
60
not apply here, better use shell aliases for complex constructs.
119
multi-word arguments). The variables are expanded with the system shell if
120
potential shell variables were found there. Avoid ~ sign because of unreliable
121
expansion, better use $HOME instead.
65
svn-builder=dpkg-buildpackage -us -uc -rfakeroot
125
svn-builder=debuild -EPATH
129
svn-override=origDir=$HOME/debian/upstream/$PACKAGE
136
.SH DIRECTORY LAYOUT HANDLING
137
By default, svn-buildpackage expects a configuration file with path/url
138
declaration, .svn/deb\-layout. The values there can be overriden with the
139
\fB\-\-svn\-override\fR
140
option, see above. If a config file could not be found, the settings are
141
autodetected following the usual assumptions about local directories and
142
repository layout. In addition, the contents of a custom file
143
debian/svn\-deblayout will be imported during the initial configuration. Package
144
maintainers can store this file in the repository to pass correct defaults to
145
new svn-buildpackage users. The format is the same as in the file .svn/deb\-layout.
147
.SH ENVIRONMENT VARIABLES
148
Following environment variables are exported by \fBsvn-buildpackage\fR and can
149
be used in hook commands or the package build system.
151
\fBPACKAGE\fR, \fBpackage\fR
152
The source package name
154
\fBSVN\_BUILDPACKAGE\fR
155
Version of svn-buildpackage
157
\fBTAG\_VERSION\fR, \fBdebian\_version\fR
158
The complete Debian version string, also used for the tag copy
160
\fBnon\_epoch\_version\fR
161
Same as debian\_version but without any epoch strings
163
\fBupstream\_version\fR
164
Same as debian\_version but without Debian extensions
167
Guessed upstream source package name in the pool, something like libm/libmeta-html-perl_3.2.1.0.orig.tar.gz
170
(experimental) shows the location of generated diff file
172
Following variables are understood by svn-buildpackage:
175
Tells to ignore the signs for an incomplete changelog
178
Export upstream source from the repository even if mergeWithUpstream property is set
181
First thing, using shell aliases makes sense. Example for the Bash:
184
alias svn-b="svn-buildpackage -us -uc -rfakeroot --svn-ignore"
185
alias svn-br="svn-b --svn-dont-purge --svn-reuse"
186
alias svn-bt="svn-buildpackage --svn-tag -rfakeroot"
189
That simply has the meaning: "just build no matter what", the same without
190
re-exporting on repeated builds and "build for upload and tag".
192
To access remote repositories, the shell access (via ssh) is the easiest way to
193
create the link. However, it requires to enter the password and this happens
194
more often with svn\-buildpackage. There are workarounds: use ssh key
195
without passphrase (insecure and still slow connection) or use the fsh tool
196
which keeps a persistent connection in background and behaves like a rsh/ssh
197
command. For details, see svn\-buildpackage manual.
199
Another way to get a remote link is using the Subversion DAV module (with SSL
200
and Apache user authentication), see svn\-buildpackage HOWTO manual for details.
76
svn\-inject(1), svn\-upgrade(1), dpkg\-buildpackage(1), lintian(1),
77
svn(1), the HOWTO manual (in /usr/share/doc/svn-buildpackage/).
202
The svn\-buildpackage HOWTO manual (in /usr/share/doc/svn-buildpackage/),
203
svn\-inject(1), svn\-upgrade(1), svn(1), dpkg\-buildpackage(1), lintian(1).