r885 - trunk

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Fri Sep 3 23:30:22 PDT 2004

Author: tushar
Date: 2004-09-04 00:30:16 -0600 (Sat, 04 Sep 2004)
New Revision: 885

Updated Hint: paco

Modified: trunk/paco.txt
--- trunk/paco.txt	2004-09-04 06:27:24 UTC (rev 884)
+++ trunk/paco.txt	2004-09-04 06:30:16 UTC (rev 885)
@@ -1,79 +1,37 @@
-AUTHOR:   David Rosal (davidrr at menta.net)
+AUTHOR:   David Rosal <davidrr at menta.net>
-DATE:     2004-06-22
+DATE:     2004-09-03
 LICENSE:  GNU Free Documentation License Version 1.2
-SYNOPSIS: Paco, installpac - Package management for LFS
+SYNOPSIS: Paco - Source code package manager
 Yet another try to provide a package manager for source-code-based systems,
-such as LFS. But I woudn't submit this hint if I did not think that it might
-be really useful. Paco comes with some nice features, such as a gtk graphic
-interface, and the use of the LD_PRELOAD method to keep track of the files
-installed by the packages, wich is much better than the "timestamp sandwich"
-method, used by many package managers.
+such as LFS. But paco comes with some nice features, such as a (optional)
+GTK+ graphic interface, and the use of the LD_PRELOAD method to keep track
+of the files installed by the packages.
-  * gtk+-2.0 or later
-  * pkg-config
+  * For the (optional) GUI: gtk+ >= 2.0 and pkg-config.
-  * http://www.webpersonal.net/kusoft/paco
+  The latest version of this hint and the sources of paco can be found in:
+  	--> http://paco.sourceforge.net
 0. Introduction
-I wrote this because I was tired of looking for a simple package manager.
-With simple I mean without automatic downloads, automatic dependency
-tracking, automatic installation and automatic everything. I just want to
-keep my box in order and to know the origin of every file in my system. This
-is the main goal of paco. If you like to install programs by hand; if you
-are familiar with "./configure && make && make install", then paco can be
-your friend. 
+I wrote paco because I couldn't get satisfied with any existent package
+manager to keep track of my LFS installation.
-1. Installpac
-Installpac logs the installation of a new package. It uses the LD_PRELOAD
-method to keep track of all installed files, and writes the list in a log
+I used to work with Andy Goth's install-log, which I like much; but
+install-log has some serious limitations due to the use of the "timestamp
+method" to keep track of the files installed by the packages.
+As said in the BLFS book:
-Installpac is actually a hack of "installwatch", which is described as
-follows in its home page:
-    Installwatch is an extremely simple utility I wrote to keep track of
-    created and modified files during the installation of a new program.
-    It's fast and easy to use. It doesn't require a "pre-install" phase
-    because it monitors processes while they run.
-    Installwatch works with every dynamically linked ELF program,
-    overriding system calls that cause file system alterations. Some of
-    such system calls are open(2) and unlink(2).
-1.1 Usage
-    $ installpac [-p <package>] [OPTIONS] <command>
-This monitors <command> and creates a log file for the <package>, with a
-list of every created or modified file. The log is placed automatically in
-the paco log directory, where it can be read by paco.
-When called without a package name, like:
-    $ installpac <command>
-does the same thing, but writing data to the standard output.
-The typical use is:
-    $ installpac -p foolbar-x.y.z make install
-1.2 The LD_PRELOAD method
-When I began to wrote paco, I used the timestamp method to log the
-installation of a new package, but I always keeped in mind that this is not
-a very reliable one. As said in the BLFS book:
     In this technique, a file is timestamped before the installation of
     the package. After the installation, a simple use of the find
     command with the appropriate options can generate a log of all the
@@ -86,65 +44,115 @@
     tracked by the package manager. Also, this scheme can only be used
     when one package is installed at a time. The logs are not reliable
     if two packages are being installed on two different consoles. 
