This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
wiki:development:nxlibs-repository [2011/11/13 08:49] rt created |
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 ' | ||
| + | ===== Unresolved Issues ===== | ||
| + | |||
| + | - How to import pristine-tar data. Note that the git-import-orig dir strips the first directory member. This is usually sensible for sensible projects, but not for NX, which expects the sources to be unpacked in a very precise manner. Therefore, we need to pretty clumsily work with temporary subdirectories to capture this right. I have not investigated yet how to integrate this with pristine-tar | ||
| + | - Mike writes: after struggling with pristine-tar for more than a day now... I have reported a [[http:// | ||
| + | |||
| + | |||
| + | ===== Editing patches using quilt ===== | ||
| + | ==== Configure quilt ==== | ||
| + | The following configuration options support the usage of quilt. | ||
| + | |||
| + | create ~/ | ||
| + | <code bash .quiltrc-dpkg> | ||
| + | #!/bin/bash | ||
| + | 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=" | ||
| + | QUILT_PATCH_OPTS=" | ||
| + | QUILT_DIFF_ARGS=" | ||
| + | QUILT_REFRESH_ARGS=" | ||
| + | QUILT_COLORS=" | ||
| + | if ! [ -d $d/ | ||
| + | fi | ||
| + | </ | ||
| + | |||
| + | Set an alias to use these configuration options. This only appies to Bash and can be added to '' | ||
| + | <code bash> | ||
| + | alias dquilt=" | ||
| + | </ | ||
| + | ==== Modifying patches ==== | ||
| + | get a source tree from git | ||
| + | < | ||
| + | git clone ssh:// | ||
| + | cd nx-libs | ||
| + | </ | ||
| + | apply patches until you find patch you want to edit | ||
| + | < | ||
| + | dquilt push | ||
| + | </ | ||
| + | edit files you want to change | ||
| + | if you want to add new files to patch, you can make it with command: | ||
| + | < | ||
| + | dquilt add <new file> | ||
| + | </ | ||
| + | after you are finished with editting, apply changes to patch | ||
| + | < | ||
| + | dquilt refresh --strip-trailing-whitespace | ||
| + | </ | ||
| + | revoke all patches with | ||
| + | < | ||
| + | dquilt pop -a | ||
| + | </ | ||
| + | check your changes with "git status" | ||
| + | < | ||
| + | * Update patch: 202_nx-x11_enable-xinerama.full.patch, | ||
| + | < | ||
| + | </ | ||
| + | commit your changes with " | ||
| + | ==== Create new patch ==== | ||
| + | Apply patches until you reach the code state where you want to begin with your new patch | ||
| + | < | ||
| + | $ dquilt push | ||
| + | </ | ||
| + | Create new patch ''< | ||
| + | < | ||
| + | $ dquilt new 203_nxagent_disable-rootless-exit.full.patch | ||
| + | </ | ||
| + | Add files, which you want to patch with | ||
| + | < | ||
| + | $ dquilt add < | ||
| + | </ | ||
| + | Edit files, you want to patch and save the changes | ||
| + | < | ||
| + | $ dquilt refresh | ||
| + | </ | ||
| + | Revoke all patches, apply all patches to verify that we didn't break any of the following patches, after that revoke all patches again: | ||
| + | < | ||
| + | $ dquilt pop -a | ||
| + | $ dquilt push -a | ||
| + | $ dquilt pop -a | ||
| + | </ | ||
| + | Check your changes with "git status" | ||
| + | < | ||
| + | * Add patch: 203_nxagent_disable-rootless-exit.full.patch, | ||
| + | < | ||
| + | </ | ||
| + | Commit your changes with | ||
| + | < | ||
| + | $ debcommit -a | ||
| + | </ | ||