On Thu, 28 Jun 2007 10:32:53 +0100 Jonny Lamb <jonnylamb@jonnylamb.com> wrote: > What I have found is that, assuming one is not using any > $vcs-buildpackage tool, it's okay to have the debian/ directory in the > appropriate directory in the vcs. However, only if you do not include it > in EXTRA_DIST. > > This way, any release tarballs will automatically not have the debian/ > directory in, and if one checks out from the vcs then he or she has the > option of creating a package simply as there is an up-to-date debian/ > directory present. However, I'm not sure how useful this is in reality. I find it extremely useful - it is precisely how I handle all my upstream packages for Debian. I then use a simple-ish script that copies the tarball (from make dist) to a clean location, unpacks it, creates an empty debian/ directory and copies the contents of debian/ (and any subdirectories) into the new directory. I've found that the easiest way to do that is with find and tar: tar -czf $debhomedir/debian/debian.tar.gz `find . -name '*CVS*' -prune -o -type d -o -print` $debhomedir is the location of the CVS working copy. find drops the CVS directory (replace that with .svn for subversion), collects up all the other files (retaining permissions) into a list for tar. Then move the tarball and unpack it to populate the debian directory in the clean tree. This has several advantages: 1. The build proceeds with ONLY the contents of debian/ and the released tarball - it is too easy to build in an existing tree and either pick up CVS directories or package files that were left behind by some other process (i.e. your main package build process is similar to a full pbuilder chroot build which is how the autobuilders will handle the upload). 2. You keep the built packages and other ancillary files (like the .changes and the .dsc) away from any existing CVS, removing the need to use .cvsignore or whatever. 3. You get to retain CVS handling of debian/ files. 4. You end up with a new build area that you can easily clean (rm -rf ./*) at the start of each run and which can be the basis for running other build scripts like pdebuild. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
pgpBt7sb1tKy7.pgp
Description: PGP signature