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?