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

Proposed by Andrew Starr-Bochicchio
Status: Merged
Merged at revision: 111
Proposed branch: lp:~andrewsomething/ubuntu-packaging-guide/traditional-packaging
Merge into: lp:ubuntu-packaging-guide
Diff against target: 116 lines (+108/-1)
1 file modified
ubuntu-packaging-guide/traditional-packaging.rst (+108/-1)
To merge this branch: bzr merge lp:~andrewsomething/ubuntu-packaging-guide/traditional-packaging
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Review via email: mp+109051@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Great work! Thanks a lot!

I'll just add '.' at the end of 'For more information on the command, see ``man pull-lp-source``.' sentence.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-packaging-guide/traditional-packaging.rst'
2--- ubuntu-packaging-guide/traditional-packaging.rst 2012-02-29 10:05:20 +0000
3+++ ubuntu-packaging-guide/traditional-packaging.rst 2012-06-06 23:46:18 +0000
4@@ -2,4 +2,111 @@
5 Traditional Packaging
6 =====================
7
8-FIXME describe traditional packaging here
9+The majority of this guide deals with :doc:`Ubuntu Distributed Development
10+<./udd-intro>` (UDD) which utilizes the distributed version control system (DVCS)
11+Bazaar for :ref:`retrieving package sources <branching>` and submitting fixes
12+with :ref:`merge proposals. <merge-proposal>` This article will discuss what we
13+will call traditional packaging methods for lack of a better word. Before Bazaar
14+was adopted for Ubuntu development, these were the typical methods for
15+contributing to Ubuntu.
16+
17+In some cases, you may need to use these tools instead of UDD. So it is good to
18+be familiar with them. Before you begin, you should already have read the
19+article :doc:`Getting Set Up. <./getting-set-up>`
20+
21+Getting the Source
22+------------------
23+
24+In order to get a source package, you can simply run::
25+
26+ $ apt-get source <package_name>
27+
28+This method has some draw backs though. It downloads the version of the source
29+that is available on **your system.** You are likely running the current stable
30+release, but you want to contribute your change against the package in the
31+development release. Luckily, the ``ubuntu-dev-tools`` package provides a helper
32+script::
33+
34+ $ pull-lp-source <package_name>
35+
36+By default, the latest version in the development release will be downloaded.
37+You can also specify a version or Ubuntu release like::
38+
39+ $ pull-lp-source <package_name> precise
40+
41+to pull the source from the ``precise`` release, or::
42+
43+ $ pull-lp-source <package_name> 1.0-1ubuntu1
44+
45+to download version ``1.0-1ubuntu1`` of the package. For more information on the
46+command, see ``man pull-lp-source``
47+
48+For our example, let's pretend we got a bug report saying that "colour" in the
49+description of ``xicc`` should be "color," and we want to fix it. *(Note: This
50+is just an example of something to change and not really a bug.)* To get the
51+source, run::
52+
53+ $ pull-lp-source xicc 0.2-3
54+
55+Creating a Debdiff
56+------------------
57+
58+A ``debdiff`` shows the difference between two Debian packages. The name of the
59+command used to generate one is also ``debdiff``. It is part of the
60+``devscripts`` package. See ``man debdiff`` for all the details. To compare two
61+source packages, pass the two ``dsc`` files as arguments::
62+
63+ $ debdiff <package_name>_1.0-1.dsc <package_name>_1.0-1ubuntu1.dsc
64+
65+To continue with our example, let's edit the ``debian/control`` and "fix" our
66+"bug"::
67+
68+ $ cd xicc-0.2
69+ $ sed -i 's/colour/color/g' debian/control
70+
71+We also must adhere to the `Debian Maintainer Field Spec
72+<https://wiki.ubuntu.com/DebianMaintainerField>`_ and edit ``debian/control``
73+to replace::
74+
75+ Maintainer: Ross Burton <ross@debian.org>
76+
77+with::
78+
79+ Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
80+ XSBC-Original-Maintainer: Ross Burton <ross@debian.org>
81+
82+You can use the ``update-maintainer`` tool (in the ``ubuntu-dev-tools`` package)
83+to do that.
84+
85+Remember to document your changes in ``debian/changelog`` using ``dch -i`` and
86+then we can generate a new source package::
87+
88+ $ debuild -S
89+
90+Now we can examine our changes using ``debdiff``::
91+
92+ $ cd ..
93+ $ debdiff xicc_0.2-3.dsc xicc_0.2-3ubuntu1.dsc | less
94+
95+To create a patch file that you can send to others or attach to a bug report for
96+sponsorship, run::
97+
98+ $ debdiff xicc_0.2-3.dsc xicc_0.2-3ubuntu1.dsc > xicc_0.2-3ubuntu1.debdiff
99+
100+
101+Applying a Debdiff
102+------------------
103+
104+In order to apply a debdiff, first make sure you have the source code of the
105+version that it was created against::
106+
107+ $ pull-lp-source xicc 0.2-3
108+
109+Then in a terminal, change the to the directory where the source was
110+uncompressed::
111+
112+ $ cd xicc-0.2
113+
114+A debdiff is just like a normal patch file. Apply it as usual with::
115+
116+ $ patch -p1 < ../xicc_0.2.2ubuntu1.debdiff

Subscribers

People subscribed via source and target branches