Uwe Ohse

uoinstall - quick and dirty documentation


Environment variables influencing the ownership

nochown=[any value]
if this variable is set then uoinstall will not try to change to owner of any file it installs.
User and group names specified in the install.list file may be overridden by environment variables. For example: If you want bin to own the programs instead of root then you may run:
    $ make root=bin install
Note (A):
This may break quite a number of setuid programs. They may have a reason to need special rights, after all.
Note (B):
Running "make install" is a security risk if you don't control the environment (this is true in any case).
Note (C):
This fails if the user is, for example, prefix.

Overriding paths

The following environment variables influence where programs, documentation and data are installed (the values shown are the defaults as of 2000-08-10):
prefix=/usr/local
general prefix.
exec_prefix=$(prefix)
program prefix.
bindir=$(exec_prefix)/bin
sbindir=$(exec_prefix)/sbin
libexecdir=$(exec_prefix)/libexec
datadir=$(prefix)/share
sysconfdir=$(prefix)/etc
sharedstatedir=$(prefix)/com
localstatedir=$(prefix)/var
libdir=$(prefix)/lib
infodir=$(prefix)/info
lispdir=$(prefix)/emacs/site-lisp
includedir=$(prefix)/include
oldincludedir=/usr/include
mandir=$(prefix)/man
man1dir=$(mandir)/man1
man2dir=$(mandir)/man2
man3dir=$(mandir)/man3
man4dir=$(mandir)/man4
man5dir=$(mandir)/man5
man6dir=$(mandir)/man6
man7dir=$(mandir)/man7
man8dir=$(mandir)/man8
man9dir=$(mandir)/man9
Things are a little more complicated in reality: The variables listed above will only be used if the install.list file references them. And that file may reference additional environment variables.

The install.list file

The file is read line by line. Lines starting with a colon are ignored. All other lines consist of a number fields separated by colons.
The first field is a type, the second a target file or directory name, the third is a uid, the thourth is a gid, the fifth is a access mode, the sixth is a source file.
type
is one of:
  1. dir: create a directory. source is ignored.
  2. file: source is copied to target.
  3. -file: source is copied to target if target doesn't exist.
  4. subst: source is copied to target line by line. @string@ sequences will be replaced by the value of the environment variable string, and if that variable is not set then by the string string.
  5. -subst: like subst, but will not replace existing files.
  6. text: source is interpreted as a text to be written into target.
  7. -text: like text, but will not replace existing files.
target
is a target file or directory name. It may reference environment variables (${...}). If it is, after environment variable expansion, not an absolute file name then the value of $prefix will be prepended (for historical reasons. This misfeature will go away).
uid
is a user name or number. It may be overridden through an environment variable.
Flags may be appended to the name or number after an @ character. At this time the only known flag is if-created, meaning that the change of the user id will only be done if the target did not already exist. The flag is only honored if the target is a directory.
gid
is a group name or number. It may be overridden through an environment variable.
Flags may be appended to the name or number, see above.
mode
is a file access mode (in octal numbers). Flags may be appended to the mode after an @ character. At this time the only known flag is if-created, meaning that the change of the user id will only be done if the target did not already exist. The flag is only honored if the target is a directory.
source
is the source file name.
is a target file or directory name. It may reference environment variables (${...}).