~ubuntu-branches/ubuntu/breezy/svn-buildpackage/breezy

« back to all changes in this revision

Viewing changes to doc/svn-buildpackage.1

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2005-06-22 22:58:16 UTC
  • mfrom: (1.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050622225816-3xp527bqyy0gfhel
Tags: 0.6.9
using "cp" for .orig.tar.gz copying again, more reliable

Show diffs side-by-side

added added

removed removed

Lines of Context:
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).
 
11
.PP
 
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").
 
20
.PP
 
21
The default behaviour is following:
 
22
.P
 
23
Check the working directory, complain on uncommited files (also see \-\-svn\-ignore\-new)
 
24
.P
 
25
Copy the orig tarball to the build area if neccessary (also see \-\-svn\-no\-links)
 
26
.P
 
27
Extract the tarball (in merge mode) or export the svn work directory to the build directory (also see below and \-\-svn\-no\-links)
 
28
.P
 
29
Build with dpkg-buildpackage (also see \-\-svn\-builder, \-\-svn\-lintian, etc.)
 
30
.P
 
31
Create a changelog entry for the future version
 
32
.SH OPTIONS
11
33
.TP
12
34
\fB\-h\fR, \fB\-\-help\fR
13
35
Show the help message
14
36
.TP
 
37
\fB\-\-svn\-verbose\fR
 
38
More verbose program output
 
39
.TP
15
40
\fB\-\-svn\-dont\-clean\fR
16
41
Don't run debian/rules clean (default: clean first)
17
42
.TP
19
44
Don't run remove the build directory when the build is done. (Default:
20
45
wipe after successfull build)
21
46
.TP
 
47
\fB\-\-svn\-export\fR
 
48
Just export the working directory and do neccessary code merge operations, then exit.
 
49
.TP
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.
24
55
.TP
25
56
\fB\-\-svn\-ignore\-new\fR
26
57
Don't stop on svn conflicts or new/changed files
27
58
.TP
28
 
\fB\-\-svn\-verbose\fR
29
 
More verbose program output
30
 
.TP
31
59
\fB\-\-svn\-tag\fR
32
60
Final build: Tag, export, build cleanly & make
33
61
new changelog entry
34
62
.TP
 
63
\fB\-\-svn\-tag\-only, \-\-svn\-only\-tag\fR
 
64
Don't build the package, do only the tag copy
 
65
.TP
 
66
\fB\-\-svn\-retag\fR
 
67
If an existing target directory has been found while trying to create the tag
 
68
copy, remove the target directory first.
 
69
.TP
35
70
\fB\-\-svn\-lintian\fR
36
71
Run lintian in the build area when done
37
72
.TP
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.
41
76
.TP
 
77
\fB\-\-svn\-move-to\fR=...
 
78
Specifies the target directory to move generated files to. 
 
79
.TP
 
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
 
83
variables).
 
84
.TP
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.
44
87
.TP
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.
50
 
.PP
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.
 
93
.TP
 
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.
 
97
.TP
 
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):
 
101
.P
 
102
.RS
 
103
.PD 0
 
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'
 
105
.P
 
106
Multiple retries with a bashism:
 
107
.P
 
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'
 
109
.P
 
110
Or using a bounty, see below...
 
111
.P
 
112
svn-b --svn-prebuild="wget http://mymirror/debian/main/pool/$guess_loc"
 
113
.RE
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.
61
122
Example:
62
 
 
63
123
.RS
64
124
.PD 0
65
 
svn-builder=dpkg-buildpackage -us -uc -rfakeroot
66
 
.P
67
 
svn-lintian
 
125
svn-builder=debuild -EPATH
68
126
.P
69
127
svn-no-links
70
128
.P
 
129
svn-override=origDir=$HOME/debian/upstream/$PACKAGE
 
130
.P
71
131
# svn-ignore-new
72
 
.PD
73
 
.RE
74
 
 
 
132
.P
 
133
#svn-lintian
 
134
.PD
 
135
.RE
 
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.
 
146
 
 
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.
 
150
.TP
 
151
\fBPACKAGE\fR, \fBpackage\fR
 
152
The source package name
 
153
.TP
 
154
\fBSVN\_BUILDPACKAGE\fR
 
155
Version of svn-buildpackage
 
156
.TP
 
157
\fBTAG\_VERSION\fR, \fBdebian\_version\fR
 
158
The complete Debian version string, also used for the tag copy
 
159
.TP
 
160
\fBnon\_epoch\_version\fR
 
161
Same as debian\_version but without any epoch strings
 
162
.TP
 
163
\fBupstream\_version\fR
 
164
Same as debian\_version but without Debian extensions
 
165
.TP
 
166
\fBguess\_loc\fR
 
167
Guessed upstream source package name in the pool, something like libm/libmeta-html-perl_3.2.1.0.orig.tar.gz
 
168
.TP
 
169
\fBDIFFSRC\fR
 
170
(experimental) shows the location of generated diff file
 
171
.P
 
172
Following variables are understood by svn-buildpackage:
 
173
.TP
 
174
\fBFORCETAG\fR
 
175
Tells to ignore the signs for an incomplete changelog
 
176
.TP
 
177
\fBFORCEEXPORT\fR
 
178
Export upstream source from the repository even if mergeWithUpstream property is set
 
179
 
 
180
.SH RECOMMENDATIONS
 
181
First thing, using shell aliases makes sense. Example for the Bash:
 
182
.RS
 
183
.PD 0
 
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"
 
187
.PD
 
188
.RE
 
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".
 
191
.P
 
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.
 
198
.P
 
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.
75
201
.SH "SEE ALSO"
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).