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

  1. The package is available in “neurogeek” overlay. To add this overlay use:
layman -a neurogeek
  1. Make sure that “source /var/lib/layman/make.conf” is in your /etc/make.conf
  2. To install the package type:
emerge autodep

Running

autodep [options] <command>
--help, -h

Show this help message and exit.

-b, --block

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

--blockpkgs=PACKAGES

Block access to files from this packages.

-f, --files

Show all files, accessed and missing (not found).

-v, --verbose

Show non-important packages, unknown packages and unknown building stages.

--nocolor, -C

Don’t colorize output

--hooklib

Use LD_PRELOAD logging approach (default).

--fusefs

Use FUSE logging approach (slow, but reliable).

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

Note

You can use emerge_strict command to check dependencies of a packages. The command has same syntax as emerge and launches bundled emerge with depcheckstrict feature.

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 [1]
What events are logged? Most [2] ALL
When is it recomended to use an approach? Analysis of buildtime dependencies Analysis of runtime dependencies
Are there any pre-requirements for using an approach? NO FUSE must be enabled in kernel

Notes

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

Examples

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

autodep emerge net-irc/xchat

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

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

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

autodep --files emerge net-irc/xchat

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

autodep --fusefs --files xchat

Indices and tables

Table Of Contents

Previous topic

Autodep’s documentation

Next topic

Internals

This Page