This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
wiki:development:nxlibs-repository [2012/02/28 10:42] ncryer [Create new patch] |
wiki:development:nxlibs-repository [2013/03/08 13:31] (current) |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| The old sources were downloaded by brute force from the nomachine download server: | The old sources were downloaded by brute force from the nomachine download server: | ||
| - | + | <file bash getnx.sh> | |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| - | | + | wget http:// |
| + | </ | ||
| These sources are then unpacked in a temporary directory '' | These sources are then unpacked in a temporary directory '' | ||
| - | + | <file bash extractnx.sh> | |
| - | | + | #!/bin/bash |
| - | | + | mkdir t; cd t; |
| - | | + | for p in nxcomp{, |
| - | | + | for f in ../ |
| + | done | ||
| + | </ | ||
| Now clone the nx-libs repo: | Now clone the nx-libs repo: | ||
| - | git clone git:// | + | <code bash> |
| + | git clone git:// | ||
| + | </ | ||
| there, for each new submodule, create a new branch. as an example, here for the nxcomp branch: | there, for each new submodule, create a new branch. as an example, here for the nxcomp branch: | ||
| - | git checkout -b nxcomp a840692edc9c6d19cd7c057f68e39c7d95eb767d | + | <code bash> |
| + | git checkout -b nxcomp a840692edc9c6d19cd7c057f68e39c7d95eb767d | ||
| + | </ | ||
| | | ||
| - | NB: the commit a840692edc9c6d19cd7c057f68e39c7d95eb767d is the very first commit in the repository. It contains an empty tree as content and is common for all branches in '' | + | NB: the commit |
| We now import the sources using the [[http:// | We now import the sources using the [[http:// | ||
| - | | + | <file bash run-git-load-dirs.sh> |
| - | l=`ls -d nxcomp-*(/ | + | # |
| - | for f in $l; do (cd $wc; git reset --hard ; git clean -dfx); git_load_dirs -w $wc $f; done | + | wc=../ |
| + | l=`ls -d nxcomp-*(/ | ||
| + | for f in $l; do (cd $wc; git reset --hard ; git clean -dfx); git_load_dirs -w $wc $f; done | ||
| + | </ | ||
| Now the nxcomp sources have been imported in the ' | Now the nxcomp sources have been imported in the ' | ||
| Line 98: | Line 107: | ||
| ===== Editing patches using quilt ===== | ===== Editing patches using quilt ===== | ||
| ==== Configure quilt ==== | ==== Configure quilt ==== | ||
| - | add to ~/.bashrc | + | The following configuration options support the usage of quilt. |
| - | < | + | |
| - | alias dquilt=" | + | |
| - | </ | + | |
| create ~/ | create ~/ | ||
| - | < | + | < |
| + | #!/bin/bash | ||
| d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done | d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done | ||
| if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then | if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then | ||
| Line 117: | Line 124: | ||
| </ | </ | ||
| - | ==== modifying | + | Set an alias to use these configuration options. This only appies to Bash and can be added to '' |
| + | <code bash> | ||
| + | alias dquilt="quilt --quiltrc=${HOME}/ | ||
| + | </ | ||
| + | |||
| + | ==== Modifying | ||
| get a source tree from git | get a source tree from git | ||
| < | < | ||
| Line 148: | Line 160: | ||
| commit your changes with " | commit your changes with " | ||
| ==== Create new patch ==== | ==== Create new patch ==== | ||
| - | apply paches | + | Apply patches |
| < | < | ||
| - | dquilt push | + | $ dquilt push |
| </ | </ | ||
| - | create | + | Create |
| < | < | ||
| - | dquilt new 203_nxagent_disable-rootless-exit.full.patch | + | $ dquilt new 203_nxagent_disable-rootless-exit.full.patch |
| </ | </ | ||
| - | add files, which you want to patch with | + | Add files, which you want to patch with |
| < | < | ||
| - | dquilt add DATEINAME | + | $ dquilt add < |
| </ | </ | ||
| - | edit files, you want to patch and save the changes | + | Edit files, you want to patch and save the changes |
| < | < | ||
| - | dquilt refresh | + | $ dquilt refresh |
| </ | </ | ||
| - | revoke all patches | + | Revoke all patches, apply all patches to verify that we didn't break any of the following patches, after that revoke all patches |
| < | < | ||
| - | dquilt pop -a | + | $ dquilt pop -a |
| + | $ dquilt push -a | ||
| + | $ dquilt pop -a | ||
| </ | </ | ||
| - | check your changes with "git status" | + | Check your changes with "git status" |
| < | < | ||
| - | * Create | + | * Add patch: 203_nxagent_disable-rootless-exit.full.patch, |
| < | < | ||
| </ | </ | ||
| - | commit | + | Commit |
| + | < | ||
| + | $ debcommit -a | ||
| + | </ | ||