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

Re: native packages

On 1/23/07, Neil Williams <linux@codehelp.co.uk> wrote:
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.

This package does not use autotools, it uses qconf. Upstream tarball
releases are literally just exports of the svn repo. Also I'm building
svn snapshot versions here.

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.

This *is* as close as possible to the final release in structure.

> 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.

It doesn't as the debian files are moved out of $DIR earlier.

> 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.

Yes, I was trying to use find but just couldn't remember how to
specifically exclude files. I'll use that.

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.

Thanks, I'll have a look.
Andrew Donnellan
ajdlinuxATgmailDOTcom (primary)    ajdlinuxATexemailDOTcomDOTau (secure)
http://andrewdonnellan.com         http://ajdlinux.wordpress.com
ajdlinux@jabber.org.au             hkp://subkeys.pgp.net 0x5D4C0C58
           http://linux.org.au    http://debian.org
       Get free rewards - http://ezyrewards.com/?id=23484

Reply to: