From 89579e5af0dd0ae91b782ebd2966c98569dcae8f Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Mon, 12 Mar 2018 20:00:31 +0100
Subject: [PATCH] WIP pkgsrc support removal

---
 Makefile                               | 2 +-
 Makefile.inc1                          | 2 +-
 etc/defaults/rc.conf                   | 4 ++--
 etc/login.conf                         | 4 ++--
 etc/man.conf                           | 5 ++---
 etc/rc.shutdown                        | 2 +-
 etc/root/dot.cshrc                     | 2 +-
 etc/root/dot.profile                   | 2 +-
 gnu/usr.bin/man/manpath/manpath.config | 1 -
 include/paths.h                        | 2 +-
 lib/libopie/config.h                   | 2 +-
 nrelease/Makefile                      | 4 ++--
 share/man/man7/security.7              | 5 ++---
 share/man/man8/rc.8                    | 8 +++-----
 share/mk/sys.mk                        | 2 +-
 share/skel/dot.profile                 | 2 +-
 tools/gitrev.sh                        | 2 +-
 usr.bin/su/su.1                        | 4 ++--
 18 files changed, 25 insertions(+), 30 deletions(-)

diff --git a/Makefile b/Makefile
index e60ee435c6..89768c5b52 100644
--- a/Makefile
+++ b/Makefile
@@ -110,7 +110,7 @@ BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
 .ORDER: realquickkernel installkernel
 .ORDER: realquickkernel reinstallkernel
 
-PATH=	/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/pkg/bin
+PATH=	/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
 MAKE=	PATH=${PATH} make -m ${.CURDIR}/share/mk -f Makefile.inc1
 
 #
diff --git a/Makefile.inc1 b/Makefile.inc1
index 1f4aa38d0f..f48b877a5a 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -200,7 +200,7 @@ BTOOLSPATH= ${BTOOLSDEST}/usr/sbin:${BTOOLSDEST}/usr/bin:${BTOOLSDEST}/bin:${BTO
 # The strict temporary command path contains all binaries required
 # by the buildworld system after the cross-tools stage.
 #
-STRICTTMPPATH=	${CTOOLSDEST}/usr/sbin:${CTOOLSDEST}/usr/bin:${CTOOLSDEST}/bin:${CTOOLSDEST}/usr/games:${BTOOLSDEST}/usr/sbin:${BTOOLSDEST}/usr/bin:${BTOOLSDEST}/bin:${BTOOLSDEST}/usr/games:/usr/local/bin:/usr/pkg/bin
+STRICTTMPPATH=	${CTOOLSDEST}/usr/sbin:${CTOOLSDEST}/usr/bin:${CTOOLSDEST}/bin:${CTOOLSDEST}/usr/games:${BTOOLSDEST}/usr/sbin:${BTOOLSDEST}/usr/bin:${BTOOLSDEST}/bin:${BTOOLSDEST}/usr/games:/usr/local/bin
 
 TMPDIR?=	/tmp
 TMPPID!=	echo $$$$
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index be165fbe70..ded64291d8 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -33,7 +33,7 @@ hotplugd_flags=""	# additional flags for hotplugd(8)
 pccard_ifconfig="NO"	# Specialized pccard ethernet configuration (or NO).
 pccard_ether_delay="5"	# Delay before trying to start dhclient in pccard_ether
 removable_interfaces=""	# Removable network interfaces for /etc/pccard_ether.
-local_startup="/usr/local/etc/rc.d /usr/pkg/etc/rc.d"
+local_startup="/usr/local/etc/rc.d"
 			# startup script dirs.
 script_name_sep=" "	# Change if your startup scripts' names contain spaces
 rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
@@ -355,7 +355,7 @@ accounting_enable="NO"	# Turn on process accounting (or NO).
 sysvipcd_enable="NO"	# Run the System V IPC daemon at startup (or NO).
 clear_tmp_enable="NO"	# Clear /tmp at startup.
 ldconfig_insecure="NO"	# Set to YES to disable ldconfig security checks
-ldconfig_paths="/lib /usr/lib /usr/local/lib /usr/pkg/lib"
+ldconfig_paths="/lib /usr/lib /usr/local/lib"
 			# shared library search paths
 ldconfig_local_dirs="/usr/local/libdata/ldconfig"
 			# Local directories with ldconfig configuration files.
diff --git a/etc/login.conf b/etc/login.conf
index e88f4cf80e..52b828c321 100644
--- a/etc/login.conf
+++ b/etc/login.conf
@@ -22,7 +22,7 @@ default:\
 	:copyright=/etc/COPYRIGHT:\
 	:welcome=/etc/motd:\
 	:setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
-	:path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/pkg/sbin /usr/pkg/bin ~/bin:\
+	:path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin ~/bin:\
 	:nologin=/var/run/nologin:\
 	:cputime=unlimited:\
 	:datasize=unlimited:\
@@ -137,7 +137,7 @@ russian|Russian Users Accounts:\
 ## users of X (needs more resources!)
 ##
 #xuser:\
-#	:manpath=/usr/share/man /usr/local/man /usr/pkg/man:\
+#	:manpath=/usr/share/man /usr/local/man:\
 #	:cputime=4h:\
 #	:datasize=12M:\
 #	:vmemoryuse=infinity:\
diff --git a/etc/man.conf b/etc/man.conf
index f094da5288..7dde6c020a 100644
--- a/etc/man.conf
+++ b/etc/man.conf
@@ -37,13 +37,12 @@ _crunch		.xz		/usr/bin/xzcat > %s
 # directory with all of the subdirectories listed for the keyword _subdir.
 
 # default
-_default	/usr/{share,X11R7,X11R6,pkg,local}/man/
+_default	/usr/{share,X11R7,X11R6,local}/man/
 
 # Other sections that represent complete man subdirectories.
 X11R7		/usr/X11R7/man/
 X11R6		/usr/X11R6/man/
-packages	/usr/pkg/man/
-local		/usr/local/man/
+packages	/usr/local/man/
 
 # Specific section/directory combinations.
 1		man1
diff --git a/etc/rc.shutdown b/etc/rc.shutdown
index 3a4888ad81..78fbe48bca 100644
--- a/etc/rc.shutdown
+++ b/etc/rc.shutdown
@@ -40,7 +40,7 @@ trap : 2
 trap : 3	# shouldn't be needed
 
 HOME=/
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/pkg/sbin
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
 export HOME PATH
 
 . /etc/rc.subr
diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc
index 35c0bc1c3e..4ae7eef46b 100644
--- a/etc/root/dot.cshrc
+++ b/etc/root/dot.cshrc
@@ -14,7 +14,7 @@ alias ll	ls -lA
 # A righteous umask
 umask 22
 
-set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /usr/pkg/bin /usr/pkg/sbin /usr/games $HOME/bin)
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /usr/games $HOME/bin)
 
 setenv	EDITOR	vi
 setenv	PAGER	less
