Using version-info data with multi-branch packaging workflow

John Arbash Meinel john at arbash-meinel.com
Sun Sep 14 00:40:56 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ben Finney wrote:
> James Westby <jw+debian at jameswestby.net> writes:
> 
>> On Sat, 2008-09-13 at 11:18 +1000, Ben Finney wrote:
>>> If you don't use 'bzr-buildpackage --export-upstream', you then
>>> need to manually generate the upstream source tarball. How is that
>>> done in the Bazaar build workflow?
> […]
>> There are difficulties if the project requires more than a "bzr
>> export." If you want to include the version_info.py file then you
>> will have to generate the tarball by hand.
> 
> If I understand you correctly, the build process of the Bazaar code
> doesn't allow for the output of 'version-info'. Is that right?
> 
> Can anyone show me an example of a code base that *is* using
> 'version-info', creating source tarballs, and packaging them with
> Debian?
> 

We build the tarball using "make dist". And it would be pretty trivial
to add a 'version_info.py' file. We already add the bzrlib/*.c files.

You can look at our Makefile:
http://bazaar.launchpad.net/~bzr/bzr/trunk/annotate/3708?file_id=Makefile-20050805140406-d96e3498bb61c5bb


dist:
    version=`./bzr version --short` && \
    echo Building distribution of bzr $$version && \
 	        expbasedir=`mktemp -t -d tmp_bzr_dist.XXXXXXXXXX` && \
 	        expdir=$$expbasedir/bzr-$$version && \
    tarball=$$PWD/../bzr-$$version.tar.gz && \
    $(MAKE) clean && \
    $(MAKE) && \
    bzr export $$expdir && \
    cp bzrlib/*.c $$expdir/bzrlib/. && \
    tar cfz $$tarball -C $$expbasedir bzr-$$version && \
    gpg --detach-sign $$tarball && \
 	        echo $$tarball done. && \
    rm -rf $$expbasedir


So we 'bzr export' to a plain directory, copy over a couple of extra
files, and then use "tar" to turn the dir into a tarball and then clean
it all up.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjMT4gACgkQJdeBCYSNAAPN3ACgsAe+jtPT84LE7XgQNl17dS1b
c/YAn0JQTugDpHJXyyyIiAwngsuBaUyC
=CAzv
-----END PGP SIGNATURE-----



More information about the bazaar mailing list