[ Please don't Cc: public replies to me. ] "David Engel": > I'm thinking of using CVS or PRCS on my Debian packages to help me > keep my own and third-party patches straight. Is anyone else doing > this, and if so, how do you make it work with the Debian source > packaging system? Here's what I do: 1. Import the sources into CVS. 2. Tag the upstream version 1.2.3.4 with a CVS tag of the form `version_1_2_3_4'. 3. Make any changes and additions (debian/*) necessary for Debian. 4. Tag the Debian specific version of the sources with a CVS tag of the form `debian_version_1_2_3_4_1' (for 1.2.3.4-1). 5. Set up a build area for the package. All packages will be built in this directory. 6. Build the package with my cvs2deb script (attached), which creates the .orig.tar.gz, if it doesn't exist already (this is why all builds must be done in the same directory -- otherwise the .orig.tar.gz won't have the same MD5), by exporting from CVS using the `version_foo' tag, and then creates the Debian diffs by exporting using the `debian_version_foo' tag. This works for me. I haven't yet investigated the cvs-buildpackage solution, though I probably should.
#!/bin/sh # # Extrace sources for a Debian package from CVS and build the package. set -e originalsource=no options='' rootcmd=fakeroot more=yes while [ "$more" = yes ] do case "$1" in -u|--unsigned) options="$options -us -uc" ; shift ;; -o|--original) originalsource=yes; shift; exit "-o|--original doesn't work"; exit 1 ;; -s|--sudo) rootcmd=sudo; shift ;; *) more=no ;; esac done package="$1" version="$2" if [ -z "$3" ] then cvsmodule="$1" else cvsmodule="$3" fi upstreamversion=`echo $version | sed 's/-[0-9.]*$//'` tagversion=`echo "$version" | sed 's/^[^_]*_//' | tr .- _` debiantag=debian_version_`echo "$version" | sed 's/^[^_]*_//' | tr .- _` upstreamtag=version_`echo "$upstreamversion" | sed 's/^[^_]*_//' | tr .- _` dir="$package-$upstreamversion" case "$version" in *-*) ;; *) originalsource=yes ;; esac rm -rf "$dir" "$dir.orig" # Note: don't remove "$dir.orig.tar.gz" cvs -Q export -d "$dir.orig" -r "$upstreamtag" "$cvsmodule" if [ "$originalsource" = yes ] then options="$options -sa" mv "$dir.orig" "$dir" else cvs -Q export -d "$dir" -r "$debiantag" "$cvsmodule" fi for d in "$dir" "$dir.orig" do [ -d "$d" ] && find "$d" -name configure.in | while read i; do (cd `dirname $i`; autoconf); done done cd "$dir" dpkg-buildpackage -r$rootcmd $options
Attachment:
pgpfEJTbLAakd.pgp
Description: PGP signature