PBuilder Usage

July 2009


PBuilder is a program to create chroot jails to build Debian packages in.

Procedure 61.  Debianization and first packaging

  1. Installing


        sudo apt-get install pbuilder
      

  2. Creation of chroot jails

    sudo pbuilder create --debootstrapopts --variant=buildd

  3. Initial Debianization

    mv hello-world-1.0.tar.gz ~/packaging
    cd !$
    tar zxvf hello-world-1.0.tar.gz
    cd hello-world-1.0.tar.gz
    export DEBEMAIL=j.bokma@rug.nl
    export DEBFULLNAME="Jurjen Bokma"
    dh_make --createorig
    Type of package: single binary, multiple binary, library, kernel module or cdbs?
    [s/m/l/k/b] s

    Maintainer name : Jurjen Bokma
    Email-Address   : j.bokma@rug.nl
    Date            : Sun, 12 Jul 2009 16:30:07 +0200
    Package Name    : hello-world
    Version         : 1.0
    License         : blank
    Using dpatch    : no
    Type of Package : Single
    Hit <enter> to confirm:
    Done. Please edit the files in the debian/ subdirectory now. hello-world
    uses a configure script, so you probably don't have to edit the Makefiles.

    Now edit debian/{changelog,control,copyright,manpage.xml}, and delete the superfluous:

    rm debian/*.ex debian/*.EX debian/README.Debian

  4. Invoking pdebuild

Procedure 62.  Upgrading a package from an upstream upgrade (simple case)

  1. Copying the new tarball in place

    cp hello-world-1.1.tar.gz ~/packaging

  2. Merging the new tarball and the old debianization

    cd hello-world-1.0/
    uupdate -u ../hello-world-1.1.tar.gz
    New Release will be 1.1-0ubuntu1.
    Symlinking to pristine source from hello-world_1.1.orig.tar.gz...
    -- Untarring the new sourcecode archive ../hello-world-1.1.tar.gz
    Success!  The diffs from version 1.0-1 worked fine.
    Remember: Your current directory is the OLD sourcearchive!
    Do a "cd ../hello-world-1.1" to see the new package
    cd ../hello-world-1.1

  3. Updating the changelog

    dch -v 1.1-1

    And describe all changes in the changelog

  4. Rebuilding

    pdebuild --buildresult ..
    <Huge output snipped once again>