User Tools

Site Tools


wiki:development:nxlibs-repository

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:development:nxlibs-repository [2011/12/28 16:43]
sunweaver [Unresolved Issues]
wiki:development:nxlibs-repository [2012/02/28 10:42]
ncryer [Create new patch]
Line 96: Line 96:
  
  
 +===== Editing patches using quilt =====
 +==== Configure quilt ====
 +add to ~/.bashrc
 +<code>
 +alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
 +</code>
 +
 +create ~/.quiltrc-dpkg
 +<code>
 +d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done
 +if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then
 +    # if in Debian packaging tree with unset $QUILT_PATCHES
 +    QUILT_PATCHES="debian/patches"
 +    QUILT_PATCH_OPTS="--reject-format=unified"
 +    QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
 +    QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
 +    QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
 +    if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi
 +fi
 +</code>
 +
 +==== modifying patches ====
 +get a source tree from git
 +<code>
 +git clone ssh://x2go@code.x2go.org:32032/srv/git/code.x2go.org/nx-libs.git
 +cd nx-libs
 +</code>
 +apply patches until you find patch you want to edit
 +<code>
 +dquilt push
 +</code>
 +edit files you want to change
 +
 +if you want to add new files to patch, you can make it with command:
 +<code>
 +dquilt add <new file>
 +</code>
 +after you are finished with editting, apply changes to patch
 +<code>
 +dquilt refresh --strip-trailing-whitespace
 +</code>
 +revoke all patches with
 +<code>
 +dquilt pop -a
 +</code>
 +check your changes with "git status" and "git diff". Edit changelog with "dch", make sure you keep changelog lines below 80 characters, for example:
 +<code>
 +* Update patch: 202_nx-x11_enable-xinerama.full.patch,
 +  <describe what you did...>.
 +</code>
 +commit your changes with "debcommit -a"
 +==== Create new patch ====
 +apply paches until you reach the code state where you want to begin with your new patch
 +<code>
 +dquilt push
 +</code>
 +create new patch NUMBER_NXCOMPONENT_DESCRIPTION.full.patch, for example:
 +<code>
 +dquilt new 203_nxagent_disable-rootless-exit.full.patch
 +</code>
 +add files, which you want to patch with
 +<code>
 +dquilt add DATEINAME
 +</code>
 +edit files, you want to patch and save the changes
 +<code>
 +dquilt refresh
 +</code>
 +revoke all patches with 
 +<code>
 +dquilt pop -a
 +</code>
 +check your changes with "git status" and "git diff". Edit changelog with "dch", make sure you keep changelog lines below 80 characters, for example:
 +<code>
 +* Create patch: 203_nxagent_disable-rootless-exit.full.patch,
 +  <describe what you did...>.
 +</code>
 +commit your changes with "debcommit -a"
wiki/development/nxlibs-repository.txt ยท Last modified: 2013/03/08 13:31 (external edit)