PORG(8) | System | PORG(8) |
porg - a source code package organizer
porg [OPTIONS] <packages>
porg -l [OPTIONS] <package> <command>
porg -q <files>
Porg is a program to aid package management when installing packages from source code.
When installing a package, porg may be used in log mode (with option -l) to wrap the installation command (e.g. "make install"), and log the created files into a text database.
Porg also provides options for printing package information, package files, removing packages or querying for the owner of files.
The special option '--' forces and end of option-scanning. This is specially useful when entering the install command in log mode.
Mandatory arguments to long options are mandatory to short options too.
These options can be used to list packages or files.
Only one of these options may be used at once.
Options -I, -E and -e accept a
colon-separated list of paths, each of which may contain shell-like
wildcards (*, ? and [..]). Files are matched against each of those paths,
following the standard shell-like expansion, but with the following
exception: If a path in the list does not contain any wildcard, and it is a
directory, it matches any file within that directory.
Note that if wildcards are to be used, the whole list of paths must be
enclosed in single quotes (') to protect it from being expanded by the
shell.
As of version 0.3, porg accepts filenames with spaces when logging package installations. Although IMHO this should be seen as an improvement in general terms, it may cause problems when trying to feed 'porg -l' with a list of files separated by spaces. For example, the following command:
echo /bin/foo /bin/bar | porg -l
would try to log the file "/bin/foo /bin/bar" instead of logging /bin/foo and /bin/bar separately. To fix this, one may use newlines to separate file names, and pass option -e to echo so it honours escape characters, like this:
echo -e "/bin/foo\n/bin/bar" | porg -l
or either write the list of files separated by newlines into a temporary file, and run:
cat tmpfile | porg -l
To log the installation of the package 'foo-1.0', which is installed with the command 'make -C src install':
porg -lp foo-1.0 "make -C src install"
Note that in this example the quotes are required to prevent porg to consider '-C' as a command line option. The special end-of-option argument '--' may be used for the same purpose:
porg -lp foo-1.0 -- make -C src install
Use single quotes if the command already contains double quotes:
porg -lp foo-1.0 'echo "hello world" > /var/log/foo.log'
Alternatively, we can use the basename of the current directory as the name of the package to be logged, using the option -D instead of -p:
porg -lD "make install && make install.man"
If we have forgotten to install a file, it can be added to a previously created log with the option -+:
porg -lp+ foo-1.0 "install bar /bin/bar"
Note that the option -+ cannot be used to remove a file from the log. For instance, the following command:
porg -lp+ foo-1.0 "rm /bin/bar"
would not remove the file /bin/bar from the log of foo-1.0.
To avoid such behaviour it is sometimes useful to join up composed install commands into one single command and run porg once. For instance, imagine that a package installs the file /bin/bar, but we want it to be installed in /usr/bin/bar instead. If one runs this:
porg -lp foo-1.0 make install
porg -lp+ foo-1.0 "mv /bin/bar /usr/bin/bar"
Both files, /bin/bar and /usr/bin/bar remain in the log. This is usually not the desired behaviour. As a workaround one can join up both commands in one single porg run:
porg -lp foo-1.0 "make install && mv /bin/bar
/usr/bin/bar"
In this case only /usr/bin/bar is logged.
To remove the package foo-3.3, keeping the files in /etc and the files ending with ".conf":
porg -r -e '/etc:*.conf' foo-3.3
You have installed the package 'boo-1.9' in prefix '/opt/boo-1.9', but you haven't logged the installation with porg. No problem! Just create a log for it thusly:
find /opt/boo-1.9 | porg -lp boo-1.9
By the way, porg internally converts all package names to lower case; 'FooBar' and 'foobar' are the same package.
Due to LD_PRELOAD limitations, porg can't follow the trace of suid
programs.
For the same reason, porg does not work with programs that statically link
libc.
/etc/porgrc - configuration file
/var/lib/porg - default log directory
Written by David Ricart (http://porg.sourceforge.net)
17 May 2016 | porg 0.10 |