SergeHallyn_packaging

Differences between revisions 1 and 2
Revision 1 as of 2010-06-22 13:08:08
Size: 3279
Editor: cpe-70-120-198-24
Comment:
Revision 2 as of 2010-06-28 13:11:44
Size: 3371
Editor: cpe-70-120-198-24
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

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

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