diff --git a/etc/root/dot.profile b/etc/root/dot.profile
index aed84137df..8e39e30b8a 100644
--- a/etc/root/dot.profile
+++ b/etc/root/dot.profile
@@ -1,6 +1,6 @@
 # $FreeBSD: src/etc/root/dot.profile,v 1.20 1999/08/27 23:24:09 peter Exp $
 #
-PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/pkg/sbin:/usr/pkg/bin
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin
 export PATH
 HOME=/root
 export HOME
diff --git a/gnu/usr.bin/man/manpath/manpath.config b/gnu/usr.bin/man/manpath/manpath.config
index 03a60c706f..256af12991 100644
--- a/gnu/usr.bin/man/manpath/manpath.config
+++ b/gnu/usr.bin/man/manpath/manpath.config
@@ -17,7 +17,6 @@ MANDATORY_MANPATH	/usr/share/openssl/man
 # check if the directory exists and if it does, add it to MANPATH
 #
 OPTIONAL_MANPATH	/usr/local/man
-OPTIONAL_MANPATH	/usr/pkg/man
 #
 # set up PATH to MANPATH mapping
 #
diff --git a/include/paths.h b/include/paths.h
index ac98ab0993..135e452be4 100644
--- a/include/paths.h
+++ b/include/paths.h
@@ -38,7 +38,7 @@
 
 /* Default search path. */
 #define	_PATH_DEFPATH \
-	"/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin"
+	"/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
 
 /* All standard utilities path. */
 #define	_PATH_STDPATH \
diff --git a/lib/libopie/config.h b/lib/libopie/config.h
index 7715c2dbd4..ffa510288c 100644
--- a/lib/libopie/config.h
+++ b/lib/libopie/config.h
@@ -54,7 +54,7 @@
 /* #undef DOANONYMOUS */
 
 /* The default value of the PATH environment variable */
-#define DEFAULT_PATH "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/pkg/bin"
+#define DEFAULT_PATH "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
 
 /* Defined if the file /etc/default/login exists 
    (and, presumably, should be looked at by login) */
diff --git a/nrelease/Makefile b/nrelease/Makefile
index 167cbd3239..a9347a3389 100644
--- a/nrelease/Makefile
+++ b/nrelease/Makefile
@@ -146,7 +146,7 @@ realquick:	realquickrel
 #########################################################################
 
 check:
-.if !exists(/usr/local/bin/mkisofs) && !exists(/usr/pkg/bin/mkisofs)
+.if !exists(/usr/local/bin/mkisofs)
 	@echo
 	@echo "Your machine does not have cdrtools installed.  You can install it with:"
 	@echo "    pkg install cdrtools"
