aboutsummaryrefslogtreecommitdiff
blob: 400a6684412a9bf64d32bc03062429f66e747d04 (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
************
Introduction
************

Overview
===================================
Auto dependency (autodep) builder is a tool for the analysis of accessed files during 
the build of a package. It also can be used for runtime dependencies analysis.

The tool can trace, log and block access to files of given packages.

It is released under GNU GPL license.

Status
===================================
Autodep is in active developing.

Installing
===================================
.. note::
   TODO: make an overlay and ebuild

Running
===================================

.. program:: autodep

.. code-block:: none

    autodep [options] <command>

.. cmdoption:: --help, -h

   Show this help message and exit.

.. cmdoption:: -b, --block

   strict mode: Deny all access to files from non-dependency packages.

.. cmdoption:: --blockpkgs=PACKAGES

   Block access to files from this packages.

.. cmdoption:: -f, --files 

   Show all files, accessed and missing (not found).
.. cmdoption:: -v, --verbose 

   Show non-important packages, unknown packages and unknown building stages.
.. cmdoption:: --nocolor, -C

   Don't colorize output
.. cmdoption:: --hooklib

   Use LD_PRELOAD logging approach (default).
.. cmdoption:: --fusefs

   Use FUSE logging approach (slow, but reliable).

Example: showfsevents.py -b lsof,cowsay emerge bash

Hooklib vs Fusefs
===================================

+------------------------------------------------+-------------+---------------+
|                                                |   Hooklib   |     FuseFS    |
+================================================+=============+===============+
| Who can use this approach?                     | **Any user**|   Only root   |
+------------------------------------------------+-------------+---------------+
| Does approach allows to block access to files? |  **YES**    | **YES**       |
+------------------------------------------------+-------------+---------------+
| Is the overhead in performance noticeable?     |  **NO**     | YES [#f1]_    |
+------------------------------------------------+-------------+---------------+
| What events are logged?                        |  Most [#f2]_| **ALL**       |
+------------------------------------------------+-------------+---------------+
| When is it recomended to use an approach?      | Analysis    | Analysis      |
|                                                | of          | of *runtime*  |
|                                                | *buildtime* | dependencies  |
|                                                | dependencies|               |
+------------------------------------------------+-------------+---------------+
| Are there any pre-requirements                 | **NO**      | FUSE must be  |
| for using an approach?                         |             | enabled in    |
|                                                |             | kernel        |
+------------------------------------------------+-------------+---------------+

.. rubric:: Notes

.. [#f1] FUSE filesystems are slower than a normal one. A Program accesses many files 
   while launching, so this will take more time than usual.
.. [#f2] Loading of Dynamic libraries and direct syscalls will not be logged.

Examples
===================================
.. rubric:: 1. Get the potential dependencies for net-irc/xchat:

.. code-block:: none

    autodep emerge net-irc/xchat

.. rubric:: 2. Get the potential dependencies for net-irc/xchat, blocking 
   x11-misc/util-macros package:

.. code-block:: none

    autodep emerge --blockpkgs x11-misc/util-macros emerge net-irc/xchat

.. rubric:: 3. Get the potential dependencies for net-irc/xchat, and show files 
   accessed:

.. code-block:: none

    autodep --files emerge net-irc/xchat

.. rubric:: 4. Get the runtime dependencies of a xchat and show accessed files:

.. code-block:: none

    autodep --fusefs --files xchat



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`