forked from hercules-team/augeas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HACKING
56 lines (41 loc) · 2.05 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
This file explains some details about developing the Augeas C library.
Check out the sources
---------------------
The sources are in a git repo (which you presumably found already)
git clone git://github.com/hercules-team/augeas
Building from git
-----------------
Besides the usual build tools (gcc, autoconf, automake etc.) you need the
following tools and libraries to build Augeas:
* Bison
* Flex
* readline-devel
* libxml2-devel
* libselinux-devel (optional)
Augeas uses gnulib, and you need a checkout of gnulib. The build scripts
can create a checkout for you behind the scenes - though if you already
have a gnulib checkout, you can pass its location to autogen.sh with the
--gnulib-srcdir option.
At its simplest, you build Augeas from git by running the following
commands in the toplevel directory of your Augeas checkout:
./autogen.sh [--gnulib-srcdir=$GNULIB_CHECKOUT]
make && make install
It is recommended though to turn on a few development features when
building; in particular, stricter compiler warnings and some debug
logging. You can pass these options either to autogen.sh or to
configure. You'd then run autogen like this:
./autogen.sh --enable-compile-warnings=error --enable-debug=yes
Running augtool
---------------
The script ./src/try can be used to run ./src/augtool against a fresh
filesystem root. It copies the files from tests/root/ to build/try/ and
starts augtool against that root, using the lenses from lenses/ (and none
of the ones that might be installed on your system)
The script can be used for the following; OPTS are options that are passed
to augtool verbatim
./src/try OPTS - run the commands from build/augcmds.txt
./src/try cli OPTS - start an interactive session with augtool
./src/try gdb - start gdb and set it up from build/gdbcmds.txt for
debugging augtool with commands in build/augcmds.txt
./src/try valgrind - run the commands from build/augcmds.txt through augtool
under valgrind to check for memory leaks