svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf sy...

Gleb Smirnoff glebius at FreeBSD.org
Tue Feb 28 05:14:46 UTC 2017


Author: glebius
Date: Tue Feb 28 05:14:42 2017
New Revision: 314373
URL: https://svnweb.freebsd.org/changeset/base/314373

Log:
  Remove SVR4 (System V Release 4) binary compatibility support.
  
  UNIX System V Release 4 is operating system released in 1988. It ceased
  to exist in early 2000-s.

Deleted:
  head/share/man/man4/man4.i386/streams.4
  head/share/man/man4/man4.i386/svr4.4
  head/sys/compat/svr4/
  head/sys/dev/streams/
  head/sys/i386/svr4/
  head/sys/modules/streams/
  head/sys/modules/svr4/
Modified:
  head/ObsoleteFiles.inc
  head/etc/defaults/rc.conf
  head/etc/rc.d/abi
  head/lib/libc/regex/re_format.7
  head/share/man/man4/man4.i386/Makefile
  head/share/man/man5/rc.conf.5
  head/sys/amd64/conf/NOTES
  head/sys/boot/forth/loader.conf
  head/sys/conf/files
  head/sys/conf/files.i386
  head/sys/conf/options.amd64
  head/sys/conf/options.i386
  head/sys/i386/conf/NOTES
  head/sys/kern/makesyscalls.sh
  head/sys/modules/Makefile
  head/sys/net/if.c
  head/usr.sbin/bsdconfig/startup/include/messages.subr
  head/usr.sbin/bsdconfig/startup/misc

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/ObsoleteFiles.inc	Tue Feb 28 05:14:42 2017	(r314373)
@@ -38,6 +38,11 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20170226: SVR4 compatibility removed
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
+OLD_FILES+=usr/share/man/man4/streams.4
+OLD_FILES+=usr/share/man/man4/svr4.4
+.endif
 # 20170219: OpenPAM RADULA upgrade removed the libpam tests
 OLD_FILES+=usr/tests/lib/libpam/Kyuafile
 OLD_FILES+=usr/tests/lib/libpam/t_openpam_ctype

Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/etc/defaults/rc.conf	Tue Feb 28 05:14:42 2017	(r314373)
@@ -630,7 +630,6 @@ firstboot_sentinel="/firstboot"	# Script
 # Emulation/compatibility services provided by /etc/rc.d/abi
 sysvipc_enable="NO"	# Load System V IPC primitives at startup (or NO).
 linux_enable="NO"	# Linux binary compatibility loaded at startup (or NO).
-svr4_enable="NO"	# SysVR4 emulation loaded at startup (or NO).
 clear_tmp_enable="NO"	# Clear /tmp at startup.
 clear_tmp_X="YES" 	# Clear and recreate X11-related directories in /tmp
 ldconfig_insecure="NO"	# Set to YES to disable ldconfig security checks

Modified: head/etc/rc.d/abi
==============================================================================
--- head/etc/rc.d/abi	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/etc/rc.d/abi	Tue Feb 28 05:14:42 2017	(r314373)
@@ -43,25 +43,18 @@ linux_start()
 	fi
 }
 
-svr4_start()
-{
-	echo -n ' svr4'
-	load_kld -m svr4elf svr4
-}
-
 abi_start()
 {
 	local _echostop
 
 	_echostop=
-	if checkyesno sysvipc_enable || checkyesno linux_enable || checkyesno svr4_enable; then
+	if checkyesno sysvipc_enable || checkyesno linux_enable; then
 		echo -n 'Additional ABI support:'
 		_echostop=yes
 	fi
 
 	checkyesno sysvipc_enable && sysv_start
 	checkyesno linux_enable && linux_start
-	checkyesno svr4_enable && svr4_start
 
 	[ -n "${_echostop}" ] && echo '.'
 }

Modified: head/lib/libc/regex/re_format.7
==============================================================================
--- head/lib/libc/regex/re_format.7	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/lib/libc/regex/re_format.7	Tue Feb 28 05:14:42 2017	(r314373)
@@ -319,7 +319,7 @@ The additional word delimiters
 and
 .Ql \e>
 are provided to ease compatibility with traditional
-.Xr svr4 4
+SVR4
 systems but are not portable and should be avoided.
 .Pp
 In the event that an RE could match more than one substring of a given

