diff options
author | wiz <wiz@pkgsrc.org> | 2010-02-21 16:25:48 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2010-02-21 16:25:48 +0000 |
commit | 7692d5545d35189fc1c439d461f43394727229c4 (patch) | |
tree | 4993689594e3d727f394801cccc116314000d4d5 /sysutils | |
parent | cde0e872dabf1e1828616081481f1a3e7e62554d (diff) | |
download | pkgsrc-7692d5545d35189fc1c439d461f43394727229c4.tar.gz |
Remove adjustkernel: Broken since 2002 (PR 17761).
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 3 | ||||
-rw-r--r-- | sysutils/adjustkernel/DESCR | 1 | ||||
-rw-r--r-- | sysutils/adjustkernel/Makefile | 28 | ||||
-rw-r--r-- | sysutils/adjustkernel/PLIST | 3 | ||||
-rw-r--r-- | sysutils/adjustkernel/files/adjustkernel | 166 | ||||
-rw-r--r-- | sysutils/adjustkernel/files/adjustkernel.1 | 114 |
6 files changed, 1 insertions, 314 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 05e2a6100f9..975beba0ca3 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.484 2010/02/18 03:01:08 seb Exp $ +# $NetBSD: Makefile,v 1.485 2010/02/21 16:25:48 wiz Exp $ # COMMENT= System utilities @@ -8,7 +8,6 @@ SUBDIR+= 915resolution SUBDIR+= 9base SUBDIR+= acpica-utils SUBDIR+= acpidump -SUBDIR+= adjustkernel SUBDIR+= adtool SUBDIR+= afbinit SUBDIR+= agedu diff --git a/sysutils/adjustkernel/DESCR b/sysutils/adjustkernel/DESCR deleted file mode 100644 index b37fb469c7f..00000000000 --- a/sysutils/adjustkernel/DESCR +++ /dev/null @@ -1 +0,0 @@ -Build a NetBSD kernel config file from dmesg output. diff --git a/sysutils/adjustkernel/Makefile b/sysutils/adjustkernel/Makefile deleted file mode 100644 index fb8c4d03e93..00000000000 --- a/sysutils/adjustkernel/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# $NetBSD: Makefile,v 1.19 2009/04/09 00:48:16 joerg Exp $ - -DISTNAME= adjustkernel-1.7 -CATEGORIES= sysutils -MASTER_SITES= # empty -DISTFILES= # empty - -MAINTAINER= pkgsrc-users@NetBSD.org -COMMENT= Generate a NetBSD kernel config - -PKG_DESTDIR_SUPPORT= user-destdir - -WRKSRC= ${WRKDIR} -NO_BUILD= yes - -USE_TOOLS+= perl:run -REPLACE_PERL= adjustkernel - -INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 - -do-extract: - ${CP} ${FILESDIR}/adjustkernel ${WRKDIR} - -do-install: - ${INSTALL_SCRIPT} ${WRKDIR}/adjustkernel ${DESTDIR}${PREFIX}/bin - ${INSTALL_MAN} ${FILESDIR}/adjustkernel.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 - -.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/adjustkernel/PLIST b/sysutils/adjustkernel/PLIST deleted file mode 100644 index aee52141971..00000000000 --- a/sysutils/adjustkernel/PLIST +++ /dev/null @@ -1,3 +0,0 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2002/03/01 01:32:13 mjl Exp $ -bin/adjustkernel -man/man1/adjustkernel.1 diff --git a/sysutils/adjustkernel/files/adjustkernel b/sysutils/adjustkernel/files/adjustkernel deleted file mode 100644 index 3cdafb0b6fd..00000000000 --- a/sysutils/adjustkernel/files/adjustkernel +++ /dev/null @@ -1,166 +0,0 @@ -#!/usr/pkg/bin/perl -# $Id: adjustkernel,v 1.4 2005/02/28 00:48:52 hubertf Exp $ -# -# Copyright (c) 2004,2005 Hubert Feyrer <hubertf@NetBSD.org>, -# Martin Laubach <mjl@NetBSD.org> -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by -# Hubert Feyrer <hubertf@NetBSD.org> and -# Martin Laubach <mjl@NetBSD.org> -# 4. Neither the name of authors nor the names of any -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS -# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - - -use strict; -use Getopt::Long; - -#-------------------------------------------------------------------------- -sub findInDmesg($$); - -#-------------------------------------------------------------------------- -my $kernel; -my $outname; -my $debug = 0; -my $remove = 0; -my $mesg; - -die "Invalid command line" unless GetOptions( - 'debug+' => \$debug, - 'file=s' => \$kernel, - 'outfile=s' => \$outname, - 'remove+' => \$remove, - 'mesg=s' => \$mesg - ); - -$kernel = shift(@ARGV) - unless $kernel; - -########################################################################### - -die "Usage: $0 [-dmor] [--debug] [--mesg dmesg-file]\n". - "\t\t [--outfile new-config][--remove] kernel-config\n" unless $kernel; - -$| = 1 if $debug; - -if($outname) - { - close STDOUT; - open STDOUT, "> $outname" or die "Cannot write $outname: $!"; - } - -my @dmesg; - -if($mesg) - { - open DMESG, "< $mesg" or die "Cannot read $mesg: $!"; - @dmesg = <DMESG>; - close DMESG; - } -else - { - @dmesg = `dmesg`; - } - -@dmesg = grep /^\s*\w+\s+at\s+\w+/, @dmesg; - -#-------------------------------------------------------------------------- -open(K,"$kernel") or die "Cannot read $kernel: $!"; -while (<K>) - { - chomp; - if (/^\s*#/) - { # Already commented out - # Nothing - } - elsif (/(\S*)\s+at\s+(\S*)(\s*.*)$/) - { - my ( $dev, $where, $comment ) = ( $1, $2, $3 ); - - print STDERR "#>> Have? <$dev> at <$where><$comment>\n" if $debug; - - # Deal with inconsistencies - $where = '\w+\d' if $where =~ /^mii/o; - - # Expand wildcards - my $gdev=$dev; - if ($dev =~ /[?*]$/o) - { - $gdev="$`\\d"; - } - - my $gwhere = $where; - if ($where =~ /[?*]$/o) - { - $gwhere="$`\\d"; - } - - my $spat = "^${gdev}\\s+at\\s+${gwhere}"; - print STDERR "#>> ? $spat\n" if $debug; - - my $l = findInDmesg(\@dmesg, "^${gdev}\\s+at\\s+${gwhere}"); - if (! $l) - { - if ($dev !~ /mainbus/) - { # inconsistent in dmesg, never comment out mainbus at something - next if $remove; - - print "#(# "; - } - } - } - - print "$_\n"; - } -close(K); - -# Mention what we didn't find. -foreach (@dmesg) - { - print "# NOTE: NoMatch: $_"; - } - -exit 0; - -#-------------------------------------------------------------------------- -sub findInDmesg($$) - { - my ( $dref, $pattern ) = @_; - - my @r = grep /$pattern/, @$dref; - - # We matched it once, so remove it from dmesg. - # Ie. we match tr0 at isa once, but not tr* at isa later on - @$dref = grep !/$pattern/, @$dref; - - print STDERR "#>> Have! @r" if @r && $debug; - - return scalar(@r) ? $r[0] : undef; - } - -#-------------------------------------------------------------------------- - diff --git a/sysutils/adjustkernel/files/adjustkernel.1 b/sysutils/adjustkernel/files/adjustkernel.1 deleted file mode 100644 index 86d53555e4b..00000000000 --- a/sysutils/adjustkernel/files/adjustkernel.1 +++ /dev/null @@ -1,114 +0,0 @@ -.\" $NetBSD: adjustkernel.1,v 1.7 2007/07/02 09:49:43 joerg Exp $ -.\" $Emsi: adjustkernel.1,v 1.1 2002/03/01 01:25:37 mjl Exp $ -.\" -.\" Copyright (c) 2004 Hubert Feyrer <hubertf@NetBSD.org>, -.\" Martin Laubach <mjl@NetBSD.org> -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by -.\" Hubert Feyrer <hubertf@NetBSD.org> and -.\" Martin Laubach <mjl@NetBSD.org> -.\" 4. Neither the name of authors nor the names of any -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS -.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -.\" POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd February 27, 2005 -.Dt ADJUSTKERNEL 1 -.Sh NAME -.Nm adjustkernel -.Nd generate kernel config from dmesg -.Sh SYNOPSIS -.Nm adjustkernel -.Op Fl dmor -.Op Fl -debug -.Op Fl -mesg Ar dmesg-file -.Op Fl -outfile Ar new-config -.Op Fl -remove -.Ar kernel-config -.Sh DESCRIPTION -.Nm -generates a new kernel configuration file from the -current dmesg output and the current kernel config file, -.Ar kernel-config . -.Pp -The generation can be customized by using the following options: -.Bl -tag -width 22n -compact -.It Fl d , Fl -debug -be verbose and generate noise (mainly useful for debugging). -.It Fl o Ar new-config , Fl -outfile Ar new-config -saves the newly generated config file to -.Ar new-config ; -otherwise the new config will be written to stdout. -.It Fl m Ar dmesg-file , Fl -mesg Ar dmesg-file -read the dmesg data from -.Ar dmesg-file , -defaults to calling -.Pa /sbin/dmesg -and using its output. -See -.Pa /var/run/dmesg.boot -for an alternative snapshot from -right after the system booted, but which may not include -any removable components added later. -.It Fl r , Fl -remove -causes the tool to remove entries in the config file instead -of commenting them out. -.El -.Pp -Note that options can be shortened, as long as they can be -unambigously distinguished. -.Sh EXAMPLES -To generate a new kernel config -.Pa MYCONFIG -after having booted a -GENERIC kernel, run: -.Bd -literal -$ cd /usr/src/sys/arch/`uname -m`/conf -$ adjustkernel GENERIC >MYCONFIG -.Ed -.Pp -To see what could be stripped off the currently-running kernel, -assuming it was built with the -.Dq INCLUDE_CONFIG_FILE -option, use something like: -.Bd -literal -$ config -x >MYKERNEL -$ adjustkernel -r MYKERNEL | diff -u MYKERNEL - | more -.Ed -.Sh SEE ALSO -.Xr options 4 , -.Xr dmesg 8 -.Sh AUTHORS -Originally created by Hubert Feyrer <hubert@feyrer.de>, -later hacked in shape and packetized by Martin J. Laubach <mjl@netbsd.org>. -.Sh BUGS -Essential lines -.Dq atabus* at ata? , -.Dq atapibus* at atapi? , -and -.Dq scsibus* at scsi? -are removed as they aren't listed in -.Xr dmesg 8 -output. |