-The main advantage of the LD_PRELOAD method is that it's able to keep trace
-of a given command (e.g. "make install"), even if there are different
-processes running on the same machine. In other words: with installpac is
-possible to log different package installations at the same time.
+I also tried installwatch, which is based on the LD_PRELOAD method, which I
+find better: To get the list of installed files, a library is loaded before
+installation. During installation, this library tracks the system calls that
+modify the filesystem. For this approach to work, all the executables need
+to be dymanically linked without the suid or sgid bit.
+But though installwatch is very efficient, it finally writes the list in a
+non-human readable format; and it stops there, without providing any feature
+to manage the packages after installation.
-2. Paco
-Once you have installed some packages and logged them with installpac, you
-can use paco to organize your stuff.
-Paco retrieves package information from the logs, and displays it in a
-friendly format, on the console or by a gtk graphic interface. It has also
-several options to perform some basic operations on the logged packages,
-such as removing a package or querying for the owner of one or more files.
-2.1. Usage
-This is a brief usage message, as displayed by "paco --help":
+So finally I decided to put my fingers on the keyboard, and write a package
+manager with the pros of the above and without their cons. And the result is
+paco (pacKAGE oRGANIZER).
-  paco [OPTIONS] <package(s)>
-  paco -q <file(s)>
-      --block-size=SIZE  Show sizes in SIZE-byte blocks.
-  -b, --bytes            Like '--block-size=1'
-  -d, --show-dates       Show installation dates.
-  -f, --files            List installed files
-      --help             Display this help and exit
-  -g, --gui              Run the gui
-  -h, --human-readable   Show sizes in human readable format, like 1.2M 7k
-  -k, --kilobytes        Show sizes in blocks of 1024 bytes
-  -l, --list             List packages
-  -m, --missing          With '-f': list only the missing files.
-                          Without '-f': Print the number of missing files
-  -q, --query            Query for the package(s) that own one or more files
-  -r, --remove           Remove a package
-      --remove-forced    With -r: don't ask for confirmation when removing
-      --remove-shared    With -r: remove also the shared files
-  -R, --reverse          Reverse order while sorting
-      --sort=WORD        Sort by WORD: 'size', 'date' or 'missing'
-  -s, --show-sizes       Show sizes
-  -t, --total            Print the total(s)
-  -u, --update           Update the logs, recalculating the size of the
-                          files, and setting their status (missing or not)
-  -v, --version          Display version information
+1. Usage
+Paco works mainly in two modes:
+In log mode it keeps track of a package installation (though it can be used
+to follow the trace of any command or script), and generates a list of all
+installed files.
-This program was inspired mainly on Andy Goth's "install-log", which is no
-long maintained. Nevertheless, their work has been very useful to me to
-learn some C programming issues.
-Install-log can be found at:    
-    --> http://ioioio.net/devel/install-log
+Paco can be run also in list, query or remove modes to perform some basic
+operations on the installed packages, by retrieving information from their
-I'd also like to thank "installwatch" developers:
-    --> http://asic-linux.com.mx/~izto/checkinstall/installwatch.html
+The output of 'paco --help' follows:
+| Usage:
+|   paco [OPTIONS] <packages>
+|   paco -q <files>
+|   paco -l [OPTIONS] <command>
+| General options:
+|   -g, --gui               Run the gui.
+|   -L, --logdir=DIR        Read/write logs from/to directory DIR.
+|   -q, --query             Query for the owner(s) of <files>.
+|   -u, --update            Update the package database.
+|   -v, --verbose           Verbose output.
+|   -V, --version           Display version information.
+|   -?, --help              Display usage information.
+| List options:
+|   -1, --one-column        List one package per line.
+|   -B, --block-size=SIZE   Show sizes in SIZE-byte blocks.
+|   -b, --bytes             Show sizes in 1-byte blocks.
+|   -k, --kilobytes         Show sizes in 1024-byte blocks.
+|   -h, --human-readable    Show sizes in human readable format (e.g. 1.2M, 7k).
+|   -d, --date              Show installation date.
+|   -D, --date-and-hour     Show date and hour of installation.
+|   -f, --list-installed    List installed files.
+|   -m, --list-missing      List missing files.
+|   -F, --installed         Print the number of installed files.
+|   -M, --missing           Print the number of missing files.
+|   -s, --sort=WORD         Sort by WORD: size, date, name, installed or missing.
+|   -R, --reverse           Reverse order while sorting.
+|   -t, --total             Print the total.
+| Remove options:
+|   -r, --remove            Remove the (non shared) files of a package.
+|       --remove-shared     With -r: Remove also the shared files.
+|       --batch             With -r: Don't ask for confirmation when removing.
+|   -e, --remove-empty-dir  With -r: Remove empty directories.
+|   -U, --unlog             Remove the log of the package.
+| Log options:
+|   -l, --log               Log mode.
+|   -p, --package=PKG       Name of the package to log.
+|   -a, --append            With '-p': If the package is already logged, append
+|                            the list of files at the end of the log.
+|   -I, --include=PATH:...  Colon-separated list of paths to scan.
+|   -E, --exclude=PATH:...  Colon-separated list of paths to skip.
+| Note: The list mode is enabled by default.
+1) To log the installation of the package 'foobar-1.0', wich is installed by
+   'make -C src install':
+        paco -lp foobar-1.0 "make -C src install"
+   (Note that in this example the quotes are required in order to prevent
+   paco to parse '-C' as a command line option).
+2) To list the missing files of the package 'foobar-1.0':
+        paco -fM foobar-1.0
+3) To print a list of all logged packages sorted by size, with the sizes in
+   human readable format, and the installation dates:
+        paco -hds size
+4) To print the owners of each file in directory /bin:
+        paco -q /bin/*
+  * Almost everything changed.
   * Replaced the tarball URL with the project web site one.
   * Added introduction.

More information about the hints mailing list