How can I apply the packaging for libvirt to build a package out of a git version?

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








up vote
1
down vote

favorite
1












I've been trying to work on a patch to libvirt to enable Ceph/RBD storage volumes.



I would like to test my code now. I would like to do this as a package (or even a Launchpad PPA), so that I can cleanly remove it.



Obviously, someone has already done the work to get libvirt packaged for Ubuntu and Debian.



How can I take a git branch and build it into a package using the packaging the official Ubuntu package uses?



Bonus points if we can get something like the output of



git describe --abbrev=7 --always --tags


as the version, so I can end up with both the version (4.0.0) and the git tag (gfd7cb8c) in a version number such that newer versions actually look new to apt.










share|improve this question























  • Have you gone through wiki.debian.org/PackagingWithGit?
    – muru
    Jan 28 at 1:31










  • @muru I've read it, but am a bit overwhelmed. Hence wanting to just use the already done packaging instead of trying to figure it all out from scratch.
    – Azendale
    Jan 28 at 19:00














up vote
1
down vote

favorite
1












I've been trying to work on a patch to libvirt to enable Ceph/RBD storage volumes.



I would like to test my code now. I would like to do this as a package (or even a Launchpad PPA), so that I can cleanly remove it.



Obviously, someone has already done the work to get libvirt packaged for Ubuntu and Debian.



How can I take a git branch and build it into a package using the packaging the official Ubuntu package uses?



Bonus points if we can get something like the output of



git describe --abbrev=7 --always --tags


as the version, so I can end up with both the version (4.0.0) and the git tag (gfd7cb8c) in a version number such that newer versions actually look new to apt.










share|improve this question























  • Have you gone through wiki.debian.org/PackagingWithGit?
    – muru
    Jan 28 at 1:31










  • @muru I've read it, but am a bit overwhelmed. Hence wanting to just use the already done packaging instead of trying to figure it all out from scratch.
    – Azendale
    Jan 28 at 19:00












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I've been trying to work on a patch to libvirt to enable Ceph/RBD storage volumes.



I would like to test my code now. I would like to do this as a package (or even a Launchpad PPA), so that I can cleanly remove it.



Obviously, someone has already done the work to get libvirt packaged for Ubuntu and Debian.



How can I take a git branch and build it into a package using the packaging the official Ubuntu package uses?



Bonus points if we can get something like the output of



git describe --abbrev=7 --always --tags


as the version, so I can end up with both the version (4.0.0) and the git tag (gfd7cb8c) in a version number such that newer versions actually look new to apt.










share|improve this question















I've been trying to work on a patch to libvirt to enable Ceph/RBD storage volumes.



I would like to test my code now. I would like to do this as a package (or even a Launchpad PPA), so that I can cleanly remove it.



Obviously, someone has already done the work to get libvirt packaged for Ubuntu and Debian.



How can I take a git branch and build it into a package using the packaging the official Ubuntu package uses?



Bonus points if we can get something like the output of



git describe --abbrev=7 --always --tags


as the version, so I can end up with both the version (4.0.0) and the git tag (gfd7cb8c) in a version number such that newer versions actually look new to apt.







virtualization deb packaging git






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 28 at 1:32









muru

131k19275473




131k19275473










asked Jan 28 at 1:24









Azendale

8,60373861




8,60373861











  • Have you gone through wiki.debian.org/PackagingWithGit?
    – muru
    Jan 28 at 1:31










  • @muru I've read it, but am a bit overwhelmed. Hence wanting to just use the already done packaging instead of trying to figure it all out from scratch.
    – Azendale
    Jan 28 at 19:00
















  • Have you gone through wiki.debian.org/PackagingWithGit?
    – muru
    Jan 28 at 1:31










  • @muru I've read it, but am a bit overwhelmed. Hence wanting to just use the already done packaging instead of trying to figure it all out from scratch.
    – Azendale
    Jan 28 at 19:00















Have you gone through wiki.debian.org/PackagingWithGit?
– muru
Jan 28 at 1:31




Have you gone through wiki.debian.org/PackagingWithGit?
– muru
Jan 28 at 1:31












