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

Re: native packages

On Tue, 23 Jan 2007 22:09:28 +1100
"Andrew Donnellan" <ajdlinux@gmail.com> wrote:

> > Keep the debian/* files in CVS/SVN.
> > Don't package the debian/* files in the distributed tarball.
> >
> > When building the packages, you simply download the released tarball as
> > usual, copy your debian/* files into place and build. You retain all
> > the advantages of building the unreleased code for test packages direct
> > from CVS/SVN.

> Thanks for the advice; I've just put together a shell script to do all
> this for me. Should this produce a native package?
> #!/bin/bash
> svn update jabbin/
> REVISION=`svn info jabbin/ | grep "Revision" | cut -f 2 -d " "`
> DATE=`date +%Y%m%d`
> DIR="jabbin-$VERSION"
> cp -r jabbin $DIR

Hmm. Can't you use 'make dist' to create a tarball that is at least
close to what will actually be released? 'make dist' will not include
debian/ UNLESS you have made the mistake of putting debian/ in
EXTRA_DIST somewhere.

Use 'make distcheck' to fix the build so that the tarball is usable.
Simply copying the entire tree is likely to result in your debian build
including more files than may be strictly necessary. The presence (and
later absence) of these files could cause complications when you get
close to a release.

> mkdir tmp$DIR
> cd $DIR
> find | grep "\.svn" | xargs rm -rf
> mv debian/ patches/ ../tmp$DIR

That seems wasteful - don't include the debian/ files in the original
tarball / copy operation in the first place. You need to have a tarball
that is as close as possible to the final release in structure -
otherwise your debian build could break when you finally get a release.

> cd ..
> tar cvzf $DIR.orig.tar.gz $DIR

What are you trying to do here? Creating the .orig here looks wrong -
make sure the .orig does NOT include the debian/ files.

> cd $DIR
> mv ../tmp$DIR/* .
> dch -v $VERSION
> dpkg-buildpackage -sa -rfakeroot

The find command can be improved - see my other email - so that you
don't have to deal with debian/patches separately.

I've attached one of my build scripts that has these assumptions:
1. I work in /opt
2. SVN/CVS checkouts are in /opt/working
3. debian package building all happens in /opt/debian
4. Previous builds have created a simple file 'old_ver' that handles
removal of old build trees. It's no odds if this file doesn't exist in
a clean directory.


Neil Williams

Attachment: debian-qof-make
Description: Binary data

Attachment: pgpJ1NsNyLImt.pgp
Description: PGP signature

Reply to: