diff options
-rw-r--r-- | INSTALL | 294 | ||||
-rw-r--r-- | PORTING | 70 | ||||
-rw-r--r-- | README | 26 | ||||
-rw-r--r-- | strace.1 | 3 | ||||
-rw-r--r-- | strace.spec | 2 |
5 files changed, 216 insertions, 179 deletions
@@ -1,48 +1,80 @@ +Installation Instructions +************************* + +Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, +Inc. + +Copying and distribution of this file, with or without modification, are +permitted in any medium without royalty provided the copyright notice +and this notice are preserved. This file is offered as-is, without +warranty of any kind. + Basic Installation ================== - These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -51,62 +83,89 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + Compilers and Options ===================== - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. Installation Names ================== - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular +options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. Optional Features ================= +If the package supports it, you can cause programs to be installed with +an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE @@ -119,62 +178,125 @@ find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + Specifying the System Type ========================== - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + CPU-COMPANY-SYSTEM +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't -need to know the host type. +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. Sharing Defaults ================ - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. -Operation Controls +Defining Variables ================== - `configure' recognizes the following options to control how it -operates. +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. `--help' - Print a summary of the options to `configure', and exit. +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' - Do not print messages saying which checks are being made. + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. -`configure' also accepts some other, not widely useful, options. +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff --git a/PORTING b/PORTING deleted file mode 100644 index aef4ce4..0000000 --- a/PORTING +++ /dev/null @@ -1,70 +0,0 @@ -I am frequently asked to port strace to a given platform. Less -frequently I am asked how one would go about porting strace to a given -platform. :-) Since I have ported strace to a few platforms already I -have some advice to the would-be strace porter. - -The number one question is ``Does the native operating support a -concept which enables even the mere possibility of tracing?''. So far -I have seen two mechanisms which support system call tracing. They -are the SunOS originated feature of the PTRACE_SYSCALL argument to the -ptrace system call and the PIOCSENTRY/PIOCSEXIT ioctl for the /proc -filesystem under System V release 4 style Unix derived systems. There -may be others (surely a better one could be devised :-) but innovation -is a rare commodity so unless one of these is supported you may be -SOL. - -Therefore the first step is to try `man 2 ptrace' and `man 4 proc' to -see if there is even a glimmer of hope. Without assistance from the -operating system, system call tracing is a lost cause. If there is a -native system call tracing program (however pathetic it might be :-), -you may be able to use it to trace itself to determine what mechanism -it is using for tracing the system calls of another process. If the -interface is documented you should be a happy camper. Otherwise, -unless you can tolerate the thought of many thankless hours -single-stepping in a debugger with little or nothing to show for it, -you should consider other tasks to distract you from your friends, -family, education, job, spouse and/or significant other. - -If you have arrived here, your OS should have ptrace or proc or you -should have a high tolerance for pain. Then again, curious but -detached readers are invited to continue with little to risk but -boredom. If the mechanism is neither ptrace nor proc then examine how -it is intended to work and see how well it fits with what strace -already does. If it fits, fine, add a few more ifdefs. If there is a -gross mismatch, write a whole new event loop. - -At this point you are responsible for determining three things: how is -the specific system call communicated, how are system call arguments -handled, and how is errno handled. These things can usually be -resolved in a day or two using a decent assembly level debugger and -some educated guesswork. For example, set a breakpoint on `read'. -Then disassemble the code and see where the arguments go. Do they go -on the stack? Do they go into registers? Some combination of the -two? Find the point where the transition from user mode to kernel -mode is made. Can you identify the arguments at this point? When the -call returns where does errno go? Into a specific register? Into a -global variable? - -Next you need to determine how to decode numeric system call numbers -into system call names (syscallent.h), errno values into errno names -(errnoent.h) and ioctl values into ioctl names (ioctlent.h). Often -this fragile step can be accomplished by massaging system header files -with ad hoc shell scripts. Expect your scripts to break with every -dot rev of each OS release. - -Finally, once you have the basic framework in which system calls and -their arguments can be decoded, you must do the dirty work of decoding -every useful call. Some may be similar or identical to like-named -calls in other operating systems. Go ahead and tweak what is there -to achieve what you want. If there is more difference than similarity, -then just write your own version of it using one of the existing -implementations for ideas. - -The first order of decoding is the generation of suitable system call, -errno, ioctl and signal tables. Sample scripts are included to assist -with the generation of a first pass at these tables. - -Good luck and feel free to contact me before and/or during any major -project. - -Rick Sladkey <jrs@world.std.com> @@ -1,31 +1,17 @@ -This is strace 4.0, a system call tracer for SunOS 4.x, Linux, System -V release 4, Solaris 2.x and Irix 5.x. strace is released under a -Berkeley-style license at the request of Paul Kranenburg; see the file -COPYRIGHT for details. +This is strace, a system call tracer for Linux. -Read the INSTALL file for generic instructions on how to install -strace. If configure cannot guess your system configuration, you can -specify it on the command line after the other options like this: +strace is released under a Berkeley-style license at the request +of Paul Kranenburg; see the file COPYRIGHT for details. - ./configure --prefix=/usr i486-linux +See the file CREDITS for a list of authors and other contributors. -A single sunos4.1 binary should work on all the sun4, sun4c and sun4m -kernel architectures. Let me know if sun4d doesn't work. Other -i486-*-sysv4 systems may work with little or no tweaking. +See the file INSTALL for compilation and installation instructions. See the file NEWS for information on what has changed in recent versions. -See the file PORTING if you like strace but it doesn't work on an -operating system you use frequently. - -See the file CREDITS to see who has contributed to strace. - -See the file TODO if you feel like helping out. - You can get the latest version of strace from its homepage at http://sourceforge.net/projects/strace/ . Please send bug reports and enhancements to the strace -mailinglist at strace-devel@lists.sourceforge.net, or directly to -Wichert Akkerman <wakkerma@debian.org> +mailinglist at strace-devel@lists.sourceforge.net. @@ -743,7 +743,6 @@ break instruction or via .SH PROBLEMS Problems with .B strace -should be reported via the Debian Bug Tracking System, -or to the +should be reported to the .B strace mailing list at <strace\-devel@lists.sourceforge.net>. diff --git a/strace.spec b/strace.spec index 51333ab..bd44453 100644 --- a/strace.spec +++ b/strace.spec @@ -74,7 +74,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root) -%doc CREDITS ChangeLog ChangeLog-CVS COPYRIGHT NEWS PORTING README +%doc CREDITS ChangeLog ChangeLog-CVS COPYRIGHT NEWS README %{_bindir}/strace %{_mandir}/man1/* |