]> git.donarmstrong.com Git - neurodebian.git/blob - sphinx/blog/2012/2012-04-14_ndtools.rst
posted blog on nd* tools with minor changes
[neurodebian.git] / sphinx / blog / 2012 / 2012-04-14_ndtools.rst
1 :date: 2012-04-14 22:16:00
2 :tags: debian, neuroscience, software, development, packages, virtualization
3
4 .. _chap_ndtools_build:
5
6
7 NeuroDebian nd* tools
8 =====================
9
10 One of the goals of NeuroDebian_ is to provide recent versions of
11 scientific software on stable Debian (and Ubuntu) deployments.  That
12 is why we build (whenever possible) every new package not only for the
13 Debian unstable (the entry point of packages into Debian) but also for
14 Debian testing and stable, and Ubuntu releases.  To automate such
15 procedure we prepared few rudimentary wrappers around cowbuilder_
16 allowing to build packages in isolated environment.  Also we provide a
17 backport-dsc_ script to ease backporting with optional application of
18 per-release patchsets.  In this blog post we would like to introduce
19 you to these tools.  They will be of use for anyone working on a
20 package intended to be uploaded to NeuroDebian_ repository or anyone
21 interested to verify if package could be easily backported.  With a
22 single command you will be able to build a given Debian source package
23 across distributions.  As a result you will verify that there are no
24 outstanding backport-ability issues or compatibility problems with
25 core components (e.g. supported versions of Python) if your source
26 package excercises test suites at build time.
27
28 .. _cowbuilder: http://packages.debian.org/sid/cowbuilder
29 .. _NeuroDebian: http://neuro.debian.net
30 .. _backport-dsc: https://github.com/neurodebian/neurodebian/blob/master/tools/backport-dsc
31
32
33 Procedure
34 ---------
35
36 - [1-20 min] If you are not running Debian-based distribution,
37   :ref:`Install NeuroDebian VM <chap_vm>`; otherwise just :ref:`add apt
38   sources for NeuroDebian repository <repository_howto>`.
39
40 - [<1 min] Install the neurodebian-dev package providing nd* tools::
41
42    sudo apt-get install neurodebian-dev
43
44 - [1-5 min] Adjust default configuration (``sudo vim
45   /etc/neurodebian/cmdsettings.sh``) used by nd commands to
46
47   - point ``cowbuilderroot`` variable to some directory under
48     ``brain`` account, e.g. ``~brain/debs`` (should be created by you)
49
50   - remove undesired releases (e.g. deprecated ``karmic``) from
51     allnddist and alldist
52
53   - adjust ``mirror`` entries to use the `Debian mirror`_ and `Ubuntu
54     mirror`_ of your choice or may be even point to your `approx
55     <http://packages.debian.org/sid/approx>`_ apt-caching server
56
57 .. _`Debian mirror`: http://www.debian.org/mirror/list
58 .. _`Ubuntu mirror`: https://launchpad.net/ubuntu/+archivemirrors
59
60 - [10-60 min] Create the COWs for all releases you left in the
61   configuration file::
62
63         sudo nd_adddistall
64
65
66 Building
67 --------
68
69 At this point you should be all set to build packages for all
70 distributions with a single command.  E.g.::
71
72    sudo nd_build4all blah_1-1.dsc
73
74 should take the .dsc file you provide, and build it for main Debian
75 sid and all ND-supported releases of Debian and Ubuntu.
76 ``nd_build4allnd`` would build only for the later omitting the vanilla
77 Debian sid.  The highlevel summary either builds succeed or failed get
78 reported in ``summary.log`` in the same directory, pointing to
79 ``.build`` log files for the corresponding architecture/release.
80
81
82 Troubleshooting Failing Build
83 -----------------------------
84
85 Provide ``--hookdir`` cmdline pbuilder argument to point to a hook
86 which would get kicked in by pbuilder upon failure, e.g.::
87
88    sudo apt-get install git
89    git clone https://github.com/neurodebian/neurodebian
90    sudo nd_build4debianmain *.dsc -- --hookdir $PWD/neurodebian/tools/hooks
91
92
93 If you have any comments (typos, improvements, etc) -- feel welcome to
94 leave a comment below, or `contact us`_ .
95
96 .. _contact us: http://neuro.debian.net/#contacts