chiark / gitweb /
8c5db28545b190e7ddf019230875dcf3fcccf802
[userv.git] / INSTALL
1 INSTALLATION INSTRUCTIONS:
2
3    $ ./configure
4    $ make
5    # make install
6
7 This will not install the documentation, which is shipped as
8 pre-prepared HTML and PostScript as well as debiandoc-sgml source.
9 Put that (spec.html/ and spec.ps) where you will.
10
11 SYSTEM REQUIREMENTS:
12
13 Programs:
14
15 * md5sum (Colin Plumb's or the GNU version)
16 * GNU m4
17 * GNU make
18 * GNU flex
19 * GCC is preferred but other compilers ought to work (though
20   no portability testing has yet been done).  ANSI C only.
21   ints must be at least 32 bits.
22 * A sensible /bin/cat which notices write errors (ie not
23   SunOS4, BSD 4.3, or many others.)
24
25 C Library:
26
27 * [v]snprintf - a real version, not just [v]sprintf with a wrapper
28   that throws the argument away.
29 * strsignal;
30 * fnmatch;
31 * BSD syslog(3);
32 * strtoul;
33 * memcpy, memset, memcpy;
34 * realloc(0,size) must work and be equivalent to malloc(size).
35 * free(0) must work and do nothing
36 * <stdarg.h> (not varargs) and v[sf][n]printf.
37
38 System interfaces:
39
40 * setreuid(2), getreuid(2), getgroups(2), initgroups(3), with
41   the ability for root to (a) swap euid and ruid and
42   (b) give away all privilege by calling setreuid(ruid,ruid)
43   twice.
44 * wait3 and waitpid, <wait.h> with WNOHANG, WIFSIGNALED,
45   WIFEXITEED, WTERMSIG, WEXITSTATUS and WCOREDUMP.
46 * gid_t, uid_t, pid_t.
47 * Unix-domain (AF_UNIX) stream sockets, for use with:
48   * BSD sockets - socket(), bind(), listen(), accept(), connect();
49   * socketpair(2);
50 * lstat(2) (though stat(2) will be safe on systems without symlinks).
51 * Pipes:
52   * creating using pipe(2) and mkfifo(2);
53   * proper interaction between open(O_RDWR), open(O_RDONLY),
54     open(O_WRONLY), close(), dup2, EPIPE, SIGPIPE, &c.;
55 * POSIX signal handling - sigaction(2), sigprocmask(2), sigsuspend(2);
56
57 To format the documentation:
58
59 * debiandoc-sgml, and hence sp (aka nsgmls) and sgmlspm.
60 * For PostScript output, Lout and possibly psutils.
61
62 For debugging version (./configure --enable-debug):
63
64 * initgroups(3) must use setgroups(2) and dynamic
65   linking must allow overriding setgroups(2) for initgroups(3);
66
67 REENTRANCY IN THE LIBC:
68
69 We assume, both in the client and server, that it is safe to use one
70 stdio stream in a signal handler which interrupts use of a _different_
71 stdio stream in another.  We make sure using setvbuf that we have
72 pre-allocated buffers so that stdio doesn't need to use malloc() when
73 we actually read or write.  stdio had better not do anything else
74 weird.
75
76 Furthermore, we assume that it is safe to use syslog in a signal
77 handler which has interrupted a stdio operation (but we don't require
78 that it be safe to invoke when the signal has interrupted a call to
79 malloc, unless stdio makes gratuitous mallocs).  openlog will already
80 have been called (but syslog will not necessarily have been called).
81
82 We assume that strerror is completely reentrant.