@muru I've read it, but am a bit overwhelmed. Hence wanting to just use the already done packaging instead of trying to figure it all out from scratch.
– Azendale
Jan 28 at 19:00




@muru I've read it, but am a bit overwhelmed. Hence wanting to just use the already done packaging instead of trying to figure it all out from scratch.
– Azendale
Jan 28 at 19:00










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Yes, you can use packaging files from the distribution (Ubuntu/Debian).




  1. Create a source archive from your repository, and rename it correctly.



    <packagename>_<version>.orig.tar.gz


    The root folder inside the archive should be <packagename>-<version> which contain the whole source tree.



    Then extract it.




  2. Download Debian packaging file .debian.tar.zx from:



    https://packages.ubuntu.com/bionic/libvirt-bin



    Extract it and put debian folder inside <packagename>-<version> folder from the previous step.




  3. Open terminal in <packagename>-<version> folder then build Debian source package.



    # if needed
    dch
    debuild clean
    # build source package only
    debuild -S


  4. Upload it to PPA that will build binary packages for you.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1000558%2fhow-can-i-apply-the-packaging-for-libvirt-to-build-a-package-out-of-a-git-versio%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Yes, you can use packaging files from the distribution (Ubuntu/Debian).




    1. Create a source archive from your repository, and rename it correctly.



      <packagename>_<version>.orig.tar.gz


      The root folder inside the archive should be <packagename>-<version> which contain the whole source tree.



      Then extract it.




    2. Download Debian packaging file .debian.tar.zx from:



      https://packages.ubuntu.com/bionic/libvirt-bin



      Extract it and put debian folder inside <packagename>-<version> folder from the previous step.




    3. Open terminal in <packagename>-<version> folder then build Debian source package.



      # if needed
      dch
      debuild clean
      # build source package only
      debuild -S


    4. Upload it to PPA that will build binary packages for you.






    share|improve this answer
























      up vote
      0
      down vote













      Yes, you can use packaging files from the distribution (Ubuntu/Debian).




      1. Create a source archive from your repository, and rename it correctly.



        <packagename>_<version>.orig.tar.gz


        The root folder inside the archive should be <packagename>-<version> which contain the whole source tree.



        Then extract it.




      2. Download Debian packaging file .debian.tar.zx from:



        https://packages.ubuntu.com/bionic/libvirt-bin



        Extract it and put debian folder inside <packagename>-<version> folder from the previous step.




      3. Open terminal in <packagename>-<version> folder then build Debian source package.



        # if needed
        dch
        debuild clean
        # build source package only
        debuild -S


      4. Upload it to PPA that will build binary packages for you.






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Yes, you can use packaging files from the distribution (Ubuntu/Debian).




        1. Create a source archive from your repository, and rename it correctly.



          <packagename>_<version>.orig.tar.gz


          The root folder inside the archive should be <packagename>-<version> which contain the whole source tree.



          Then extract it.




        2. Download Debian packaging file .debian.tar.zx from:



          https://packages.ubuntu.com/bionic/libvirt-bin



          Extract it and put debian folder inside <packagename>-<version> folder from the previous step.




        3. Open terminal in <packagename>-<version> folder then build Debian source package.



          # if needed
          dch
          debuild clean
          # build source package only
          debuild -S


        4. Upload it to PPA that will build binary packages for you.






        share|improve this answer












        Yes, you can use packaging files from the distribution (Ubuntu/Debian).




        1. Create a source archive from your repository, and rename it correctly.



          <packagename>_<version>.orig.tar.gz


          The root folder inside the archive should be <packagename>-<version> which contain the whole source tree.



          Then extract it.




        2. Download Debian packaging file .debian.tar.zx from:



          https://packages.ubuntu.com/bionic/libvirt-bin



          Extract it and put debian folder inside <packagename>-<version> folder from the previous step.




        3. Open terminal in <packagename>-<version> folder then build Debian source package.



          # if needed
          dch
          debuild clean
          # build source package only
          debuild -S


        4. Upload it to PPA that will build binary packages for you.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 7 at 19:50









        user.dz

        33.8k1188171




        33.8k1188171



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1000558%2fhow-can-i-apply-the-packaging-for-libvirt-to-build-a-package-out-of-a-git-versio%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491