cruft-0.9.16/0000755000000000000000000000000011605526570007627 5ustar cruft-0.9.16/dash-search.10000644000000000000000000000150611543656372012102 0ustar .TH DASH-SEARCH 1 "October 17, 2007" .SH NAME dash-search \- match arguments against cruft filter patterns .SH SYNOPSIS .B dash-search [ file ] [ ... ] .SH "DESCRIPTION" .B dash-search Reads files in directories .B /usr/lib/cruft/filters-broken_symlinks .B /usr/lib/cruft/filters-frbn .B /usr/lib/cruft/filters-miss and .B /usr/lib/cruft/filters-unex and tries to match each command argument in turn against the patterns in those files, using the .BR shellexp (3) funcition. Any argument which matches is printed on standard output, prefixed with the name of the file which contained the pattern which it matched. .SH BUGS Same as .BR shellexp (3). .SH "SEE ALSO" .BR shellexp (3), .BR cruft (8). .SH AUTHOR This manual page was written by Anthony Towns , for the Debian GNU/Linux system (but may be used by others). cruft-0.9.16/README0000644000000000000000000001451211543656372010517 0ustar cruft ===== Preliminary notes: ------------------ * This is a pre release version! Be careful, and take its results with a grain of salt. * cruft does not make any assumptions about the things you may have in places like /usr/local. You can teach cruft of such locations in several ways - read below. * If you have any suggestions on how to improve cruft, or if you make a /usr/lib/cruft/filters/* file for another package, please file them as a bug against cruft. A rough roadmap for cruft development can be found in TODO. How it works, and what it does: ------------------------------- cruft is a program to look over your system for anything that shouldn't be there, but is; or for anything that should be there, but isn't. Here is a brief description of how it achieves this. See also the image "design.png" in this directory. First, cruft produces the following four lists of files: * list of files ACTUALLY PRESENT on the system. This is produced by running 'find' on each mounted filesystem in turn, except for: - filesystems of type such as nfs, proc, etc -- the full expression is in cruft_default_scan_fs() in common.sh - directories (and their contents) specified by --ignore This list is put into /var/spool/cruft/file_* * list of files which MUST be on the system. This for example includes the list of files dpkg knows about, diversions, lost+found directories and so on. This list (as are the following two) is produced by running so called 'explain' scripts, located in /usr/lib/cruft/explain and /etc/cruft/explain. See below on how the explain scripts to run are selected. This list is taken from the explain scripts' standard output and put into /var/spool/cruft/expl_* * list of files which MAY be on the system. If a file is on this list, it means that it is OK for it to be present, but it is not a problem if the file is missing, either. This list is taken from the explain scripts' output to file descriptor 3, and put into /var/spool/cruft/mayx_* * list of files which MUST NOT be on the system. This list is taken from the explain scripts' output to file descriptor 4, and put into /var/spool/cruft/msnt_* After producing the lists, the first one is compared to each of the three other ones using a modified mergesort algorithm. This produces three new lists of files: * files which are on the system, but they are not mentioned by neither the "MAY" nor the "MUST" list It is placed into /var/spool/cruft/unex_* * files which are in the "MUST" list but are not in the "actually present" list. It is placed into /var/spool/cruft/miss_* * files which are in the "MUST NOT" list, and are in the "actually present" list. It is placed into /var/spool/cruft/frbn_* Before reporting, each of the three lists is first filtered through the patterns specified in the filter files for that type of list. The syntax and semantics of the cruft patterns used in the filter files are documented in the shellexp(3) manual page. See below for how the filter files are selected. Selecting explain scripts to run -------------------------------- Explain scripts are located in two directories: * /usr/lib/cruft/explain - where cruft installs its explain scripts * /etc/cruft/explain - meant for local explain scripts created by the administrator Any file in /etc/cruft/explain overrides a file in /usr/lib/cruft/explain with the same name. So if you want to override /usr/lib/cruft/explain/foo, just create an executable file called /etc/cruft/explain/foo. Also, any explain script will be run only if any of the following is true: - a package with the same name as the file is not completly purged - that is, at least one of the following exist for the package: * a non-empty file list, * a postrm file, * a prerm file. - the name of the file contains no lower-case characters. Thus, the way to have a script run regardless of any package being installed, just name it in UPPER_CASE Selecting filter files ---------------------- For filtering the list of files of a certain TYPE (any of: frbn miss unex), the following filter files will be selected: - /etc/cruft/filters-TYPE/* - /etc/cruft/filters/* - installed "extrafiles" control files (in dpkg database) - /usr/lib/cruft/filters-TYPE/* - /usr/lib/cruft/filters/* However, if a filter file called "foo" (or "foo.extrafiles") exists in any of the above location, only the first one in this list will be considered. Moreover, the same CASE-type naming convention applies as with explain scripts (that is, a filter file which has any lower case letters will only be run if a package with the same name is present in the system). Please note that /etc/cruft/filters/ and /usr/lib/cruft/filters/ are deprecated, and support for these directories will be removed at some point. How to make cruft not report some file -------------------------------------- There are several ways to do this: * use "--ignore" which makes cruft ignore whole directory trees by not entering them at all, which speeds it up considerably. This is useful for large directory trees which local administrator is not interested in, like /home. An example: computer:~# cruft -m root --ignore /usr/local * create a filter file, which contains patterns of files which are not to be reported. This is a little more flexible, but requires cruft to traverse the directory tree, which takes some time. An example could be: computer:~# echo '/usr/local/**' > /etc/cruft/filters-unex/USR_LOCAL * create an 'explanation' script which prints to FD3 the names of all files which are not to be reported. This is the most flexible way, since you can decide at runtime which files should be there, and which not, however usually requires cruft to traverse the directory tree twice. An example could be: computer:~# cat >/etc/cruft/explain/USR_LOCAL #!/bin/sh find /usr/local >&3 ^D computer:~# chmod 755 /etc/cruft/explain/USR_LOCAL Note that when traversing the filesystems when producing the above lists, cruft does not follow symlinks. Also, for symlinks there is an additional mechanism, which identifies and reports broken symlinks separately. And that's about it. -- Anthony Towns Marcin Owsiany cruft-0.9.16/river.c0000644000000000000000000001052611543656373011134 0ustar #include #include #include #include #include #include "river.h" int river_has_line(river *r) { if (r->least >= 0) return 1; else return 0; } char *river_least_line(river *r) { if (river_has_line(r)) return r->in[r->least]->line; else return "(eof)"; } void river_scroll(river *r) { next_line(r->in[r->least]); } static int river_find_least(river *r) { int i; r->least = -1; for ( i = 0; i < r->n; i++ ) { if ( NULL == r->in[i]->file ) { continue; } else if ( r->least == -1 ) { r->least = i; } else { int x = strcmp( r->in[r->least]->line, r->in[i]->line ); if ( x == 0 ) { next_line(r->in[i]); } else if ( x > 0 ) { r->least = i; } } } return r->least; } static int river_close(river* r) { int i; for (i = 0; i < r->n; i++) { if (r->out[i]) if (fclose(r->out[i]) != 0) return 0; if (r->in[i]->file) if (fclose(r->in[i]->file) != 0) return 0; free(r->in[i]); } r->n = 0; return 1; } int rivers_close(river *rivers) { unsigned int idx; for (idx = 0; idx < NUM_RIVERS; idx++) if (! river_close(&rivers[idx])) return 0; return 1; } /* * Compares two rivers, and returns the offset of the smaller one. * * Also understands the concept of a "fake prev. river", with index=-1, which * only compares as smaller than dry rivers (whose inputs is all EOF). This * makes the pick_smallest_rivers algorithm a bit more straightforward. */ int rivers_compare(int prev_idx, int cur_idx, river *rivers) { int prev_has_lines; int cur_has_lines; /* the "fake river" can only be considered smaller, if the other one is * at EOF (has no more lines) */ if (prev_idx == -1) { int smaller = river_has_line(&rivers[cur_idx]) ? cur_idx : prev_idx; cruft_debug("\t\t\t\tFake prev, smaller= %d\n", smaller); return smaller; } cruft_debug("\t\t\t\tComparing prev_idx=%d and cur_idx=%d\n", prev_idx, cur_idx); prev_has_lines = river_has_line(&rivers[prev_idx]); cur_has_lines = river_has_line(&rivers[cur_idx]); #define A_TIE -2 if (prev_has_lines && cur_has_lines) { int res = strcmp(river_least_line(&rivers[prev_idx]), river_least_line(&rivers[cur_idx])); cruft_debug("\t\t\t\tBoth have lines: %s\n", res < 0 ? "prev is smaller" : res > 0 ? "cur is smaller" : "and are equal"); return res < 0 ? prev_idx : res > 0 ? cur_idx : A_TIE; } else if (cur_has_lines) { cruft_debug("\t\t\t\tOnly cur has lines, so wins\n"); return cur_idx; } else if (prev_has_lines) { cruft_debug("\t\t\t\tOnly prev has lines, so wins\n"); return prev_idx; } else { cruft_debug("\t\t\t\tNone have lines, a tie\n"); return A_TIE; } } /* * Opens an input file for reading, and an output file (with a changed prefix) * for writing. * TODO: because of how the filename is transformed, we are currently limited * to 4-char prefixes for both input and output filenames. */ static int open_streams(char *d_name, river *r) { /* XXX buffer overflow */ char filename[1000]; strcpy(filename, d_name); strncpy(filename, r->output_prefix, strlen(r->output_prefix)); if ((r->out[r->n] = fopen(filename, "w")) == NULL) { perror(filename); return 0; } if ((r->in[r->n] = init_fn_stream(d_name)) == NULL) { fclose(r->out[r->n]); return 0; } r->n++; return 1; } int river_output_line(river *r) { int ret = fprintf(r->out[r->least], "%s\n", river_least_line(r)); if (ret < 0) { perror("fprintf"); return 0; } else return 1; } int rivers_open_files(char *spool_dir_name, river *rivers) { DIR* spool_dir; struct dirent* pde; spool_dir = opendir( spool_dir_name ); if ( spool_dir == NULL ) { perror( spool_dir_name ); return 0; } if (chdir(spool_dir_name) != 0) { perror(spool_dir_name); return 0; } while( (pde = readdir( spool_dir )) ) { unsigned int idx; for (idx = 0; idx < NUM_RIVERS; idx++) { river *r = &rivers[idx]; if (strncmp(pde->d_name, r->input_prefix, strlen(r->input_prefix)) == 0) if (! open_streams(pde->d_name, r)) return 0; } } closedir(spool_dir); return 1; } /* Find the smallest line within each river (among its streams) and return true * if there is input available in at least one of the rivers */ int rivers_prepare_round(river *rivers) { int ret = 0; unsigned int idx; for (idx = 0; idx < NUM_RIVERS; idx++) if (river_find_least(&rivers[idx]) >= 0) ret = 1; return ret; } cruft-0.9.16/common.sh0000644000000000000000000001161211543656372011461 0ustar cruft_debug() { local min_level=${1:-1} if [ -n "$CRUFT_DEBUG" ] && [ "$CRUFT_DEBUG" -ge $min_level ]; then # dash turns into a forkbomb with this :-/ #PS4='$(date +\>[%Y-%m-%d\ %H:%M:%S.%N])'" [$min_level] " set -x ulimit -c unlimited fi } debug() { if [ -z "$CRUFT_DEBUG" ] ; then return ; fi echo "$(date +">[%Y-%m-%d %H:%M:%S.%N] [0]")" "$@" >&2 } # print default list of all mounted filesystems to scan cruft_default_scan_fs() { mount | egrep -v " type (proc|devpts|nfs[1234]?|ncp|coda|(a|smb|ci|ncp|usb|tmp|sys)fs|fusectl)" | cut -d\ -f3 } # set list of fs to scan, for other programs set_cruft_scan_fs() { : > /var/spool/cruft/DRIVES for x in "$@"; do echo $x >> /var/spool/cruft/DRIVES; done } # print all mounted filesystems cruft_all_fs() { mount | cut -d\ -f3 } # print all mounted filesystems to scan. Obeys what set_scan_drives has set. cruft_scan_fs() { cat /var/spool/cruft/DRIVES } # print all mounted filesystems not to scan. Obeys what set_scan_drives has set. cruft_noscan_fs() { for fs in $(cruft_all_fs); do local yes=0 for yesfs in $(get_cruft_scan_fs); do if [ "$fs" = "$yesfs" ]; then yes=1; fi done [ "$yes" = "1" ] || echo "$fs" done } # Checks whether a dir is a subdir of another # usage: # is_subdir potential_base potential_subdir # 0 = success ; if potential_subdir is a subdir of potential_base or they are the same # 1 = failure ; otherwise is_subdir() { local dir="$1";shift local sub="$1";shift # remove trailing slash, unless the dir is root dir itself [ / != "$dir" ] && dir="${dir%/}" [ / != "$sub" ] && sub="${sub%/}" # $sub is the same as $dir [ "$dir" = "$sub" ] && return 0 # / - special cases, which would need special treatment below # every dir is a subdir of / [ / = "$dir" ] && return 0 # no dir is parent of / (except for itself, but that was caught above) [ / = "$sub" ] && return 1 # try to remove $dir from beginning of $sub local trail="${sub##$dir}" if [ "$sub" = "$trail" ] ; then # since stripping did not succeed (no change) # then $sub does not begin with $dir return 1 else # $sub begins with $dir # There are two possibilities if [ "${trail##/}" != "$trail" ] ; then # $tail begins with a slash # /dir/sub return 0 else # $tail does not begin with slash, so it is not below $dir # /diranother/sub return 1 fi fi } add_prune() { local prunes="$1"; shift local ignore="$1"; shift if [ -n "$prunes" ]; then echo "${prune} -or -wholename $ignore -prune" else echo "-wholename $ignore -prune" fi } finish_prunes() { if [ -n "$1" ] ; then echo "( $1 ) -or" else echo fi } get_prunes_for() { local drive="$1" local prune="" for ignore in $(get_ignores) do if is_subdir "$ignore" "$drive"; then # $DRIVE is a subdir of $IGNORE # no need to scan the drive at all echo skip return elif is_subdir "$drive" "$ignore"; then # $IGNORE is a subdir of $DRIVE # add it to prune list prune=$(add_prune "${prune}" "${ignore}") fi done finish_prunes "${prune}" } get_ignores() { cat /var/spool/cruft/IGNORES } set_ignores() { : > /var/spool/cruft/IGNORES for x in "$@"; do echo $x >> /var/spool/cruft/IGNORES; done } # This function checks if, and how the argument should be scanned, depending on # current DRIVES and IGNORES, and either does nothing or runs find command(s) # suffixed with appropriate options cruft_find() { /usr/lib/cruft/cruft_find "$@" } fixup_slashes() { sed 's:/\.$:/:;s:/$::;s:^$:/:' } package_has_script() { local pkg="$1" local script="$2" local ctrl_path_tmp=$(mktemp) if ! dpkg-query --control-path "${pkg}" "${script}" >"${ctrl_path_tmp}" 2>/dev/null then rm -f "${ctrl_path_tmp}" # error, most likely ${pkg} is not installed return 1 else lines=$(wc -l < "${ctrl_path_tmp}") rm -f "${ctrl_path_tmp}" if [ "${lines}" -eq 0 ] then # no path returned return 1 else return 0 fi fi } package_has_files() { local pkg="$1" local list_tmp=$(mktemp) if ! dpkg-query --listfiles "${pkg}" >"${list_tmp}" 2>/dev/null then rm -f "${list_tmp}" # error, most likely ${pkg} is not installed return 1 else lines=$(wc -l < "${list_tmp}") if [ "${lines}" -eq 0 ] then # has no files return 1 else return 0 fi fi } package_installed() { local pkg="$1" package_has_script "${pkg}" prerm || package_has_script "${pkg}" postrm || package_has_files "${pkg}" } # return 0 if file with that name is to be processed # return 1 if it is to be skipped process_package() { local name="$1" # Check if it is a package name if [ "${name}" = "$(echo ${name} | tr '[:lower:]' '[:upper:]')" ] ; then # All UPPER_CASE, this is an exception, do not require a # package to be installed, process the file unconditionally return 0 elif package_installed "${name}" ; then # process a file whose matching package is not completly purged return 0 else debug " skipping ${name} - package not installed" return 1 fi } cruft-0.9.16/helper/0000755000000000000000000000000011543656373011114 5ustar cruft-0.9.16/helper/README0000644000000000000000000000065711543656373012004 0ustar This is a helper script to make creating filters from an existing alternatives database automatic. It began existence by rewriting aj's shell/perl/awk scripts. Note that this is only meant as a quick and dirty way to initialize the filter database. The plan is that when cruft becomes more usable, the filter files should move to each package, and be maintained there, since a package's file list changes over time. -- porridge cruft-0.9.16/helper/make_update_filter0000644000000000000000000000535711543656373014675 0ustar #!/usr/bin/perl # Read alternatives info and print a shell script which updates the filter # files. use strict; use warnings; # alternatives work like this (examples in parens): # each alternative has a name (editor) # each alternative has one master link (/usr/bin/editor) # each alternative has zero or more slave links (/usr/share/man/man1/editor.1.gz), of each has one name (editor.1.gz) # # for each alternative there is one or more providers # each provider has one master path (/usr/bin/vim) # each provider has zero or more slave paths (/usr/share/man/man1/vim.1.gz). the number of slave paths may be lower than the number of slave links (in case a provider does not provide a particular slave) # # moreover, each path may be provided by one or more packages (vim, vim-gnome). more than one if diversions are involved # Get a list of packages which provide a regular file # this is slow :-/ sub packages { my $file = shift; open DPKG, "LC_ALL=C LANG=C dpkg -S $file |" or return (); my @ret; while () { chomp; next if /^diversion by/; my ($pp) = split /:\s*/; my @p = split /,\s*/, $pp; foreach my $p (@p) { push @ret, $p; } } close DPKG; return @ret; } opendir ALTS, "/var/lib/dpkg/alternatives" or die "alternatives dir: $!\n"; # some mappings my %alternative; # alternative_name -> [ link, ... ] my %path; # link name -> [ path, ... ] my %provider; # path -> [ package, ... ] foreach my $alternative (readdir(ALTS)) { next if $alternative eq '.' or $alternative eq '..'; open FILE, '/var/lib/dpkg/alternatives/'.$alternative or die "Couldn't open $alternative: $!\n"; $_ = ; # auto # read the part describing links my @provides = (); my $cnt = 0; do { $_ = ; chomp($_); push @{$alternative{$alternative}}, $_; $cnt++; $_ = ; chomp($_); } while( $_ ne "" ); # read the part describing paths while( my $main = ) { chomp($main); unless ( $main eq "" ) { push @{$path{$alternative{$alternative}->[0]}}, $main; my $pri = ; chomp($pri); push @{$provider{$main}}, &packages($main); for ( my $i = 1; $i < $cnt; $i++ ) { my $alt = ; chomp($alt); next if $alt eq ''; push @{$path{$alternative{$alternative}->[$i]}}, $alt; push @{$provider{$alt}}, &packages($alt); } } } close FILE; } closedir ALTS or die "alternatives dir: $!\n"; # spit out an updating script open OUT, "| sort -u | tee update_filter" or die "output: $!\n"; foreach my $alt (keys %alternative) { foreach my $link (@{$alternative{$alt}}) { foreach my $path (@{$path{$link}}) { foreach my $package (@{$provider{$path}}) { printf OUT "grep -q '%s\$' %s 2>/dev/null || echo >>%s %s\n", $link, $package, $package, $link; } } } } close OUT or die "output: $!\n"; cruft-0.9.16/merge_diff_common.c0000644000000000000000000000033011543656373013434 0ustar #include #include #include "merge_diff_common.h" void cruft_debug(const char *fmt, ...) { #if DEBUG_CRUFT > 1 va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); #endif } cruft-0.9.16/readlinks.c0000644000000000000000000000701711543656373011762 0ustar #include #include #include #include #define __USE_BSD #include #include #define FALSE 0 #define TRUE 1 int double_buffers( size_t s, char** b1, char** b2, char** b3, char** b4 ) { char* n; n = realloc( *b1, s*2 ); if ( n == NULL ) return FALSE; else *b1 = n; n = realloc( *b2, s*2 ); if ( n == NULL ) return FALSE; else *b2 = n; n = realloc( *b3, s*2 ); if ( n == NULL ) return FALSE; else *b3 = n; n = realloc( *b4, s*2 ); if ( n == NULL ) return FALSE; else *b4 = n; return TRUE; } int main(void) { size_t sz_buffs = 1000; char *buffer = malloc(sz_buffs); /* user's input */ char *cwd = malloc(sz_buffs); /* expanded dirname */ char *basename = malloc(sz_buffs); /* basename */ char *last = malloc(sz_buffs); /* directory the link was in */ char *pch; if ( buffer == NULL ) return EXIT_FAILURE; if ( cwd == NULL ) return EXIT_FAILURE; if ( basename == NULL ) return EXIT_FAILURE; for(;;) { if ( fgets(buffer, sz_buffs, stdin) == NULL ) break; for ( pch = buffer + strlen(buffer) - 1; *pch != '\n' && pch == buffer + sz_buffs - 2; pch += strlen(pch) - 1 ) { assert( pch[1] == '\0' ); if ( double_buffers( sz_buffs, &buffer, &cwd, &basename, &last )) { sz_buffs *= 2; } else { break; } pch = buffer + strlen(buffer) - 1; if ( fgets(pch+1, sz_buffs/2+1, stdin) == NULL ) break; } assert( pch == buffer + strlen(buffer) - 1 ); if ( *pch == '\n' ) *pch = '\0'; for ( ; pch > buffer && *pch != '/'; pch-- ) ; if ( buffer[0] != '/' ) { /* don't even try relative paths */ if (printf("%s\n", buffer) < 0) return EXIT_FAILURE; continue; } strncpy( last, buffer, pch - buffer + 1 ); last[pch-buffer+1] = '\0'; for(;;) { int numchars; /* basename == link */ numchars = readlink( buffer, basename, sz_buffs - 1 ); if ( numchars != -1 && (unsigned)numchars < sz_buffs - 1 ) { chdir(last); basename[numchars] = 0; strcpy(buffer,basename); break; } if ( (unsigned)numchars == sz_buffs - 1 || errno == ENAMETOOLONG ) { if (double_buffers( sz_buffs, &buffer, &cwd, &basename, &last )) { sz_buffs *= 2; } else { fprintf( stderr, "Error. Out of memory." ); exit(EXIT_FAILURE); } } else { break; } } for ( pch = buffer+strlen(buffer); pch > buffer && *pch != '/'; pch-- ) ; if ( *pch != '/' ) { /* then buffer = "xyzzy", w/o a dir */ strcpy( basename, buffer ); strcpy( buffer, "./" ); } else { strcpy( basename, pch + 1 ); *(pch+1) = '\0'; } if ( 0 == chdir( buffer ) ) { while ( NULL == getcwd( cwd, sz_buffs ) ) { if ( double_buffers( sz_buffs, &buffer, &cwd, &basename, &last ) ) { sz_buffs *= 2; } else { break; } } pch = cwd + strlen(cwd) - 1; if ( *pch != '/' ) { pch[1] = '/'; pch[2] = '\0'; } } else { if ( buffer[0] == '/' ) { strcpy( cwd, buffer ); } else { strcpy( cwd, last ); strcat( cwd, buffer ); /* may overflow XXXXX */ } pch = cwd + strlen(cwd) - 1; if ( *pch != '/' ) { pch[1] = '/'; pch[2] = '\0'; } } if (printf("%s%s\n", cwd, basename) < 0) return EXIT_FAILURE; } if (fclose(stdout) != 0) return EXIT_FAILURE; free(cwd); free(buffer); free(basename); return 0; } cruft-0.9.16/fn_stream.c0000644000000000000000000000115711543656373011763 0ustar #include #include #include #include "fn_stream.h" void next_line( fn_stream* s ) { assert(s != NULL); assert(s->file != NULL); if ( NULL == fgets( s->line, 1000, s->file ) ) { fclose(s->file); s->file = NULL; } else { int x = strlen(s->line) - 1; if ( s->line[x] == '\n' ) s->line[x] = '\0'; } } fn_stream* init_fn_stream(char *filename) { fn_stream* s = malloc(sizeof(fn_stream)); if (! s) { perror("malloc"); return NULL; } if ((s->file = fopen(filename, "r")) == NULL) { free(s); perror(filename); return NULL; } next_line(s); return s; } cruft-0.9.16/merge_diff.c0000644000000000000000000000014411543656373012067 0ustar int merge_diff(char *spool_dir_name); int main(void) { return merge_diff("/var/spool/cruft"); } cruft-0.9.16/design.dia0000644000000000000000000001032011543656372011560 0ustar Ko,4~?V;r$ ZmfdҠhC[W-ɤ-ٔ4*-05KE_~V!-Y4,8~>:͒_u';8_Ͽ}f*J4<=O2%᧳`ӤJ{w**mqxL^}>g-Λ<$ßkxu޸]r^iؾwi~ۻbSǻW\Ys{R~+-xVm5R&ucͬiJhWlo_s~͕wEYIV6yY4kUyng>If{˭/*WljVe6}[+g\[6n.G]#]!ggy_G> Z0թHxϦl+,N;ﮯ鍩Z71Krqb8XifZ8߿ > >O!/ Ȧī7f{1^ݙ)$ Nmf./׭֏$Tnj t^L2>Ioʇ׎>KߤM~mnW0J/_ݣƻf L3Q߫;m6>ykū6M*-[ڌoڶTUE*f%|8W..X[:{Hl,ǫH3{Q#yUmb6۴o l~Mi %ƿJABA$bD(bqbdL#^::q|Hgx(bڢG^DB'y#"+3U3jDD.Y,v5I= J/k_ (RU)R@!T"#tʘ` `R@i(^I@)PQ*qQlšU5@igR@)s:U PzH((%&Qlšx( P (vZP (4)_ll ũ}وDRm 07c؏#n'E_{mJ௕n{4-)N;Ӌ,onTNW[v#N+ ^׆>g" "ӿ n 7S WOIÇboԍUv86\9CBp>6,12o𱭷0?R_ iȢ_#ƌ3—3d&Ed7z60 ?Rًٳބ˞{WYUY;Xv:ĩqɢŶ%[ )AG{{Cl) ߇jf$T1>32zWQH9"h*aG:WcV!EaFh"yT`2m@TR p$AAlh-A!xT9XO\5q}\P;`8.4ؚPw,כFQJtm ;#L@M#臽_e^x8D8nݠ&!`{ h!ݻHVVMo]`YLcERb,w]e ?N?X,)cYc`4!iC1vv~r^#^r L"] "V%1P(8 АYȣ-;i'. ux?5\Uy|l2H(9-sd?Yh&(tM^G"-@ɰSċN6gA*ٓis@!#9JK!? ԔL$O-BYYFŭWdeLm}TJEXfEөa+M>O{ߦG+zcX]y*c;SRD\&lo\t6>ghCji&&ʘ{t:(=^e694:LBR`U;LD#Ŵś #cŽ4a.bovujwôϑNl{$A':c/υeDѫIxqqT@o9EFZkZ˟1È2dkKrCQogzl~C,6Ai 7\ whYK;/X$0zY'``#L"˜FW rpp28ܤi DMx@&m}Wk}PCp |4QOF\yp7C_k>p|,8E\><q|(G*""̳6bWaD2?4CHe%n D"3;dOHhT$r"3Z4E/VzB39N%ijGw` NICE>Tgԑ'''2Dg@ &}Bu2;a㨉?=Q[q z qbɈ^"bl6}ʘBݛ!"1@ b8QZ@a:HKX0fӼf\b g& mߔH(hٯ8}&,tjՈ(Zqh,v|_tr=wbHM6 f\/czGoW pg@}~{@B)6{$OV%7y'ivuϡ|V((0-eJWepf\Fw5R9F3q'ǻprTuvs$Tm%_4rauVemd_ά.~șu&E nnUbfҘű"qqӅ39]YL:'ѩc6:(RN,] C~M%KJ|d; 8u'π>I {pcyxXl8+M!]X6NYQpl3Jsba8qT?nڦ|ZISH:P1nh71xN S˟$\>rU䯻ʡ2AGa1(a=F7!@ hb H(gDǍBIu A`sͥBP*fV( S 64vhy?5HOL1jo]Gnol";sBSBF?|A!t@Ll-ʲrGMl7/_^_#XÈRdv~7!dn.7; kNf}Mek.sk`ý-u=L X"a{k{\7Ch -la`ןIS ^N.FͤVҙ0:&V+}l 'Cz1IFsBvM$1)#`K@cDڹb.O#u׈i,Uj0BJ.v d?@Ip{kآ"RDmF^a^d%Uι2xCFJcvbcOV?-!vL'Hlʂ0 .?DӒo𱭼n@kJH_I$\붠ȝeϻl"c/56 M#KǦ?@> ֺؓήU秆ֹuYru$`9 xbg #include int shellexp( char* string, char* pattern ); void usage() { printf("Usage: shellexptest \n"); exit(1); } int main(int argc, char **argv) { int ret = 0; if (argc != 3) usage(); ret = shellexp(argv[2], argv[1]); if (ret == -1) exit(2); else exit(ret); } cruft-0.9.16/filters-unex/0000755000000000000000000000000011605525410012244 5ustar cruft-0.9.16/filters-unex/ipolish0000644000000000000000000000025411543656373013655 0ustar /etc/dictionaries-common/ispell-default /etc/dictionaries-common/default.aff /etc/dictionaries-common/default.hash /usr/lib/ispell/default.aff /usr/lib/ispell/default.hash cruft-0.9.16/filters-unex/libblkid10000644000000000000000000000004211543656373014036 0ustar /etc/blkid.tab /etc/blkid.tab.old cruft-0.9.16/filters-unex/resolvconf0000644000000000000000000000015711543656373014370 0ustar /etc/resolv.conf /etc/resolvconf/run /etc/resolvconf/resolv.conf.d/original /etc/resolvconf/resolv.conf.d/tail cruft-0.9.16/filters-unex/passwd0000644000000000000000000000001411543656373013501 0ustar /etc/shells cruft-0.9.16/filters-unex/potool0000644000000000000000000000006011543656373013515 0ustar /usr/bin/poedit /usr/share/man/man1/poedit.1.gz cruft-0.9.16/filters-unex/rxvt0000644000000000000000000000005211543656373013205 0ustar /usr/X11R6/bin/rclock /usr/X11R6/bin/rxvt cruft-0.9.16/filters-unex/cfingerd0000644000000000000000000000002711543656372013764 0ustar /var/log/cfingerd.log* cruft-0.9.16/filters-unex/hddtemp0000644000000000000000000000012511543656372013627 0ustar # hddtemp 0.3-beta15-34 (etch) /etc/default/hddtemp /usr/share/man/man1/hddtemp.1.gz cruft-0.9.16/filters-unex/dpkg0000644000000000000000000000071311543656372013132 0ustar /var/lib/dpkg/available /var/lib/dpkg/available-old /var/lib/dpkg/cmethopt /var/lib/dpkg/diversions /var/lib/dpkg/diversions-old /var/lib/dpkg/lock /var/lib/dpkg/methlock /var/lib/dpkg/statoverride /var/lib/dpkg/statoverride-old /var/lib/dpkg/status /var/lib/dpkg/status-old /var/lib/dpkg/alternatives/* /var/lib/dpkg/info/* /var/lib/dpkg/methods/** /var/lib/dpkg/triggers /var/lib/dpkg/triggers/* /var/log/dpkg.log /etc/dpkg/dpkg.cfg /usr/share/info/dir.old cruft-0.9.16/filters-unex/x11-common0000644000000000000000000000016711543656373014110 0ustar # x11-common 1:7.1.0-16 (etch) /etc/X11/Xwrapper.config /etc/X11/xorg.conf /var/log/Xorg.0.log /var/log/Xorg.0.log.old cruft-0.9.16/filters-unex/vim0000644000000000000000000000027411543656373013003 0ustar # vim 7.0-122+1 /usr/bin/editor /usr/bin/ex /usr/bin/vi /usr/bin/view /usr/share/man/man1/editor.1.gz /usr/share/man/man1/ex.1.gz /usr/share/man/man1/vi.1.gz /usr/share/man/man1/view.1.gz cruft-0.9.16/filters-unex/sysvinit0000644000000000000000000000001511543656373014071 0ustar /etc/inittab cruft-0.9.16/filters-unex/tcl8.40000644000000000000000000000005611543656373013222 0ustar /usr/bin/tclsh /usr/share/man/man1/tclsh.1.gz cruft-0.9.16/filters-unex/libc60000644000000000000000000000030311543656373013200 0ustar /etc/localtime /etc/timezone /etc/ld.so.hwcappkgs /etc/ld.so.conf /etc/ld.so.cache /var/cache/ldconfig /var/cache/ldconfig/aux-cache /usr/lib/gconv/gconv-modules.cache # lckpwdf() /etc/.pwd.lock cruft-0.9.16/filters-unex/debsums0000644000000000000000000000005711543656372013650 0ustar # debsums 2.0.16 /etc/apt/apt.conf.d/90debsums cruft-0.9.16/filters-unex/tar0000644000000000000000000000005311543656373012771 0ustar /usr/sbin/rmt /usr/share/man/man8/rmt.8.gz cruft-0.9.16/filters-unex/cupsys-client0000644000000000000000000000006311543656372015005 0ustar # cupsys-client 1.2.7-4 (etch) /etc/cups/lpoptions cruft-0.9.16/filters-unex/libpam-runtime0000644000000000000000000000014611543656373015133 0ustar /etc/pam.d/common-account /etc/pam.d/common-auth /etc/pam.d/common-password /etc/pam.d/common-session cruft-0.9.16/filters-unex/libapr00000644000000000000000000000005611543656373013537 0ustar /usr/lib/libapr.so.0 /usr/lib/libaprutil.so.0 cruft-0.9.16/filters-unex/dump0000644000000000000000000000002311543656372013144 0ustar /var/lib/dumpdates cruft-0.9.16/filters-unex/ed0000644000000000000000000000006011543656372012570 0ustar /usr/bin/editor /usr/share/man/man1/editor.1.gz cruft-0.9.16/filters-unex/checksecurity0000644000000000000000000000014411543656372015050 0ustar # checksecurity 2.0.7-10.1 /var/log/setuid.changes* /var/log/setuid.today /var/log/setuid.yesterday cruft-0.9.16/filters-unex/man-db0000644000000000000000000000007511543656373013345 0ustar /var/cache/man /var/cache/man/** /usr/bin/man /usr/bin/mandb cruft-0.9.16/filters-unex/gimp0000644000000000000000000000003711543656372013140 0ustar /etc/gimp /etc/gimp/add-ons.rc cruft-0.9.16/filters-unex/screen0000644000000000000000000000004511543656373013463 0ustar /var/run/screens /var/run/screens/** cruft-0.9.16/filters-unex/console-common0000644000000000000000000000003611543656372015133 0ustar /etc/console/boottime.kmap.gz cruft-0.9.16/filters-unex/gs-gpl0000644000000000000000000000005011543656372013370 0ustar /usr/bin/gs /usr/share/man/man1/gs.1.gz cruft-0.9.16/filters-unex/ftp0000644000000000000000000000005211543656372012772 0ustar /usr/bin/ftp /usr/share/man/man1/ftp.1.gz cruft-0.9.16/filters-unex/proftpd0000644000000000000000000000002211543656373013655 0ustar /etc/proftpd.conf cruft-0.9.16/filters-unex/postgresql0000644000000000000000000000042311543656373014407 0ustar /etc/postgresql/postgresql.conf /etc/postgresql/postmaster.conf /var/lib/postgres # this should probably be more sophisticated /var/lib/postgres/** /var/log/postgresql /var/log/postgresql/postgres.log* /var/run/postgresql/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432.lock cruft-0.9.16/filters-unex/slrn0000644000000000000000000000002211543656373013155 0ustar /etc/slrnget.conf cruft-0.9.16/filters-unex/pbuilder0000644000000000000000000000015311543656373014012 0ustar # pbuilder 0.123 /var/cache/pbuilder/aptcache/*.deb /var/cache/pbuilder/build /var/cache/pbuilder/result/* cruft-0.9.16/filters-unex/joe0000644000000000000000000000010511543656373012756 0ustar /etc/joe/termcap.idx /usr/bin/editor /usr/share/man/man1/editor.1.gz cruft-0.9.16/filters-unex/distributed-net0000644000000000000000000000040611543656372015312 0ustar /var/lib/distributed-net/buff-in.des /var/lib/distributed-net/buff-in.rc5 /var/lib/distributed-net/buff-out.des /var/lib/distributed-net/buff-out.rc5 /var/lib/distributed-net/ckpoint.rc5 /var/lib/distributed-net/distributed-net.ini /var/log/distributed-net.log* cruft-0.9.16/filters-unex/ssh0000644000000000000000000000023611543656373013003 0ustar /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_dsa_key.pub /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_rsa_key.pub /etc/ssh/ssh_known_hosts /etc/ssh/sshd_config cruft-0.9.16/filters-unex/xemacs210000644000000000000000000000015311543656373013627 0ustar /etc/xemacs/site-start-20.d /etc/xemacs/site-start-20.d/00debian.el /usr/share/xemacs21/site-lisp/**/*.elc cruft-0.9.16/filters-unex/python0000644000000000000000000000003511543656373013524 0ustar /usr/lib/python*/**/*.py[co] cruft-0.9.16/filters-unex/debconf0000644000000000000000000000024711543656372013607 0ustar /var/cache/debconf/config.dat /var/cache/debconf/config.dat-old /var/cache/debconf/passwords.dat /var/cache/debconf/templates.dat /var/cache/debconf/templates.dat-old cruft-0.9.16/filters-unex/wpolish0000644000000000000000000000003711543656373013672 0ustar /etc/dictionaries-common/words cruft-0.9.16/filters-unex/sudo0000644000000000000000000000005311543656373013155 0ustar /etc/sudoers /var/run/sudo /var/run/sudo/* cruft-0.9.16/filters-unex/sysklogd0000644000000000000000000000074411605525410014033 0ustar /var/log/auth.log* /var/log/cron.log* /var/log/daemon.log* /var/log/debug* /var/log/kern.log* /var/log/lpr.log* /var/log/mail.err* /var/log/mail.info* /var/log/mail.log* /var/log/mail.warn* /var/log/messages* /var/log/news /var/log/news/news.crit* /var/log/news/news.err* /var/log/news/news.notice* /var/log/news.crit* /var/log/news.err* /var/log/news.notice* /var/log/ppp.log* /var/log/syslog* /var/log/user.log* /var/log/uucp.log* /run/sendsigs.omit.d /run/sendsigs.omit.d/sysklogd cruft-0.9.16/filters-unex/dwww0000644000000000000000000000014011543656372013167 0ustar /etc/dwww/dwww.conf /var/lib/dwww/html/** /var/lib/dwww/quickfind.dat /var/spool/dwww/.cache_db cruft-0.9.16/filters-unex/apt-listchanges0000644000000000000000000000003211543656372015265 0ustar /etc/apt/listchanges.conf cruft-0.9.16/filters-unex/tcl8.30000644000000000000000000000005611543656373013221 0ustar /usr/bin/tclsh /usr/share/man/man1/tclsh.1.gz cruft-0.9.16/filters-unex/gcc0000644000000000000000000000005011543656372012733 0ustar /usr/bin/cc /usr/share/man/man1/cc.1.gz cruft-0.9.16/filters-unex/openbsd-inetd0000644000000000000000000000002011543656373014730 0ustar /etc/inetd.conf cruft-0.9.16/filters-unex/hotplug0000644000000000000000000000005711543656372013670 0ustar # hotplug 0.0.20040329-22 /etc/default/hotplug cruft-0.9.16/filters-unex/devscripts0000644000000000000000000000005111543656372014366 0ustar # devscripts 2.8.14 /etc/devscripts.conf cruft-0.9.16/filters-unex/pcmciautils0000644000000000000000000000006411543656373014522 0ustar # pcmciautils 014-3 (etch) /etc/default/pcmciautils cruft-0.9.16/filters-unex/samba-common0000644000000000000000000000002411543656373014552 0ustar /etc/samba/smb.conf cruft-0.9.16/filters-unex/locales0000644000000000000000000000014111543656373013623 0ustar # locales 2.3.6.ds1-13 (etch) /etc/default/locale /etc/locale.gen /usr/lib/locale/locale-archive cruft-0.9.16/filters-unex/apt-show-versions0000644000000000000000000000021211543656372015607 0ustar # apt-show-versions 0.08 /var/cache/apt-show-versions/files /var/cache/apt-show-versions/apackages /var/cache/apt-show-versions/ipackages cruft-0.9.16/filters-unex/exim4-daemon-light0000644000000000000000000000020111543656372015571 0ustar /var/run/exim4 /var/run/exim4/exim.pid /var/log/exim4 /var/log/exim4/mainlog* /var/log/exim4/paniclog* /var/log/exim4/rejectlog* cruft-0.9.16/filters-unex/sgml-base0000644000000000000000000000012611543656373014056 0ustar # sgml-base 1.26 /etc/sgml /etc/sgml/catalog /etc/sgml/catalog.old /var/lib/sgml-base cruft-0.9.16/filters-unex/perl0000644000000000000000000000007611543656373013152 0ustar /usr/bin/perl /usr/bin/rename /usr/share/man/man1/rename.1.gz cruft-0.9.16/filters-unex/ssh-askpass-gnome0000644000000000000000000000007211543656373015547 0ustar /usr/bin/ssh-askpass /usr/share/man/man1/ssh-askpass.1.gz cruft-0.9.16/filters-unex/gawk0000644000000000000000000000012611543656372013134 0ustar /usr/bin/awk /usr/bin/nawk /usr/share/man/man1/awk.1.gz /usr/share/man/man1/nawk.1.gz cruft-0.9.16/filters-unex/equivs0000644000000000000000000000002111543656372013511 0ustar /etc/equivs.conf cruft-0.9.16/filters-unex/alsa-base0000644000000000000000000000014111543656372014030 0ustar # alsa-base 1.0.13-5 (etch) /etc/default/alsa /etc/apm/suspend.d/80alsa /etc/apm/resume.d/20alsa cruft-0.9.16/filters-unex/byacc0000644000000000000000000000005411543656372013264 0ustar /usr/bin/yacc /usr/share/man/man1/yacc.1.gz cruft-0.9.16/filters-unex/bsdgames0000644000000000000000000000005111543656372013765 0ustar # bsdgames 2.17-8 /var/games/bsdgames/** cruft-0.9.16/filters-unex/popularity-contest0000644000000000000000000000007211543656373016071 0ustar /etc/popularity-contest.conf /var/log/popularity-contest* cruft-0.9.16/filters-unex/krb5-config0000644000000000000000000000001711543656373014311 0ustar /etc/krb5.conf cruft-0.9.16/filters-unex/bash0000644000000000000000000000004211543656372013115 0ustar /usr/share/man/man7/builtins.7.gz cruft-0.9.16/filters-unex/lpr0000644000000000000000000000001611543656373012777 0ustar /etc/printcap cruft-0.9.16/filters-unex/dia-gnome0000644000000000000000000000005211543656372014041 0ustar /usr/bin/dia /usr/share/man/man1/dia.1.gz cruft-0.9.16/filters-unex/gpm0000644000000000000000000000005611543656372012770 0ustar /etc/gmp.conf /var/run/gpmctl /var/run/gpmpid cruft-0.9.16/filters-unex/apache-ssl0000644000000000000000000000050011543656372014217 0ustar /etc/apache-ssl/access.conf /etc/apache-ssl/conf /etc/apache-ssl/cron.conf /etc/apache-ssl/httpd.conf /etc/apache-ssl/mime.types /etc/apache-ssl/srm.conf /etc/apache-ssl/modules.conf /var/log/apache-ssl/access.log* /var/log/apache-ssl/error.log* /var/log/apache-ssl/ssl.log* /var/run/apache-ssl.pid /var/run/gcache_port cruft-0.9.16/filters-unex/telnet0000644000000000000000000000006011543656373013474 0ustar /usr/bin/telnet /usr/share/man/man1/telnet.1.gz cruft-0.9.16/filters-unex/gdm0000644000000000000000000000006711543656372012756 0ustar # gdm 2.16.4-1 (etch) /etc/X11/default-display-manager cruft-0.9.16/filters-unex/mpg1230000644000000000000000000000015211543656373013214 0ustar /usr/bin/mp3-decoder /usr/bin/mpg123 /usr/share/man/man1/mp3-decoder.1.gz /usr/share/man/man1/mpg123.1.gz cruft-0.9.16/filters-unex/iamerican0000644000000000000000000000025411543656372014135 0ustar /etc/dictionaries-common/ispell-default /etc/dictionaries-common/default.aff /etc/dictionaries-common/default.hash /usr/lib/ispell/default.aff /usr/lib/ispell/default.hash cruft-0.9.16/filters-unex/syslog-summary0000644000000000000000000000005711543656373015222 0ustar /etc/syslog-summary /etc/syslog-summary/ignore cruft-0.9.16/filters-unex/desktop-file-utils0000644000000000000000000000015511543656372015731 0ustar # desktop-file-utils 0.10-1 # probably created by desktop-file-utils: /usr/share/applications/mimeinfo.cache cruft-0.9.16/filters-unex/afterstep0000644000000000000000000000002611543656372014177 0ustar /etc/X11/afterstep/** cruft-0.9.16/filters-unex/initscripts0000644000000000000000000000040711605525410014543 0ustar /etc/default/rcS /etc/rc.local /var/lib/urandom/random-seed /var/log/dmesg # nologin is a symlink to a file which may be created in /var... /etc/nologin /etc/motd.tail /var/run/motd /var/log/fsck/checkfs /var/log/fsck/checkroot /var/log/boot /run/sendsigs.omit.d cruft-0.9.16/filters-unex/fonty0000644000000000000000000000007611543656372013346 0ustar /etc/console-tools/config.d /etc/console-tools/config.d/fonty cruft-0.9.16/filters-unex/klogd0000644000000000000000000000007611605525410013272 0ustar # klogd 1.5-4 /run/sendsigs.omit.d /run/sendsigs.omit.d/klogd cruft-0.9.16/filters-unex/wu-ftpd0000644000000000000000000000007411543656373013574 0ustar /var/log/xferlog* /var/log/xferreport /var/run/ftp.pids-all cruft-0.9.16/filters-unex/mysql-server0000644000000000000000000000044111543656373014655 0ustar /etc/mysql/debian.cnf /var/lib/mysql # this should probably be more sophisticated /var/lib/mysql/** /var/log/mysql.err* /var/log/mysql.log* /var/log/mysql /var/log/mysql/mysql-bin.* /var/log/mysql/mysql.log* /var/log/mysql/mysql.err* /var/run/mysqld/mysqld.pid /var/run/mysqld/mysqld.sock cruft-0.9.16/filters-unex/procps0000644000000000000000000000004611543656373013513 0ustar /usr/bin/w /usr/share/man/man1/w.1.gz cruft-0.9.16/filters-unex/shared-mime-info0000644000000000000000000000123311543656373015330 0ustar # shared-mime-info 0.16-3 # some mysterious files.. /usr/share/mime/globs /usr/share/mime/magic /usr/share/mime/XMLnamespaces /usr/share/mime/subclasses /usr/share/mime/aliases # mime types: */* /usr/share/mime/application /usr/share/mime/application/*.xml /usr/share/mime/audio /usr/share/mime/audio/*.xml /usr/share/mime/image /usr/share/mime/image/*.xml /usr/share/mime/inode /usr/share/mime/inode/*.xml /usr/share/mime/message /usr/share/mime/message/*.xml /usr/share/mime/model /usr/share/mime/model/*.xml /usr/share/mime/multipart /usr/share/mime/multipart/*.xml /usr/share/mime/text /usr/share/mime/text/*.xml /usr/share/mime/video /usr/share/mime/video/*.xml cruft-0.9.16/filters-unex/netkit-inetd0000644000000000000000000000002011543656373014574 0ustar /etc/inetd.conf cruft-0.9.16/filters-unex/nfs-kernel-server0000644000000000000000000000001511543656373015551 0ustar /etc/exports cruft-0.9.16/filters-unex/csh0000644000000000000000000000004611543656372012761 0ustar /bin/csh /usr/share/man/man1/csh.1.gz cruft-0.9.16/filters-unex/tcsh0000644000000000000000000000004611543656373013146 0ustar /bin/csh /usr/share/man/man1/csh.1.gz cruft-0.9.16/filters-unex/gnome-themes0000644000000000000000000000007411543656372014575 0ustar # gnome-themes 2.10.2-1 /usr/share/icons/*/icon-theme.cache cruft-0.9.16/filters-unex/apache-common0000644000000000000000000000046011543656372014713 0ustar /etc/apache/modules.conf /var/www /var/www/index.html # I've not decided yet what to do about the following files, since they _are_ # created by a postinst, but they signify a possible problem with the package, # so it might be better to just show them to the user.. # /etc/apache*/suggested_corrections cruft-0.9.16/filters-unex/mgetty0000644000000000000000000000004011543656373013510 0ustar /var/log/mgetty/mg_unknown.log* cruft-0.9.16/filters-unex/gnats0000644000000000000000000000011111543656372013311 0ustar /var/lib/gnats /var/lib/gnats/gnats-db /var/lib/gnats/gnats-db/gnats-adm cruft-0.9.16/filters-unex/lynx0000644000000000000000000000006311543656373013176 0ustar /usr/bin/lynx /usr/share/man/man1/www-browser.1.gz cruft-0.9.16/filters-unex/sun-java5-bin0000644000000000000000000000021611543656373014563 0ustar # sun-java5-bin 1.5.0-10-3 /etc/.java /etc/.java/.systemPrefs /etc/.java/.systemPrefs/.system.lock /etc/.java/.systemPrefs/.systemRootModFile cruft-0.9.16/filters-unex/inn0000644000000000000000000000034411543656373012772 0ustar /etc/news/inn.conf /etc/news/newsfeeds /etc/news/organization /etc/news/server /etc/news/whoami /var/lib/news/* /var/log/news /var/log/news/** /var/run/innd/control /var/run/innd/innd.pid /var/run/innd/nntpin /var/spool/news/** cruft-0.9.16/filters-unex/doc-base0000644000000000000000000000012511543656372013657 0ustar /var/lib/doc-base/info /var/lib/doc-base/info/*.list /var/lib/doc-base/info/*.status cruft-0.9.16/filters-unex/qmail-src0000644000000000000000000000006511543656373014076 0ustar /usr/src/qmail-src/qmail /usr/src/qmail-src/qmail/** cruft-0.9.16/filters-unex/snmpd0000644000000000000000000000003111543656373013320 0ustar /var/lib/snmp/snmpd.conf cruft-0.9.16/filters-unex/postfix0000644000000000000000000000163211543656373013703 0ustar /etc/aliases /etc/aliases.db /etc/mailname /etc/postfix/dynamicmaps.cf /etc/postfix/main.cf /etc/postfix/master.cf /var/spool/postfix/incoming /var/spool/postfix/incoming/** /var/spool/postfix/active /var/spool/postfix/active/** /var/spool/postfix/defer /var/spool/postfix/defer/** /var/spool/postfix/deferred /var/spool/postfix/deferred/** /var/spool/postfix/bounce /var/spool/postfix/bounce/** /var/spool/postfix/corrupt /var/spool/postfix/flush /var/spool/postfix/hold /var/spool/postfix/maildrop /var/spool/postfix/saved /var/spool/postfix/trace /var/spool/postfix/pid /var/spool/postfix/pid/** /var/spool/postfix/private /var/spool/postfix/private/** /var/spool/postfix/public /var/spool/postfix/public/pickup /var/spool/postfix/public/cleanup /var/spool/postfix/public/qmgr /var/spool/postfix/public/flush /var/spool/postfix/public/showq /var/spool/postfix/etc/** /var/spool/postfix/lib/** /var/spool/postfix/usr/** cruft-0.9.16/filters-unex/base-files0000644000000000000000000000117511543656372014222 0ustar /cdrom /cdrom/cdrom0 /cdrom0 /floppy /initrd /opt /media /media/cdrom /media/cdrom0 /media/floppy /media/floppy0 /srv /proc /sys /etc/fstab /etc/motd /etc/mtab /etc/opt /etc/papersize /etc/adjtime /etc/profile /etc/inputrc /etc/nsswitch.conf # those three are created by debootstrap/d-i? /etc/hostname /etc/resolv.conf /etc/networks /var/backups/** /var/mail /var/opt /usr/share/info/dir /var/spool/mail /var/run/*.pid /var/run/utmp /var/log/wtmp /var/log/btmp /usr/local /usr/local/bin /usr/local/etc /usr/local/games /usr/local/include /usr/local/lib /usr/local/man /usr/local/sbin /usr/local/share /usr/local/share/man /usr/local/src cruft-0.9.16/filters-unex/iptraf0000644000000000000000000000002211543656373013464 0ustar /var/lib/iptraf/* cruft-0.9.16/filters-unex/ca-certificates0000644000000000000000000000007511543656372015234 0ustar /etc/ca-certificates.conf /etc/ssl/certs/ca-certificates.crt cruft-0.9.16/filters-unex/dcc-common0000644000000000000000000000007311543656372014223 0ustar # dcc-common 1.2.74-4 (etch) /etc/dcc/ids /etc/dcc/map.txt cruft-0.9.16/filters-unex/apt0000644000000000000000000000062611543656372012774 0ustar /var/cache/apt/archives/* /var/cache/apt/lock /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin /var/lib/apt/cdroms.list /var/lib/apt/listchanges.db /var/lib/apt/lists/* /var/lib/apt/lists/partial/* /etc/apt/sources.list /etc/apt/apt.conf /etc/apt/preferences /etc/apt/trusted.gpg /etc/apt/trusted.gpg~ /etc/apt/trustdb.gpg /etc/apt/secring.gpg /var/lib/apt/extended_states /var/log/apt/term.log* cruft-0.9.16/filters-unex/expect0000644000000000000000000000014211543656372013471 0ustar /usr/bin/expect /usr/bin/expectk /usr/share/man/man1/expect.1.gz /usr/share/man/man1/expectk.1.gz cruft-0.9.16/filters-unex/aide0000644000000000000000000000030011543656372013077 0ustar /var/lib/aide/aide.conf.autogenerated /var/lib/aide/aide.db /var/lib/aide/aide.db.new /var/log/aide/aide.log* /var/log/aide/error.log* /var/log/aide/aideinit.errors /var/log/aide/aideinit.log cruft-0.9.16/filters-unex/fakeroot0000644000000000000000000000027311543656372014020 0ustar # fakeroot 1.2.10 /usr/bin/fakeroot /usr/share/man/man1/faked.1.gz /usr/share/man/man1/fakeroot.1.gz # looks like the SONAME causes ldconfig to create this link /usr/lib/libfakeroot.so.0 cruft-0.9.16/filters-unex/xml-core0000644000000000000000000000031511543656373013732 0ustar # xml-core 0.09 /etc/xml /etc/xml/catalog /etc/xml/catalog.old /etc/xml/xml-core.xml /etc/xml/xml-core.xml.old /etc/sgml/xml-core.cat /var/lib/xml-core /var/lib/xml-core/catalog /var/lib/xml-core/xml-core cruft-0.9.16/filters-unex/irssi-text0000644000000000000000000000005611543656373014321 0ustar /usr/bin/irssi /usr/share/man/man1/irssi.1.gz cruft-0.9.16/filters-unex/findutils0000644000000000000000000000003311543656372014201 0ustar /var/cache/locate/locatedb cruft-0.9.16/filters-unex/analog0000644000000000000000000000006111543656372013442 0ustar /var/www/analog_images /var/www/analog_images/** cruft-0.9.16/filters-unex/less0000644000000000000000000000005611543656373013154 0ustar /usr/bin/pager /usr/share/man/man1/pager.1.gz cruft-0.9.16/filters-unex/mawk0000644000000000000000000000012611543656373013143 0ustar /usr/bin/awk /usr/bin/nawk /usr/share/man/man1/awk.1.gz /usr/share/man/man1/nawk.1.gz cruft-0.9.16/filters-unex/gnome-session0000644000000000000000000000016411543656372014773 0ustar /usr/bin/x-session-manager /usr/share/images/desktop-base/desktop-splash /usr/share/man/man1/x-session-manager.1.gz cruft-0.9.16/filters-unex/libuuid10000644000000000000000000000004511543656373013722 0ustar # libuuid1 1.40.8-2 /var/lib/libuuid cruft-0.9.16/filters-unex/chkrootkit0000644000000000000000000000005111543656372014361 0ustar # chkrootkit 0.44-2 /etc/chkrootkit.conf cruft-0.9.16/filters-unex/clamav-daemon0000644000000000000000000000020611543656372014706 0ustar /etc/clamav/clamd.conf /etc/logrotate.d/clamav-daemon /var/log/clamav/clamav.log* /var/run/clamav/clamd.ctl /var/run/clamav/clamd.pid cruft-0.9.16/filters-unex/mc0000644000000000000000000000025111543656373012602 0ustar /usr/lib/mc/mc.ext /usr/lib/mc/mc.ini /usr/lib/mc/mc.lib /usr/lib/mc/mc.menu /usr/bin/editor /usr/bin/view /usr/share/man/man1/editor.1.gz /usr/share/man/man1/view.1.gz cruft-0.9.16/filters-unex/dhcp3-client0000644000000000000000000000003711543656372014461 0ustar /var/lib/dhcp3/dhclient.leases cruft-0.9.16/filters-unex/w3m0000644000000000000000000000015011543656373012707 0ustar /usr/bin/pager /usr/bin/www-browser /usr/share/man/man1/pager.1.gz /usr/share/man/man1/www-browser.1.gz cruft-0.9.16/filters-unex/net-acct0000644000000000000000000000016511543656373013705 0ustar /var/log/net-acct /var/log/net-acct/net-acct-dump* /var/log/net-acct/net-acct.debug* /var/log/net-acct/net-acct.log* cruft-0.9.16/filters-unex/libsnmp-base0000644000000000000000000000003411543656373014556 0ustar /usr/share/snmp/mibs/.index cruft-0.9.16/filters-unex/sysstat0000644000000000000000000000012411543656373013714 0ustar /etc/default/sysstat /usr/bin/sar /usr/share/man/man1/sar.1.gz /var/log/sysstat/sa* cruft-0.9.16/filters-unex/vim-gnome0000644000000000000000000000030411543656373014100 0ustar # vim-gnome 1:6.3-071+1 /usr/bin/editor /usr/bin/ex /usr/bin/vi /usr/bin/view /usr/share/man/man1/editor.1.gz /usr/share/man/man1/ex.1.gz /usr/share/man/man1/vi.1.gz /usr/share/man/man1/view.1.gz cruft-0.9.16/filters-unex/apt-listbugs0000644000000000000000000000007311543656372014622 0ustar # apt-listbugs 0.0.69 (etch) /etc/apt/listbugs/ignore_bugs cruft-0.9.16/filters-unex/mime-support0000644000000000000000000000001511543656373014642 0ustar /etc/mailcap cruft-0.9.16/filters-unex/tcpd0000644000000000000000000000004111543656373013132 0ustar /etc/hosts.allow /etc/hosts.deny cruft-0.9.16/filters-unex/tetex-base0000644000000000000000000000007111543656373014244 0ustar /var/lib/texmf/ls-R /var/spool/texmf /var/spool/texmf/** cruft-0.9.16/filters-unex/cryptsetup0000644000000000000000000000006011543656372014422 0ustar # cryptsetup 1.0.4+svn26-1 (etch) /etc/crypttab cruft-0.9.16/filters-unex/gs-common0000644000000000000000000000007511543656372014105 0ustar # gs-common 0.3.11 (etch) /etc/defoma/ghostscript.subst-rule cruft-0.9.16/filters-unex/galeon-common0000644000000000000000000000004711543656372014740 0ustar /usr/share/man/man1/x-www-browser.1.gz cruft-0.9.16/filters-unex/lm-sensors0000644000000000000000000000002211543656373014301 0ustar /etc/sensors.conf cruft-0.9.16/filters-unex/libncurses50000644000000000000000000000016211543656373014442 0ustar # libncurses5 5.4-4 # looks like symlinks and SONAME causes ldconfgi to create this link /usr/lib/libncurses.so.5 cruft-0.9.16/filters-unex/tk8.00000644000000000000000000000005411543656373013050 0ustar /usr/bin/wish /usr/share/man/man1/wish.1.gz cruft-0.9.16/filters-unex/automake1.90000644000000000000000000000014611543656372014243 0ustar /usr/bin/aclocal /usr/bin/automake /usr/share/man/man1/aclocal.1.gz /usr/share/man/man1/automake.1.gz cruft-0.9.16/filters-unex/info0000644000000000000000000000007211543656372013136 0ustar /usr/bin/infobrowser /usr/share/man/man1/infobrowser.1.gz cruft-0.9.16/filters-unex/samba0000644000000000000000000000005511543656373013270 0ustar /etc/pam.d/samba /var/log/nmb* /var/log/smb* cruft-0.9.16/filters-unex/libpango1.0-common0000644000000000000000000000013311543656373015502 0ustar # libpango1.0-common 1.8.1-1 /etc/pango /etc/pango/pango.modules /etc/pango/pangox.aliases cruft-0.9.16/filters-unex/ucf0000644000000000000000000000007711543656373012766 0ustar /var/lib/ucf/cache /var/lib/ucf/cache/* /var/lib/ucf/hashfile* cruft-0.9.16/filters-unex/dhcp-client0000644000000000000000000000010411543656372014371 0ustar /usr/share/man/man5/dhcp-options.5.gz /var/lib/dhcp/dhclient.leases cruft-0.9.16/filters-unex/nagios-nrpe-server0000644000000000000000000000003311543656373015727 0ustar /etc/nagios/nrpe_local.cfg cruft-0.9.16/filters-unex/g++0000644000000000000000000000005211543656372012555 0ustar /usr/bin/c++ /usr/share/man/man1/c++.1.gz cruft-0.9.16/filters-unex/cupsys0000644000000000000000000000201011543656372013523 0ustar # cupsys 1.2.7-4 (etch) /etc/cups/classes.conf /etc/cups/classes.conf.* /etc/cups/ppd /etc/cups/ppd/*.ppd /etc/cups/ppd/*.ppd.old /etc/cups/printers.conf /etc/cups/printers.conf.* /etc/cups/raw.convs /etc/cups/raw.types /var/lib/cups/ppds.dat /var/lib/cups/certs /var/lib/cups/certs/* /var/log/cups /var/log/cups/access.log /var/log/cups/access.log.* /var/log/cups/error_log /var/log/cups/error_log.* /var/log/cups/page_log /var/log/cups/page_log.* /var/run/cups /var/run/cups/certs /var/run/cups/certs/* /var/run/cups/cupsd.pid /var/run/cups/cups.sock /var/run/cups/printcap /var/cache/cups/job.cache /var/cache/cups/job.cache/* /var/cache/cups/remote.cache /var/cache/cups/remote.cache/* /var/spool/cups/* # enabled backends could be detected in an explain script for more accuracy /usr/lib/cups/backend/http /usr/lib/cups/backend/ipp /usr/lib/cups/backend/lpd /usr/lib/cups/backend/parallel /usr/lib/cups/backend/scsi /usr/lib/cups/backend/serial /usr/lib/cups/backend/socket /usr/lib/cups/backend/usb /usr/lib/cups/backend/snmp cruft-0.9.16/filters-unex/fontconfig0000644000000000000000000000013311543656372014335 0ustar # fontconfig 2.3.2-1.1 /etc/defoma/fontconfig.subst-rule /usr/share/fonts/**/fonts.cache-1 cruft-0.9.16/filters-unex/openjade0000644000000000000000000000002211543656373013764 0ustar /usr/bin/openjade cruft-0.9.16/filters-unex/pdmenu0000644000000000000000000000015011543656373013471 0ustar #pdmenu 1.2.89 (etch) /var/lib/pdmenu/pdmenurc /var/lib/pdmenu/pdmenurc.vc /var/lib/pdmenu/pdmenurc.x11 cruft-0.9.16/filters-unex/nethack-common0000644000000000000000000000003211543656373015103 0ustar /var/lib/games/nethack/** cruft-0.9.16/filters-unex/libnet-perl0000644000000000000000000000002011543656373014412 0ustar /etc/libnet.cfg cruft-0.9.16/filters-unex/dhelp0000644000000000000000000000023611543656372013301 0ustar # dhelp 0.5.20 /etc/dhelp /etc/dhelp/www-browser-console /etc/dhelp/www-browser-x /usr/share/doc/HTML /usr/share/doc/HTML/** /var/lib/dhelp /var/lib/dhelp/** cruft-0.9.16/filters-unex/modutils0000644000000000000000000000020611543656373014043 0ustar /etc/conf.modules /etc/modules /etc/modules.conf /etc/modules.conf.old /etc/modutils/conf.i386 /var/log/ksymoops /var/log/ksymoops/** cruft-0.9.16/filters-unex/exuberant-ctags0000644000000000000000000000013411543656372015276 0ustar /usr/bin/ctags /usr/bin/etags /usr/share/man/man1/ctags.1.gz /usr/share/man/man1/etags.1.gz cruft-0.9.16/filters-unex/ircii0000644000000000000000000000007311543656373013304 0ustar /etc/irc/servers /usr/bin/irc /usr/share/man/man1/irc.1.gz cruft-0.9.16/filters-unex/galeon0000644000000000000000000000002711543656372013450 0ustar /usr/bin/x-www-browser cruft-0.9.16/filters-unex/python2.3-gtk20000644000000000000000000000005211543656373014613 0ustar /usr/lib/python2.3/site-packages/pygtk.py cruft-0.9.16/filters-unex/syslog-ng0000644000000000000000000000055711543656373014136 0ustar /var/log/auth.log* /var/log/cron.log* /var/log/daemon.log* /var/log/debug* /var/log/kern.log* /var/log/lpr.log* /var/log/mail.err* /var/log/mail.crit* /var/log/mail.notice* /var/log/mail.info* /var/log/mail.log* /var/log/mail.warn* /var/log/messages* /var/log/news.crit* /var/log/news.err* /var/log/news.notice* /var/log/syslog* /var/log/user.log* /var/log/uucp.log* cruft-0.9.16/filters-unex/stunnel40000644000000000000000000000014111543656373013755 0ustar /var/log/stunnel4 /var/log/stunnel4/stunnel.log* /var/run/stunnel4 /var/run/stunnel4/stunnel.pid cruft-0.9.16/filters-unex/libhesiod00000644000000000000000000000002111543656373014220 0ustar /etc/hesiod.conf cruft-0.9.16/filters-unex/nvi0000644000000000000000000000031611543656373013001 0ustar # nvi 1.79-22 /usr/bin/editor /usr/bin/ex /usr/bin/vi /usr/bin/view /usr/share/man/man1/editor.1.gz /usr/share/man/man1/ex.1.gz /usr/share/man/man1/vi.1.gz /usr/share/man/man1/view.1.gz /var/tmp/vi.recover cruft-0.9.16/filters-unex/base-passwd0000644000000000000000000000014411543656372014414 0ustar /etc/group /etc/gshadow /etc/passwd /etc/shadow /etc/group- /etc/gshadow- /etc/passwd- /etc/shadow- cruft-0.9.16/filters-unex/metacity0000644000000000000000000000010411543656373014017 0ustar /usr/bin/x-window-manager /usr/share/man/man1/x-window-manager.1.gz cruft-0.9.16/filters-unex/lprng0000644000000000000000000000002211543656373013321 0ustar /var/spool/lpd/** cruft-0.9.16/filters-unex/xbill0000644000000000000000000000003411543656373013314 0ustar /var/lib/games/xbill.scores cruft-0.9.16/filters-unex/cpio0000644000000000000000000000004411543656372013134 0ustar /bin/mt /usr/share/man/man1/mt.1.gz cruft-0.9.16/filters-unex/openssh-client0000644000000000000000000000020411543656373015134 0ustar /usr/bin/rcp /usr/bin/rlogin /usr/bin/rsh /usr/share/man/man1/rcp.1.gz /usr/share/man/man1/rlogin.1.gz /usr/share/man/man1/rsh.1.gz cruft-0.9.16/filters-unex/gconf20000644000000000000000000000002311543656372013355 0ustar /usr/bin/gconftool cruft-0.9.16/filters-unex/mpg3210000644000000000000000000000015211543656373013214 0ustar /usr/bin/mp3-decoder /usr/bin/mpg123 /usr/share/man/man1/mp3-decoder.1.gz /usr/share/man/man1/mpg123.1.gz cruft-0.9.16/filters-unex/ddclient0000644000000000000000000000010311543656372013764 0ustar # ddclient 3.6.7-2 (etch) /etc/ddclient.conf /etc/default/ddclient cruft-0.9.16/filters-unex/libpam-modules0000644000000000000000000000006211543656373015115 0ustar # libpam-modules 0.99.7.1-6 /etc/security/opasswd cruft-0.9.16/filters-unex/wmaker0000644000000000000000000000006311543656373013472 0ustar /etc/X11/WindowMaker/** /usr/X11R6/bin/WindowMaker cruft-0.9.16/filters-unex/exim4-daemon-heavy0000644000000000000000000000026011543656372015603 0ustar /var/spool/exim4/scan /var/spool/exim4/scan/** /var/run/exim4 /var/run/exim4/exim.pid /var/log/exim4 /var/log/exim4/mainlog* /var/log/exim4/paniclog* /var/log/exim4/rejectlog* cruft-0.9.16/filters-unex/ifupdown0000644000000000000000000000023711543656372014041 0ustar /etc/network/if-down.d /etc/network/if-post-down.d /etc/network/if-pre-up.d /etc/network/if-up.d /etc/network/ifstate /etc/network/interfaces /etc/network/run cruft-0.9.16/filters-unex/gtk2-engines-industrial0000644000000000000000000000005511543656372016655 0ustar /usr/X11R6/lib/X11/icons/default/index.theme cruft-0.9.16/filters-unex/fetchmail0000644000000000000000000000011111543656372014131 0ustar /etc/fetchmailrc /etc/ppp/ip-down.d/fetchmail /etc/ppp/ip-up.d/fetchmail cruft-0.9.16/filters-unex/adduser0000644000000000000000000000002211543656372013625 0ustar /etc/adduser.conf cruft-0.9.16/filters-unex/clamav-freshclam0000644000000000000000000000021311543656372015405 0ustar /etc/clamav/freshclam.conf /var/lib/clamav/daily.cvd /var/lib/clamav/main.cvd /var/log/clamav/freshclam.log* /var/run/clamav/freshclam.pid cruft-0.9.16/filters-unex/ppp0000644000000000000000000000055311543656373013007 0ustar # ppp 2.4.4rel-4.1 (etch) #files deleted in ppp.postrm seem like the right things to list here: /etc/ppp/pap-secrets /etc/ppp/chap-secrets /etc/ppp/resolv.conf /etc/ppp/peers/provider /etc/chatscripts/provider /etc/ppp/peers/ /etc/ppp/ip-up.d/ /etc/ppp/ip-down.d/ /etc/ppp/ /etc/chatscripts/ /var/log/ppp.log /var/log/ppp-connect-errors /var/log/ppp-ipupdown.log cruft-0.9.16/filters-unex/ee0000644000000000000000000000006011543656372012571 0ustar /usr/bin/editor /usr/share/man/man1/editor.1.gz cruft-0.9.16/filters-unex/xterm0000644000000000000000000000011211543656373013336 0ustar /usr/bin/x-terminal-emulator /usr/share/man/man1/x-terminal-emulator.1.gz cruft-0.9.16/filters-unex/bind0000644000000000000000000000014411543656372013117 0ustar /etc/named.boot /etc/named.conf /var/named/boot.options /var/named/boot.zones /var/named/named.boot cruft-0.9.16/filters-unex/tomcat40000644000000000000000000000040711543656373013561 0ustar # tomcat4 4.1.31-3 /var/lib/tomcat4/conf/catalina.policy /var/lib/tomcat4/conf/jk2.properties /var/lib/tomcat4/conf/tomcat-users.xml /var/lib/tomcat4/temp/tomcat4.pid /var/lib/tomcat4/webapps/*/WEB-INF/web.xml /var/log/tomcat4/catalina.out* /var/cache/tomcat4/** cruft-0.9.16/filters-unex/fvwm950000644000000000000000000000002311543656372013334 0ustar /etc/X11/fvwm95/** cruft-0.9.16/filters-unex/xscreensaver0000644000000000000000000000007111543656373014713 0ustar # xscreensaver 4.21-3 /etc/X11/app-defaults/XScreenSaver cruft-0.9.16/filters-unex/xserver-xorg0000644000000000000000000000005411543656373014657 0ustar # xserver-xorg 1:7.1.0-16 (etch) /etc/X11/X cruft-0.9.16/filters-unex/ibritish0000644000000000000000000000025411543656372014022 0ustar /etc/dictionaries-common/ispell-default /etc/dictionaries-common/default.aff /etc/dictionaries-common/default.hash /usr/lib/ispell/default.aff /usr/lib/ispell/default.hash cruft-0.9.16/filters-unex/emacs21-common0000644000000000000000000000020311543656372014720 0ustar # emacs21-common 21.4a+1-3 /usr/share/emacs21/site-lisp/**/*.elc /usr/local/share/emacs/21.4 /usr/local/share/emacs/21.4/site-lisp cruft-0.9.16/filters-unex/aptitude0000644000000000000000000000017111543656372014022 0ustar /var/lib/aptitude/lock /var/lib/aptitude/pkgstates /var/lib/aptitude/pkgstates.old /var/lock/aptitude /var/log/aptitude* cruft-0.9.16/filters-unex/xfstt0000644000000000000000000000004111543656373013350 0ustar # xfstt 1.6-3 /etc/default/xfstt cruft-0.9.16/filters-unex/msttcorefonts0000644000000000000000000000015211543656373015115 0ustar # msttcorefonts 1.2 /usr/share/fonts/truetype/msttcorefonts /usr/share/fonts/truetype/msttcorefonts/*.ttf cruft-0.9.16/filters-unex/util-linux0000644000000000000000000000005611543656373014320 0ustar /usr/bin/pager /usr/share/man/man1/pager.1.gz cruft-0.9.16/filters-unex/gnome-terminal0000644000000000000000000000011211543656372015114 0ustar /usr/bin/x-terminal-emulator /usr/share/man/man1/x-terminal-emulator.1.gz cruft-0.9.16/filters-unex/cron0000644000000000000000000000034611543656372013150 0ustar # cron 3.0pl1-100 (etch) /var/backups /var/backups/dpkg.status* /var/backups/group.bak /var/backups/gshadow.bak /var/backups/passwd.bak /var/backups/shadow.bak /var/lock/cron.daily /var/spool/cron/crontabs/* /var/run/crond.reboot cruft-0.9.16/filters-unex/scrollkeeper0000644000000000000000000000007411543656373014700 0ustar # scrollkeeper 0.3.14-10 /usr/share/scrollkeeper/configured cruft-0.9.16/filters-unex/man2html0000644000000000000000000000004411543656373013725 0ustar /var/cache/man2html/* /var/man2html cruft-0.9.16/filters-unex/gftp-text0000644000000000000000000000001511543656372014122 0ustar /usr/bin/ftp cruft-0.9.16/filters-unex/x-ttcidfont-conf0000644000000000000000000000011011543656373015363 0ustar # x-ttcidfont-conf 25.1 (etch) /etc/defoma/config/x-ttcidfont-conf.conf cruft-0.9.16/filters-unex/login0000644000000000000000000000004211543656373013311 0ustar /var/log/faillog /var/log/lastlog cruft-0.9.16/filters-unex/acct0000644000000000000000000000010011543656372013105 0ustar /var/account/pacct /var/account/pacct.*.gz /var/account/pacct.0 cruft-0.9.16/filters-unex/netbase0000644000000000000000000000007311543656373013626 0ustar /etc/hosts /etc/network/options /etc/network/spoof-protect cruft-0.9.16/filters-unex/exim4-base0000644000000000000000000000044311543656372014143 0ustar /var/spool/exim4 /var/spool/exim4/exim-process.info /var/spool/exim4/gnutls-params /var/spool/exim4/db /var/spool/exim4/db/retry /var/spool/exim4/db/retry.lockfile /var/spool/exim4/db/wait-* /var/spool/exim4/input /var/spool/exim4/input/** /var/spool/exim4/msglog /var/spool/exim4/msglog/** cruft-0.9.16/filters-unex/php40000644000000000000000000000003111543656373013052 0ustar /etc/php4/apache/php.ini cruft-0.9.16/filters-unex/dhcp0000644000000000000000000000005611543656372013123 0ustar # dhcp 2.0pl5-19.1 /var/lib/dhcp/dhcpd.leases cruft-0.9.16/filters-unex/phpmyadmin0000644000000000000000000000053111543656373014352 0ustar # phpmyadmin 4:2.6.2-3 /etc/apache/conf.d/phpmyadmin.conf /etc/apache-ssl/conf.d/phpmyadmin.conf /etc/apache-perl/conf.d/phpmyadmin.conf /etc/apache2/conf.d/phpmyadmin.conf /etc/phpmyadmin/config.footer.inc.php /etc/phpmyadmin/config.header.inc.php /etc/phpmyadmin/config.inc.php /etc/phpmyadmin/htaccess /etc/phpmyadmin/blowfish_secret.inc.php cruft-0.9.16/filters-unex/logrotate0000644000000000000000000000007211543656373014204 0ustar /var/lib/logrotate/status /var/log/btmp.* /var/log/wtmp.* cruft-0.9.16/filters-unex/emacs210000644000000000000000000000035511543656372013442 0ustar /etc/emacs21/site-start.d/00debian-vars.elc /usr/bin/b2m /usr/bin/ctags /usr/bin/emacs /usr/bin/emacsclient /usr/bin/etags /usr/bin/rcs-checkin /usr/share/man/man1/ctags.1.gz /usr/share/man/man1/emacs.1.gz /usr/share/man/man1/etags.1.gz cruft-0.9.16/filters-unex/debfoster0000644000000000000000000000003311543656372014155 0ustar /var/lib/debfoster/keepers cruft-0.9.16/filters-unex/tetex-bin0000644000000000000000000000004511543656373014103 0ustar /usr/bin/oxdvi.bin /usr/bin/xdvi.bin cruft-0.9.16/filters-unex/exim4-config0000644000000000000000000000016411543656372014476 0ustar /etc/aliases /etc/mailname /etc/default/exim4 /etc/exim4/update-exim4.conf.conf /var/lib/exim4/config.autogenerated cruft-0.9.16/filters-unex/mozilla-browser0000644000000000000000000000006211543656373015333 0ustar /usr/bin/mozilla /usr/share/man/man1/mozilla.1.gz cruft-0.9.16/filters-unex/qmail0000644000000000000000000000041211543656373013305 0ustar /etc/qmail/defaultdomain /etc/qmail/localiphost /etc/qmail/locals /etc/qmail/me /etc/qmail/plusdomain /etc/qmail/rcpthosts /etc/qmail/virtualdomains /var/qmail/alias/* /var/qmail/users/cdb /var/spool/qmail/info/** /var/spool/qmail/mess/** /var/spool/qmail/remote/** cruft-0.9.16/filters-unex/module-init-tools0000644000000000000000000000033411543656373015571 0ustar /etc/modules /usr/share/man/man8/ksyms.8.gz /usr/share/man/man8/kallsyms.8.gz /etc/modprobe.d/arch-aliases /bin/lsmod.modutils /sbin/lsmod.modutils /sbin/modprobe.modutils /sbin/rmmod.modutils /sbin/ksyms /sbin/kallsyms cruft-0.9.16/filters-unex/ncurses-term0000644000000000000000000000002711543656373014633 0ustar /usr/share/terminfo/** cruft-0.9.16/filters-unex/cfengine0000644000000000000000000000002311543656372013755 0ustar /var/log/cfengine* cruft-0.9.16/filters-unex/cvs0000644000000000000000000000010011543656372012766 0ustar # cvs 1.12.13-8 (etch) /etc/cvs-cron.conf /etc/cvs-pserver.conf cruft-0.9.16/filters-unex/bsdmainutils0000644000000000000000000000005611543656372014703 0ustar /usr/bin/write /usr/share/man/man1/write.1.gz cruft-0.9.16/filters-unex/fte0000644000000000000000000000006011543656372012756 0ustar /usr/bin/editor /usr/share/man/man1/editor.1.gz cruft-0.9.16/filters-unex/gftp-common0000644000000000000000000000003511543656372014430 0ustar /usr/share/man/man1/ftp.1.gz cruft-0.9.16/filters-unex/squid0000644000000000000000000000013111543656373013325 0ustar # squid 2.5.9-10 /etc/default/squid /etc/squid.conf /var/log/squid/* /var/spool/squid/** cruft-0.9.16/filters-unex/octave2.00000644000000000000000000000005111543656373013702 0ustar # octave 2.0.17-9 /usr/share/octave/ls-R cruft-0.9.16/filters-unex/desktop-base0000644000000000000000000000014011543656372014560 0ustar /usr/share/images/desktop-base/desktop-background /usr/share/images/desktop-base/desktop-splash cruft-0.9.16/filters-unex/libcommons-validator-java0000644000000000000000000000011611543656373017247 0ustar # libcommons-validator-java 1:1.1.4-2 /etc/sgml/libcommons-validator-java.cat cruft-0.9.16/filters-unex/ntp0000644000000000000000000000020111543656373012777 0ustar /etc/ntp.conf /var/lib/ntp/ntp.drift /var/log/ntpstats /var/log/ntpstats/loopstats* /var/log/ntpstats/peerstats* /var/log/xntpd* cruft-0.9.16/filters-unex/openssl0000644000000000000000000000001511543656373013664 0ustar /etc/ssl/lib cruft-0.9.16/filters-unex/lg-base0000644000000000000000000000060411543656373013517 0ustar # lg-base 113-1 /usr/share/doc/lg/** # This could be better, if every lg-issue provided a list, or a detailed list, # or it could be created by an explain script. # Though it may not be worth the hassle, since lg-* may be removed from the # archive (licence problems). # For now, this filter is worth having because sarge has lg packages (and # people will keep them around for sarge+1). cruft-0.9.16/filters-unex/suck0000644000000000000000000000010411543656373013145 0ustar /usr/sbin/get-news /var/lib/suck/** /var/log/suck-* /var/log/suck/* cruft-0.9.16/filters-unex/xlibs-data0000644000000000000000000000005511543656373014235 0ustar /usr/X11R6/lib/X11/icons/default/index.theme cruft-0.9.16/filters-unex/emacsen-common0000644000000000000000000000017211543656372015105 0ustar # emacsen-common 1.4.17 /var/lib/emacsen-common/installed-flavors /usr/local/share/emacs /usr/local/share/emacs/site-lisp cruft-0.9.16/filters-unex/apache0000644000000000000000000000031511543656372013424 0ustar /etc/apache/access.conf /etc/apache/conf /etc/apache/cron.conf /etc/apache/httpd.conf /etc/apache/mime.types /etc/apache/srm.conf /var/log/apache/access.log* /var/log/apache/error.log* /var/run/apache.pid cruft-0.9.16/filters-unex/sun-j2sdk1.50000644000000000000000000000137611543656373014260 0ustar /usr/bin/appletviewer /usr/bin/idlj /usr/bin/jar /usr/bin/jarsigner /usr/bin/java /usr/bin/javac /usr/bin/javadoc /usr/bin/javah /usr/bin/javap /usr/bin/jdb /usr/bin/rmic /usr/bin/rmid /usr/bin/rmiregistry /usr/bin/serialver /usr/lib/mozilla-firefox/plugins/libjavaplugin.so /usr/lib/mozilla/plugins/libjavaplugin.so /usr/share/man/man1/appletviewer.1.gz /usr/share/man/man1/idlj.1.gz /usr/share/man/man1/jar.1.gz /usr/share/man/man1/jarsigner.1.gz /usr/share/man/man1/java.1.gz /usr/share/man/man1/javac.1.gz /usr/share/man/man1/javadoc.1.gz /usr/share/man/man1/javah.1.gz /usr/share/man/man1/javap.1.gz /usr/share/man/man1/jdb.1.gz /usr/share/man/man1/rmic.1.gz /usr/share/man/man1/rmid.1.gz /usr/share/man/man1/rmiregistry.1.gz /usr/share/man/man1/serialver.1.gz cruft-0.9.16/filters-unex/lilo0000644000000000000000000000001711543656373013142 0ustar /etc/lilo.conf cruft-0.9.16/filters-unex/logcheck0000644000000000000000000000003311543656373013760 0ustar /var/lib/logcheck/offset.* cruft-0.9.16/filters-unex/bison0000644000000000000000000000005411543656372013315 0ustar /usr/bin/yacc /usr/share/man/man1/yacc.1.gz cruft-0.9.16/filters-unex/dhcpcd0000644000000000000000000000001611543656372013426 0ustar /etc/dhcpc/** cruft-0.9.16/filters-unex/cups-pdf0000644000000000000000000000012211543656372013720 0ustar # cups-pdf 2.4.2-3 (etch) /var/log/cups/cups-pdf_log /var/log/cups/cups-pdf_log.* cruft-0.9.16/cruft0000755000000000000000000001360611605526563010710 0ustar #!/bin/dash set -e . /usr/lib/cruft/common.sh cruft_debug 2 # empty means stdout REPORTFILE="" MAILTO="" CLEANUP=yes FILES=yes REPORT=yes CHROOTS="" IGNORES="" STARTDIR="$(pwd)" # first, read the paths from command line DRIVES="" exitcode=0 usage() { echo "Usage:" echo " cruft -h Shows this message and exits." echo " cruft -k Only cleans the spool directory." echo " cruft -n [OPTIONS] Generates input files for reporting, but does not" echo " generate a report." echo " cruft -N [OPTIONS] Only generates a report." echo " cruft [OPTIONS] Performs a run and generates a report." echo echo "Options: [-r REPORTFILE] [-m ADDRESS]" echo " [-d DRIVES] [--chroots CHROOTS] [--ignore IGNORES]" } while [ $# != 0 ]; do case "$1" in -h) usage; exit 0;; -d) DRIVES="$DRIVES $2"; shift;; -r) REPORTFILE="$2"; shift if [ -z "$STARTDIR" -o ! -d "$STARTDIR" ]; then echo "Start directory \"$STARTDIR\" is not accessible." >&2 exit 1 fi ;; -m) MAILTO="$2"; shift;; --chroots) CHROOTS="$2"; shift ;; --ignore) IGNORES="$IGNORES $2"; shift ;; -k) CLEANUP=yes; FILES=no; REPORT=no;; -n) CLEANUP=no; FILES=yes; REPORT=no;; -N) CLEANUP=no; FILES=no; REPORT=yes;; -*) echo "$0: invalid option -- ${i#-}"; usage; exit 2;; *) echo "$0: invalid argument: ${i#-}"; usage; exit 2;; esac shift done cd /var/spool/cruft || { echo "Are you root?" ; exit 1; } # now set the default, if none were specified if [ -z "$DRIVES" ] ; then default_drives=$(cruft_default_scan_fs) DRIVES=${default_drives:-/} fi # clean up from previous runs if [ "$CLEANUP" = "yes" ]; then rm -f /var/spool/cruft/* fi set_cruft_scan_fs $DRIVES set_ignores $IGNORES # set collation order to POSIX, to avoid differences between own programs' and # sort output export LC_COLLATE="C" if [ "$FILES" = yes ]; then # delete old explain output files rm -f /var/spool/cruft/must_* rm -f /var/spool/cruft/mayx_* rm -f /var/spool/cruft/msnt_* debug "*** Running explain scripts" # run explain scripts ( cd /usr/lib/cruft/explain && ls -1 2>/dev/null cd /etc/cruft/explain && ls -1 2>/dev/null ) | sort -u | while read f ; do process_package "${f}" || continue # File in /etc overrides the one in /usr if [ -x "/etc/cruft/explain/${f}" -a ! -d "/etc/cruft/explain/${f}" ] ; then script="/etc/cruft/explain/${f}" elif [ -x "/usr/lib/cruft/explain/${f}" -a ! -d "/usr/lib/cruft/explain/${f}" ] ; then script="/usr/lib/cruft/explain/${f}" else debug " - Skipping [${f}] - probably a directory" continue fi debug " - Running ${script}" # FD1 -> must exist # FD3 -> may exist # FD4 -> must not exist # FD2 -> stderr ( ( ${script} | fixup_slashes | /usr/lib/cruft/filter_ignores | /usr/lib/cruft/canonical | sort -u > /var/spool/cruft/must_${f} ) 3>&1 | fixup_slashes | /usr/lib/cruft/filter_ignores | /usr/lib/cruft/canonical | sort -u > /var/spool/cruft/mayx_${f} ) 4>&1 | fixup_slashes | /usr/lib/cruft/filter_ignores | /usr/lib/cruft/canonical | sort -u > /var/spool/cruft/msnt_${f} done # delete old find output rm -f /var/spool/cruft/file_* rm -f /var/spool/cruft/type_* # run find on the filesystems debug "*** Running find commands" for DRIVE in $DRIVES; do if [ "$DRIVE" = "/" ]; then FILENAME=file_root else FILENAME=file_in_`echo "$DRIVE" | sed 's:^/::;s:/:-:g'` fi PRUNE=$(get_prunes_for "$DRIVE") if [ "$PRUNE" = skip ]; then debug " - Skipping [${DRIVE}]" : > "${FILENAME}" : > "type_symlink${FILENAME#file}" else debug " - Running find on [${DRIVE}]" find "$DRIVE" -xdev $PRUNE -print \ -type l -fprint "type_symlink${FILENAME#file}" \ | sort -u > "$FILENAME" fi done # objects of particular type # - delete old output lists rm -f /var/spool/cruft/broken_symlinks_* # - generate new ones debug "*** Checking symlinks" /usr/lib/cruft/check_type_symlink $CHROOTS fi if [ "$REPORT" = yes ]; then # delete old target files rm -f /var/spool/cruft/frbn_* rm -f /var/spool/cruft/miss_* rm -f /var/spool/cruft/unex_* rm -f /var/spool/cruft/whte_* rm -f /var/spool/cruft/filter_list_* # generate differences debug "*** Calculating differences" /usr/lib/cruft/merge_diff cd /var/spool/cruft debug "*** Filtering results" # filter the results for type in frbn miss unex broken_symlinks do debug " - Filtering type [${type}]" /usr/lib/cruft/filters_list "${type}" > "filter_list_${type}" find . -maxdepth 1 -mindepth 1 -type f -name "${type}_*" | while read f ; do /usr/lib/cruft/filter "filter_list_${type}" < "${f}" > "${f}.tmp" mv "${f}.tmp" "${f}" done done # remove empty files find . -maxdepth 1 -mindepth 1 -type f -size 0 | xargs rm -r debug "*** Generating report" # generate report TEMPFILE="`tempfile`" ( echo -n 'cruft report: '; date echo for a in miss_*; do if [ -e $a ]; then echo ---- $a ---- | sed 's/miss_/missing: /' cat $a | sed 's/^/ /' fi done for a in frbn_*; do if [ -e $a ]; then echo ---- $a ---- | sed 's/want_/missing: /' cat $a | sed 's/^/ /' fi done for a in unex_*; do if [ -e $a ]; then echo ---- $a ---- | sed 's=unex_root=unexplained: /=;s=unex_in_=unexplained: =' cat $a | sed 's/^/ /' fi done for a in broken_symlinks_*; do if [ -e $a ]; then echo ---- $a ---- | sed 's=broken_symlinks_root=broken symlinks: /=;s=broken_symlinks_in_=broken symlinks: =' cat $a | sed 's/^/ /' fi done echo echo end. ) > "$TEMPFILE" if [ -z "$REPORTFILE" ]; then cat "$TEMPFILE" else cd "$STARTDIR" cat "$TEMPFILE" > "$REPORTFILE" fi if [ "$MAILTO" != "" ]; then if which mail >/dev/null 2>&1 ; then cat "$TEMPFILE" | mail -s "[`hostname`] Cruft Report" $MAILTO else echo "mail program unavailable, not sending the email" >&2 exitcode=1 fi fi rm -f "$TEMPFILE" fi exit $exitcode cruft-0.9.16/filters_list0000755000000000000000000000300211543656373012261 0ustar #!/bin/dash # Print on standard output the list of files which contain filter patterns for # the type given as the first argument set -e . /usr/lib/cruft/common.sh cruft_debug 2 type="$1" get_all_filter_basenames() { # the trick with cat is to detect "disk full" conditions but not fail on directory empty ( dpkg-query -W | awk '{print $1}' | xargs -I '{}' dpkg-query --control-path '{}' extrafiles | xargs -r -n 1 basename | sed 's,\.extrafiles$,,' if cd /etc/cruft/filters 2>/dev/null ; then ls * 2>/dev/null | cat ; fi if cd /usr/lib/cruft/filters 2>/dev/null ; then ls * 2>/dev/null | cat ; fi if [ -n "${type}" ] ; then if cd /etc/cruft/filters-${type} 2>/dev/null ; then ls * 2>/dev/null | cat ; fi if cd /usr/lib/cruft/filters-${type} 2>/dev/null ; then ls * 2>/dev/null | cat ; fi fi ) | sort -u } for f in $(get_all_filter_basenames) ; do process_package "${f}" || continue if [ -n "${type}" -a -e "/etc/cruft/filters-${type}/${f}" ] ; then echo "/etc/cruft/filters-${type}/${f}" elif [ -e "/etc/cruft/filters/${f}" ] ; then echo "${LIST}/etc/cruft/filters/${f}" elif package_has_script "${f}" extrafiles ; then dpkg-query --control-path "${f}" extrafiles | sed "s,^,${LIST}," elif [ -n "${type}" -a -e "/usr/lib/cruft/filters-${type}/${f}" ] ; then echo "${LIST}/usr/lib/cruft/filters-${type}/${f}" elif [ -e "/usr/lib/cruft/filters/${f}" ] ; then echo "${LIST}/usr/lib/cruft/filters/${f}" else echo "Cannot find filter file [${f}] for some strange reason" >&2 fi done cruft-0.9.16/filters-miss/0000755000000000000000000000000011543656373012256 5ustar cruft-0.9.16/debian/0000755000000000000000000000000011605552465011053 5ustar cruft-0.9.16/debian/changelog0000644000000000000000000005627211605552071012732 0ustar cruft (0.9.16) unstable; urgency=medium * [852e6e9] Use /run instead of /lib/init/rw. (Closes: Bug#633025) * [6454bba] Added a suggests on mailx and handle its lack. (Closes: Bug#628390) -- Marcin Owsiany Fri, 08 Jul 2011 10:55:52 +0100 cruft (0.9.15) unstable; urgency=low * Moved the source tree to git. * [5ccce15] Simplified and modernized the build. * [cdbce1a] Make test output easier to clean and do clean it. * [720aa0e] Use minus, not hyphen in some places. * [df7e8db] Removed deps on dash, added misc:Depends. * [94bd5dc] Point to git repo and updated year in copyright. * [fd34d72] Added a git-buildpackage config. -- Marcin Owsiany Wed, 30 Mar 2011 09:57:35 +0100 cruft (0.9.14) unstable; urgency=low * Instead of directly accessing installed maintainer scripts and dpkg "list" files, call dpkg-query as appropriate. This makes it much slower in some cases but at least it will let us survive the incoming revolution in dpkg database (closes: Bug#616068) -- Marcin Owsiany Wed, 09 Mar 2011 09:21:40 +0000 cruft (0.9.13) experimental; urgency=high * Changed all bash and sh scripts to use dash, because bash makes it hard to write reliable scripts - see discussion at http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/e37f5c7ddcc55eeb (closes: Bug#500261) - changed the shebang line - added a dependency and a build-dependency on dash - fixed a bashism in check_type_symlink and disabled timestamps in $PS4 * common.sh: - disable corefile limit in debug mode - added fusectl to list of ignored filesystems (closes: Bug#499783) * filter_shell.c: - swapped checks in a for loop to avoid rather harmless but technically invalid uninitialized memory accesses - increase the number of patterns we can handle to 4000 - when there are more patterns to load than we can handle then warn and exit, instead of segfaulting (closes: Bug#498986) -- Marcin Owsiany Sat, 22 Nov 2008 09:39:56 +0000 cruft (0.9.11) unstable; urgency=low * Unset DISPLAY when launching dia, so it's less likely to fail if the variable is set incorrectly at build time. * explain/ALTERNATIVES: make the warning about symlink and registered alternatives mismatch more intelligible (closes: Bug#487777) * filters-broken_symlinks: sysklogd, klogd: added sendsigs.omit.d files * filters-unex: - apt: added term.log - aptitude: added lock and pkgstates.old - libc6: added ldconfig directory and aux-cache file - initscripts, sysklogd, klogd: added /lib/init/rw/sendsigs.omit.d - libpam-modules: added /etc/security/opasswd - dpkg: added triggers directory - libuuid1: added /var/lib/libuuid * clarify man page as to what cruft "cleans up" (closes: Bug#487456) * updated debian/copyright, added myself and some links to it * added vcs-* and homepage headers to the control file * bumped Standards-Version to 3.8.0.0 (only change needed was change of findstring to filter when parsing DEB_BUILD_OPTIONS) * dropped linda overrides, as suggested by lintian * added a lintian override about the empty directories -- Marcin Owsiany Wed, 23 Jul 2008 21:45:49 -0700 cruft (0.9.10) unstable; urgency=low * Fixed two bashisms in cruft (closes: Bug#432207) * Skip directories among explain scripts gracefully (closes: Bug#432788) * Added a shellexp(3) manpage (closes: Bug#375788) * Generate the PNG from the dia file and shrink it using pngcrush at build time, instead of embedding it in the source package (closes: Bug#439926) -- Marcin Owsiany Wed, 17 Oct 2007 12:57:50 +0100 cruft (0.9.9) unstable; urgency=low * check_type_symlink: fixed a failure when there are no broken symlinks on a filesystem (closes: Bug#430401) -- Marcin Owsiany Wed, 27 Jun 2007 18:17:16 +0100 cruft (0.9.8) unstable; urgency=low * Filter files: - added: ipolish alsa-base apt-listbugs cryptsetup cups-pdf cupsys cupsys-client dcc-common ddclient gdm gs-common pcmciautils sun-java5-bin wpolish xserver-xorg x-ttcidfont-conf - modified: apache-common apt cvs fontconfig hddtemp iamerican ibritish locales x11-common * Explain script modified: grub -- Marcin Owsiany Sat, 23 Jun 2007 21:32:23 +0100 cruft (0.9.7) experimental; urgency=low * The "DebConf 7" release - includes 0.9.6-0.18 (experimental) * Taking over the package with aj's permission - finally got rid of that ugly version appendix * Bumped standards-version to 3.7.2.2 * Bumped debhelper compat and version dep to 5 * Added lintian and linda overrides for the non-standard spool directory permissions * Significant changes aiming to fix some design issues: - merge_diff: refactored to make the code less cryptic, and added a new stream of data from the explain scripts - cruft: . moved filtering to after the merge_diff stage . only use filters/explain scripts which have a matching package in the system OR have UPPER_CASE name (closes: Bug#373708), also only use a filter/script once, making it possible to do overrides cleanly (closes: Bug#410800) . introduced multiple filter directories, making it possible to silence any complaints from cruft (closes: Bug#383364) * many programs: lots of changes to detect potential output (but not only) failures, for example due to filesystem being full. (closes: Bug#411860) * Added a design.png diagram * Many cleanups and minor enhancements to programs and documentation * filter files changes submitted by Jeremy Bygott (closes: Bug#411602) - changed: cron checksecurity emacs21-common base-files bsdgames emacsen-common nvi pdmenu ppp vim vim-gnome dpkg logrotate - new: tcl8.3 tcl8.4 emacs21 - removed: tcl8.0 emacs20 * Acknowledging bugs closed in NMUs (closes: Bug#51448, #51617, #52094, Bug#182796, #335507, #35042, #37735, #42969, #47513, #50730, #51446, Bug#51653, #55022, #88274, #95799, #100145, #110000, #146021, #149616, Bug#155431, #263472, #265794, #272124, #284711, #291820, #334091, Bug#367029, #373633, #373684, #59714, #102809, #126855, #174877, Bug#233979, #308176, #349558, #29187, #65169, #94942, #133887, #133888, Bug#134310, #149736, #304440, #371871, #371872, #66731, #319490, #411860, Bug#373708, #410738, #410800, #411861, #346058, #383364, #157737) -- Marcin Owsiany Fri, 22 Jun 2007 21:42:58 +0100 cruft (0.9.6-0.17) unstable; urgency=low * Non-maintainer upload blessed by aj * merge_diff: renamed some variables and constants to make the logic more readable * Filter files: - new: x11-common (closes: Bug#410738) - removed: xfree86-common * cruft: fixed the way DRIVES was set from command line, to actually override the default, not just add to it (closes: Bug#411861) -- Marcin Owsiany Sat, 3 Mar 2007 22:21:09 +0000 cruft (0.9.6-0.16) unstable; urgency=low * Non-maintainer upload blessed by aj * TODO: added URLs of past cruft discussions * Filter files: - new: openbsd-inetd - modified: apt base-files dhcp3-client initscripts libc6 module-init-tools * explain/alternatives: modified not to list ALL symlinks, just the ones which should be there -- Marcin Owsiany Thu, 18 Jan 2007 18:44:56 +0000 cruft (0.9.6-0.15) unstable; urgency=low * Non-maintainer upload blessed by aj * Explain scripts: - modified: doc-base (do not complain when doc-base isn't installed) (Closes: #373684) -- Marcin Owsiany Thu, 15 Jun 2006 08:29:09 +0100 cruft (0.9.6-0.14) unstable; urgency=low * Non-maintainer upload blessed by aj * Moved handling of .dhelp files from filter to modified explain script provided by Kevin Ryde (Closes: #371871) * Changed interpreter of some bash explain scripts to sh, thanks to Joerg Sommer, who pointed out checkbashisms (Closes: #367029) * Changed processing of -d and --ignore to allow multiple occurences, and documented it in the manpage (Closes: #371872) * Explain scripts: - new: doc-base - modified: apt-listchanges cvs2svn grub linda reportbug rubber zsh * Filter files: - modified: dhelp -- Marcin Owsiany Thu, 8 Jun 2006 20:52:33 +0100 cruft (0.9.6-0.13) unstable; urgency=low * Non-maintainer upload blessed by aj * Filter files: - new: apache-common apt-show-versions devscripts libcommons-validator-java libncurses5 pbuilder phpmyadmin msttcorefonts gnome-themes initscripts fontconfig scrollkeeper desktop-file-utils shared-mime-info hddtemp - updated: apache apache-ssl base-files fakeroot initscripts mysql-server postgresql sgml-base squid tomcat4 xml-core * cruft_find cruft common.sh explain/users explain/home_ftp explain/lost_found: added conditional debugging support * common.sh, common.pl: properly escape parens on find invocation * debian/rules: properly install the filter file to avoid setting +x * shellexptest.c: new tiny utility to test shellexp * Explain scripts: - new: linda rubber -- Marcin Owsiany Mon, 6 Feb 2006 18:07:18 +0100 cruft (0.9.6-0.12) experimental; urgency=low * Non-maintainer upload blessed by aj * Many thanks to Jeremy Bygott, who provided most of the patches for many changes in this release * Explain scripts: - apt-listchanges cvs2svn: only echo files if they exist - reportbug: new script * Filter files: - updated: base-files exim4-daemon-heavy apache debsums dhelp ppp - new: mysql-server postgresql tomcat4 syslog-ng apache-ssl exim4-daemon-light chkrootkit hotplug lg-base libpango1.0-common octave2.0 xfstt xscreensaver - removed: pgp-i ppp-pam suidmanager wenglish - renamed: expect5.24 -> expect, nethack -> nethack-common, wu-ftpd-academ -> wu-ftpd, xntp3 -> ntp, filters/dhcpd -> filters/dhcp (also fixed a path), xbase -> xfree86-common (updated a config file path), xemacs -> xemacs21 (updated+fixed a path) -- Marcin Owsiany Wed, 2 Nov 2005 16:31:07 +0100 cruft (0.9.6-0.11) experimental; urgency=low * Non-maintainer upload blessed by aj * common.sh: local-scope function variables * Explain scripts: - fixed executable permission: grub zsh - fixed error: grub (echo grub directory) - new: screen apt-listchanges cvs2svn * Filter files: - fixed: apt-listchanges (wrong path to config file), locales (wrong path to locale-archive) - updated: netbase ucf sysstat exim4-config apt-listchanges (moved pyc to explain script) - new: aide clamav-daemon clamav-freshclam sgml-base xml-core exim4-base exim4-daemon-heavy stunnel4 debsums libapr0 * Extended the list of remote filesystems in common.sh and explain/dev (partially stolen from netbase). -- Marcin Owsiany Fri, 28 Oct 2005 15:11:52 +0200 cruft (0.9.6-0.10) experimental; urgency=low * Non-maintainer upload blessed by aj * Filter files: - new: aptitude apt-listchanges ca-certificates console-common cvs dump exim4-config fonty iptraf libblkid1 libsnmp-base lm-sensors logcheck logrotate mime-support nagios-nrpe-server samba-common snmpd ucf - updated: apt base-files cron findutils initscripts locales modutils popularity-contest postfix resolvconf ssh sudo sysklogd sysstat * Explain scripts: - new: grub zsh - fixed: lost_found works properly on no ignores -- Marcin Owsiany Thu, 27 Oct 2005 16:57:28 +0200 cruft (0.9.6-0.9) experimental; urgency=low * Non-maintainer upload blessed by aj * Fixed path in debian/extrafiles (Closes: #334091) * Filter files: - new: debconf login passwd libpam-runtime netkit-inetd resolvconf - updated: ifupdown libc6 dhcp-client info modutils dpkg nvi base-files man-db sysklogd - removed filter files not named after packages (timezones lastlog log_wtmp run_utmp) and moved their contents to libc6, login, base-files - removed files for packages nonexistant in sid: ae bsmtpd distributed-net-pproxy dpkg-mountable fvwm2 guile1.2 ldso majordomo msqld netstd prime-net psptools quake tcl7.6 tix41 tk4.2 wwwcount xemacs20-bin * explain/gconf: Run find conditionally if the path exists * explain/dpkg: implemented better diversion detection logic * extrafiles: only use filter files in /usr/lib/cruft/filters if their packages seem installed (Closes: #335507) * debian/control: - added >> 4 to debhelper build-dep - updated Standards-Version to 3.6.2 * debian/rules: Added policy-required CFLAGS stuff, and cross-compilation helpers * debian/copyright: - fixed typo in path to common-licenses - updated FSF address * debian/changelog: removed obsolete emacs settings * Makefile.in: install common.?? without +x * README: noted the changes to extrafiles -- Marcin Owsiany Tue, 25 Oct 2005 18:09:36 +0200 cruft (0.9.6-0.8) experimental; urgency=low * Non-maintainer upload blessed by aj * cruft: - do not use "/dev/stdout", rather cat to implied stdout. Also chdir to original directory before catting to a report file. - pass DRIVES information using a file in spool - use filter_ignores * common.sh: new cruft_find function wrapping around "find", pass DRIVES information using a file in spool * cruft_find: added new perl script to implement the cruft_find function * filter_ignores: added new perl script to filter filenames WRT setting of DRIVES and IGNORES (Closes: #47513) * common.pl: added new perl library with common perl code * explain scripts: - dpkg: use find|xargs|cat|sort instead of globbing (Closes: #284711) - dpkg: count diversions and file occurences and print filenames correct number of times - gconf: avoid warning if there are no gconf schema files - lost_found: source common.sh before using its functions - home_ftp, users: use new common.sh cruft_find function - dev: adjusted fs list * helper scripts: reimplemented as one Perl script, removed outdated updater scripts. They don't contain old non-FHS paths now. (Closes: #126855) * filter files: both automatically and manually updated and added some scripts (Closes: #133887, #133888) * Makefile.in: - tweaked not to install .svn metadata - really modified to remove shellexp.o in clean rule (last time it must have been Makefile, not .in) - added cruft_find and common.pl installation -- Marcin Owsiany Mon, 29 Aug 2005 23:29:56 +0200 cruft (0.9.6-0.7) experimental; urgency=medium * Non-maintainer upload blessed by aj * Remove shellexp.o in clean rule (Closes: #319490) Fixes an FTBFS, so urgency=medium -- Marcin Owsiany Mon, 25 Jul 2005 22:15:14 +0200 cruft (0.9.6-0.6) experimental; urgency=low * Non-maintainer upload blessed by aj * Rewritten the README file to clear up the general idea on how cruft works. * Moved common code from dash-search and filter_shell to shellexp.c * Added some comments to code in various files * Added --ignore support to cruft, and made explain files obey that (using functions stored in new files common.sh). This allows serious speed improvements in certain situations. (Closes: #29187) * Updated manpage (Closes: #308176) * Added support for running in chroots, by setting DRIVES to / if it turns out empty. * Added afs to list of ignored filesystems (Closes: #233979) * Use dh_installman instead of obsolete dh_installmanpages * Removed obsolete dh_suidregister * Removed junky postinst "warning" (Closes: #174877, #304440) * Removed the "optimization" from dash-search which caused only the first file containing matching pattern to be printed. Apparently the purpose of dash-search is to find all occurences. Noted in manpage that the file name is printed for each line. * filters/*: /usr/{doc,man} updated to /usr/share/{doc,man} * filters/base-files: added /srv, /media, /usr/local and its subdirs * filters/libc6: added /etc/.pwd.lock * explain/ca-certificates: new file * explain/dev: fixed grep to be quiet * explain/dpkg: use a hash to remember diversions instead of an array * explain/diversions: only print a diversion target if it exists in filesystem * explain/gconf: new file: a kludgy way to list at least some of the gconf files * explain/tmp: removed, since this was just a copy of explain/dev * Removed a misplaced adduser filter file. * Noted in changelog that previous upload Closes: #149736 (I know this is slight changelog abuse, but I haven't yet learned everything about BTS version supoprt) -- Marcin Owsiany Wed, 20 Jul 2005 21:55:08 +0200 cruft (0.9.6-0.5) experimental; urgency=low * Non-maintainer upload blessed by aj * cruft: - Use tempfile to make temporary file, which makes -r create reportfile "report" (Closes: #182796, #42969) - Report broken symlinks themselves, rather than their inexistant destinations (Closes: #149736) - Ignore /dev/(fd|std(in|out|err)) links (Closes: #146021) - Added --chroots which allows to completly broken symlinks in chosen dirs - Do not traverse some special filesystems (Closes: #272124, #291820, #110000) - Improved command line error reporting a little (Closes: #51446) - Set LC_COLLATE to C to avoid sorting differences causing double output (Closes: #55022, #155431). This should also make sorts faster in non-C locale environments. * explain files fixes: - dev: don't scan it if cruft itself doesn't - dpkg, diversions: Treat diversions properly (Closes: #263472): . dpkg: don't report files which were diverted to something else . diversions: report diversion destinations - home_ftp: fixed find command (Closes: #88274) - init_d: fixed grep expression for new 'file' output syntax - lost_found: added ext3 to list of filesystems - users: Users are allowed not to have home dirs and mailboxes. So only list mailboxes and homedirs which really exist. (Closes: #265794, #50730) Also use /var/mail instead of deprecated /var/spool/mail * filter files: - prime-net: new file: (Closes: #95799) - debfoster: new file: (Closes: #100145) - more new files and additions to existing ones (Closes: #157737): adduser, apt, base-files, dpkg, ifupdown, krb5-config, libc6, libhesiod0, libnet-perl, locales, lpr, modutils, netbase, nfs-kernel-server, openssl, php4, popularity-contest, proftpd, tcpd * Wrote a manpage for dash-search (Closes: #37735) * dash-search: added a matched arguments cache array to speed things up just a little bit * debian/compat: set to 4 -- Marcin Owsiany Sat, 16 Jul 2005 21:24:02 +0300 cruft (0.9.6-0.4) unstable; urgency=low * Non-maintainer bugsquash upload * Add file to Build-depends. (Closes: #35042) -- Hwei Sheng Teoh Fri, 22 Nov 2002 22:58:01 -0500 cruft (0.9.6-0.3) unstable; urgency=low * Non-maintainer upload * New postrm script which prevents cruft leaving cruft behind in /var/spool/cruft. Fixes: #66731 * Fixed location of GPL reference in copyright file. (Lintian error) * dash-search.1 dh_undocumented manpage. (Lintian error) -- Paul Martin Sat, 17 Mar 2001 04:18:09 +0000 cruft (0.9.6-0.2) unstable; urgency=low * Hack around to get argument parsing to work. Thanks to Janne Veli Kujala for the patch. (closes: Bug#58035) * Maintainer NMU. :) This package really needs to be rewritten and cleaned up. :( -- Anthony Towns Sun, 20 Feb 2000 19:00:36 +1000 cruft (0.9.6-0.1) unstable; urgency=low * Non-maintainer bugsquash upload. * Only call "make distclean" if there is a Makefile (closes: #51617) * debian/rules: Applied patch from BTS to install all necessary files (closes: #51448, #52094, #51653) -- Richard Braakman Sun, 19 Dec 1999 18:36:39 +0100 cruft (0.9.6) unstable; urgency=low * Added autoconf support and Makefile, thanks to Mitch Blevins. * Add machine name in mail. * Deal with spaces in argument handling. (Closes: Bug#50180) * Only display boring junk in postinst when installing (not upgrading). -- Anthony Towns Sun, 28 Nov 1999 01:02:22 +1000 cruft (0.9.5) frozen unstable; urgency=low * Fix bashism in postinst (Closes #27541) * No longer reports one letter file names as cruft (Closes #23773) * Merge NMU's (Closes #23523) * Made manpage match actual options. (Closes #21730) * Don't report alternative targets as missing * Added some extra information to /usr/doc/README (as requested in, but not closing, #21987) * Changed home_ftp explanation to check for an ftp user in /etc/passwd, and to do nothing if no ftp directory was found (thanks to David Frey for /etc/passwd bit) (Closes #24339) * Fix bashism (avoid ash bug?) in cruft ([ ""$FOO = "" ] doesn't work as expected) (Closes #28593) -- Anthony Towns Mon, 9 Nov 1998 14:35:00 +1000 cruft (0.9.4.2) unstable; urgency=low * merge_diff.c: Initialize need.n to 0. -- Daniel Jacobowitz Thu, 10 Sep 1998 16:21:01 -0400 cruft (0.9.4.1) unstable; urgency=low * Have dash-search actually compile, rather than using the i386-specific one left around from some prior build. * Add '#include ' so it'll actually compile under egcs. -- Michael Alan Dorman Sun, 14 June 1998 19:00:03 +1000 cruft (0.9.4) unstable; urgency=low * Fixes buggy upload of 0.9.3 (.changes and .deb weren't final release of 0.9.3) * Handle more alternatives -- Anthony Towns Wed, 15 Apr 1998 19:00:03 +1000 cruft (0.9.3) unstable; urgency=low * Moved cruft.extrafiles dpkg control file to /usr/lib/cruft/filters in preparation of actually uploading to unstable. * Added need_* and want_* files: for things that *have* to be there, but aren't particularly provided by anthing. Used for dealing with symlinks (need_symlink_dest), and alternatives (/usr/bin/vi, rather than /etc/alternatives/vi, eg). * Moved canonical into /usr/lib/cruft * Added checks for broken symlinks * Moved distributed filters from /etc/cruft/filters to /usr/lib/cruft/filters * Added TODO file -- Anthony Towns Sat, 11 Apr 1998 23:14:32 +1000 cruft (0.9.2) unreleased; urgency=low * Got rid of /etc/cruft/explain/etc_dir test * Added command line parsing * Saved report in /var/spool/cruft/report * Added handling of diversions -- Anthony Towns Fri, 10 Apr 1998 23:12:52 +1000 cruft (0.9.1) unreleased; urgency=low * Tidied up canonical.c * Changed filters to use shell patterns instead of scripts * Output results to stdout rather than leave in /var/spool/cruft * Sped up canonical substantially (about twice as fast) * Tightened handling of /etc * Added /var/cache -- Anthony Towns Mon, 6 Apr 1998 22:24:34 +1000 cruft (0.9) unreleased; urgency=low * Initial Release. -- Anthony Towns Sun, 5 Apr 1998 00:46:56 +1000 cruft-0.9.16/debian/docs0000644000000000000000000000000111543656372011720 0ustar cruft-0.9.16/debian/NEWS0000644000000000000000000000075711543656372011566 0ustar cruft (0.9.7) unstable; urgency=low * Filters and explain scripts are now only used if a package with the same name is present on the system. Rename your files to UPPER_CASE if you want them to be used every time. * Directories /etc/cruft/filters and /usr/lib/cruft/filters are deprecated. Please move your custom filter files to /etc/cruft/filters-unex. * See the README file for more information. -- Marcin Owsiany Fri, 22 Jun 2007 21:13:22 +0100 cruft-0.9.16/debian/source/0000755000000000000000000000000011544577220012351 5ustar cruft-0.9.16/debian/source/format0000644000000000000000000000001511544577220013560 0ustar 3.0 (native) cruft-0.9.16/debian/cruft.lintian-overrides0000644000000000000000000000033011543656372015555 0ustar cruft binary: non-standard-dir-perm var/spool/cruft/ 0700 != 0755 cruft binary: package-contains-empty-directory usr/lib/cruft/filters-miss/ cruft binary: package-contains-empty-directory usr/lib/cruft/filters-frbn/ cruft-0.9.16/debian/control0000644000000000000000000000172411605525670012460 0ustar Source: cruft Section: admin Priority: optional Maintainer: Marcin Owsiany Uploaders: Anthony Towns Build-Depends: debhelper (>= 7.0.50~), dh-autoreconf, pngcrush, dia | dia-gnome Build-Conflicts: autoconf2.13 Standards-Version: 3.9.1 Homepage: http://alioth.debian.org/projects/cruft/ Vcs-Git: git://github.com/porridge/cruft.git Vcs-Browser: https://github.com/porridge/cruft Package: cruft Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, file Suggests: mailx Description: program that finds any cruft built up on your system cruft is a program to look over your system for anything that shouldn't be there, but is; or for anything that should be there, but isn't. . It bases most of its results on dpkg's database, as well as a list of `extra files' that can appear during the lifetime of various packages. . cruft is still in pre-release; your assistance in improving its accuracy and performance is appreciated. cruft-0.9.16/debian/extrafiles0000644000000000000000000000044311543656372013150 0ustar /etc/cruft/explain/* /etc/cruft/filters/* /var/spool/cruft/file_* /var/spool/cruft/mayx_* /var/spool/cruft/msnt_* /var/spool/cruft/must_* /var/spool/cruft/frbn_* /var/spool/cruft/miss_* /var/spool/cruft/unex_* /var/spool/cruft/type_symlink_* /var/spool/cruft/DRIVES /var/spool/cruft/IGNORES cruft-0.9.16/debian/rules0000755000000000000000000000202011544577220012123 0ustar #!/usr/bin/make -f # cruft package rules file # Copyright 2011 Marcin Owsiany # As recommended by "current Debian best practice" prescribed by autotools-dev, # we set configure flags appropriately to help cross-compiling: # These are set automatically by dpkg-buildpackage, but we cannot depend on # them being available, because caller might not be using dpkg-buildpackage DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += --build $(DEB_HOST_GNU_TYPE) else confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif %: dh $@ --with autoreconf --parallel override_dh_auto_configure: dh_auto_configure -- $(confflags) override_dh_auto_install: dh_auto_install install -m 0644 -o root -g root debian/extrafiles debian/cruft/usr/lib/cruft/filters-unex/cruft override_dh_fixperms: dh_fixperms chmod 700 debian/cruft/var/spool/cruft cruft-0.9.16/debian/cruft.docs0000644000000000000000000000002711544577220013045 0ustar README TODO design.png cruft-0.9.16/debian/copyright0000644000000000000000000000223711544577220013010 0ustar This package was written for Debian by Anthony Towns Subsequently maintained and developed by Marcin Owsiany Project page: http://alioth.debian.org/projects/cruft/ Wiki: http://wiki.debian.org/Cruft Git repository: git://github.com/porridge/cruft.git Copyright and License: Cruft Copyright (c) 1998-2000 Anthony Towns Copyright (c) 2005-2011 Marcin Owsiany This program is free software; you may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details. A copy of the GNU General Public License is available as /usr/share/common-licenses/GPL in the Debian GNU/Linux distribution or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also obtain it by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. cruft-0.9.16/debian/postrm0000644000000000000000000000162111543656372012325 0ustar #! /bin/sh # postrm script for cruft # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see /usr/share/doc/packaging-manual/ case "$1" in remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; purge) rm -rf /var/spool/cruft || true ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 0 esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# cruft-0.9.16/debian/dirs0000644000000000000000000000017111543656372011741 0ustar usr/bin usr/sbin usr/lib/cruft var/spool/cruft etc/cruft etc/cruft/explain etc/cruft/filters usr/share/lintian/overrides cruft-0.9.16/debian/compat0000644000000000000000000000000211543656372012254 0ustar 5 cruft-0.9.16/debian/gbp.conf0000644000000000000000000000017311544577220012471 0ustar # cruft configuration file for git-buildpackage and friends [DEFAULT] debian-branch=master [git-dch] id-length=7 meta=True cruft-0.9.16/debian/cruft.manpages0000644000000000000000000000004111543656372013711 0ustar dash-search.1 cruft.8 shellexp.3 cruft-0.9.16/merge_diff_funcs.c0000644000000000000000000000751011543656373013271 0ustar #include #include #include #include "river.h" /* * Please note that the adjective smaller/smallest in this program does not * have anything to do with its size. Instead it means "a river/stream, whose * line to be read on input compares as lexicographically smaller than lines to * be read from other rivers/streams". */ static void scroll_smallest(int *smallest, river *rivers) { unsigned int idx; for (idx = 0; idx < NUM_RIVERS; idx++) if (smallest[idx]) river_scroll(&rivers[idx]); } static int at_least_one_is(int *smallest) { unsigned int idx; for (idx = 0; idx < NUM_RIVERS; idx++) if (smallest[idx]) return 1; return 0; } static void debug_current_state(int *smallest, river *rivers) { char *line = "?"; unsigned int idx; for (idx = 0; idx < NUM_RIVERS; idx++) { cruft_debug("%c", smallest[idx] ? '*' : '-'); if (smallest[idx]) line = river_least_line(&rivers[idx]); } cruft_debug(" %s (", line); for (idx = 0; idx < NUM_RIVERS; idx++) { cruft_debug("%s%s", river_least_line(&rivers[idx]), idx == NUM_RIVERS - 1 ? "" : " "); } cruft_debug(")\n"); } /* * Finds out which river(s) in rivers[] have the smallest line(s) on input and * sets matching elements of smallest[] appropriately. */ static void pick_smallest_rivers(int *smallest, river *rivers) { int prev = -1; int cur; for (cur = 0; cur < NUM_RIVERS; cur++) { int smaller = rivers_compare(prev, cur, rivers); if (prev == smaller) ; /* cur is larger, so nothing changes */ else if (cur == smaller) { /* cur is smaller than anything before, so first wipe * the table up and including the previous element */ memset(smallest, 0, sizeof(int) * cur); /* and mark the new smallest one */ smallest[cur] = 1; prev = smaller; } else /* prev and cur have the same line on input, so just * mark cur as being smallest as well */ smallest[cur] = 1; /* prev stays unchanged, as it matters in case of EOFs */ } /* some assertions */ { unsigned int idx; /* a river must not be smallest and empty at the same time */ for (idx = 0; idx < NUM_RIVERS; idx++) assert(! (smallest[idx] && (! river_has_line(&rivers[idx])))); /* some river must be smallest, if at least one is not empty */ assert(at_least_one_is(smallest)); } } int merge_diff(char *spool_dir_name) { river rivers[NUM_RIVERS] = { { "file", 0, -1, { NULL }, { NULL }, "file_", "unex" }, { "may exist", 0, -1, { NULL }, { NULL }, "mayx_", "whte" }, { "must exist", 0, -1, { NULL }, { NULL }, "must_", "miss" }, { "must not exist", 0, -1, { NULL }, { NULL }, "msnt_", "frbn" } }; if (! rivers_open_files(spool_dir_name, rivers)) return EXIT_FAILURE; cruft_debug(DEBUG_HEADER); for(;;) { int smallest[NUM_RIVERS]; memset(smallest, 0, sizeof(int) * NUM_RIVERS); if (! rivers_prepare_round(rivers)) break; pick_smallest_rivers(smallest, rivers); debug_current_state(smallest, rivers); /* must be, but isn't */ if (smallest[MUST_IDX] && ! smallest[FILE_IDX]) if (! river_output_line(&rivers[MUST_IDX])) return EXIT_FAILURE; /* is, but not explained by must nor may */ if (smallest[FILE_IDX] && (! smallest[MUST_IDX] && ! smallest[MAYX_IDX])) if (! river_output_line(&rivers[FILE_IDX])) return EXIT_FAILURE; /* must not be, but is */ if (smallest[MSNT_IDX] && smallest[FILE_IDX]) if (! river_output_line(&rivers[MSNT_IDX])) return EXIT_FAILURE; if (smallest[MSNT_IDX]) { if (smallest[MAYX_IDX]) fprintf(stderr, "Explain script (may and musn't) conflict: [%s]\n", river_least_line(&rivers[MSNT_IDX])); if (smallest[MUST_IDX]) fprintf(stderr, "Explain script (must and musn't) conflict: [%s]\n", river_least_line(&rivers[MSNT_IDX])); } scroll_smallest(smallest, rivers); } if (! rivers_close(rivers)) return EXIT_FAILURE; return EXIT_SUCCESS; } cruft-0.9.16/shellexp.c0000644000000000000000000000437211543656373011633 0ustar #include #include #include #include #include #define FALSE 0 #define TRUE 1 /* 0 on no match, non-zero on match */ int shellexp( char* string, char* pattern ) { /* printf( "...matching( \"%s\", \"%s\" )\n", string, pattern ); */ switch( pattern[0] ) { case '\0': return string[0] == '\0'; case '?': switch( string[0] ) { case '\0': case '/': return FALSE; default: return shellexp( string+1, pattern+1 ); } case '/': if ( pattern[1] == '*' && pattern[2] == '*' ) { char* pch = string; if ( pattern[3] != '/' && pattern[3] != '\0' ) { fprintf( stderr, "Bad expression.\n" ); return -1; } if ( *pch != '/' ) return FALSE; if ( pattern[3] == '\0' ) return TRUE; while ( *pch != '\0' ) { if ( *pch == '/' ) { int ret = shellexp( pch, pattern + 3 ); if ( ret == TRUE || ret == -1 ) return ret; } pch++; } return FALSE; } else if ( string[0] == '/' ) { return shellexp( string+1, pattern+1 ); } else return FALSE; case '*': if ( string[0] == '/' ) return shellexp( string, pattern+1 ); { int ret = shellexp( string, pattern+1 ); if (ret == FALSE) return string[0] != '\0' ? shellexp( string + 1, pattern ) : FALSE; else return ret; } case '[': if ( string[0] == '\0' ) return FALSE; { int not = FALSE; int okay = FALSE; pattern++; if ( pattern[0] == '!' || pattern[0] == '^' ) { not = TRUE; pattern++; } if ( pattern[0] == ']' ) { if ( string[0] == ']' ) { okay = TRUE; } pattern++; } while( pattern[0] != ']' && pattern[0] != '\0' ) { if ( pattern[0] == string[0] ) { okay = TRUE; } else if ( pattern[1] == '-' && pattern[2] != ']' ) { if ( pattern[0] <= string[0] && string[0] <= pattern[2] ) { okay = TRUE; } pattern += 2; } pattern++; } if ( pattern[0] == '\0' ) { fprintf( stderr, "Bad shell expression\n" ); return -1; } if (! (not ? !okay : okay)) return FALSE; else return shellexp( string + 1, pattern + 1 ); } default: if (pattern[0] != string[0]) return FALSE; else return shellexp( string + 1, pattern + 1 ); } } cruft-0.9.16/configure.in0000644000000000000000000000056711543656372012155 0ustar dnl Process this file with autoconf to produce a configure script. AC_INIT(canonical.c) dnl Checks for programs AC_PROG_CC dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(getcwd) AC_OUTPUT(Makefile) cruft-0.9.16/filter0000755000000000000000000000035111543656372011046 0ustar #!/bin/dash # Read standard input and filter out files which match filter patterns listed # in the file given as the first argument set -e . /usr/lib/cruft/common.sh cruft_debug 2 list="$1" /usr/lib/cruft/filter_shell $(cat $list) cruft-0.9.16/filter_ignores0000644000000000000000000000067211543656372012577 0ustar #!/usr/bin/perl -wn BEGIN{ require '/usr/lib/cruft/common.pl'; sub is_subdir($$); sub ignores; sub scan_fs; sub all_fs; sub noscan_fs; sub get_direct_fs($@); sub prunes($@); sub debug($); @I=ignores;@S=scan_fs;@NS=noscan_fs; %M = ( map {$_=> 1} @S); %M = ( %M, map {$_=>0} @NS ); } chomp; $l=$_; next if grep { is_subdir($_,$l) } @I; print "$l\n" or die $! if $M{get_direct_fs($l,(@S,@NS))}; END { close STDOUT or die $!; } cruft-0.9.16/Makefile.in0000644000000000000000000000351411544577220011677 0ustar # Makefile for cruft CC = @CC@ CFLAGS = @CFLAGS@ -Wall -W -ansi -pedantic-errors INS = install DATADIRS = explain filters-broken_symlinks filters-frbn filters-miss filters-unex DESTDIR = `pwd`/debian/cruft PROGS1 = canonical filter_shell merge_diff readlinks PROGS2 = dash-search PROGS = $(PROGS1) $(PROGS2) all : $(PROGS) design.png install1 : $(PROGS1) filter filters_list cruft_find filter_ignores check_type_symlink $(INS) $^ $(DESTDIR)/usr/lib/cruft/ install11 : common.sh common.pl $(INS) -m 0644 $^ $(DESTDIR)/usr/lib/cruft/ install2 : $(PROGS2) $(INS) $< $(DESTDIR)/usr/bin/$< installdirs : $(DATADIRS) set -e ; for d in $^ ; do \ mkdir $(DESTDIR)/usr/lib/cruft/$$d; \ find $$d -maxdepth 1 -type f | xargs -i cp '{}' $(DESTDIR)/usr/lib/cruft/$$d/; \ done install : install1 install11 install2 installdirs cruft $(INS) cruft $(DESTDIR)/usr/sbin/cruft clean : rm -f $(PROGS) merge_diff.o merge_diff_funcs.o shellexp.o *~ debian/*~ \ shellexptest.o shellexptest merge_diff_test.o merge_diff_test \ merge_diff_common.o river.o fn_stream.o rm -rf merge_diff_tests/*/run check: shellexptest merge_diff_test ./test-shellexp cd merge_diff_tests && ./test shellexptest: shellexptest.o shellexp.o filter_shell dash-search: shellexp.o merge_diff_test: merge_diff_test.o merge_diff_funcs.o merge_diff_common.o river.o fn_stream.o merge_diff: merge_diff.o merge_diff_funcs.o merge_diff_common.o river.o fn_stream.o merge_diff_funcs.o merge_diff_test.o merge_diff_common.o river.o fn_stream.o merge_diff.o: merge_diff_common.h design.png: design.dia unset DISPLAY ; dia --size 800x740 --export tmp-$@ $< pngcrush -q -c 0 tmp-$@ $@ rm tmp-$@ distclean : clean rm -f Makefile config.cache config.status config.log design.png devclean : configclean rm -f configure .PHONY : all clean configclean distclean install check cruft-0.9.16/test-shellexp0000755000000000000000000000275011543656373012370 0ustar #!/bin/dash exit=0 # base (universal) test function tu() { ./shellexptest "$1" "$2" 2>/dev/null if [ $? -ne $3 ] ; then echo UNEXPECTED $4: "$1" "$2" exit=1 fi } # test - error te() { tu "$1" "$2" 2 "LACK OF ERROR"; } # test - yes ty() { tu "$1" "$2" 1 "FAILURE"; } # test - no tn() { tu "$1" "$2" 0 "SUCCESS"; } tn '/one/**/end' '/oneend' ty '/one/**/end' '/one/end' ty '/one/**/end' '/one/two/end' ty '/one/**/end' '/one/two/three/end' ty '/one/**/end' '/one/two/three/four/end' ty '/one?two' '/oneatwo' tn '/one?two' '/one/two' tn '/one?two' '/onetwo' tn '/one?' '/one' # # A "**" after non-slash is the same as "*" # - at the end for pat in '/one/a*' '/one/a**' ; do ty $pat '/one/a' ty $pat '/one/ab' ty $pat '/one/abc' tn $pat '/one/a/' tn $pat '/one/a/b' tn $pat '/one/a/bc' done # - before a "/" for pat in '/one/a*/' '/one/a**/' ; do ty $pat '/one/a/' ty $pat '/one/ab/' ty $pat '/one/abc/' tn $pat '/one/a/b' tn $pat '/one/a/bc' done # - before "/something" for pat in '/one/a*/e' '/one/a**/e' ; do ty $pat '/one/a/e' ty $pat '/one/ab/e' ty $pat '/one/abc/e' tn $pat '/one/a/b/e' tn $pat '/one/a/bc/e' done te '/one/**a' '/one/whatever' ty '/[abc]' '/a' tn '/[abc]' '/d' # The following are mentioned in the manpage ty '/a/b*/*c' '/a/b/xyz.c' ty '/a/b*/*c' '/a/bcd/.c' tn '/a/b*/*c' '/a/b/c/d.c' ty '/a/**/*.c' '/a/a.c' ty '/a/**/*.c' '/a/b/a.c' ty '/a/**/*.c' '/a/b/c/a.c' ty '/a/**/*.c' '/a/b/c/d/a.c' ty '/a/[0-9][^0-9]*' '/a/1abc' tn '/a/[0-9][^0-9]*' '/a/12bc' exit $exit cruft-0.9.16/river.h0000644000000000000000000000220711543656373011136 0ustar #include "fn_stream.h" /* * A "river" is a bunch of (I/O) streams. It also has some additional data * which go with it. */ typedef struct river { /* Just a descriptive name */ char* name; /* Number of input streams open. The number of output streams open is * the same. */ int n; /* The offset of the input stream whose line to be read compares as * lexicographically smallest to lines of other input streams in this * river. */ int least; /* Input streams. */ fn_stream* in[100]; /* Output streams. */ FILE* out[100]; /* The prefix of filenames which will be read by this river. */ char* input_prefix; /* The prefix of filenames which will be written by this river. */ char* output_prefix; /* NOTE: the length of both prefixes must be the same. See * open_streams(). */ } river; int rivers_open_files(char *spool_dir_name, river *rivers); int rivers_prepare_round(river *rivers); void river_scroll(river *r); char *river_least_line(river *r); int river_has_line(river *r); int rivers_compare(int prev, int cur, river *rivers); int river_output_line(river *r); int rivers_close(river *rivers); cruft-0.9.16/filter_shell.c0000644000000000000000000000427611543656372012465 0ustar #include #include #include #include #include #define FALSE 0 #define TRUE 1 /* XXX this should be changed to use the heap. stack has its limits... */ #define BUFFER_LEN 1000 #define NUM_STRINGS 4000 int shellexp(char*, char*); int main(int argc, char **argv) { char strings[NUM_STRINGS][BUFFER_LEN]; char buffer[BUFFER_LEN]; FILE* exp_list; int n_strings = 0; int i; /* Read into memory all patterns from the files specified as command line * arguments */ for ( i = 1; i < argc; i++ ) { exp_list = fopen( argv[i], "r" ); if ( exp_list == NULL ) { perror( argv[i] ); continue; } while( fgets( strings[n_strings], BUFFER_LEN, exp_list ) ) { char*pch; char*buffer = strings[n_strings]; for ( pch = buffer; *pch != '\0'; pch++ ) { /* Skip comments */ if ( *pch == '#' ) { *pch = '\0'; break; } } /* Trim trailing whitespace */ for ( pch = pch - 1; pch >= buffer && isspace(*pch); pch-- ) ; *(pch+1) = '\0'; n_strings++; if ( n_strings == NUM_STRINGS ) { fprintf(stderr, "You have more than %d patterns defined. Change NUM_STRINGS definition in "__FILE__" and recompile.\n", NUM_STRINGS); exit(EXIT_FAILURE); } continue; /* XXX: the following code is unreachable */ /* Trim leading whitespace */ if ( isspace(buffer[0]) ) { for ( pch = buffer + 1; isspace(*pch) && *pch; pch++ ) ; memmove( buffer, pch, strlen(pch) + 1 ); } if ( buffer[0] == '\0' ) continue; n_strings++; } fclose( exp_list ); } /* Copy lines from standard input to standard output, skipping the ones * which matched at least one of the loaded patterns */ while( fgets( buffer, BUFFER_LEN, stdin ) ) { int match; match = FALSE; if ( buffer[strlen(buffer)-1] == '\n' ) buffer[strlen(buffer)-1]='\0'; for ( i = 0; !match && i < n_strings; i++ ) { match = shellexp( buffer, strings[i] ); } if ( !match ) { if (printf("%s\n", buffer) < 0) return EXIT_FAILURE; } } if (fclose(stdout) != 0) return EXIT_FAILURE; return EXIT_SUCCESS; } cruft-0.9.16/merge_diff_tests/0000755000000000000000000000000011544577220013140 5ustar cruft-0.9.16/merge_diff_tests/test0000755000000000000000000000071211544577220014045 0ustar #!/bin/dash set -e [ -f ../Makefile ] || ( cd .. && ./configure ) [ -x ../merge_diff_test ] || make -C .. merge_diff_test CFLAGS="-g -O0 -Wall -W -ansi -pedantic-errors" set +e for subdir in [0-9][0-9] do echo "ENTERING ${subdir}" cd ${subdir} outs="$(cd output && echo *)" rm -f ${outs} mkdir -p run cp input/* run #gdb ../../merge_diff_test run ../../merge_diff_test run for out in $outs do diff -u output/${out} run/${out} done cd .. done cruft-0.9.16/merge_diff_tests/01/0000755000000000000000000000000011544570320013352 5ustar cruft-0.9.16/merge_diff_tests/01/output/0000755000000000000000000000000011543656373014726 5ustar cruft-0.9.16/merge_diff_tests/01/output/miss_010000644000000000000000000000000211543656373016114 0ustar f cruft-0.9.16/merge_diff_tests/01/output/frbn_010000644000000000000000000000000211543656373016070 0ustar c cruft-0.9.16/merge_diff_tests/01/output/unex_010000644000000000000000000000000411543656373016122 0ustar c d cruft-0.9.16/merge_diff_tests/01/input/0000755000000000000000000000000011543656373014525 5ustar cruft-0.9.16/merge_diff_tests/01/input/must_010000644000000000000000000000000411543656373015732 0ustar a f cruft-0.9.16/merge_diff_tests/01/input/file_010000644000000000000000000000001011543656373015656 0ustar a b c d cruft-0.9.16/merge_diff_tests/01/input/msnt_010000644000000000000000000000000211543656373015721 0ustar c cruft-0.9.16/merge_diff_tests/01/input/mayx_010000644000000000000000000000000211543656373015716 0ustar b cruft-0.9.16/cruft.80000644000000000000000000000441511543656372011054 0ustar .TH CRUFT 8 .SH NAME cruft \- Check the filesystem for cruft (missing and unexplained files) .SH SYNOPSIS .B cruft .I "[-h] [-d DRIVES] [--chroots CHROOTS] [--ignore IGNORES] [-r REPORTFILE] [-m ADDRESS] [-k | -n | -N]" .SH "DESCRIPTION" This manual page documents briefly the .BR cruft command. Please see /usr/share/doc/cruft/README.gz for more information. .PP .B cruft is a program that goes over the Debian packaging system's database, and compares the contents of that with the files actually on your system, and produces a summary of the differences. .SH OPTIONS The following options are recognized: .TP .B \-h Show a summary of options and exit. .TP .B \-d \fIDRIVES Search only the listed filesystems. .I DRIVES should be an absolute path, or a quoted, space-separated list of multiple absolute paths (eg, "/ /usr /home"). Multiple \-d options are allowed as well. If not specified, .BR cruft attempts to autodetect which filesystems to scan. .TP .B \-\-chroots \fICHROOTS Do not perform validity checks on symlinks under these directories. Useful for whatever chroots are set up in the system. .TP .B \-\-ignore \fIIGNORES Treat the directory trees in .I IGNORES as if they did not exist. .I IGNORES should be an absolute path, or a quoted, space-separated list of multiple absolute paths. Multiple \-\-ignore options are allowed as well. .TP .B \-r \fIREPORTFILE Output report to .I REPORTFILE instead of standard output. .TP .B \-m \fIADDRESS Mail report to .I ADDRESS. .TP .B \-k Only cleanup cruft's spool directory. .TP .B \-n Generate input files for reporting, but do not generate a report. .TP .B \-N Only generate a report, based on old input files. .PP With none of .B \-k .B \-n or .B \-N cruft performs all the above three actions, that is cleans its own spool directory, generates new input files and produces a report. Please note that cruft never deletes any files outside its own spool directory. .SH "ENVIRONMENT VARIABLES" It is possible to get some debugging information from cruft by setting the variable .B CRUFT_DEBUG to 1. If you need more detailed information on what cruft is doing, set it to 2. .SH "SEE ALSO" /usr/share/doc/cruft/README.gz .SH AUTHOR This manual page was written by Anthony Towns , for the Debian GNU/Linux system (but may be used by others). cruft-0.9.16/explain/0000755000000000000000000000000011543656372011274 5ustar cruft-0.9.16/explain/dpkg0000755000000000000000000000417111543656372012152 0ustar #!/usr/bin/perl # read diversions information, and create a hash: diverted_file -> diverting_package open(DIVERT, "/var/lib/dpkg/diversions" ) || die( "Couldn't open diversions info\n"); my %diverted = (); my $x = 0; my $lastkey; while() { chomp; if ( $x % 3 == 0 ){ $diverted{$_} = $x if ( $x % 3 == 0 ); $lastkey = $_; } $diverted{$lastkey} = $_ if ( $diverted{$lastkey} + 2 == $x ); $x++; } close DIVERT or die "Couldn't close diversions info\n"; # Decide, basing on the diverting package and the list of packages providing # the file, whether the file should be present in the system # If so, then print file. Otherwise, don't print anything. sub decide($$$) { my $diverted = shift; my $pkgs = shift; my $line = shift; if (not defined $diverted) { # there is no diversion, so the file should be present print $line or die $!; } elsif (scalar @$pkgs > 1) { # many packages provide it, and there is a diversion # so the file should be present print $line or die $!; # just one package provides it, and there is a diversion } elsif ($diverted eq $$pkgs[0]) { # the file will be present only if it's provided by the # same package which diverts it print $line or die $!; } } # Read the list of installed files in format: # /var/lib/dpkg/info/.list: # Look up the diversion hash created above, and print the names of files which # should be on the system. open(DPKG, "find /var/lib/dpkg/info -type f -name '*.list' | xargs grep -H . | sort -t: -k 2 |") or die "Couldn't open dpkg info: $!\n"; my $re = qr{^/var/lib/dpkg/info/(\S+)\.list:(.*)$}; my $lastfile = ''; my @pkgs; while($l=) { chomp $l; $l =~ $re or warn "invalid input: \"$l\""; my ($pkg, $file) = ($1, $2); if ($file eq $lastfile) { push @pkgs, $pkg; } else { # now all pkgs providing $file are in @pkgs # and package diverting that file (if any) is in $diverted{$file} decide($diverted{$lastfile}, \@pkgs, $lastfile."\n") if $lastfile; $lastfile = $file; @pkgs = ($pkg); } } decide($diverted{$lastfile}, \@pkgs, $lastfile."\n"); close DPKG or die "Couldn't close dpkg info: $!\n"; close STDOUT or die $!; cruft-0.9.16/explain/gconf0000755000000000000000000000052111543656372012314 0ustar #!/bin/dash set -e test -d /usr/share/gconf/schemas || exit 1 find /usr/share/gconf/schemas -type f | xargs -r egrep '<(applyto|key)>' | perl -n -e 'm{<\w+>(/[^/]+/[^/<]+)};print $1."\n"' | sort -u | while read n do p="/etc/gconf/gconf.xml.defaults$n" if [ -e "$p" ]; then find /etc/gconf/gconf.xml.defaults$n fi done cruft-0.9.16/explain/rubber0000755000000000000000000000024111543656372012500 0ustar #!/bin/dash p='rubber' set -e dpkg-query --listfiles "${p}" | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | while read o; do if [ -e "$o" ]; then echo "$o"; fi; done cruft-0.9.16/explain/screen0000755000000000000000000000026311543656372012502 0ustar #!/bin/dash set -e for user in root `awk -F: '{ if ( 1000 <= $3 && $3 < 30000 ) print $1 }' /etc/passwd`; do d="/var/run/screen/S-$user" if [ -d "$d" ]; then echo "$d"; fi done cruft-0.9.16/explain/apt-listchanges0000755000000000000000000000025211543656372014307 0ustar #!/bin/dash p='apt-listchanges' set -e dpkg-query --listfiles "${p}" | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | while read o; do if [ -e "$o" ]; then echo "$o"; fi; done cruft-0.9.16/explain/INIT_D0000755000000000000000000000021711543656372012230 0ustar #!/bin/dash set -e file /etc/rc?.d/[SK]???* | egrep ": *symbolic link to \`?../init.d/[-a-zA-Z0-9_.]*'?$" | sed "s/: *symbolic.*$//" cruft-0.9.16/explain/ALTERNATIVES0000755000000000000000000000415311543656372013126 0ustar #!/usr/bin/perl open( NEED, ">&=3" ) || die( "Couldn't open output for needed files!?!" ); while( defined($alternative_file = glob("/var/lib/dpkg/alternatives/*")) ) { $name = "$1" if $alternative_file =~ m{^.*/([^/]*)$}; open( FILE, $alternative_file ) || die( "Couldn't open $alternative_file\n" ); my $mode = ; my $winner_name = readlink '/etc/alternatives/'.$name or die "Unable to read symlink $name"; # # parse the first stanza: the names of the symlinks # # @link holds pairs: name of the file in alternatives dir; path of the alternative # e.g.: editor, /usr/bin/editor # editor.1.gz, /usr/share/man/man1/editor.1.gz # ... # entry number 0 is the master, the rest are slaves my @link; $link[0][0] = $name; $_ = ; chomp($_); $link[0][1] = $_; my $num_files = 1; while (1) { $_ = ; chomp($_); last unless $_; $link[$num_files][0] = $_; $_ = ; chomp($_); $link[$num_files][1] = $_; $num_files++; } # # parse the stanzas with files provided by packages # my %alternative; my $winner = undef; ALT: while( $master = ) { chomp($master); last ALT if $master eq ""; die "internal error: duplicate master [$master] in alternatives file $name" if exists $alternative{$master}; my $pri = ; chomp($pri); my $this = $alternative{$master} = { prio => $pri, files => [ $master ] }; $winner = $this if $master eq $winner_name; SLAVE: for ( $i = 1; $i < $num_files; $i++ ) { $slave = ; chomp($slave); $alternative{$master}->{files}->[$i] = $slave; } } warn("Master link \"/etc/alternatives/$name\" points to alternative \"${winner_name}\", but no such alternative is registered, according to \"/var/lib/dpkg/alternatives/$name\". See \"update-alternatives --display $name\"\n"), next unless defined $winner; # list the symlinks for files the winning alternative provides for ($i = 0; $i < $num_files; $i++) { print '/etc/alternatives/', $link[$i][0], "\n", $link[$i][1], "\n" or die $! if $winner->{files}->[$i]; } } close STDOUT or die $!; cruft-0.9.16/explain/DEV0000755000000000000000000000041311543656372011636 0ustar #!/bin/dash # If cruft is not entering /dev, then don't scan it here either if mount | awk '$3 == "/dev" {print $1}' | egrep -q '^(proc|devpts|nfs[1234]?|ncp|coda|(a|smb|ci|ncp|usb|tmp|sys)fs)$' then exit 0 else : # find /dev # XXX maybe get a list from makedev? fi cruft-0.9.16/explain/USERS0000755000000000000000000000050611543656372012124 0ustar #!/bin/dash set -e . /usr/lib/cruft/common.sh cruft_debug cd /home/ for user in root `awk -F: '{ if ( 1000 <= $3 && $3 < 30000 ) print $1 }' /etc/passwd`; do home=`grep "^$user:" /etc/passwd | cut -d: -f6` if [ -d "$home" ]; then cruft_find "$home" -user $user fi [ -e /var/mail/$user ] && echo /var/mail/$user done cruft-0.9.16/explain/DIVERSIONS0000755000000000000000000000043311543656372012707 0ustar #!/usr/bin/perl open(DIVERT, "/var/lib/dpkg/diversions" ) || die( "Couldn't open diversions info\n"); $x = 0; while() { if ($x % 3 == 1) { chomp; print $_."\n" or die $! if -e $_; # a diversion doesn't necessarily need to be active } $x++; } close STDOUT or die $!; cruft-0.9.16/explain/grub0000755000000000000000000000046111543656372012162 0ustar #!/bin/dash d=/boot/grub set -e if [ ! -d "$d" ]; then d=/boot/boot/grub; fi if [ ! -d "$d" ]; then exit 1; fi if [ "$d" = "/boot/boot/grub" ]; then echo /boot/boot; fi echo $d find $d -type f -name stage1 -or -name stage2 -or -name \*_stage1_5 -or -name device.map -or -name menu.lst\* -or -name default cruft-0.9.16/explain/doc-base0000755000000000000000000000035511543656372012702 0ustar #!/bin/dash # files generated by doc-base, eg. /usr/share/doc/xterm-faq/.dhelp, if any set -e if [ ! -d /var/lib/doc-base/info ]; then exit 1; fi find /var/lib/doc-base/info -mindepth 1 -maxdepth 1 -name '*.list' -print0 | xargs -r0 cat cruft-0.9.16/explain/ca-certificates0000755000000000000000000000041411543656372014247 0ustar #!/bin/dash set -e [ -d /etc/ssl/certs ] || exit 0 find /etc/ssl/certs -type l -name \*.pem | while read name do [ -e "$name" ] && echo "$name" done find /etc/ssl/certs -type l -name '????????.?' | while read name do [ -e "$name" ] && echo "$name" done cruft-0.9.16/explain/LOST_FOUND0000755000000000000000000000055511543656372012743 0ustar #!/bin/dash set -e . /usr/lib/cruft/common.sh cruft_debug mount | egrep ".* on .* type ext[23]" | awk '{ print $3"/lost+found" }' | sed 's://*:/:g' | while read dir; do ignores="$(get_ignores)" if [ -z "$ignores" ]; then echo $dir else for ignore in $ignores; do if is_subdir "$ignore" "$dir" ; then : else echo "$dir" fi done fi done cruft-0.9.16/explain/zsh0000755000000000000000000000015011543656372012022 0ustar #!/bin/dash set -e if [ ! -e /usr/share/zsh ]; then exit 1; fi find /usr/share/zsh -type f -name \*.zwc cruft-0.9.16/explain/cvs2svn0000755000000000000000000000024211543656372012624 0ustar #!/bin/dash p='cvs2svn' set -e dpkg-query --listfiles "${p}" | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | while read o; do if [ -e "$o" ]; then echo "$o"; fi; done cruft-0.9.16/explain/reportbug0000755000000000000000000000024411543656372013233 0ustar #!/bin/dash p='reportbug' set -e dpkg-query --listfiles "${p}" | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | while read o; do if [ -e "$o" ]; then echo "$o"; fi; done cruft-0.9.16/explain/HOME_FTP0000755000000000000000000000035611543656372012467 0ustar #!/bin/dash set -e . /usr/lib/cruft/common.sh cruft_debug FTPDIR=/home/ftp if grep '^ftp:' /etc/passwd >/dev/null 2>&1; then FTPDIR=`awk -F: '$1 == "ftp" { print $6 }' /etc/passwd` fi if [ -e "$FTPDIR" ]; then cruft_find "$FTPDIR" fi cruft-0.9.16/explain/linda0000755000000000000000000000024011543656372012305 0ustar #!/bin/dash p='linda' set -e dpkg-query --listfiles "${p}" | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | while read o; do if [ -e "$o" ]; then echo "$o"; fi; done cruft-0.9.16/canonical.c0000644000000000000000000000674011543656372011736 0ustar #include #include #include #include #include #define FALSE 0 #define TRUE 1 /* * This program reads filenames from standard input (one per line), and tries * to canonicalize them by chdir()-ing into their directories and calling * getcwd() */ /* * Realloc provided buffers to double their size. */ int double_buffers( size_t s, char** b1, char** b2, char** b3, char** b4 ) { char* n; n = realloc( *b1, s*2 ); if ( n == NULL ) return FALSE; else *b1 = n; n = realloc( *b2, s*2 ); if ( n == NULL ) return FALSE; else *b2 = n; n = realloc( *b3, s*2 ); if ( n == NULL ) return FALSE; else *b3 = n; n = realloc( *b4, s*2 ); if ( n == NULL ) return FALSE; else *b4 = n; return TRUE; } int main(void) { /* Prepare buffers */ size_t sz_buffs = 4; char *buffer = malloc(sz_buffs); /* user's input */ char *cwd = malloc(sz_buffs); /* expanded dirname */ char *basename = malloc(sz_buffs); /* basename */ char *last = malloc(sz_buffs); /* last unexpanded dirname */ char *pch; if ( buffer == NULL ) return EXIT_FAILURE; if ( cwd == NULL ) return EXIT_FAILURE; if ( basename == NULL ) return EXIT_FAILURE; if ( last == NULL ) return EXIT_FAILURE; strcpy( last, "" ); /* Read lines from standard input */ for(;;) { /* Read whole line, expanding the buffer if necessary */ if ( fgets(buffer, sz_buffs, stdin) == NULL ) break; for ( pch = buffer + strlen(buffer) - 1; *pch != '\n' && pch == buffer + sz_buffs - 2; pch += strlen(pch) - 1 ) { assert( pch[1] == '\0' ); if ( double_buffers( sz_buffs, &buffer, &cwd, &basename, &last ) ) { sz_buffs *= 2; } else { return EXIT_FAILURE; } pch = buffer + strlen(buffer) - 1; if ( fgets(pch+1, sz_buffs/2+1, stdin) == NULL ) break; } if ( *pch == '\n' ) *pch = '\0'; if ( buffer[0] != '/' ) { /* don't even try working with relative paths */ if (printf("%s\n", buffer) < 0) return EXIT_FAILURE; continue; } /* Find last component */ for ( ; *pch != '/'; pch-- ) ; /* Save it as basename */ strcpy( basename, pch + 1 ); /* And cut the buffer */ *(pch+1) = '\0'; /* Use the last result, if the directory was the same */ if ( strcmp( last, buffer ) != 0 ) { strcpy( last, buffer ); /* Try to enter the directory */ if ( 0 == chdir( buffer ) ) { /* If succeeded, get current canonical directory * expanding the buffers as necessary */ while ( NULL == getcwd( cwd, sz_buffs ) ) { if ( double_buffers( sz_buffs, &buffer, &cwd, &basename, &last ) ) { sz_buffs *= 2; } else { return EXIT_FAILURE; } } } else { /* If failed for some reason, just use the read path, as there * is no way to canonicalize it (maybe it is already deleted or * didn't exist) */ strcpy( cwd, buffer ); } /* Append a slash if it does not end with one */ pch = cwd + strlen(cwd) - 1; if ( *pch != '/' ) { pch[1] = '/'; pch[2] = '\0'; } } /* Finally print the canonical path */ if (printf("%s%s\n", cwd, basename) < 0) return EXIT_FAILURE; } free(cwd); free(buffer); free(basename); free(last); if (fclose(stdout) != 0) return EXIT_FAILURE; return EXIT_SUCCESS; } cruft-0.9.16/check_type_symlink0000755000000000000000000000141711543656372013451 0ustar #!/bin/dash # Read lists of symlinks found on the filesystems and produce files with lists # of broken ones. set -e . /usr/lib/cruft/common.sh cruft_debug 3 cd /var/spool/cruft for f in type_symlink_* do debug " - Processing ${f}" suffix=${f#type_symlink_} touch "broken_symlinks_${suffix}.tmp" cat "${f}" | while read link do if [ ! -e "$(echo "$link" | /usr/lib/cruft/readlinks)" ]; then echo "$link" >> "broken_symlinks_${suffix}.tmp" fi done for chroot in "$@" do # using cat is a trick to fail only on filesystem write errors egrep -v "^$chroot/" "broken_symlinks_${suffix}.tmp" | cat > "broken_symlinks_${suffix}" mv "broken_symlinks_${suffix}" "broken_symlinks_${suffix}.tmp" done mv "broken_symlinks_${suffix}.tmp" "broken_symlinks_${suffix}" done cruft-0.9.16/fn_stream.h0000644000000000000000000000031611543656373011764 0ustar #include #include "merge_diff_common.h" typedef struct fn_stream { FILE* file; char line[1000]; } fn_stream; void next_line( fn_stream* s ); fn_stream* init_fn_stream(char *filename); cruft-0.9.16/common.pl0000755000000000000000000000436611543656372011475 0ustar use strict; use warnings; use POSIX qw(strftime); # is_subdir potential_base potential_subdir # 1 = success ; if potential_subdir is a subdir of potential_base or they are # the same # 0 = failure ; otherwise sub is_subdir($$) { my ($dir, $sub) = @_; # compact multiple slashes $dir =~ s#/+#/#g; $sub =~ s#/+#/#g; # strip trailing slash unless it's the root dir $dir =~ s#/+$## unless $dir eq '/'; $sub =~ s#/+$## unless $sub eq '/'; # "the same" return 1 if $dir eq $sub; # / - special cases, which would need special treatment below # every dir is a subdir of / return 1 if $dir eq '/'; # no dir is parent of / (except for itself, but that was caught above) return 0 if $sub eq '/'; # see, if $sub begins with $dir if ($dir eq substr($sub, 0, length($dir))) { # it does, so there are two possibilities: if (substr($sub, length($dir), 1) eq '/') { # the char in $sub after $dir is a slash (/dir/sub) return 1; } else { # it's something else (/diranother/sub) return 0 } } else { # if it's not, then $sub cannot possibly be a subdir of $dir return 0; } } sub ignores { my @lines = `cat /var/spool/cruft/IGNORES`; chomp @lines; return grep { $_ ne '' } @lines; } sub scan_fs { my @lines = `cat /var/spool/cruft/DRIVES`; chomp @lines; return @lines; } sub all_fs { my @all = `mount|cut -d\\ -f3`; chomp @all; push @all, '/' unless grep { '/' eq $_ } @all; return @all if @all; } sub noscan_fs { my @all = all_fs; my @ret; my @do = scan_fs; foreach my $a (@all) { push @ret, $a unless grep { $_ eq $a } @do }; return @ret; } sub get_direct_fs($@) { my $path = shift; my $found = ''; foreach my $fs (@_) { $fs =~ s#/+#/#g; $found = $fs if is_subdir($fs, $path) and length($fs) > length($found); } return $found || undef; } sub prunes($@) { my $path = shift; my @prunes; foreach my $prune (@_) { push @prunes, "-wholename $prune -prune" if is_subdir($path, $prune); } return "\\( ".join(" -or ", @prunes)." \\) -or" if @prunes; return ''; } sub debug($) { # XXX this needs to be fixed to show nanosecods, to be consistent with shell date calls printf STDERR ">[%s] [0] %s\n", strftime('%Y-%m-%d %H:%M:%S.?????????', localtime), $_[0] if defined $ENV{'CRUFT_DEBUG'} and $ENV{'CRUFT_DEBUG'} ne ''; } 1; cruft-0.9.16/cruft_find0000755000000000000000000000366411543656372011716 0ustar #!/usr/bin/perl # A wrapper for find, which knows about cruft IGNORES and filesystems to scan # or not to scan. use strict; use warnings; sub usage { "cruft_find [ ... ] [ option ... ]\n" } my (@args, @params); my $dest = \@args; foreach (@ARGV) { $dest = \@params if /^-/; push @$dest, $_; } @args or die &usage; require '/usr/lib/cruft/common.pl'; sub is_subdir($$); sub ignores; sub scan_fs; sub all_fs; sub noscan_fs; sub get_direct_fs($@); sub prunes($@); sub debug($); sub run_find { my $path = shift; my $ignore_ref = shift; my $params_ref = shift; my $extra = shift || ''; my $cmd = "find $path $extra ".prunes($path, @$ignore_ref).' '.join(' ', @$params_ref); debug "Running [$cmd]"; system($cmd) == 0 or die "[$cmd] failed: $?\n"; } sub do_find($) { my $path = shift; my $FS = get_direct_fs($path, all_fs) or die "FS not found for \"$path\""; my @do_scan = scan_fs; my @dont_scan = noscan_fs; my @ignore = ignores; # use Data::Dumper 'Dumper'; # warn Dumper({FS=>$FS,path=>$path,doscan=>\@do_scan,dont=>\@dont_scan,ignore=>\@ignore}); # $path is below ignored subtree return if grep { is_subdir($_, $path) } @ignore; # $path is in non-scan FS if (grep { $_ eq $FS } @dont_scan) { my @do_under_path = grep { is_subdir($path, $_) } @do_scan; # and contains no do-scan FS if (not scalar @do_under_path) { return; } else { # and contains some do-scan FS run_find($_, \@ignore, \@params, '-xdev') for @do_under_path; } } # $path is in do-scan FS elsif (grep { $_ eq $FS } @do_scan) { my @dont_under_path = grep { is_subdir($path, $_) } @dont_scan; # and there are no dont-scan FS under $path if (not scalar @dont_under_path) { run_find($path, \@ignore, \@params); } else { # and there are dont-scan FS under $path run_find($path, \@ignore, \@params, '-xdev') for @dont_under_path; } } else { die "Internal error: [$path][@do_scan][@dont_scan][@ignore]\n"; } } do_find($_) for @args; cruft-0.9.16/filters-broken_symlinks/0000755000000000000000000000000011605525410014476 5ustar cruft-0.9.16/filters-broken_symlinks/sysklogd0000644000000000000000000000005711605525410016262 0ustar # sysklogd 1.5-4 /run/sendsigs.omit.d/sysklogd cruft-0.9.16/filters-broken_symlinks/initscripts0000644000000000000000000000011611543656372017007 0ustar # nologin is a symlink to a file which may be created in /var... /etc/nologin cruft-0.9.16/filters-broken_symlinks/klogd0000644000000000000000000000005111605525410015515 0ustar # klogd 1.5-4 /run/sendsigs.omit.d/klogd cruft-0.9.16/filters-broken_symlinks/module-init-tools0000644000000000000000000000016111543656372020020 0ustar /bin/lsmod.modutils /sbin/lsmod.modutils /sbin/modprobe.modutils /sbin/rmmod.modutils /sbin/ksyms /sbin/kallsyms cruft-0.9.16/filters-frbn/0000755000000000000000000000000011543656373012232 5ustar cruft-0.9.16/merge_diff_test.c0000644000000000000000000000033011543656373013123 0ustar #include int merge_diff(char *spool_dir_name); int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr, "Usage: merge_diff_test \n"); return 1; } return merge_diff(argv[1]); } cruft-0.9.16/dash-search.c0000644000000000000000000000305011543656372012160 0ustar #include #include #include #include #include #include #define FALSE 0 #define TRUE 1 int shellexp(char*, char*); int dash_search(char *dir, int argc, char **argv) { char filename[1000]; char buffer[1000]; int i; DIR* dpkg_info; struct dirent* pde; dpkg_info = opendir(dir); if ( dpkg_info == NULL ) { perror(dir); exit(EXIT_FAILURE); } chdir(dir); while( (pde = readdir( dpkg_info )) ) { FILE* f; f = fopen( pde->d_name, "r" ); if ( !f ) continue; while( fgets( buffer, 1000, f ) ) { if ( buffer[strlen(buffer)-1] == '\n' ) buffer[strlen(buffer)-1] = '\0'; for ( i = 1; i < argc; i++ ) { /* printf( "shellexp( \"%s\", \"%s\" )\n", argv[i], buffer );*/ if ( shellexp( argv[i], buffer ) ) { strcpy( filename, pde->d_name ); if (printf("%s/%s: %s\n", dir, filename, argv[i]) < 0) return EXIT_FAILURE; } } } fclose(f); } closedir( dpkg_info ); if (fclose(stdout) != 0) return EXIT_FAILURE; return EXIT_SUCCESS; } int main(int argc, char **argv) { int ret; if (( ret = dash_search("/usr/lib/cruft/filters-broken_symlinks", argc, argv)) != EXIT_SUCCESS) return ret; if (( ret = dash_search("/usr/lib/cruft/filters-frbn", argc, argv)) != EXIT_SUCCESS) return ret; if (( ret = dash_search("/usr/lib/cruft/filters-miss", argc, argv)) != EXIT_SUCCESS) return ret; if (( ret = dash_search("/usr/lib/cruft/filters-unex", argc, argv)) != EXIT_SUCCESS) return ret; return ret; } cruft-0.9.16/merge_diff_common.h0000644000000000000000000000053211543656373013445 0ustar #define TRUE (1) #define FALSE (0) #define FILE_IDX (0) #define MAYX_IDX (1) #define MUST_IDX (2) #define MSNT_IDX (3) #define NUM_RIVERS (4) /* #define DEBUG_CRUFT 2 */ #define DEBUG_HEADER "File\n" \ "| May exist\n" \ "|/ Must exist\n" \ "||/ Must NOT exist\n" \ "|||/\n" \ "||||\n" void cruft_debug(const char *fmt, ...); cruft-0.9.16/shellexp.30000644000000000000000000000517111544577220011543 0ustar .\" Please adjust this date whenever revising the manpage. .TH SHELLEXP 3 "October 17, 2007" .SH NAME shellexp \- match string against a cruft filter pattern .SH SYNOPSIS .nf .BI "extern int shellexp(const char *" string ", const char *" pattern ); .fi .SH DESCRIPTION The .BR shellexp () function is similar to .BR fnmatch (3), but works with cruft patterns instead of standard .BR glob (7) patterns. The function returns a true value if .I string matches the cruft pattern .IR pattern , and a false value (0) otherwise. Returns \-1 in case of pattern syntax error. .PP Cruft patterns are similar to .BR glob (7) patterns, but are not fully compatible. The following special characters are supported: .TP .B ? (a question mark) matches exacly one character of .I string other than a slash. .TP .B * matches zero or more characters of .I string other than a slash. .TP .B /** or /**/ matches zero or more path components in .IR string . Please note that you can only use .B ** when directly following a slash, and furthermore, only when either directly preceding a slash or at the very end of .IR pattern . A .B ** followed by anything other than a slash makes .I pattern invalid. A .B ** following anything else than a slash reduces it to having the same effect as .BR * . .TP .BI [ character-class ] Matches any character between the brackets exactly once. Named character classes are NOT supported. If the first character of the class is .B ! or .BR ^ , then the meaning is inverted (matches any character NOT listed between the brackets). If you want to specify a literal closing bracket in the class, then specify it as the first (or second, if you want to negate) character after the opening bracket. Also, simple ASCII-order ranges are supported using a dash character (see examples section). .PP Any other character matches itself. .SH EXAMPLES .TP .B /a/b*/*c matches .BR /a/b/xyz.c , as well as .BR /a/bcd/.c , but not .BR /a/b/c/d.c . .TP .B /a/**/*.c matches all of the following: .BR /a/a.c , .BR /a/b/a.c , .BR /a/b/c/a.c and .BR /a/b/c/d/a.c . .TP .B /a/[0\-9][^0\-9]* matches .BR /a/1abc , but not .BR /a/12bc . .SH BUGS Uses constant-length 1000 byte buffers to hold filenames. Also uses recursive function calls, which are not very efficient. Does not validate the pattern before matching, so any pattern errors (unbalanced brackets or misplaced .BR ** ) are only reported when and if the matching algorithm reaches them. .SH "SEE ALSO" .BR fnmatch (3), .BR glob (3), .BR cruft (8) and .BR dash\-search (1). .SH AUTHOR This manual page was written by Marcin Owsiany , for the Debian GNU/Linux system (but may be used by others). cruft-0.9.16/TODO0000644000000000000000000000445311543656372010332 0ustar A bit of history and a general roadmap for cruft development: ------------------------------------------------------------- Cruft was written by Anthony Towns back in twentieth century. Mainly because of lack of consensus on how to specify ignore patterns and how to integrate it with dpkg, the development has stalled for several years. See the following threads for more details: http://lists.debian.org/debian-policy/1998/04/msg00032.html http://lists.debian.org/debian-devel/2001/09/msg00647.html http://lists.debian.org/debian-devel/2004/02/msg01915.html Since mid-2005, it is being cleaned up and enhanced by Marcin Owsiany, and is in nearly usable shape (i.e. it does not report false-positives on a fresh current sid base installation). The long-term plan is to: - keep squashing bugs (some parts of the code are still messy and hard to understand and maintain) - keep acquiring filter and explain scripts for more packages, at least until cruft output is no longer erroneus on a typical desktop and server installation (the scripts/filters should still be maintained in cruft package). - when the previous step is reached, there should be enough material to decide on how exactly it should be implemented (I still think the current code is just a prototype) - when there is established policy on the filter and explain scripts, they should gradually be moved into their respectice packages, and be maintained there (as close to the code they describe as possible). - when the filter/explain files are widely adopted, they could be made Debian policy Short-term TODO items: ---------------------- Policy: * There are three possible sources for file information: cruft package, another package, system administrator. Need to invent a policy which would allow seamless upgrades, so that old files do not override newly updated ones. Checks: * add a check that symlinks and suchlike to excluded directories don't get whined about (/dev/kcore -> /proc/kcore) * handle .dpkg-{old,dist,new} files? * think over /tmp, /var/tmp, /usr/local, /home/ftp or similar directories whose contents depend on local policy Code quality: * remove hard coded constants from .c files * fix possible overflow in readlinks * think up better names for this stuff? Other features: * add a cronjob?