## page was renamed from Diaspora/packaging ## page was renamed from diaspora/packaging #language en ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~ ---- ||<>|| = Links = * [[UsingQuilt|using quilt debian wiki]] Which contains several other links, one being: * [[http://raphaelhertzog.com/2012/08/08/how-to-use-quilt-to-manage-patches-in-debian-packages/|how to use quilt]] Docu is also to be found at /usr/share/doc/quilt/ ; for example with: {{{ lynx /usr/share/doc/quilt/quilt.html }}} <
> = Basic Usage = == Setting up quilt to use with Debian source packages == Place a .quiltrc configuration file in your home directory with the following lines. {{{ QUILT_PATCHES=debian/patches QUILT_NO_DIFF_INDEX=1 QUILT_NO_DIFF_TIMESTAMPS=1 QUILT_REFRESH_ARGS="-p ab" }}} See [[UsingQuilt#Using_quilt_with_Debian_source_packages||Using Quilt]] Only changes outside of the debian directory need to be added with quilt. Before you make a change do: {{{ quilt new $patchname }}} Add the file you have to edit: {{{ quilt add $filename }}} Now edit the file you need to edit. When finished do {{{ quilt refresh quilt pop -a }}} and ignore the warning. Documenting the patches is good style. Besides that the absence is a lintian error. To do so * look at the example at the bottom of this page * run "quilt header -e --dep3" after "quilt refresh" and before "quilt pop -a" * if you forget you can later just edit debian/patches/name_of_patch manually <
> If you are using git-buildpackage you will have to add debian/patches to the git-repo {{{ git add debian/patches git commit -m "added debian/patches" }}} <
> == Editing an existing patch == {{{ quilt push -a }}} edit the file you added, say to correct a typo. You can also add a new file to the patch with "quilt add $newfilename". Then do the same like above: {{{ quilt refresh quilt pop -a }}} and inform git about the changes: {{{ git add debian/patches git commit -m "added debian/patches" }}} <
> == unapply-patches == If you have patches, add a file debian/source/local-options containing the single line unapply-patches: {{{ echo "unapply-patches" >> debian/source/local-options }}} so that patches are automatically removed after a local build. That will also remove the .pc directory from git status. Don't git add it ! Another option to do the same is to run {{{ /usr/share/doc/git-buildpackage/examples/gbp-configure-unpatched-source }}} <
> <
> = Documenting patch = Patches created for Debian packages are usually documented according to DEP-3 (http://dep.debian.net/deps/dep3/). Thus making it easy to review the patch file. A very basic structure of a patch documented in this format includes a description, author's name, if the patch is forwarded or not, last update date, etc. followed by which is the actual patch body. Here is an example: {{{ Description: Remove requirements on bundler and rubygems Author: Nandaja Varma Forwarded: No Last-Update: 2013-01-07 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,3 @@ -require 'rubygems' -require 'bundler/setup' require 'test/unit' begin require 'mocha/setup' }}} Like mentioned above you can run "quilt header -e --dep3" after you did refresh or edit the file debian/patches/name_of_patch manually.