Skip to content

Commit 1a75696

Browse files
author
Felipe Eduardo Sanchez Diaz Duran
committed
Switch to git. Checkinstall pre 1.6.2
0 parents  commit 1a75696

18 files changed

+5072
-0
lines changed

3445gifile

Whitespace-only changes.

BUGS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Here's a list of things that need to be fixed, in no particular order.
2+
3+
* Installwatch does not work with programs that statically link libc.
4+
Uhm... I should take a look at strace(1)
5+
6+
* Due to LD_PRELOAD limitations, it does not work with suid binaries
7+
neither. Believe me, this is a very good thing anyway :-)
8+
9+
* mknod(2) is not watched
10+
11+
=============
12+
$Id: BUGS,v 0.6 2001/04/17 19:38:09 izto Exp $

CHANGELOG

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
20061101 --
2+
* getwcd() patch from David Brown
3+
* utimes() support from David Brown
4+
* access() support from David Brown
5+
* Makefile patch from Felipe Sateler
6+
7+
20040613 -- version 0.7.0beta4
8+
* _init() patch
9+
10+
20031214 -- version 0.7.0beta3
11+
* fopen64() patch
12+
13+
20030312 -- version 0.7.0beta2 -- Thomas Rausch
14+
* Small patch for correct symlink call reporting
15+
16+
20021125 -- version 0.7.0beta1 -- olivier fleurigeon
17+
* Added translation fs support
18+
19+
20011122 -- version 0.6.3 -- olivier fleurigeon <[email protected]>
20+
* Fixed the test-installwatch test program.
21+
22+
20011118 -- version 0.6.2 -- Felipe Sanchez
23+
* Fixed two other descriptor leaks that were causing the "Too many open files"
24+
problem when tracing large installations.
25+
26+
20011111 -- olivier fleurigeon <[email protected]>
27+
* Patched installwatch.c to trace the fopen() call
28+
29+
20010625 -- version 0.6.1 -- Felipe Sanchez <[email protected]>
30+
* Fixed the installwatch shell script to make it report the return status from
31+
the watched program
32+
33+
20010624 -- David Jarvie
34+
* Patched create-localdecls to correctly detect the libc version in systems
35+
without a libc-2* file
36+
37+
20010610 -- Christian Tusche
38+
* Patched installwatch.c to make it close the file descriptors in backup().
39+
This prevents the "Too many open files" problem when a watched program
40+
opens lots of files in one run (i.e. cp -vr / /some/dir)
41+
42+
20010608 -- version 0.6.0 -- Felipe Sanchez
43+
* The backup actually works now ;)
44+
45+
20010415 -- version 0.6.0beta -- Felipe Sanchez
46+
* Added functions: backup() and makepath(). Installwatch now can make a backup
47+
of any file that will be overwritten or deleted by the true glibc functions.
48+
49+
20010301 -- version 0.5.6 -- Development now continued by
50+
Felipe Eduardo Sanchez Diaz Duran
51+
52+
* Removed the RTLD_NEXT line, we'll deal with all glibc's as if they were
53+
broken.
54+
55+
19990514 -- version 0.5.5
56+
* Added support for glibc2.1 (used for example in RedHat 6.0)
57+
* Added a test program (run "make test" to see if installwatch works
58+
correctly with your configuration)
59+
60+
19990331 -- version 0.5.4
61+
* inst2rpm: patch from [email protected] to detect and use renamed
62+
and linked files (often used by install.sh scripts)
63+
64+
19990325 -- version 0.5.3
65+
* Fixed canonicize(). It always returns absolute paths now
66+
Thanks to Jon A. Christopher <[email protected]>
67+
* Renamed canonicize() to canonicalize(), which happens to be an
68+
existing word :-)
69+
* Improved inst2rpm script from Jon
70+
71+
19981107 -- version 0.5.2
72+
* Fixed a bug regarding non-absolute paths used with the -o option.
73+
Thanks to Jon A. Christopher <[email protected]> for pointing this
74+
out
75+
* Greg Norris <[email protected]> has volunteered to maintain then
76+
Debian package of installwatch. Thanks Greg!
77+
* Added the contrib section. Thanks to
78+
Jon A. Christopher <[email protected]>, first contributor with the
79+
inst2rpm script. Very useful!
80+
81+
19980930 -- version 0.5.1
82+
* Added libc5 support
83+
* Cosmetic fixes on the documentation
84+
* Removed support for mknod(2), I'll add it again later
85+
86+
=================
87+
$Id: CHANGELOG,v 0.7 2001/11/18 08:32:33 izto Exp $

COPYING

Lines changed: 340 additions & 0 deletions
Large diffs are not rendered by default.

INSTALL

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Installwatch has been tested on Linux only.
2+
3+
To compile it, a simple `make' followed by `make install' should do
4+
the magic.
5+
6+
By default, it will install itself to /usr/local/{bin,lib}
7+
but you can change that by specifying PREFIX during install as in
8+
9+
make
10+
make PREFIX=/usr install
11+
12+
Also, for packagers and such, Makefile obeys DESTDIR ala Autotools.
13+
14+
You need an ELF system, but I don't think it's a problem today...
15+
16+
Let me know if things go wrong. My address is [email protected]
17+
Don't forget to tell me your OS version, libraries version and every
18+
other relevant detail.
19+
20+
If you want to try installwatch on itself for the first time, do
21+
the following instead of `make install'.
22+
23+
Bash family:
24+
25+
LD_PRELOAD=./installwatch.so make install
26+
27+
Tcsh family:
28+
29+
setenv LD_PRELOAD ./installwatch.so ; make install
30+
31+
Of course, you must be root in the installwatch source directory.
32+
Remember, if you belong to the tcsh family, LD_PRELOAD will remain
33+
set after `make install', so be sure to clear the variable.
34+
35+
36+
================
37+
$Id: INSTALL,v 0.6 2001/04/17 19:38:09 izto Exp $

Makefile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Makefile for installwatch
2+
# $Id: Makefile,v 0.7.0.6 2008/11/09 07:49:34 izto Exp $
3+
4+
# Well, the only configurable part is the following variable.
5+
# Make sure the directory you specify exists.
6+
7+
PREFIX=/usr/local
8+
9+
# End of configurable part
10+
11+
VERSION=0.7.0beta7
12+
13+
BINDIR=$(PREFIX)/bin
14+
LIBDIR=$(PREFIX)/lib
15+
16+
all: installwatch.so
17+
18+
installwatch.so: installwatch.o
19+
ld -shared -o installwatch.so installwatch.o -ldl -lc
20+
21+
installwatch.o: installwatch.c localdecls.h
22+
gcc -Wall -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DVERSION=\"$(VERSION)\" installwatch.c
23+
24+
localdecls.h:
25+
./create-localdecls
26+
27+
install: all
28+
mkdir -p $(LIBDIR)
29+
mkdir -p $(BINDIR)
30+
if [ -r $(LIBDIR)/installwatch.so ]; then \
31+
rm -f $(LIBDIR)/installwatch.so; \
32+
fi
33+
install installwatch.so $(LIBDIR)
34+
35+
sed -e "s|#PREFIX#|$(PREFIX)|" < installwatch > $(BINDIR)/installwatch
36+
chmod 755 $(BINDIR)/installwatch
37+
38+
uninstall:
39+
rm -f $(LIBDIR)/installwatch.so
40+
rm -f $(BINDIR)/installwatch
41+
42+
clean:
43+
rm -f *~ *.bak *.o installwatch.so core localdecls.h libctest test-installwatch
44+
45+
tarball: clean
46+
tar -czvC .. -f ../installwatch-$(VERSION).tar.gz installwatch-$(VERSION)
47+
48+
test: install
49+
gcc -Wall -DVERSION=\"$(VERSION)\" -o test-installwatch test-installwatch.c -ldl
50+
$(PREFIX)/bin/installwatch ./test-installwatch
51+
52+

README

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
######################################
2+
# Welcome to installwatch 0.7.0beta7 #
3+
######################################
4+
5+
================
6+
The short story:
7+
8+
Installwatch is Copyright 1998 by Pancrazio `Ezio' de Mauro
9+
10+
11+
* Installwatch is no longer mantained by Pancrazio, you should now contact
12+
me with any issues relating to it:
13+
14+
Felipe Eduardo Sanchez Diaz Duran <izto at asic-linux.com.mx>
15+
http://asic-linux.com.mx/~izto
16+
17+
This package is distributed under the GPL license. Have a look at
18+
COPYING if you don't know what it means.
19+
20+
To use it, just type:
21+
22+
installwatch <command>
23+
24+
This monitors <command> and logs using the syslog(3) facility every created
25+
or modified file.
26+
27+
installwatch -o <filename> <command>
28+
29+
does the same thing, but writing data in <filename>, which is truncated
30+
if it already exixts.
31+
32+
The typical use is:
33+
34+
installwatch -o ~/install/foobar-x.y make install
35+
36+
Extra options are displayed by running:
37+
38+
installwatch --help
39+
40+
===============
41+
The long story:
42+
43+
Installwatch is an extremely simple utility I wrote to keep track of
44+
created and modified files during the installation of a new program.
45+
46+
It's fast and easy to use. It doesn't require a ``pre-install'' phase
47+
because it monitors processes while they run.
48+
49+
Installwatch works with every dynamically linked ELF program,
50+
overriding system calls that cause file system alterations. Some of
51+
such system calls are open(2) and unlink(2).
52+
53+
Installwatch is especially useful on RedHat, Debian and similar
54+
distributions, where you can use a package system to keep track
55+
of installed software. (See specific package details below).
56+
57+
Of course a simple `make install' does not update the package database,
58+
making your installation ``dirty'' -- well, kind of.
59+
60+
If your room is a mess but you make RPMS even for your home directory,
61+
then installwatch is for you. (See RPMS below).
62+
63+
Here's a typical installwatch use. After compiling your brand new
64+
package, just type
65+
66+
installwatch make install
67+
68+
instead of a simple make install. Then have a look at your logs.
69+
70+
Installwatch logs by default using syslog(3), with a
71+
``LOG_USER | LOG_INFO'' priority.
72+
73+
Usually the log file is /var/log/messages, but if may vary.
74+
75+
If you want to log on a particular file (my preferred method) just
76+
type:
77+
78+
installwatch -o filename make install
79+
80+
The log format may look ugly at first glance, but it is designed to
81+
be easily processed by programs.
82+
83+
Every record ends with a newline, every field is delimited with a TAB
84+
character (it is ``^I'' when you use syslog.)
85+
86+
The fields of a record are, in order:
87+
88+
<return-value> <syscall-name> <arguments> #<comment>
89+
90+
So made lines are really easy to process, if arguments don't contain
91+
TABs or pound signs.
92+
93+
=====
94+
RPMS:
95+
96+
Ok, so you've done a "installwatch -o logfile make install", but how do
97+
you tell the RPM database about this? You use CheckInstall.
98+
99+
http://asic-linux.com.mx/~izto/checkinstall
100+
101+
The inst2rpm script that used to be distributed along with installwatch
102+
is not supported by me, it has been superseeded by CheckInstall.
103+
104+
If you still want it, you can get an older version of installwatch (0.5.6),
105+
where you will find it inside the contrib directory. Installwatch's versions
106+
starting from 0.5.5 are available at
107+
108+
http://asic-linux.com.mx/~izto/installwatch.html
109+
110+
===============
111+
$Id: README,v 0.7.0.2 2006/11/01 07:34:36 izto Exp $

TODO

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Here's a list of things I would like to add, in no particular order.
2+
3+
If you can/want to contribute, send me a message: [email protected]
4+
5+
* Make it work with statically linked programs (see BUGS)
6+
* Make it as portable as possible. I only tested installwatch with
7+
Linux, but it should work with other systems with <dlfcn.h>
8+
Solaris comes in mind
9+
* Use autoconf
10+
11+
12+
=================
13+
$Id: TODO,v 0.6 2001/04/17 19:38:09 izto Exp $

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.7.0beta7

create-localdecls

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/bin/sh
2+
3+
# This is a quick'n'dirty hack to make the program behave correctly
4+
# under different systems.
5+
# Example:
6+
# when using libc5, (f)trucate's offset argument type is size_t with
7+
# libc5, but it's off_t with libc6 (glibc2).
8+
#
9+
# Uhm... time to learn GNU autoconf :-)
10+
11+
OUTFILE='localdecls.h'
12+
13+
echo '/* This file is automatically generated *' > $OUTFILE
14+
echo ' * Modify create-localdecls instead of this */' >> $OUTFILE
15+
echo >> $OUTFILE
16+
echo '#ifndef __LOCALDECLS_H_' > $OUTFILE
17+
echo '#define __LOCALDECLS_H_' >> $OUTFILE
18+
echo >> $OUTFILE
19+
20+
###
21+
###
22+
###
23+
24+
echo -n 'Checking truncate argument type... '
25+
if grep -q 'truncate.*size_t' /usr/include/unistd.h ; then
26+
echo 'size_t'
27+
echo '#define TRUNCATE_T size_t' >> $OUTFILE
28+
else
29+
echo 'off_t' # At least, I HOPE it's off_t :-)
30+
echo '#define TRUNCATE_T off_t' >> $OUTFILE
31+
fi
32+
33+
###
34+
###
35+
###
36+
37+
echo -n 'Checking libc version... '
38+
gcc -Wall -o libctest libctest.c
39+
VERSION=`ldd libctest | grep libc\\.so | awk '{print $1}'`
40+
rm libctest
41+
echo $VERSION
42+
echo "#define LIBC_VERSION \"$VERSION\"" >> $OUTFILE
43+
if test "$VERSION" = 'libc.so.5' ; then
44+
echo '#define BROKEN_RTLD_NEXT' >> $OUTFILE
45+
echo '#define LIBC 5' >> $OUTFILE
46+
fi
47+
48+
if test "$VERSION" = 'libc.so.6' ; then
49+
echo -n 'Checking glibc subversion... '
50+
tmp="`ldd /bin/sh | grep libc.so 2> /dev/null`"
51+
LibcPath=`expr "$tmp" : '[^/]*\(/[^ ]*\)'`
52+
tmp="`strings $LibcPath | grep -i 'c library'`"
53+
OsLibcMajor=`expr "$tmp" : '.* \([0-9][0-9]*\)'`
54+
OsLibcMinor=`expr "$tmp" : '.* [0-9][0-9]*\.\([0-9][0-9]*\)'`
55+
case "$OsLibcMajor" in
56+
2)
57+
# 2 is the glibc version
58+
case "$OsLibcMinor" in
59+
0)
60+
echo '#define GLIBC_MINOR 0' >> $OUTFILE
61+
SUBVERSION='glibc-2.0' ;;
62+
1)
63+
echo '#define GLIBC_MINOR 1' >> $OUTFILE
64+
SUBVERSION='glibc-2.1' ;;
65+
2)
66+
echo '#define GLIBC_MINOR 2' >> $OUTFILE
67+
SUBVERSION='glibc-2.2' ;;
68+
*)
69+
echo 'Treated as glibc >= 2.1 (finger crossed)'
70+
echo '#define GLIBC_MINOR 1' >> $OUTFILE
71+
SUBVERSION='glibc-2.1' ;;
72+
esac
73+
;;
74+
esac
75+
fi
76+
77+
echo >> $OUTFILE
78+
echo '#endif' >> $OUTFILE
79+

0 commit comments

Comments
 (0)