Modified: head/share/man/man4/man4.i386/Makefile
==============================================================================
--- head/share/man/man4/man4.i386/Makefile	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/share/man/man4/man4.i386/Makefile	Tue Feb 28 05:14:42 2017	(r314373)
@@ -25,8 +25,6 @@ MAN=	aic.4 \
 	pnpbios.4 \
 	sbni.4 \
 	smapi.4 \
-	streams.4 \
-	svr4.4 \
 	vpd.4 \
 	vx.4
 

Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/share/man/man5/rc.conf.5	Tue Feb 28 05:14:42 2017	(r314373)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 10, 2016
+.Dd February 26, 2017
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -3631,11 +3631,6 @@ Set to
 .Dq Li YES
 to enable Linux/ELF binary emulation at system initial
 boot time.
-.It Va svr4_enable
-.Pq Vt bool
-If set to
-.Dq Li YES ,
-enable SysVR4 emulation at boot time.
 .It Va sysvipc_enable
 .Pq Vt bool
 If set to

Modified: head/sys/amd64/conf/NOTES
==============================================================================
--- head/sys/amd64/conf/NOTES	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/amd64/conf/NOTES	Tue Feb 28 05:14:42 2017	(r314373)
@@ -633,27 +633,6 @@ options 	LINPROCFS
 # and PSEUDOFS)
 options 	LINSYSFS
 
-#
-# SysVR4 ABI emulation
-#
-# The svr4 ABI emulator can be statically compiled into the kernel or loaded as
-# a KLD module.
-# The STREAMS network emulation code can also be compiled statically or as a
-# module.  If loaded as a module, it must be loaded before the svr4 module
-# (the /usr/sbin/svr4 script does this for you).  If compiling statically,
-# the `streams' device must be configured into any kernel which also
-# specifies COMPAT_SVR4.  It is possible to have a statically-configured
-# STREAMS device and a dynamically loadable svr4 emulator;  the /usr/sbin/svr4
-# script understands that it doesn't need to load the `streams' module under
-# those circumstances.
-# Caveat:  At this time, `options KTRACE' is required for the svr4 emulator
-# (whether static or dynamic).
-#
-#XXX#options 	COMPAT_SVR4	# build emulator statically
-#XXX#options 	DEBUG_SVR4	# enable verbose debugging
-#XXX#device	streams		# STREAMS network driver (required for svr4).
-
-

 #####################################################################
 # VM OPTIONS
 

Modified: head/sys/boot/forth/loader.conf
==============================================================================
--- head/sys/boot/forth/loader.conf	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/boot/forth/loader.conf	Tue Feb 28 05:14:42 2017	(r314373)
@@ -273,8 +273,6 @@ cloudabi64_load="NO"		# 64-bit CloudABI 
 ibcs2_load="NO"			# IBCS2 (SCO) emulation
 ibcs2_coff_load="NO"
 linux_load="NO"			# Linux emulation
-svr4_load="NO"			# SystemV R4 emulation
-streams_load="NO"		# System V streams module
 
 
 ##############################################################

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/conf/files	Tue Feb 28 05:14:42 2017	(r314373)
@@ -2959,7 +2959,6 @@ dev/stg/tmc18c30_pccard.c	optional stg p
 dev/stg/tmc18c30_pci.c		optional stg pci
 dev/stg/tmc18c30_subr.c		optional stg
 dev/stge/if_stge.c		optional stge
-dev/streams/streams.c		optional streams
 dev/sym/sym_hipd.c		optional sym				\
 	dependency	"$S/dev/sym/sym_{conf,defs}.h"
 dev/syscons/blank/blank_saver.c	optional blank_saver

Modified: head/sys/conf/files.i386
==============================================================================
--- head/sys/conf/files.i386	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/conf/files.i386	Tue Feb 28 05:14:42 2017	(r314373)
@@ -43,18 +43,6 @@ linux_vdso.so			optional	compat_linux		\
 	no-implicit-rule						\
 	clean		"linux_vdso.so"
 #