@@ -159,7 +159,7 @@ check:
 		echo "/usr if you are unfamiliar with dports."; \
 		/usr/bin/false; \
 	fi
-.if !exists(/usr/local/bin/mkisofs) && !exists(/usr/pkg/bin/mkisofs)
+.if !exists(/usr/local/bin/mkisofs)
 	@/usr/bin/false
 .endif
 	@echo "Using ${DPORTS_PATH} as the dports tree."
diff --git a/share/man/man7/security.7 b/share/man/man7/security.7
index 2bc625dd12..8d207ef7ff 100644
--- a/share/man/man7/security.7
+++ b/share/man/man7/security.7
@@ -403,10 +403,9 @@ and
 .Xr md5 1 .
 It is best to physically md5 the client-box files boxes at least once a
 day, and to test control files such as those found in
-.Pa /etc ,
-.Pa /usr/local/etc
+.Pa /etc
 and
-.Pa /usr/pkg/etc
+.Pa /usr/local/etc
 even more often.  When mismatches are found relative to the base md5
 information the limited-access machine knows is valid, it should scream at
 a sysadmin to go check it out.  A good security script will also check for
diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8
index 5b6007d554..37970d72bc 100644
--- a/share/man/man8/rc.8
+++ b/share/man/man8/rc.8
@@ -401,11 +401,9 @@ The
 script can execute scripts from multiple
 .Nm rc.d/
 directories.
-The default locations are
-.Pa /usr/local/etc/rc.d/
-and
-.Pa /usr/pkg/etc/rc.d/ ,
-but these may be overridden with the
+The default location is
+.Pa /usr/local/etc/rc.d/ ,
+but this may be overridden with the
 .Va local_startup
 .Xr rc.conf 5
 variable.
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index c5c8419565..2dc7030be6 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -53,7 +53,7 @@ CC_LINK		?=	${CC}
 # The system cc frontend is not subject to the path, e.g. when buildworld
 # is doing cross compiles it may still need the native compiler for things.
 #
-NXENV		?=	CCVER=${HOST_CCVER} BINUTILSVER=${HOST_BINUTILSVER} OBJFORMAT_PATH=/ PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/pkg/bin
+NXENV		?=	CCVER=${HOST_CCVER} BINUTILSVER=${HOST_BINUTILSVER} OBJFORMAT_PATH=/ PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
 NXCC		?=	${NXENV} ${CC}
 NXCC_LINK	?=	${NXENV} ${CC_LINK}
 
diff --git a/share/skel/dot.profile b/share/skel/dot.profile
index 6e1c04820f..1a11b5247d 100644
--- a/share/skel/dot.profile
+++ b/share/skel/dot.profile
@@ -6,7 +6,7 @@
 #
 
 # remove /usr/games if you want
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/pkg/sbin:/usr/pkg/bin:$HOME/bin; export PATH
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH
 
 # Setting TERM is normally done through /etc/ttys.  Do only override
 # if you're sure that you'll never log in via telnet or xterm or a
diff --git a/tools/gitrev.sh b/tools/gitrev.sh
index 210d723e24..d4e182a32c 100755
--- a/tools/gitrev.sh
+++ b/tools/gitrev.sh
@@ -4,7 +4,7 @@
 # limited.  To reach git, we need to add the directories
 # git might be located in.  Not a very nice solution, but
 # it works well enough.
-PATH=$PATH:/usr/local/bin:/usr/pkg/bin
+PATH=$PATH:/usr/local/bin
 
 srcdir=${1:-$(dirname $0)}
 
diff --git a/usr.bin/su/su.1 b/usr.bin/su/su.1
index 336e4fd6aa..a4d8da7104 100644
--- a/usr.bin/su/su.1
+++ b/usr.bin/su/su.1
@@ -195,7 +195,7 @@ Note that the
 option is required since user
 .Dq man
 does not have a valid shell by default.
-.It Li "su -m man -c 'catman /usr/share/man /usr/local/man /usr/pkg/man'"
+.It Li "su -m man -c 'catman /usr/share/man /usr/local/man'"
 Same as above, but the target command consists of more than a
 single word and hence is quoted for use with the
 .Fl c
@@ -203,7 +203,7 @@ option being passed to the shell.
 (Most shells expect the argument to
 .Fl c
 to be a single word).
-.It Li "su -m -c staff man -c 'catman /usr/share/man /usr/local/man /usr/pkg/man'"
+.It Li "su -m -c staff man -c 'catman /usr/share/man /usr/local/man'"
 Same as above, but the target command is run with the resource limits of
 the login class
 .Dq staff .
-- 
2.16.2

