chkdupexe: remove, deprecated for years
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
27abd80948
commit
58a3cee647
|
@ -67,14 +67,12 @@ tests/run.sh.trs
|
|||
#
|
||||
/addpart
|
||||
/agetty
|
||||
/arch
|
||||
/blkid
|
||||
/blockdev
|
||||
/cal
|
||||
/cfdisk
|
||||
/chcpu
|
||||
/chfn
|
||||
/chkdupexe
|
||||
/chrt
|
||||
/chsh
|
||||
/col
|
||||
|
|
|
@ -2,12 +2,6 @@ The following is a list of commands or features that are deprecated. All
|
|||
deprecated utils are in maintenance mode and we keep them in source tree for
|
||||
backward compatibility only.
|
||||
|
||||
What: chkdupexe
|
||||
Why: unnecessary, in Perl, not used in distributions, possible to replace
|
||||
by a simple shell script.
|
||||
|
||||
--------------------------
|
||||
|
||||
What: 'udev' and 'list' blkid(8) output formats
|
||||
Why: udevd links libblkid directly; the 'list' is unnecessary, use lsblk(8)
|
||||
|
||||
|
|
14
configure.ac
14
configure.ac
|
@ -684,7 +684,6 @@ AC_ARG_ENABLE([most-builds],
|
|||
)
|
||||
if test "x$enable_most_builds" = xyes; then
|
||||
enable_chfn_chsh=yes
|
||||
enable_chkdupexe=yes
|
||||
enable_elvtune=check
|
||||
enable_last=yes
|
||||
enable_line=yes
|
||||
|
@ -1296,19 +1295,6 @@ UL_BUILD_INIT([write])
|
|||
AM_CONDITIONAL(BUILD_WRITE, test "x$build_write" = xyes)
|
||||
|
||||
|
||||
AC_ARG_ENABLE([chkdupexe],
|
||||
AS_HELP_STRING([--enable-chkdupexe], [build deprecated chkdupexe]),
|
||||
[], enable_chkdupexe=no
|
||||
)
|
||||
UL_BUILD_INIT([chkdupexe])
|
||||
AM_CONDITIONAL(BUILD_CHKDUPEXE, test "x$build_chkdupexe" = xyes)
|
||||
|
||||
if test "x$build_chkdupexe" = xyes; then
|
||||
AC_PATH_PROG(PERL, perl)
|
||||
AC_CONFIG_FILES([misc-utils/chkdupexe:misc-utils/chkdupexe.pl])
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE([socket-activation],
|
||||
AS_HELP_STRING([--enable-socket-activation], [build uuidd with support for systemd socket activation]),
|
||||
[], enable_socket_activation=no
|
||||
|
|
|
@ -2,4 +2,3 @@ uuidd.8
|
|||
uuidd.rc
|
||||
uuidd.service
|
||||
uuidd.socket
|
||||
/chkdupexe
|
||||
|
|
|
@ -45,13 +45,6 @@ usrbin_exec_PROGRAMS += whereis
|
|||
dist_man_MANS += misc-utils/whereis.1
|
||||
whereis_SOURCES = misc-utils/whereis.c
|
||||
|
||||
|
||||
if BUILD_CHKDUPEXE
|
||||
dist_usrbin_exec_SCRIPTS += misc-utils/chkdupexe
|
||||
CLEANFILES += misc-utils/chkdupexe
|
||||
dist_man_MANS += misc-utils/chkdupexe.1
|
||||
endif
|
||||
|
||||
if BUILD_LSLOCKS
|
||||
usrbin_exec_PROGRAMS += lslocks
|
||||
dist_man_MANS += misc-utils/lslocks.8
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
.\" chkdupexe.1 --
|
||||
.\" Created: Sat Mar 11 18:19:44 1995 by faith@cs.unc.edu
|
||||
.\" Revised: Sat Mar 11 19:07:05 1995 by faith@cs.unc.edu
|
||||
.\" Revised: Wed Jul 5 01:56:26 1995 by shields@tembel.org
|
||||
.\" Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
|
||||
.\"
|
||||
.\" Permission is granted to make and distribute verbatim copies of this
|
||||
.\" manual provided the copyright notice and this permission notice are
|
||||
.\" preserved on all copies.
|
||||
.\"
|
||||
.\" Permission is granted to copy and distribute modified versions of this
|
||||
.\" manual under the conditions for verbatim copying, provided that the
|
||||
.\" entire resulting derived work is distributed under the terms of a
|
||||
.\" permission notice identical to this one
|
||||
.\"
|
||||
.\" Since the Linux kernel and libraries are constantly changing, this
|
||||
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
||||
.\" responsibility for errors or omissions, or for damages resulting from
|
||||
.\" the use of the information contained herein. The author(s) may not
|
||||
.\" have taken the same level of care in the production of this manual,
|
||||
.\" which is licensed free of charge, as they might when working
|
||||
.\" professionally.
|
||||
.\"
|
||||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
||||
.\" the source, must acknowledge the copyright and authors of this work.
|
||||
.\"
|
||||
.TH CHKDUPEXE 1 "March 1995" "util-linux" "User Commands"
|
||||
.SH NAME
|
||||
chkdupexe \- find duplicate executables
|
||||
.SH SYNOPSIS
|
||||
.B chkdupexe
|
||||
.SH DESCRIPTION
|
||||
.B chkdupexe
|
||||
will scan the union of $PATH and a hardcoded list of common locations
|
||||
for binaries. It will report dangling symlinks and duplicately-named
|
||||
binaries.
|
||||
.SH AUTHOR
|
||||
Nicolai Langfeldt, Michael Shields.
|
|
@ -1,120 +0,0 @@
|
|||
#!@PERL@ -w
|
||||
#
|
||||
# chkdupexe version 2.1.1
|
||||
#
|
||||
# Simple script to look for and list duplicate executables and dangling
|
||||
# symlinks in the system executable directories.
|
||||
#
|
||||
# Copyright 1993 Nicolai Langfeldt. janl@math.uio.no
|
||||
# Distribute under gnu copyleft (included in perl package)
|
||||
#
|
||||
# Modified 1995-07-04 Michael Shields <shields@tembel.org>
|
||||
# Don't depend on GNU ls.
|
||||
# Cleanups.
|
||||
# Merge together $ENV{'PATH'} and $execdirs.
|
||||
# Don't break if there are duplicates in $PATH.
|
||||
#
|
||||
# Modified 1996-02-16 Nicolai Langfeldt (janl@math.uio.no).
|
||||
# I was thinking admins would edit the $execdirs list to suit their
|
||||
# machine(s) when I wrote this. This is ofcourse not the case, thus
|
||||
# Michaels fixes. And my fixes to his :-)
|
||||
# - Working duplicate dirs detection.
|
||||
# - Added more checks
|
||||
# - Took out $PATH from the list of checked directories and added a
|
||||
# check for $execdirs and $PATH consistency instead
|
||||
# - Made it possible to run with perl -w
|
||||
|
||||
$execdirs='/bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin '.
|
||||
'/usr/X11/bin /usr/bin/X11 /usr/local/X11/bin '.
|
||||
'/usr/TeX/bin /usr/tex/bin /usr/games '.
|
||||
'/usr/local/games';
|
||||
|
||||
# Turn off buffering for the output channel.
|
||||
$|=1;
|
||||
|
||||
# Values from /usr/include/linux/errno.h. Existence of linux/errno.ph is not
|
||||
# something to count on... :-(
|
||||
$ENOENT=2;
|
||||
|
||||
%didthis=();
|
||||
|
||||
foreach $dir (split(/\s+/, "$execdirs"), "\0", split(/:/, $ENV{PATH})) {
|
||||
|
||||
if ($dir eq "\0") { $checkingpath = 1; next; }
|
||||
|
||||
# It's like this: One directory corresponds to one $device,$inode tuple
|
||||
# If a symlink points to a directory we already checked that directory
|
||||
# will have the same $device,$inode tuple.
|
||||
|
||||
# Does this directory have any real exstence outside the ravings of
|
||||
# symlinks pointing hither and dither?
|
||||
($device,$inode)=stat($dir);
|
||||
if (!defined($device)) {
|
||||
# Nonexistant directory, or dangling symlink?
|
||||
($dum)=lstat($dir);
|
||||
next if $! == $ENOENT;
|
||||
if (!$dum) {
|
||||
print "Dangling symlink: $dir\n";
|
||||
next;
|
||||
}
|
||||
warn "Nonexistent directory: $dir\n" if ($checkingpath);
|
||||
next;
|
||||
}
|
||||
|
||||
if (!-d _) {
|
||||
print "Not a directory: $dir\n";
|
||||
next;
|
||||
}
|
||||
|
||||
next if defined($didthis{$device,$inode});
|
||||
|
||||
$didthis{$device,$inode}=1;
|
||||
|
||||
chdir($dir) || die "Could not chdir $dir: $!\n";
|
||||
# This would give us the true directory name, do we want that?
|
||||
# chop($dir=`pwd`);
|
||||
opendir(DIR,".") ||
|
||||
die "NUTS! Personaly I think your perl or filesystem is broken.\n".
|
||||
"I've done all sorts of checks on $dir, and now I can't open it!\n";
|
||||
foreach $_ (readdir(DIR)) {
|
||||
lstat($_);
|
||||
if (-l _) {
|
||||
($dum)=stat($_);
|
||||
print "Dangling symlink: $dir/$_\n" unless defined($dum);
|
||||
next;
|
||||
}
|
||||
next unless -f _ && -x _; # Only handle regular executable files
|
||||
if (defined($count{$_})) {
|
||||
$progs{$_}.=" $dir/$_";
|
||||
$count{$_}++;
|
||||
} else {
|
||||
$progs{$_}="$dir/$_";
|
||||
$count{$_}=1;
|
||||
}
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
|
||||
open(LS,"| xargs -r ls -ldU");
|
||||
while (($prog,$paths)=each %progs) {
|
||||
print LS "$paths\n" if ($count{$prog}>1);
|
||||
}
|
||||
close(LS);
|
||||
|
||||
exit 0;
|
||||
|
||||
@unchecked=();
|
||||
# Check if the users PATH contains something I've not checked. The site admin
|
||||
# might want to know about inconsistencies in user PATHs and chkdupexec
|
||||
# configuration
|
||||
foreach $dir (split(/:/,$ENV{'PATH'})) {
|
||||
($device,$inode)=stat($dir);
|
||||
next unless defined($device);
|
||||
next if defined($didthis{$device,$inode});
|
||||
push(@unchecked,$dir);
|
||||
$didthis{$device,$inode}=1;
|
||||
}
|
||||
|
||||
print "Warning: Your path contains these directories which chkdupexe has not checked:\n",join(',',@unchecked),
|
||||
".\nPlease review the execdirs list in chkdupexe.\n"
|
||||
if ($#unchecked>=$[);
|
Loading…
Reference in New Issue