Independent from the ongoing discussion at debian-devel I attach a small README, that explains how to use dpatch with svn-buildpackage in mergeWithUpstream mode. Please don't hesitate to send feedback, suggestions or critics.
Maybe with this README, this bug can be closed. Regards, Daniel
HOWTO use dpatch with a debian/-only VCS layout =============================================== This HOWTO has been primarily written for users of svn-buildpackage in mergeWithUpstream mode. In this case, normally only the debian/- directory and patches (normally in debian/patches/) are stored under VCS-control. This setup does not include the complete package source. However, dpatch already can handle this layout perfectly via the -b swtich. Optional to this switch you can give the full path to the .orig.tar.gz tarball, e.g.: $ dpatch-edit-patch -b /usr/local/src/foo/foo-1.0.tar.gz If you do not provide the tarball, dpatch tries to figure it out via the following steps: - try to get the tarball from the location given via the DPEP_GETORIGTARGZ environment variable or the conf_getorigtargz variable in ${HOME}/.dpatch.conf - try to get the tarball from the Debian archive - try to get the tarball using debian/watch Using the first option, you can configure dpatch to look at the "right" place by defining conf_getorigtargz in ${HOME}/.dpatch.conf. Say for example your sources always reside in /usr/local/src/packages/${PACKAGE}, then add the following to your .dpatch.conf (BASH syntax!) /---- .dpatch.conf ----------------------------------------------------------- # the following is necessary, because dpatch maybe determines the variables # too late PACKAGENAME="$(dpkg-parsechangelog | \ sed -n '/^Source:/{s/^Source:[[:space:]]\+\(.*\)/\1/;p;q}')" UPSTREAMVERSION="$(dpkg-parsechangelog | \ sed -n '/^Version:/{s/^Version:[[:space:]]\+\([0-9]\+:\)\?\([^-]\+\).*/\2/;p;q}')" # simply adjust the following variable for your needs conf_origtargzpath="/usr/local/src/packages/${PACKAGENAME}" \----------------------------------------------------------------------------- Maybe you have different locations, because you are part of several projects. In this case, you can do the following: /---- .dpatch.conf ----------------------------------------------------------- # the following is necessary, because dpatch maybe determines the variables # too late PACKAGENAME="$(dpkg-parsechangelog | \ sed -n '/^Source:/{s/^Source:[[:space:]]\+\(.*\)/\1/;p;q}')" UPSTREAMVERSION="$(dpkg-parsechangelog | \ sed -n '/^Version:/{s/^Version:[[:space:]]\+\([0-9]\+:\)\?\([^-]\+\).*/\2/;p;q}')" # simply adjust the following test and variable for your needs if [[ `pwd` =~ '^.*/debian-med/trunk/packages/.*$' ]] then conf_origtargzpath="/usr/local/src/packages/debian-med/trunk/packages/${PACKAGENAME}" else conf_origtargzpath="/usr/local/src/packages/${PACKAGENAME}" fi \----------------------------------------------------- So you simply run $ dpatch-edit-patch -b in your VCS copy and dpatch automatically figures out the correct place to look for the upstream tarball. -- Daniel Leidert, January 2008 # vim:tw=78