diff options
author | 2012-01-05 23:03:57 +0000 | |
---|---|---|
committer | 2012-01-05 23:03:57 +0000 | |
commit | 37aa2508b5fbc60e60a53866ff79b726659cf40e (patch) | |
tree | d542ed076bd7d32682a04b968509448c68df1bbb | |
parent | OpenSSL 1.0.0f: crank minor (diff) | |
download | wireguard-openbsd-37aa2508b5fbc60e60a53866ff79b726659cf40e.tar.xz wireguard-openbsd-37aa2508b5fbc60e60a53866ff79b726659cf40e.zip |
Enable the new apropos(1), whatis(1), and makewhatis(8).
Unlink the old apropos(1), whatis(1), and makewhatis(8) from the build.
Call the new tools from pkg_create(1) and pkg_add(1).
"Please enable it now." deraadt@
-rw-r--r-- | libexec/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/Makefile | 6 | ||||
-rw-r--r-- | usr.bin/mandoc/Makefile | 10 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Add.pm | 11 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Delete.pm | 10 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Paths.pm | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgCreate.pm | 15 |
7 files changed, 23 insertions, 36 deletions
diff --git a/libexec/Makefile b/libexec/Makefile index 91a81e0ad32..b33d25716c6 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -1,10 +1,10 @@ # from: @(#)Makefile 5.7 (Berkeley) 4/1/91 -# $OpenBSD: Makefile,v 1.46 2011/09/19 06:47:49 okan Exp $ +# $OpenBSD: Makefile,v 1.47 2012/01/05 23:03:57 schwarze Exp $ .include <bsd.own.mk> SUBDIR= comsat fingerd ftpd getty identd lockspool \ - mail.local makewhatis rpc.rquotad rpc.rstatd rpc.rusersd \ + mail.local rpc.rquotad rpc.rstatd rpc.rusersd \ rpc.rwalld rpc.sprayd security spamd spamlogd spamd-setup rshd \ talkd tcpd tftp-proxy tftpd uucpd diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 5bb2601c9a5..90f4e0ab6f7 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.119 2010/10/29 14:47:14 millert Exp $ +# $OpenBSD: Makefile,v 1.120 2012/01/05 23:03:57 schwarze Exp $ .include <bsd.own.mk> -SUBDIR= apply apropos ar arch asa asn1_compile at aucat audioctl awk banner \ +SUBDIR= apply ar arch asa asn1_compile at aucat audioctl awk banner \ basename bc bdes bgplg \ biff cal calendar cap_mkdb cdio chpass cmp col colrm \ column comm compile_et compress cpp crontab csplit ctags cut \ @@ -25,7 +25,7 @@ SUBDIR= apply apropos ar arch asa asn1_compile at aucat audioctl awk banner \ tmux top touch tput tr true tset tsort tty usbhidaction usbhidctl \ ul uname unexpand unifdef uniq units \ unvis users uudecode uuencode vacation vi vis vmstat w wall wc \ - what whatis which who whois write x99token xargs xinstall xlint \ + what which who whois write x99token xargs xinstall xlint \ xstr yacc yes .if (${YP:L} == "yes") diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile index 6c2ef54d434..69a1af2b843 100644 --- a/usr.bin/mandoc/Makefile +++ b/usr.bin/mandoc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.65 2011/11/26 16:41:35 schwarze Exp $ +# $OpenBSD: Makefile,v 1.66 2012/01/05 23:03:57 schwarze Exp $ .include <bsd.own.mk> @@ -22,8 +22,12 @@ SRCS+= manpath.c mandocdb.c apropos_db.c apropos.c PROG= mandoc -LINKS= ${BINDIR}/mandoc ${BINDIR}/mandocdb +LINKS= ${BINDIR}/mandoc ${BINDIR}/apropos +LINKS+= ${BINDIR}/mandoc ${BINDIR}/mandocdb +LINKS+= ${BINDIR}/mandoc ${BINDIR}/whatis +LINKS+= ${BINDIR}/mandoc /usr/libexec/makewhatis -MAN= mandoc.1 mandocdb.8 +MAN= apropos.1 mandoc.1 mandocdb.8 whatis.1 +MLINKS= mandocdb.8 makewhatis.8 .include <bsd.prog.mk> diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 03116760dd2..aa9c45222df 100644 --- a/usr.sbin/pkg_add/OpenBSD/Add.pm +++ b/usr.sbin/pkg_add/OpenBSD/Add.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Add.pm,v 1.127 2011/12/03 16:15:05 espie Exp $ +# $OpenBSD: Add.pm,v 1.128 2012/01/05 23:03:57 schwarze Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -30,7 +30,6 @@ sub manpages_index my ($state) = @_; return unless defined $state->{mandirs}; my $destdir = $state->{destdir}; - require OpenBSD::Makewhatis; while (my ($k, $v) = each %{$state->{mandirs}}) { my @l = map { $destdir.$_ } @$v; @@ -39,12 +38,8 @@ sub manpages_index $destdir.$k, join(' ', @l)) if $state->verbose >= 2; } else { - try { - OpenBSD::Makewhatis::merge($destdir.$k, \@l, - $state); - } catchall { - $state->errsay("Error in makewhatis: #1", $_); - }; + $state->vsystem(OpenBSD::Paths->makewhatis, + '-d', $destdir.$k, '--', @l); } } } diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm index 1c7ca316ed1..36035b69524 100644 --- a/usr.sbin/pkg_add/OpenBSD/Delete.pm +++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Delete.pm,v 1.117 2011/09/17 15:33:56 schwarze Exp $ +# $OpenBSD: Delete.pm,v 1.118 2012/01/05 23:03:57 schwarze Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -44,7 +44,6 @@ sub manpages_unindex my ($state) = @_; return unless defined $state->{mandirs}; my $destdir = $state->{destdir}; - require OpenBSD::Makewhatis; while (my ($k, $v) = each %{$state->{mandirs}}) { my @l = map { $destdir.$_ } @$v; @@ -53,11 +52,8 @@ sub manpages_unindex $destdir.$k, join(' ', @l)) if $state->verbose >= 2; } else { - eval { OpenBSD::Makewhatis::remove($destdir.$k, \@l, - $state); }; - if ($@) { - $state->errsay("Error in makewhatis: #1", $@); - } + $state->vsystem(OpenBSD::Paths->makewhatis, + '-u', $destdir.$k, '--', @l); } } undef $state->{mandirs}; diff --git a/usr.sbin/pkg_add/OpenBSD/Paths.pm b/usr.sbin/pkg_add/OpenBSD/Paths.pm index 4c68b71af5d..9ca0a3e2ffd 100644 --- a/usr.sbin/pkg_add/OpenBSD/Paths.pm +++ b/usr.sbin/pkg_add/OpenBSD/Paths.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Paths.pm,v 1.17 2010/12/24 09:04:14 espie Exp $ +# $OpenBSD: Paths.pm,v 1.18 2012/01/05 23:03:57 schwarze Exp $ # # Copyright (c) 2007 Marc Espie <espie@openbsd.org> # @@ -47,6 +47,7 @@ sub mount() { '/sbin/mount' } sub df() { '/bin/df' } sub ssh() { '/usr/bin/ssh' } sub make() { '/usr/bin/make' } +sub makewhatis() { '/usr/libexec/makewhatis' } sub mklocatedb() { '/usr/libexec/locate.mklocatedb' } sub hostname() { '/bin/hostname' } sub sudo() { '/usr/bin/sudo' } diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index 0792a11fbe7..56ebaadc53f 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgCreate.pm,v 1.53 2011/11/16 11:41:38 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.54 2012/01/05 23:03:57 schwarze Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -1106,17 +1106,8 @@ sub finish_manpages my ($self, $state, $plist) = @_; $plist->grab_manpages($state); if (defined $state->{manpages}) { - $state->{v} ++; - - require OpenBSD::Makewhatis; - - try { - OpenBSD::Makewhatis::scan_manpages($state->{manpages}, - $state); - } catchall { - $state->errsay("Error in makewhatis: #1", $_); - }; - $state->{v} --; + $state->system(OpenBSD::Paths->makewhatis, '-t', '--', + @{$state->{manpages}}); } if (defined $state->{mandir}) { |