[Aptitude-devel] how to build deb package from git sources?

matthias.hinkfoth2 at uni-rostock.de matthias.hinkfoth2 at uni-rostock.de
Thu Jan 28 21:43:57 UTC 2016


Hi Axel,

thanks for clarification.

> You probably missed that there are multiple branches. To understand
> what's going on, these branch are probably of interest for you:
> 
> * master = upstream development
> * upstream = upstream code as in the upstream tar ball of Debian, i.e.
>   updated only with every upstream release (by using "gbp import-orig"
>   on the upstream tar ball generated with "make dist" or so from the
>   code in the master branch).
> * debian-sid = current debian packaging branch, contains "upstream"
>   branch plus packaging (i.e. the "debian/" directory).

I am still a bit confused, since there are even more branches.

> To build the 0.6.11-1 package from source (0.6.11-1+b1 has the same
> source, but is a different build, e.g. against updated libraries),
> checkout the git tag "debian/0.6.11-1" and build from there, i.e. use
> these commands:
> 
> $ git checkout debian/0.6.11-1
> $ dpkg-buildpackage -b

This worked fine. :-)

> ("gbp buildpackage --ignore-debian-branch" should work, too, but the
> additional checks of gbp like "is the working copy clean?" etc. are
> probably not needed in your case.)

I have not found --ignore-debian-branch, instead I ran:

$ gbp buildpackage --git-ignore-branch
gbp:warning: Pristine-tar branch "pristine-tar" not found
fatal: Path 'aptitude_0.6.11.orig.tar.gz.delta' does not exist in 'refs/remotes/origin/pristine-tar'
pristine-tar: git show refs/remotes/origin/pristine-tar:aptitude_0.6.11.orig.tar.gz.delta failed
gbp:error: Couldn't checkout "aptitude_0.6.11.orig.tar.gz": it exited with 128


I do not really understand the error.
But I tried to build a source package the following way:

$ git checkout debian/0.6.11-1
$ dpkg-buildpackage -S
dpkg-buildpackage: source package aptitude
dpkg-buildpackage: source version 0.6.11-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Daniel Hartwig <mandyke at gmail.com>
 dpkg-source --before-build aptitude-git
 fakeroot debian/rules clean
dh clean --parallel --builddirectory=build-arch --dbg-package=aptitude-dbg
   dh_testdir -O--parallel -O--builddirectory=build-arch -O--dbg-package=aptitude-dbg
   dh_auto_clean -O--parallel -O--builddirectory=build-arch -O--dbg-package=aptitude-dbg
   dh_clean -O--parallel -O--builddirectory=build-arch -O--dbg-package=aptitude-dbg
 dpkg-source -b aptitude-git
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../aptitude_0.6.11.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b aptitude-git gave error exit status 255


I would really like to also build a source package, as I do not have
a cross compiler at hand for all my platforms.

Regards,
Matthias



More information about the Aptitude-devel mailing list