3

It's the first time I try to build debian/ubuntu packages for different architectures. For this, I decided to use pbuilder using the .pbuilderrc script from https://jodal.no/2015/03/08/building-arm-debs-with-pbuilder/. Then, I use dpkg-buildpackage -S or dpkg-source -b for creating the .dsc file. Using this file, I call

sudo OS=ubuntu DIST=trusty ARCH=amd64 pbuilder --build $dscfile
sudo OS=ubuntu DIST=trusty ARCH=armhf pbuilder --build $dscfile

The problem is that pbuilder seems to repack the .debian.tar.gz file (and change to .xz) and recreate the .dsc file. The contents of the two tar files are similar, only the permissions and timestamps changed and in the .dsc file I see minor changes plus the different checksums:

- libpj2 deb comm optional
+ libpj2 deb comm optional arch=any

- b42ddedc2d8b210ec10b4db4271997569aab448d 29942 pjproject_2.1.0.0.ast20130823-1.test20.debian.tar.gz
+ 11646618842914086b78ce0e191f6e2cfbe0965d 25548 pjproject_2.1.0.0.ast20130823-1.test20.debian.tar.xz

Now, the problem is that I cannot put the result of these two builds to a reprepro repository:

#reprepro -Vb . includedsc trusty $dscfile
reprepro -Vb . include trusty /var/cache/pbuilder/ubuntu-trusty-amd64/result/*.changes
reprepro -Vb . include trusty /var/cache/pbuilder/ubuntu-trusty-armhf/result/*.changes

Because it doesn't accept the different checksums of the .dsc file:

File "pool/test/p/pjproject/pjproject_2.1.0.0.ast20130823-1.test20.debian.tar.xz" is already registered with different checksums!
md5 expected: 2f5bcb162dedd309a9d9ecba733d1036, got: bc30e1f502f7b36c10e9709dfe75e60b
sha1 expected: 11646618842914086b78ce0e191f6e2cfbe0965d, got: 94c6ecebe07a93c7505058019b6f64a73a9625a5
sha256 expected: 0642aa4d78b1cc91d06cc6fe406380b76aa7de5fb26105ea052d447f36f65d19, got: cfa085ac5904eadc21a849958118ce597fe03d78fd8cc82f225c33cbcb663462

My questions are now:

  • How can I avoid rebuilding the source package?
  • Is this a plausible workflow for building such multi-arch packages?
  • Is there a better way, for example a better cross-build tool?
  • For arch-independent binary packages, I assume similar problems as with the source package. How can I integrate them into this workflow?

1 Answer 1

1

Solved. My workflow is now as following:

Update version information:

dch -i

Build source package:

cd ulxmlrpcpp/
dpkg-buildpackage -S -sa
cd ../

Build. Note that the first call is different because it also generates the arch-indep binaries. I recommend the native arch for this because it's the fastest and in case of an error you don't waste emulation time:

sudo OS=debian DIST=jessie ARCH=amd64 pbuilder --build --pkgname-logfile --debbuildopts '-sa -b' ulxmlrpcpp_1.7.5-2.35.dsc
sudo OS=debian DIST=jessie ARCH=armhf pbuilder --build --pkgname-logfile --debbuildopts -B ulxmlrpcpp_1.7.5-2.35.dsc

Add to repo (only if all above steps were successful):

reprepro -Vb . include jessie ulxmlrpcpp_1.7.5-2.35_source.changes
reprepro -Vb . include jessie /var/cache/pbuilder/debian-jessie-armhf/result/ulxmlrpcpp_1.7.5-2.35_armhf.changes
reprepro -Vb . include jessie /var/cache/pbuilder/debian-jessie-amd64/result/ulxmlrpcpp_1.7.5-2.35_amd64.changes

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .