For a proprietary piece of software I'd like to build and publish multiple versions of software for multiple distributions. E.g. 1.0, 1.1 and both versions for squeeze, wheezy and precise.

The builds are run on automatically on different machines and produce distribution-specific .deb files. Distribution-specific in a way that they're linked to distribution-specific versions of libraries. E.g. OpenSSL 0.9.8 for squeeze, 1.0.1 for wheezy. However, these packages are built using the same version number and package name. This is what is probably the cause for the issue following.

Currently I'm using reprepro with the includedeb command to add the binaries to the repository. This works out fine, until I add the same package version built for a second distribution.

Publishing for Squeeze is fine

# reprepro -b ./repo --outdir ./wwwpub/repo includedeb squeeze /path/to/sqeezepackages/packagename-1.0.deb

But then publishing the same version of the software built on wheezy, publishing for wheezy fails:

# reprepro -b ./repo --outdir ./wwwpub/repo includedeb wheezy /path/to/wheezypackages/packagename-1.0.deb 
/path/to/wheezypackages/packagename-1.0.deb: component guessed as 'main'
ERROR: '/path/to/wheezypackages/packagename-1.0.deb' cannot be included as 'pool/main/p/packagename/packagename_1.0_all.deb'.
Already existing files can only be included again, if they are the same, but:
md5 expected: e7df7cd2ca07f4f1ab415d457a6e1c13, got: 0fa924209085a5713f79e6a30649455f
sha1 expected: 947b41827bbac414baddf0648b9abecaad8de4fe, got: 1be168ff837f043bde17c0314341c84271047b31
sha256 expected: a883dafc480d466ee04e0d6da986bd78eb1fdd2178d04693723da3a8f95d42f4, got: a93dbf1e95ddc4cfa84e9cd3cfa6c9e0e14affd79812abde4bca688224430a65
size expected: 1234, got: 1235
There have been errors!

I assume my build needs a unique version number for each distribution.

  • What's the easiest way to accomplish this?
  • How do I add this to the current version number? Is it advised to use something like 1.1~wheezy, 1.1+wheezy, 1.1-1 (incrementing), 1.1+deb6, etc.? As jessie is coming up and I'd like the system to recognize this during dist-upgrades, I think just using the distribution name won't work as j comes before the w and will be recognized as older by APT.
  • Once determined how to build up the version number; how do I add this to my tooling? I guess I need heuristics in the debian/control files to have the version number specific to the distribution it's built on. And for the changelog I'll have to invoke dch to comply with that version number as well.

1 Answer 1


I would personally just make one archive per distribution.

This would fix your issue, and would have the benefit that each archive would be smaller. (faster to download and parse by clients)

  • Not really solving the issue about the transitioning happening on a dist-upgrade. If the wheezy archive contains 1.1 and the jessie archive contains 1.1 as well, APT won't upgrade the package to the jessie one until it's removed from cache manually and reinstalled manually (apt-get clean; apt-get install --reinstall mypackage). Not so neat.
    – gertvdijk
    Jul 25, 2016 at 8:57
  • Also, I doubt it would be true that "each archive would be smaller", because the repository tools are already aware of the package listings on a per-distribution release base. It may be true that the full package listing is slightly smaller in that case, but then again, it's about a handful amount of packages in my case, not a full Ubuntu mirror or something.
    – gertvdijk
    Jul 25, 2016 at 8:58
  • You're right, I didn't think about the upgrade path between distro releases. Jul 25, 2016 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.