Differences between revisions 20 and 21
Revision 20 as of 2013-12-25 15:38:56
Size: 6221
Comment: some minor fixes
Revision 21 as of 2014-12-21 07:02:17
Size: 6232
Editor: AnthonyFok
Comment: Typo fixes.
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
svn-buildpackage is a tool which helps in maintainance of packages with Subversion. svn-buildpackage is a tool which helps in maintenance of packages with Subversion.
Line 13: Line 13:
 * storing layout information can be done in subversion properties of the debian/ directory
 * store the following information in the layout information (via svn-bp:* properties of the debian/ directory)
 * storing layout information can be done in Subversion properties of the debian/ directory
 * store the following information in the layout information (via {{{svn-bp:*}}} properties of the debian/ directory)
Line 56: Line 56:
 * As svn-buildpackage makes sense with a team, you must first joint a the team which is using this tool, and have an account in its SVN repository
 * chechout the tree which provides the collaborative data:
 * As svn-buildpackage makes sense with a team, you must first join a team which is using this tool, and have an account in its SVN repository
 * checkout the tree which provides the collaborative data:
Line 78: Line 78:
 * Just beware: ${devroot} must be changed by the effective path to the package directories; $PACKAGE is written litterally.  * Just beware: ${devroot} must be changed by the effective path to the package directories; $PACKAGE is written literally.
Line 81: Line 81:
 * I will work on the package {{{jmol}}}. My first step is to retreive its last upstream version. So I cd to the jmol subdirectory of the team-maintained tree, and I use {{{uscan}}} to get the last version:  * I will work on the package {{{jmol}}}. My first step is to retrieve its last upstream version. So I {{{cd}}} to the {{{jmol}}} subdirectory of the team-maintained tree, and I use {{{uscan}}} to get the last version:

Translation(s): English - Italiano


svn-buildpackage is a tool which helps in maintenance of packages with Subversion.

Group maintainance HowTo

Rules:

  • storing layout information can be done in Subversion properties of the debian/ directory
  • store the following information in the layout information (via svn-bp:* properties of the debian/ directory)

    • upstream tarball - layout information origUrl (this will allow a workflow like the one described in Games/Development/BuildProcess)

    • set all the URL fields:
      • trunkUrl
      • tagsUrl (use URI for authenticated users)
      • branchesUrl
  • specify layout information by using relative paths

Examples

origUrl specification:

eddy@bounty ~/usr/src/games/trunk/wormux $ svn pl debian/ | grep svn-bp
  svn-bp:origUrl
eddy@bounty ~/usr/src/games/trunk/wormux $ svn pg svn-bp:origUrl debian/
http://pkg-games.alioth.debian.org/tarballs/wormux_0.7.9.orig.tar.gz

Relative information:

origDir=..
trunkDir=.
buildArea=../build-area

Introduction for a beginner, with debichem

These lines have been written when I began to join the team Debichem.

Paths

Everyone has particular habits: I used to manage all of my packages in directories like ${HOME}/development/$PACKAGE

For example the package "units-filter" was managed inside ${HOME}/development/units-filter, and this directory contained files like ${HOME}/development/units-filter/units-filter_3.5.orig.tar.gz

From now on, the particular directory ${HOME}/development will be named ${devroot}.

Getting the team's work into my computer

  • As svn-buildpackage makes sense with a team, you must first join a team which is using this tool, and have an account in its SVN repository
  • checkout the tree which provides the collaborative data:

cd ${devroot}
svn checkout svn+ssh://svn://svn.debian.org/blends/projects/debichem/trunk/debichem
  • this creates a directory ${devroot}/debichem with all of the team's work, which will be tracked by SVN.

  • the data in this directory can be refreshed by the following command:

cd ${devroot}/debichem
svn update

Configurations

  • I created a configuration file ~/.svn-buildpackage.conf containing these lines:

svn-override=origDir=${devroot}/$PACKAGE
svn-override=buildArea=${devroot}/$PACKAGE
  • Just beware: ${devroot} must be changed by the effective path to the package directories; $PACKAGE is written literally.

Working on the package jmol

  • I will work on the package jmol. My first step is to retrieve its last upstream version. So I cd to the jmol subdirectory of the team-maintained tree, and I use uscan to get the last version:

cd ${devroot}/debichem/unstable/jmol
mkdir ${devroot}/jmol
uscan --force-download --devroot ${devroot}/jmol
  • As a result, I wait some time before I see that feedback:

jmol: Version (13.2.3) available on remote site:
  http://qa.debian.org/watch/sf.php/jmol/Jmol-13.2.3-full.tar.gz
  (local version is 13.0.15+dfsg, mangled local version number 13.0.15)
jmol: Successfully downloaded updated package Jmol-13.2.3-full.tar.gz
    and symlinked jmol_13.2.3.orig.tar.gz to it
+ UPSTREAM_VERSION=13.2.3
+ ORIG_TARBALL= ...
... [ many other lines ] ...
+ exit 0
  • the file ${devroot}/jmol/jmol_13.2.3+dfsg.orig.tar.gz is created successfully.

here are the next hints from Daniel Leidert

- To do some patching or check compilation you can do `svn-do`. In the
  resulting path you can create or modify patches. Do `exit` and all changes
  will be copied to the subversion tree (including changed or added patch
  files). Do `exit 1` or similar and all changes will be dropped.

Tricks

Just tag, no dependency checks

svn-buildpackage --svn-tag-only -d

Obtaining the unpacked source package without building

svn-buildpackage -d --svn-export

or

svn-buildpackage -d --svn-builder echo

Modifing easily packages which are partially imported (sources which have the mergeWithUpstream option set)

All of the following commands use the svn-do wrapper script which is present in /usr/bin/svn-do (in older versions svn-do was in /usr/share/svn-buildpackage/contrib/svn-do)

# clean the tree (useful if this requires the full source tree)
% svn-do debclean
I: Exporting source tree via svn-buildpackage...
[...]
I: Running command: debclean
[...]
I: Copying back the debian/ tree...
`debian/control' ->
`/home/lool/svn/debian/pkg-gnome/desktop/unstable/nautilus-cd-burner/debian/control'

# use quilt to refresh a patch
% QUILT_PATCHES=debian/patches svn-do \
     sh -c "quilt push 002_static-linking-dont-build-perf.patch; quilt refresh"
[...]
I: Copying back the debian/ tree...
[...]
`debian/patches/002_static-linking-dont-build-perf.patch' ->
`/home/lool/svn/debian/pkg-gnome/desktop/experimental/gtk+2.0/debian/patches/002_static-linking-dont-build-perf.patch'

# start a source editing session and decide later not to copy back the
# debian/ tree
% svn-do $SHELL
[...]
I: Running command: /bin/zsh
% exit 1
E: command exited with 1; not copying back the debian/ tree.

# edit a patch in a CDBS' simple-patchsys based package
% svn-do cdbs-edit-patch 02_pmount.patch
[...]

Development

svn-buildpackage is currently maintained as part of the collab-maint repository. To join the development team, check it out, join the channel #debian-svn-bp on OFTC, subscribe to PTS on http://packages.qa.debian.org/s/svn-buildpackage.html. There are some potential improvements that could be made.

Obtaining the current svn-buildpackage can be done via the following command:

debcheckout svn-buildpackage

or, if you want to use authorized access (requires an account on Alioth):

debcheckout -a svn-buildpackage