SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files
| paco - source code pacKAGE oRGANIZER |

Description

Paco is a source code package organizer for Unix/Linux systems, originally written to aid package management when installing an LFS (Linux From Scratch) system.

When installing a package from sources, paco wraps the "make install" command (or whatever is needed to install the files into the system), and generates a log containing the list of all installed files. (See "The LD_PRELOAD method" below for more information).

Please note that paco does not modify the way packages are built and installed. So if you are familiar with the "./configure && make && make install" dance you can continue with it. Just add "paco -lp foobar-x.y" right before "make install", and it will catch all the files that are installed in your system, creating a log for the package in the paco database.

Once some packages have been installed and properly logged, paco can be used to retrieve information from the logs and display it in different formats. It can also remove packages or query for the packages that own one or more files.
See "Usage" below for more information, or type "man paco" after installation.

Gpaco

Gpaco is the GTK+ graphic interface of paco. It's not mean to be a replacement of paco, since it lacks some important features like logging package installations, but it allows for manipulating the installed packages in a more comfortable way.
Gpaco requires GTK+ >= 2.6 and pkg-config.

The LD_PRELOAD method

In log mode, to get the list of all installed files, paco preloads a library before installation, and during installation this library catches all the system calls that modify the filesystem, like open(), link(), rename()...

This method is fast and easy to use. It doesn't require a "pre-install" phase because it monitors processes while they run. The preloaded library is taken into account only by the installation process, so the log is never contaminated with any file created by other processes running at the same time. Thus paco can be used to track parallel installations.

Usage

The output of 'paco --help' follows:

+-----
| Usage:
| paco [OPTIONS] <packages|files|command> |
| General options:

|   -L, --logdir=DIR         Use DIR as the log directory.
|   -x, --expand             Expand the command line package names.
|   -a, --all                Apply to all logged packages (not with -r).
|   -v, --verbose            Verbose output (-vv produces debugging messages).
|   -h, --help               Display this help message.
|       --version            Display version information.

|
| Database maintenance options:

|   -u, --update             Update the log of the package.
|   -U, --unlog              Remove the log of the package. See Remove options.

|
| General list options:
| -b, --block-size=SIZE Use blocks of SIZE bytes for the sizes.

|   -k, --kilobytes          Like '--block-size=1024'.
|       --sort=WORD          Sort by WORD: 'name', 'date', 'size', 'files',
|                            'missing-size' or 'missing-files'.
|   -R, --reverse            Reverse order while sorting.
|   -t, --total              Print totals.

|
| Package list options:

|   -1, --one-column         List one package per line.
|   -F                       Print the number of installed files.
|   -M                       Print the number of missing files.
|   -C                       Print the number of shared files.
|   -d, --date               Show installation date (-dd show the hour too).
|   -s, --size               Show the installed size of each package.
|   -n, --missing-size       Print the total missing size of the package.

|
| File list options:

|   -f, --files              List installed files.
|   -m, --missing-files      List missing files.
|   -c, --shared             List only the shared files (see the man page).
|   -w, --who-shares         With -c: Print the packages that share each file.
|   -y, --symlinks           Print the contents of symbolic links.
|   -z, --no-package-name    Don't print the name of the package.
|   -s, --size               Show the size of each file.

|
| Information options:
| Note: Information may be not available for all packages. | -i, --info Print package information. | -o, --configure-options Print the options passed to configure when the

|                            package was installed.
|   -q, --query              Query for the packages that own one or more files.
|   -V, --variable=VAR       Print the package build-time value of the
|                            environment variable VAR (see the man page).

|
| Remove options:

|   -r, --remove             Remove the (non shared) files of the package.
|       --remove-shared      Remove also the shared files.
|       --batch              Don't ask for confirmation when removing.
|   -U, --unlog              Always remove the log of the package.
|   -e, --skip=DIR:...       Don't remove files in these directories.

|
| Log options:

|   -l, --log                Enable log mode. See the man page.
|   -p, --package=PKG        Name of the package to log.
|   -D, --dirname            Use the name of the current directory as the name
|                            of the package.
|   -+, --append             With -p or -D: If the package is already logged,
|                            append the list of files into the log.
|       --ignore-errors      Do not exit if the monitored command fails.

| -I, --include=DIR:... List of paths to scan. | -E, --exclude=DIR:... List of paths to skip. |
| Note: The package list mode is enabled by default. +-----

Examples

  1. To log the installation of the package 'foo-1.0', which is installed with the command 'make -C src install':

paco -lp foo-1.0 "make -C src install"

This will create a log file named 'foo-1.0' in the log directory, with the list of all installed files.
(Note that in this example the quotes are required in order to prevent paco to treat '-C' as a command line option).

2) Alternatively, we can use the name of the current directory as the name of

the package to log, using the option '-D':

paco -lD make install

3) If we have forgotten to install a file, it can be added to a previously

created log with the option '-+':

paco -lp+ foo-1.0 "install boo /usr/bin/boo"

4) The option '-x' can be used along with '-l' to avoid typing the version of

the package to install, in cases when the package is already installed and we want to add files to its log:

paco -xlp+ foo "install moo /usr/lib/moo"

If there's not any version of the package foo already installed, the above command will create a new log for it. But if there's any version of foo installed, say foo-1.2, then it would add the file /usr/lib/moo to its log.

In cases of conflict (when the package name expansion leads to more than one installed package), paco prints an error message and exits. For example, if the packages foo-1.2 and foo-2.4 are both installed, the avobe command would fail.

5) To remove all versions of the package foo, keeping the files in /etc and

/root, and without asking for confirmation:

paco -rx -e /etc:/root --batch foo

6) We have installed the package bubble-1.9 in prefix /opt/bubble-1.9, but we

haven't logged the installation with paco. No problem! Just create a log for it thusly:

find /opt/bubble-1.9 | paco -lp bubble-1.9

It's unnecesary to pass the option "! -type d" to "find", because paco skip directories.

Supported architectures and operative systems

Paco has been successfully tested on the following platforms:


OS Vers. Architectures
    Linux   2.4     x86
    Linux   2.6     x86, amd64, mips64, ppc64
    Solaris 9       x86, sparc

NetBSD 1.6.1 x86
NetBSD 2.0.2 x86


Note
Paco does not work on systems in which binaries are linked statically, like FreeBSD or OpenBSD.

License

Copyright (C) 2004-2006 David Rosal <david.rosal@upf.edu> Paco is protected by the GNU General Public License. Look at the COPYING file for more details.

URLs

Home page:          http://paco.sourceforge.net
Mailing list:       http://lists.sourceforge.net/lists/listinfo/paco-general

At Freshmeat.net: http://freshmeat.net/projects/paco At SourceForge.net: http://sourceforge.net/projects/paco At GnomeFiles.org: http://www.gnomefiles.org/app.php?soft_id=447


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.