SergeHallyn_packaging

Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2010-06-22 13:08:08
Size: 3279
Editor: cpe-70-120-198-24
Comment:
Revision 5 as of 2011-01-08 00:26:30
Size: 3932
Editor: cpe-70-116-4-34
Comment:
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
 * http://dep.debian.net/deps/dep3/
   * DEP-3 tags to add to patches in a debian package
Line 24: Line 26:
{{{
Line 32: Line 35:
}}}
Line 36: Line 40:
{{{
Line 37: Line 42:
}}}
Line 52: Line 58:
{{{
Line 70: Line 77:
}}}
Line 78: Line 86:
{{{
Line 91: Line 100:
}}}
Line 96: Line 106:
{
Line 99: Line 110:
}

== how vmbuilder is packaged ==

vmbuilder package uploads:
 1. source code is in lp:vmbuilder
 2. debian/ is in lp:vmbuilder-dev/vmbuilder/packaging
 3. the release name in changelog entry in packaging tree
    should reference 'bzr-#' where # is the latest bzr
    version of lp:vmbuilder I want included
 4. then do 'bzr-buildpackage -S'
 5. build, test the package
 6. try 'bzr merge-upstream' and see if that requests the dput

== merging ==

https://wiki.ubuntu.com/UbuntuDevelopment/Merging

Serge's basic recipes for packaging

Mainly for my own sake.

Preliminaries

Updating a package

Important Note

(Daviey (Dave Walker) points out that this is the case only for packages which either are not available as, or maintained separately from, upstream Debian packages - and those should be few)

Here is an example of forwarding an existing package to newest upstream:

   apt-get source qemu-kvm
   cd qemu-kvm-*
   uscan
   (make any changes)
   dch -i
   debuild -S
   cd ..
   sbuild -d maverick -A package-newversion.dsc

Install the resulting .debs in a VM or schroot using 'dpkg -i', and test. If all passes, you can push the package with

   dput ppa:your-name/ppaname package-newversion.changes

Sponsorship, and alternative package updating

The above works for uploading a new package, with all work local. There is an alternative way, more streamlined with bzr. If you seek sponsorship to get your package upstream, then you'll follow this example.

To start, see

Now you will check out the upstream package bzr tree, create a new branch for your work, ask bzr to upstream it, push your changes, then request sponsorship.

        sudo apt-get install bzr-builddeb
        bzr init-repo <package>
        cd <package>
        bzr co lp:ubuntu/<package> original
        bzr branch original merge-VERSION
        cd merge-VERSION
        # download the newest upstream tarball
        bzr merge-upstream ../NEW_TARBALL --version VERSION-0ubuntu1 --distribution maverick --last-version=LAST_UPSTREAM_VERSION
        # make any needed changes to the source
        # edit debian/changelog
        bzr ci # check in bzr changes
        bzr bd -S  # build source package
        bzr push lp:~username/ubuntu/maverick/<package>/merge-VERSION
        # build and test backages
        cd ..
        sbuild -d maverick -A <package>-version-0ubuntu1.dsc
        # test as above
        # now request sponsorship/merge using 'bzr lp-open' as shown in https://wiki.ubuntu.com/SponsorshipProcess

Creating a new package

Let's say I downloaded dmenu-4.1.1.tar.gz. I extract it into dmenu-4.1.1, and make some personalization changes there. Now I want to upload a package with those changes. I cd back into dmenu-4.1.1, and then:

        dh_make -f ../dmenu-4.1.1.tar.gz
        cp debian/watch.ex debian/watch
        vi debian/watch
        edit debian/control
           # fill in source, homepage, maintainer, and description
           # Also add recommends, depends, and build-depends
           # remove any debian/*.ex files
        debuild -S -sa
        cd ..
        to test package building locally:
                sbuild -d lucid qemu-kvm_0.12.4-0ubuntu3.dsc
        to put into ppa:
                dput ppa:serge-hallyn/suckless dmenu_4.1.1-1_source.changes 

misc notes

dpkg-source -x <package>.dsc

{

  • extracts the source directory so we can then do

    # gunzip -c ../<package>.diff.gz | patch fakeroot debian/rules binary

}

how vmbuilder is packaged

vmbuilder package uploads:

  1. source code is in lp:vmbuilder
  2. debian/ is in lp:vmbuilder-dev/vmbuilder/packaging
  3. the release name in changelog entry in packaging tree
    • should reference 'bzr-#' where # is the latest bzr version of lp:vmbuilder I want included
  4. then do 'bzr-buildpackage -S'
  5. build, test the package
  6. try 'bzr merge-upstream' and see if that requests the dput

merging

https://wiki.ubuntu.com/UbuntuDevelopment/Merging

SergeHallyn_packaging (last edited 2011-01-08 00:26:30 by cpe-70-116-4-34)