How to build and publish binaries for multiple Debian/Ubuntu distributions?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












5















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.









share|improve this question




























    5















    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.









    share|improve this question


























      5












      5








      5


      4






      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.









      share|improve this question
















      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.






      debian packaging






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 7 '14 at 13:01







      gertvdijk

















      asked Apr 7 '14 at 12:53









      gertvdijkgertvdijk

      7,40442945




      7,40442945




















          1 Answer
          1






          active

          oldest

          votes


















          0














          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)






          share|improve this answer























          • 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 '16 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 '16 at 8:58












          • You're right, I didn't think about the upgrade path between distro releases.

            – Mathieu Bridon
            Jul 25 '16 at 9:17










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f123528%2fhow-to-build-and-publish-binaries-for-multiple-debian-ubuntu-distributions%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          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)






          share|improve this answer























          • 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 '16 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 '16 at 8:58












          • You're right, I didn't think about the upgrade path between distro releases.

            – Mathieu Bridon
            Jul 25 '16 at 9:17















          0














          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)






          share|improve this answer























          • 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 '16 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 '16 at 8:58












          • You're right, I didn't think about the upgrade path between distro releases.

            – Mathieu Bridon
            Jul 25 '16 at 9:17













          0












          0








          0







          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)






          share|improve this answer













          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)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 25 '16 at 7:11









          Mathieu BridonMathieu Bridon

          23128




          23128












          • 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 '16 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 '16 at 8:58












          • You're right, I didn't think about the upgrade path between distro releases.

            – Mathieu Bridon
            Jul 25 '16 at 9:17

















          • 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 '16 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 '16 at 8:58












          • You're right, I didn't think about the upgrade path between distro releases.

            – Mathieu Bridon
            Jul 25 '16 at 9:17
















          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 '16 at 8:57





          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 '16 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 '16 at 8:58






          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 '16 at 8:58














          You're right, I didn't think about the upgrade path between distro releases.

          – Mathieu Bridon
          Jul 25 '16 at 9:17





          You're right, I didn't think about the upgrade path between distro releases.

          – Mathieu Bridon
          Jul 25 '16 at 9:17

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f123528%2fhow-to-build-and-publish-binaries-for-multiple-debian-ubuntu-distributions%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay