Debian Codegraph @

doc/wiki/FirstSteps.markdown

raw
1 # First steps #
2
3
4 Because there was no dose3 upstream release since January 2013, botch needs some features of dose3 which are only available via git. Dose3 itself can only release a new version once a new upstream version of libcudf is released. So dose3 depends on the git version of libcudf as well.
5
6 To check out the dose submodule you need git. To check out the libcudf submodule you need ca-certificates.
7
8 $ apt-get install git ca-certificates
9 $ git clone https://gitlab.mister-muffin.de/debian-bootstrap/botch.git
10 $ cd botch
11 $ git submodule update --init
12 $ (cd dose; git submodule update --init;)
13
14 You now can install all dependencies to build libcudf, dose3 and botch:
15
16 $ apt-get install build-essential ocaml-nox camlp4 libzip-ocaml-dev libbz2-ocaml-dev ocaml-findlib libextlib-ocaml-dev libre-ocaml-dev libocamlgraph-ocaml-dev
17 $ make doselib
18 $ apt-get install libatdgen-ocaml-dev libxmlm-ocaml-dev
19 $ make
20 $ apt-get install zutils dctrl-tools wget python python-apt python-networkx
21 $ ./native.sh
22
23 Botch is a set of tools which are concatenated in a meaningful manner by `./native.sh`. The result of above invocation will be:
24
25 * the files `buildgraph.xml` and `srcgraph.xml` which are the buildgraph and sourcegraph in graphml format for the current dependency situation
26 * several graphs in graphml format `cyclic_src*_*.xml` representing the strongly connected components before any dependencies were dropped
27 * a file `stats.json` containing the results of running several heuristics on the cyclic graph that help to make the graph acyclic
28 * a file `stats.html` which contains the information of `stats.json` in human readable format
29 * a file `remove.list` which contains a close to minimal selection (a feedback arc set) of build dependencies which have to be dropped in addition to the known droppable ones (given by files in the `./droppable` directory) to make the graph acyclic
30 * a file `feedback_vertex_set.list` which contains a close to minimal selection (a feedback vertex set) of source packages which were selected to be profile built according to the information in `./droppable` and `remove.list` to make the graph acyclic
31 * the files `order1.lst` and `order2.lst` which contain the resulting build order to bootstrap the whole distribution
32
33 The `./native.sh` script makes the assumption that a minimal build system including `Essential:yes` packages, `build-essential` and `debhelper` exists. Look at the `--help` output for more options. Investigate the script to see how it combines the multiple tools together.
34
35 You can also use graphviz to look at the graphs:
36
37 $ apt-get install graphviz python-pygraphviz
38 $ ./tools/graphml2dot < cyclic_src:foo_0.xml > cyclic_src:foo_0.dot
39 $ dot -Tpng cyclic_src:foo_0.dot > cyclic_src:foo_0.png
40
41 The number in the graph filename indicates the amount of vertices. Do not use `dot` to look at large graphs as computation can take hours. Furthermore, even after computation finished, the result will not be very useful due to the sheer amount of vertices and edges. If you nevertheless want to look at it, use `sfdp` instead.
42
43 Instead of looking at a huge graph you might want to look at the neighborhood of a specific node in the graph:
44
45 $ ./tools/extract_neighborhood.py --depth=2 src:foo < cyclic_src:foo_0.xml > foo.xml
46 $ ./tools/graphml2dot < foo.xml > foo.dot
47
48 If that is still too much, try a transitive reduction of the graph (not unique if the graph has cycles):
49
50 $ tred < foo.dot > foo_tred.dot
51
52 But instead of investigating the graph manually you should really look at and follow the calculated heuristics:
53
54 $ iceweasel stats.html