NAME
svn-buildpackage - build Debian packages from SVN repositorySYNOPSIS
svn-buildpackage
[[
OPTIONS... ] [ OPTIONS for
dpkg-buildpackage ]]
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). 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
$ svn propset useNativeDist 1 debian
OPTIONS
svn-buildpackage accepts the following options on the command-line: --svn-builder=COMMANDSpecifies alternative build command instead of
dpkg-buildpackage, eg. debuild, pdebuild, etc. Every
parameter that svn-buildpackage doesn't know ( --svn-*) is
passed to COMMAND. There is no difference between the command line and
config file parameters . They are used at the same time.
WARNING: shell quotation rules do not completely apply here, better use wrappers
for complex constructs. Using this option may break --svn-lintian and
--svn-move functionality. Some functions may be disabled when a custom
build command is used because the output file location is not predictable.
Default: use dpkg-buildpackage.
--svn-ignore-new | --svn-ignore
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.
Default: Stop on conflicts or new/changed files.
--svn-dont-clean
Don't run debian/rules clean.
Default: clean first
--svn-no-links
Don't use file links but try to export or do
hard copies of the working directory. This is useful if your package fails to
build because some files, empty directories, broken links, ... cannot be
transported with in the default link-copy mode.
Default: use links where possible.
--svn-dont-purge
Don't remove the build directory when the
build is done.
Default: remove after successful build.
--svn-reuse
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.
Default: build directory is removed.
--svn-rm-prev-dir
If a previous build directory is found, remove
it before building instead of renaming it. If --svn-reuse is also given
in the same line, the reuse behaviour occurs.
Default: rename old directories with a ' obsolete' suffix.
--svn-export
Just export the working directory and do
necessary code merge operations, then exit.
Default: Off.
--svn-tag
Final build: Tag, export, build cleanly &
make new changelog entry.
Default: Off.
--svn-tag-only | --svn-only-tag
Don't build the package, do only the tag copy.
Default: Off.
--svn-retag
If an existing target directory has been found
while trying to create the tag copy, remove the target directory first.
Default: Off.
--svn-noautodch
No new Debian changelog entry is added
automatically.
Default: A new UNRELEASED changelog entry is set via dch.
--svn-lintian
Run lintian on the resulting changes file when
done.
Default: Off.
--svn-move
When done, move the created files (as listed
in .changes) to the parent directory, relative to the one where
svn-buildpackage was started.
Default: Off.
--svn-move-to=...
Specifies the target directory to which to
move the generated files.
Default: Off. (Files are left where the build command puts them.)
--svn-pkg=packagename
Overrides the detected package name. Use with
caution since it could be set too late during the processing (eg. still have
the old value when expanding shell variables).
Default: Off.
--svn-arch=ARCH
Allows specifying the build architecture (e.g.
i386 build on an amd64 machine).
Default: Off.
--svn-override=var=value,anothervar=value
Overrides any config variable that has been
autodetected or found in .svn/deb-layout.
Default: Off.
--svn-prebuild | --svn-postbuild | --svn-pretag |
--svn-posttag
Commands (hooks) to be executed before/after
the build/tag command invocations, e.g. to download the orig tarballs from the
archive. Shell code can be emdded here though it is not recommended. Various
helping variables are available in the environment, see ENVIRONMENT VARIABLES
below for detailed explanation.
Please note that the prebuild and postbuild hooks replace the normal prebuild
and postbuild actions of svn-buildpackage. For prebuild, this means
that the build dependencies will not be checked. For postbuild, this means
that the resulting files won't be moved, and lintian will not be run.
Defaults: Off.
--svn-noninteractive
With this parameter svn-buildpackage
will not interact with the user.
Default: Off.
--svn-savecfg
By default, svn-buildpackage used to
create .svn/deb-layout on every invocation. Since version 0.6.22 this
behaviour is deprecated.
With this parameter svn-buildpackage will (partly) replicate the old
behaviour. In contrast to the deprecated behaviour, the .svn/deb-layout
is regarded as a local override; the old behaviour simply ignored any
versioned layout information if it found .svn/deb-layout.
This option was provided since it can be useful when creating a local override
file.
Default: Off.
--svn-download-orig
This option makes svn-buildpackage try
to download the upstream tarball using apt and uscan.
Default: Off.
--svn-verbose
More verbose program output.
Default: Off.
-h | --help
Show the help message.
EXAMPLES
For more detailed information on how to use svn-buildpackage, see the HOWTO http://svn-bp.alioth.debian.org/[1]. To start working with existing native Debian package from a *.dsc file, import it into the repository with command:svn-inject package_0.1.dsc svn://host/debian/devel/packages
svn-inject -o package_0.1-2.dsc svn://host/debian/devel/packages
svn mkdir ../tarballs svn propset svn:ignore "*" ../tarballs uscan --force-download --destdir ../tarballs
svn-buildpackage --svn-lintian -us -uc -rfakeroot
svn mkdir ../build-area # To store results svn propset svn:ignore "*" ../build-area svn-buildpackage --svn-ignore-new --svn-builder=pdebuild
svn status # Check that there are no uncommited changes svn-upgrade --verbose ../package-2.0.tar.gz
CONFIGURATION FILE
svn-buildpackage's behaviour can be modified using the file ~/.svn-buildpackage.conf. Additional parts can be added in each package working directory using the file .svn/svn-buildpackage.conf. 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:svn-builder=debuild -EPATH svn-no-links svn-override=origDir=$HOME/debian/upstream/$PACKAGE # svn-ignore-new #svn-lintian
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 --svn-override 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. If a full svn URL is not given, the repository root will be prepended to this value.ENVIRONMENT VARIABLES
The following environment variables are exported by svn-buildpackage and can be used in hook commands or the package build system. PACKAGE, packageThe source package name.
SVN_BUILDPACKAGE
Version of svn-buildpackage.
TAG_VERSION, debian_version
The complete Debian version string, also used
for the tag copy.
non_epoch_version
Same as debian_version but without any
epoch strings.
upstream_version
Same as debian_version but without Debian
extensions
guess_loc
Guessed upstream source package name in the
pool, something like libm/libmeta-html-perl_3.2.1.0.orig.tar.gz
DIFFSRC
(experimental) shows the location of generated
diff file
All the layout properties are exported to the environment, too. The following
ones have meaning to svn-buildpackage.
buildArea
the location of build area directory
trunkUrl
the URL of the trunk directory for the current
package.
tagsUrl
the URL of the tags base directory for the
current package.
origDir
the local directory where the orig tarball
should be located.
origUrl
the URL from where the orig tarball for the
current package can be pulled from.
The following variables are understood by svn-buildpackage:
FORCETAG
Ignore the signs of an incomplete changelog
and tag the repository anyway.
FORCEEXPORT
Export upstream source from the repository
even if mergeWithUpstream property is set.
DEBIAN_FRONTEND
If DEBIAN_FRONTEND is set to
'noninteractive' --svn-noninteractive is called silently.
RECOMMENDATIONS
Use shell aliases. Here are some examples for Bash: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"
SEE ALSO
/usr/share/doc/svn-buildpackage/()The svn-buildpackage HOWTO manual
svn-inject(1)
puts a Debian source package into Subversion
repository
svn-upgrade(1)
upgrade source package from a new upstream
revision
svn(1)
Subversion command line client tool
dpkg-buildpackage(1)
Debian source package tools
lintian(1)
Debian package checker
AUTHORS
Eduard BlochThis manual page was written by Eduard Bloch
in roff.
Goneri Le Bouder
Converted manpages to SGML.
Neil Williams
Converted manpages to DocBook XML and current
Debian maintainer
COPYRIGHT
Copyright © 2009 Eduard BlochNOTES
May 2009 | Release: 0.8.2 |