====== The nx-libs repository ====== This page explains how the branches of the ''nx-libs'' repository are managed Links: * http://code.x2go.org/gitweb?p=nx-libs.git;a=summary ===== Importing the old sources ===== The old sources were downloaded by brute force from the nomachine download server: wget http://64.34.161.181/download/3.5.0/sources/nx-X11-3.5.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.2/sources/nx-X11-3.4.2-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.1/sources/nx-X11-3.4.1-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.0/sources/nx-X11-3.4.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.3.0/sources/nx-X11-3.3.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.2.0/sources/nx-X11-3.2.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.1.0/sources/nx-X11-3.1.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.0.0/sources/nx-X11-3.0.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.5.0/sources/nxagent-3.5.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.2/sources/nxagent-3.4.2-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.1/sources/nxagent-3.4.1-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.0/sources/nxagent-3.4.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.3.0/sources/nxagent-3.3.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.2.0/sources/nxagent-3.2.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.1.0/sources/nxagent-3.1.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.0.0/sources/nxagent-3.0.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.5.0/sources/nxauth-3.5.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.2/sources/nxauth-3.4.2-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.1/sources/nxauth-3.4.1-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.0/sources/nxauth-3.4.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.3.0/sources/nxauth-3.3.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.2.0/sources/nxauth-3.2.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.1.0/sources/nxauth-3.1.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.0.0/sources/nxauth-3.0.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.5.0/sources/nxcomp-3.5.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.2/sources/nxcomp-3.4.2-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.1/sources/nxcomp-3.4.1-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.0/sources/nxcomp-3.4.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.3.0/sources/nxcomp-3.3.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.2.0/sources/nxcomp-3.2.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.1.0/sources/nxcomp-3.1.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.0.0/sources/nxcomp-3.0.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.5.0/sources/nxcompext-3.5.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.0/sources/nxcompext-3.4.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.3.0/sources/nxcompext-3.3.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.2.0/sources/nxcompext-3.2.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.1.0/sources/nxcompext-3.1.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.0.0/sources/nxcompext-3.0.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.5.0/sources/nxproxy-3.5.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.1/sources/nxproxy-3.4.1-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.0/sources/nxproxy-3.4.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.3.0/sources/nxproxy-3.3.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.2.0/sources/nxproxy-3.2.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.1.0/sources/nxproxy-3.1.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.0.0/sources/nxproxy-3.0.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.5.0/sources/nxcompshad-3.5.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.4.0/sources/nxcompshad-3.4.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.3.0/sources/nxcompshad-3.3.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.2.0/sources/nxcompshad-3.2.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.1.0/sources/nxcompshad-3.1.0-{1..15}.tar.gz wget http://64.34.161.181/download/3.0.0/sources/nxcompshad-3.0.0-{1..15}.tar.gz These sources are then unpacked in a temporary directory ''t/'': #!/bin/bash mkdir t; cd t; for p in nxcomp{,shad,ext} nxproxy; do for f in ../$p*.tar.gz; do b=`basename $f`; mkdir $b; ( cd $b; tar xvf ../$f; ); done done Now clone the nx-libs repo: git clone git://code.x2go.org/nx-libs.git there, for each new submodule, create a new branch. as an example, here for the nxcomp branch: 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 ''nx-libs''. This faciliates the merging step later. We now import the sources using the [[http://packages.debian.org/squeeze/git-load-dirs | git_load_dirs]] tool. It is run in the temporary directory ''t/'': #!/bin/bash wc=../nx-libs 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 'nxcomp' branch. ===== 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://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653465|patch against pristine-tar to Debian BTS]]: With that patch applied to pristine-tar, it is possible to commit NX sources as pristine-tar objects (.delta, .id) to our Git. ===== Editing patches using quilt ===== ==== Configure quilt ==== The following configuration options support the usage of quilt. create ~/.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="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 Set an alias to use these configuration options. This only appies to Bash and can be added to ''~/.bashrc''. Other shells may have similar commands. alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg" ==== Modifying patches ==== get a source tree from git git clone ssh://x2go@code.x2go.org:32032/srv/git/code.x2go.org/nx-libs.git 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 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" and "git diff". Edit changelog with "dch", make sure you keep changelog lines below 80 characters, for example: * Update patch: 202_nx-x11_enable-xinerama.full.patch, . commit your changes with "debcommit -a" ==== 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 ''__.full.patch'', for example: $ 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" and "git diff". Edit changelog with "dch", make sure you keep changelog lines below 80 characters, for example: * Add patch: 203_nxagent_disable-rootless-exit.full.patch, . Commit your changes with $ debcommit -a