-svr4_genassym.o			optional	compat_svr4		\
-	dependency 	"$S/i386/svr4/svr4_genassym.c"			\
-	compile-with	"${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
-	no-obj no-implicit-rule						\
-	clean		"svr4_genassym.o"
-#
-svr4_assym.h			optional	compat_svr4		\
-	dependency 	"$S/kern/genassym.sh svr4_genassym.o"	   	\
-	compile-with	"sh $S/kern/genassym.sh svr4_genassym.o > ${.TARGET}" \
-	no-obj no-implicit-rule before-depend				\
-	clean		"svr4_assym.h"
-#
 font.h				optional	sc_dflt_font		\
 	compile-with	"uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'static u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'static u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'static u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h"										\
 	no-obj no-implicit-rule before-depend				\
@@ -127,22 +115,6 @@ compat/ndis/subr_ntoskrnl.c	optional ndi
 compat/ndis/subr_pe.c		optional ndisapi pci
 compat/ndis/subr_usbd.c		optional ndisapi pci
 compat/ndis/winx32_wrap.S	optional ndisapi pci
-compat/svr4/imgact_svr4.c	optional compat_svr4
-compat/svr4/svr4_fcntl.c	optional compat_svr4
-compat/svr4/svr4_filio.c	optional compat_svr4
-compat/svr4/svr4_ioctl.c	optional compat_svr4
-compat/svr4/svr4_ipc.c		optional compat_svr4
-compat/svr4/svr4_misc.c		optional compat_svr4
-compat/svr4/svr4_resource.c	optional compat_svr4
-compat/svr4/svr4_signal.c	optional compat_svr4
-compat/svr4/svr4_socket.c	optional compat_svr4
-compat/svr4/svr4_sockio.c	optional compat_svr4
-compat/svr4/svr4_stat.c		optional compat_svr4
-compat/svr4/svr4_stream.c	optional compat_svr4
-compat/svr4/svr4_syscallnames.c	optional compat_svr4
-compat/svr4/svr4_sysent.c	optional compat_svr4
-compat/svr4/svr4_sysvec.c	optional compat_svr4
-compat/svr4/svr4_termios.c	optional compat_svr4
 bf_enc.o			optional crypto | ipsec	| ipsec_support \
 	dependency	"$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \
 	compile-with	"${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \
@@ -546,11 +518,6 @@ i386/linux/linux_sysent.c	optional compa
 i386/linux/linux_sysvec.c	optional compat_linux
 i386/pci/pci_cfgreg.c		optional pci
 i386/pci/pci_pir.c		optional pci
-i386/svr4/svr4_locore.s		optional compat_svr4	\
-	dependency	"svr4_assym.h"	\
-	warning "COMPAT_SVR4 is broken and should be avoided"
-i386/svr4/svr4_machdep.c	optional compat_svr4
-#
 isa/syscons_isa.c		optional sc
 isa/vga_isa.c			optional vga
 kern/kern_clocksource.c		standard

Modified: head/sys/conf/options.amd64
==============================================================================
--- head/sys/conf/options.amd64	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/conf/options.amd64	Tue Feb 28 05:14:42 2017	(r314373)
@@ -18,8 +18,6 @@ COMPAT_FREEBSD32	opt_compat.h
 #IBCS2			opt_dontuse.h
 #COMPAT_LINUX		opt_dontuse.h
 COMPAT_LINUX32		opt_compat.h
-#COMPAT_SVR4		opt_dontuse.h
-#DEBUG_SVR4		opt_svr4.h
 LINPROCFS		opt_dontuse.h
 LINSYSFS		opt_dontuse.h
 NDISAPI			opt_dontuse.h

Modified: head/sys/conf/options.i386
==============================================================================
--- head/sys/conf/options.i386	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/conf/options.i386	Tue Feb 28 05:14:42 2017	(r314373)
@@ -24,8 +24,6 @@ PV_STATS		opt_pmap.h
 COMPAT_AOUT		opt_dontuse.h
 IBCS2			opt_dontuse.h
 COMPAT_LINUX		opt_dontuse.h
-COMPAT_SVR4		opt_dontuse.h
-DEBUG_SVR4		opt_svr4.h
 LINPROCFS		opt_dontuse.h
 LINSYSFS		opt_dontuse.h
 NDISAPI			opt_dontuse.h

Modified: head/sys/i386/conf/NOTES
==============================================================================
--- head/sys/i386/conf/NOTES	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/i386/conf/NOTES	Tue Feb 28 05:14:42 2017	(r314373)
@@ -954,26 +954,6 @@ options 	LINPROCFS
 # and PSEUDOFS)
 options 	LINSYSFS
 
-#
-# SysVR4 ABI emulation
-#
-# The svr4 ABI emulator can be statically compiled into the kernel or loaded as
-# a KLD module.
-# The STREAMS network emulation code can also be compiled statically or as a
-# module.  If loaded as a module, it must be loaded before the svr4 module
-# (the /usr/sbin/svr4 script does this for you).  If compiling statically,
-# the `streams' device must be configured into any kernel which also
-# specifies COMPAT_SVR4.  It is possible to have a statically-configured
-# STREAMS device and a dynamically loadable svr4 emulator;  the /usr/sbin/svr4
-# script understands that it doesn't need to load the `streams' module under
-# those circumstances.
-# Caveat:  At this time, `options KTRACE' is required for the svr4 emulator
-# (whether static or dynamic).
-#
-options 	COMPAT_SVR4	# build emulator statically
-options 	DEBUG_SVR4	# enable verbose debugging
-device		streams		# STREAMS network driver (required for svr4).
-
 # Enable NDIS binary driver support
 options 	NDISAPI
 device		ndis

Modified: head/sys/kern/makesyscalls.sh
==============================================================================
--- head/sys/kern/makesyscalls.sh	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/kern/makesyscalls.sh	Tue Feb 28 05:14:42 2017	(r314373)
@@ -455,9 +455,8 @@ sed -e '
 		if (!flag("NOPROTO") && !flag("NODEF")) {
 			if (funcname == "nosys" || funcname == "lkmnosys" ||
 			    funcname == "sysarch" || funcname ~ /^freebsd/ || 
-			    funcname ~ /^linux/ || funcname ~ /^svr4/ || 
-			    funcname ~ /^ibcs2/ || funcname ~ /^xenix/ ||
-			    funcname ~ /^cloudabi/) {
+			    funcname ~ /^linux/ || funcname ~ /^ibcs2/ ||
+			    funcname ~ /^xenix/ || funcname ~ /^cloudabi/) {
 				printf("%s\t%s(struct thread *, struct %s *)",
 				    rettype, funcname, argalias) > sysdcl
 			} else {
@@ -476,9 +475,8 @@ sed -e '
 		} else {
 			if (funcname == "nosys" || funcname == "sysarch" || 
 			    funcname == "lkmnosys" || funcname ~ /^freebsd/ ||
-			    funcname ~ /^linux/ || funcname ~ /^svr4/ ||
-			    funcname ~ /^ibcs2/ || funcname ~ /^xenix/ ||
-			    funcname ~ /^cloudabi/) {
+			    funcname ~ /^linux/ || funcname ~ /^ibcs2/ ||
+			    funcname ~ /^xenix/ || funcname ~ /^cloudabi/) {
 				printf("%s, %s, NULL, 0, 0, %s, %s },", funcname, auditev, flags, thr_flag) > sysent
 				column = column + length(funcname) + length(auditev) + length(flags) + 3 
 			} else {

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/modules/Makefile	Tue Feb 28 05:14:42 2017	(r314373)
@@ -350,8 +350,6 @@ SUBDIR=	\
 	ste \
 	${_stg} \
 	stge \
-	${_streams} \
-	${_svr4} \
 	${_sym} \
 	${_syscons} \
 	sysvipc \
@@ -732,9 +730,7 @@ _nsp=		nsp
 _pcfclock=	pcfclock
 _pst=		pst
 _sbni=		sbni
-_streams=	streams
 _stg=		stg
-_svr4=		svr4
 _cm=		cm
 .if ${MK_SOURCELESS_UCODE} != "no"
 _ctau=		ctau

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/sys/net/if.c	Tue Feb 28 05:14:42 2017	(r314373)
@@ -2703,9 +2703,6 @@ ifhwioctl(u_long cmd, struct ifnet *ifp,
 	return (error);
 }
 
-/* COMPAT_SVR4 */
-#define	OSIOCGIFCONF	_IOWR('i', 20, struct ifconf)
-
 #ifdef COMPAT_FREEBSD32
 struct ifconf32 {
 	int32_t	ifc_len;
@@ -2745,7 +2742,6 @@ ifioctl(struct socket *so, u_long cmd, c
 
 	switch (cmd) {
 	case SIOCGIFCONF:
-	case OSIOCGIFCONF:	/* COMPAT_SVR4 */
 		error = ifconf(cmd, data);
 		CURVNET_RESTORE();
 		return (error);
@@ -3017,15 +3013,6 @@ again:
 			if (prison_if(curthread->td_ucred, sa) != 0)
 				continue;
 			addrs++;
-			/* COMPAT_SVR4 */
-			if (cmd == OSIOCGIFCONF) {
-				struct osockaddr *osa =
-				    (struct osockaddr *)&ifr.ifr_addr;
-				ifr.ifr_addr = *sa;
-				osa->sa_family = sa->sa_family;
-				sbuf_bcat(sb, &ifr, sizeof(ifr));
-				max_len += sizeof(ifr);
-			} else
 			if (sa->sa_len <= sizeof(*sa)) {
 				ifr.ifr_addr = *sa;
 				sbuf_bcat(sb, &ifr, sizeof(ifr));

Modified: head/usr.sbin/bsdconfig/startup/include/messages.subr
==============================================================================
--- head/usr.sbin/bsdconfig/startup/include/messages.subr	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/usr.sbin/bsdconfig/startup/include/messages.subr	Tue Feb 28 05:14:42 2017	(r314373)
@@ -101,8 +101,6 @@ msg_show_value_desc="Show configured sta
 msg_startup="Startup"
 msg_startup_dirs="Startup dirs"
 msg_startup_dirs_desc="Set the list of dirs to look for startup scripts"
-msg_svr4="SVR4"
-msg_svr4_desc="This host wants to be able to run SVR4 binaries."
 msg_toggle_startup_services="Toggle Startup Services"
 msg_unknown_startup_menu_selection="Unknown startup menu selection"
 msg_value_required="Value Required"

Modified: head/usr.sbin/bsdconfig/startup/misc
==============================================================================
--- head/usr.sbin/bsdconfig/startup/misc	Tue Feb 28 04:48:30 2017	(r314372)
+++ head/usr.sbin/bsdconfig/startup/misc	Tue Feb 28 05:14:42 2017	(r314373)
@@ -74,7 +74,6 @@ dialog_menu_main()
 		var_list="$var_list
 			apm_enable
 			ibcs2_enable
-			svr4_enable
 		" # END-QUOTE
 	fi
 
@@ -96,7 +95,6 @@ dialog_menu_main()
 		export msg_accounting     msg_accounting_desc
 		export msg_lpd            msg_lpd_desc
 		export msg_sco            msg_sco_desc
-		export msg_svr4           msg_svr4_desc
 		:| awk \
 			-v uname_p="$UNAME_P"            \
 			-v menu_tags="$DIALOG_MENU_TAGS" \
@@ -238,18 +236,6 @@ dialog_menu_main()
 				tag = sprintf(mtag_fmt, char, mark, subtag)
 				mprint(tag, ENVIRON["msg_sco_desc"])
 				if (ditem == char) defaultitem = tag
-
-				#
-				# SVR4: This host wants to be able to run SVR4
-				#       binaries.
-				#
-				char = substr(menu_tags, i++, 1)
-				mark = ( ENVIRON["svr4_enable"] ~ \
-						/^[Yy][Ee][Ss]$/ ? "X" : " " )
-				subtag = ENVIRON["msg_svr4"]
-				tag = sprintf(mtag_fmt, char, mark, subtag)
-				mprint(tag, ENVIRON["msg_svr4_desc"])
-				if (ditem == char) defaultitem = tag
 			}
 
 			printf "\"\n"
@@ -360,9 +346,6 @@ while :; do
 	?" ["?"] $msg_sco")
 		f_eval_catch -dk err "$0" f_sysrc_set \
 			'f_sysrc_set ibcs2_enable "%s"' "$reverse" ;;
-	?" ["?"] $msg_svr4")
-		f_eval_catch -dk err "$0" f_sysrc_set \
-			'f_sysrc_set svr4_enable "%s"' "$reverse" ;;
 	# Multi-variable On/Off toggle bits
 	?" ["?"] $msg_nis_client")
 		if f_eval_catch -dk err "$0" f_sysrc_set \


More information about the svn-src-head mailing list