[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging automation - separation of 'debian/' directory



Ben Finney <ben@benfinney.id.au> writes:

> I've seen many recommendations that the 'debian/' directory should not
> be part of the 'foo_X.Y.orig.tar.gz' tarball but should always be added
> by the 'foo_X.Y-Z.diff.gz', even in the case of "I *am* the upstream and
> I prefer to track the 'debian/' directory as part of the source tree in
> my VCS".

> So that leads to the question: What "best practices" are there for
> creating the Debian sources ('foo_X.Y.orig.tar.gz', 'foo_X.Y-Z.dsc',
> 'foo_X.Y-Z.diff.gz') automatically from a source working tree that
> already contains the 'debian/' directory?

I just exclude the debian/ directory from make dist so it isn't included
in the official distributions.  Then, to build the final Debian package, I
take the last official distribution, rename the tarball to .orig.tar.gz,
untar it, and then export the latest copy of the debian/ directory from my
revision control system into the newly created build tree.

> Bonus points for a method that *doesn't* involve getting the source
> from version control as part of the package build process. A big part
> of (my) testing is attempting a build of the package from the working
> copy of the source, *before* committing the latest changes to version
> control.

Yup, you can do this from inside your regular working directory, and only
use the above method for building the final packages.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: