← Back to team overview

ubuntu-packaging-guide-team team mailing list archive

lp:~andrewsomething/ubuntu-packaging-guide/traditional-packaging into lp:ubuntu-packaging-guide

 

Andrew Starr-Bochicchio has proposed merging lp:~andrewsomething/ubuntu-packaging-guide/traditional-packaging into lp:ubuntu-packaging-guide.

Requested reviews:
  Ubuntu Packaging Guide Team (ubuntu-packaging-guide-team)
Related bugs:
  Bug #809925 in Ubuntu Packaging Guide: "Provide overview of traditional packaging tools"
  https://bugs.launchpad.net/ubuntu-packaging-guide/+bug/809925
  Bug #885315 in Ubuntu Packaging Guide: "traditional-packaging.html is empty, but linked to"
  https://bugs.launchpad.net/ubuntu-packaging-guide/+bug/885315

For more details, see:
https://code.launchpad.net/~andrewsomething/ubuntu-packaging-guide/traditional-packaging/+merge/109051

This branch adds instruction on getting a package's source and generating a debdiff for the "traditional" packaging methods page. I think those are the main differences between the current UDD practices and the "traditional" ones. There's probably more to add eventually, but this is better than linking to an empty page. Mostly this just ports: https://wiki.ubuntu.com/PackagingGuide/Recipes/Debdiff
-- 
https://code.launchpad.net/~andrewsomething/ubuntu-packaging-guide/traditional-packaging/+merge/109051
Your team Ubuntu Packaging Guide Team is requested to review the proposed merge of lp:~andrewsomething/ubuntu-packaging-guide/traditional-packaging into lp:ubuntu-packaging-guide.
=== modified file 'ubuntu-packaging-guide/traditional-packaging.rst'
--- ubuntu-packaging-guide/traditional-packaging.rst	2012-02-29 10:05:20 +0000
+++ ubuntu-packaging-guide/traditional-packaging.rst	2012-06-06 23:46:18 +0000
@@ -2,4 +2,111 @@
 Traditional Packaging
 =====================
 
-FIXME describe traditional packaging here
+The majority of this guide deals with :doc:`Ubuntu Distributed Development
+<./udd-intro>` (UDD) which utilizes the distributed version control system (DVCS)
+Bazaar for :ref:`retrieving package sources <branching>` and submitting fixes
+with :ref:`merge proposals. <merge-proposal>` This article will discuss what we
+will call traditional packaging methods for lack of a better word. Before Bazaar
+was adopted for Ubuntu development, these were the typical methods for
+contributing to Ubuntu.
+
+In some cases, you may need to use these tools instead of UDD. So it is good to
+be familiar with them. Before you begin, you should already have read the
+article :doc:`Getting Set Up. <./getting-set-up>`
+
+Getting the Source
+------------------
+
+In order to get a source package, you can simply run::
+
+    $ apt-get source <package_name>
+
+This method has some draw backs though. It downloads the version of the source
+that is available on **your system.** You are likely running the current stable
+release, but you want to contribute your change against the package in the
+development release. Luckily, the ``ubuntu-dev-tools`` package provides a helper
+script::
+
+    $ pull-lp-source <package_name>
+
+By default, the  latest version in the development release will be downloaded.
+You can also specify a version or Ubuntu release like::
+
+    $ pull-lp-source <package_name> precise
+
+to pull the source from the ``precise`` release, or::
+
+    $ pull-lp-source <package_name> 1.0-1ubuntu1
+
+to download version ``1.0-1ubuntu1`` of the package. For more information on the
+command, see ``man pull-lp-source``
+
+For our example, let's pretend we got a bug report saying that "colour" in the
+description of ``xicc`` should be "color," and we want to fix it. *(Note: This
+is just an example of something to change and not really a bug.)* To get the
+source, run::
+
+    $ pull-lp-source xicc 0.2-3
+
+Creating a Debdiff
+------------------
+
+A ``debdiff`` shows the difference between two Debian packages. The name of the
+command used to generate one is also ``debdiff``. It is part of the
+``devscripts`` package. See ``man debdiff`` for all the details. To compare two
+source packages, pass the two ``dsc`` files as arguments::
+
+    $ debdiff <package_name>_1.0-1.dsc <package_name>_1.0-1ubuntu1.dsc
+
+To continue with our example, let's edit the ``debian/control`` and "fix" our
+"bug"::
+
+    $ cd xicc-0.2
+    $ sed -i 's/colour/color/g' debian/control
+
+We also must adhere to the `Debian Maintainer Field Spec
+<https://wiki.ubuntu.com/DebianMaintainerField>`_ and edit ``debian/control``
+to replace::
+
+    Maintainer: Ross Burton <ross@xxxxxxxxxx>
+
+with::
+
+    Maintainer: Ubuntu Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
+    XSBC-Original-Maintainer: Ross Burton <ross@xxxxxxxxxx>
+
+You can use the ``update-maintainer`` tool (in the ``ubuntu-dev-tools`` package)
+to do that.
+
+Remember to document your changes in ``debian/changelog`` using ``dch -i`` and
+then we can generate a new source package::
+
+    $ debuild -S
+
+Now we can examine our changes using ``debdiff``::
+
+    $ cd ..
+    $ debdiff xicc_0.2-3.dsc xicc_0.2-3ubuntu1.dsc | less
+
+To create a patch file that you can send to others or attach to a bug report for
+sponsorship, run::
+
+    $ debdiff xicc_0.2-3.dsc xicc_0.2-3ubuntu1.dsc > xicc_0.2-3ubuntu1.debdiff
+
+
+Applying a Debdiff
+------------------
+
+In order to apply a debdiff, first make sure you have the source code of the
+version that it was created against::
+
+    $ pull-lp-source xicc 0.2-3
+
+Then in a terminal, change the to the directory where the source was
+uncompressed::
+
+    $ cd xicc-0.2
+
+A debdiff is just like a normal patch file. Apply it as usual with::
+
+    $ patch -p1 < ../xicc_0.2.2ubuntu1.debdiff


Follow ups