Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2016 12:49:23 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305929 - in head: . etc share/man/man8
Message-ID:  <201609181249.u8ICnNPa015121@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Sep 18 12:49:23 2016
New Revision: 305929
URL: https://svnweb.freebsd.org/changeset/base/305929

Log:
  Remove backup_uses_rcs from rc.subr
  
  In preparation for the removal of GNU rcs from base, remove the backup_uses_rcs
  functionality from the rc.subr backup_file feature. This functionnality was off
  by default
  
  Reviewed by:	wblock
  Differential Revision:	https://reviews.freebsd.org/D7883

Modified:
  head/UPDATING
  head/etc/rc.subr
  head/share/man/man8/rc.subr.8

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Sun Sep 18 11:36:54 2016	(r305928)
+++ head/UPDATING	Sun Sep 18 12:49:23 2016	(r305929)
@@ -31,6 +31,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12
 	disable the most expensive debugging functionality run
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20160918:
+	The backup_uses_rcs functionality has been removed from rc.subr.
+
 20160908:
 	The queue(3) debugging macro, QUEUE_MACRO_DEBUG, has been split into
 	two separate components, QUEUE_MACRO_DEBUG_TRACE and

Modified: head/etc/rc.subr
==============================================================================
--- head/etc/rc.subr	Sun Sep 18 11:36:54 2016	(r305928)
+++ head/etc/rc.subr	Sun Sep 18 12:49:23 2016	(r305929)
@@ -1532,28 +1532,20 @@ debug()
 #
 # backup_file action file cur backup
 #	Make a backup copy of `file' into `cur', and save the previous
-#	version of `cur' as `backup' or use rcs for archiving.
-#
-#	This routine checks the value of the backup_uses_rcs variable,
-#	which can be either YES or NO.
+#	version of `cur' as `backup'.
 #
 #	The `action' keyword can be one of the following:
 #
 #	add		`file' is now being backed up (and is possibly
 #			being reentered into the backups system).  `cur'
-#			is created and RCS files, if necessary, are
-#			created as well.
+#			is created.
 #
 #	update		`file' has changed and needs to be backed up.
-#			If `cur' exists, it is copied to to `back' or
-#			checked into RCS (if the repository file is old),
-#			and then `file' is copied to `cur'.  Another RCS
-#			check in done here if RCS is being used.
+#			If `cur' exists, it is copied to to `back'
+#			and then `file' is copied to `cur'.
 #
 #	remove		`file' is no longer being tracked by the backups
-#			system.  If RCS is not being used, `cur' is moved
-#			to `back', otherwise an empty file is checked in,
-#			and then `cur' is removed.
+#			system.  `cur' is moved `back'.
 #
 #
 backup_file()
@@ -1563,56 +1555,18 @@ backup_file()
 	_cur=$3
 	_back=$4
 
-	if checkyesno backup_uses_rcs; then
-		_msg0="backup archive"
-		_msg1="update"
-
-		# ensure that history file is not locked
-		if [ -f $_cur,v ]; then
-			rcs -q -u -U -M $_cur
-		fi
-
-		# ensure after switching to rcs that the
-		# current backup is not lost
+	case $_action in
+	add|update)
 		if [ -f $_cur ]; then
-			# no archive, or current newer than archive
-			if [ ! -f $_cur,v -o $_cur -nt $_cur,v ]; then
-				ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur
-				rcs -q -kb -U $_cur
-				co -q -f -u $_cur
-			fi
+			cp -p $_cur $_back
 		fi
-
-		case $_action in
-		add|update)
-			cp -p $_file $_cur
-			ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur
-			rcs -q -kb -U $_cur
-			co -q -f -u $_cur
-			chown root:wheel $_cur $_cur,v
-			;;
-		remove)
-			cp /dev/null $_cur
-			ci -q -f -u -t-"$_msg0" -m"$_msg1" $_cur
-			rcs -q -kb -U $_cur
-			chown root:wheel $_cur $_cur,v
-			rm $_cur
-			;;
-		esac
-	else
-		case $_action in
-		add|update)
-			if [ -f $_cur ]; then
-				cp -p $_cur $_back
-			fi
-			cp -p $_file $_cur
-			chown root:wheel $_cur
-			;;
-		remove)
-			mv -f $_cur $_back
-			;;
-		esac
-	fi
+		cp -p $_file $_cur
+		chown root:wheel $_cur
+		;;
+	remove)
+		mv -f $_cur $_back
+		;;
+	esac
 }
 
 # make_symlink src link

Modified: head/share/man/man8/rc.subr.8
==============================================================================
--- head/share/man/man8/rc.subr.8	Sun Sep 18 11:36:54 2016	(r305928)
+++ head/share/man/man8/rc.subr.8	Sun Sep 18 12:49:23 2016	(r305929)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 4, 2016
+.Dd September 18, 2016
 .Dt RC.SUBR 8
 .Os
 .Sh NAME
@@ -105,17 +105,7 @@ Make a backup copy of
 .Ar file
 into
 .Ar current .
-If the
-.Xr rc.conf 5
-variable
-.Va backup_uses_rcs
-is
-.Dq Li YES ,
-use
-.Xr rcs 1
-to archive the previous version of
-.Ar current ,
-otherwise save the previous version of
+Save the previous version of
 .Ar current
 as
 .Ar backup .
@@ -129,9 +119,7 @@ may be one of the following:
 .Ar file
 is now being backed up by or possibly re-entered into this backup mechanism.
 .Ar current
-is created, and if necessary, the
-.Xr rcs 1
-files are created as well.
+is created.
 .It Cm update
 .Ar file
 has changed and needs to be backed up.
@@ -139,9 +127,6 @@ If
 .Ar current
 exists, it is copied to
 .Ar backup
-or checked into
-.Xr rcs 1
-(if the repository file is old),
 and then
 .Ar file
 is copied to
@@ -149,12 +134,6 @@ is copied to
 .It Cm remove
 .Ar file
 is no longer being tracked by this backup mechanism.
-If
-.Xr rcs 1
-is being used, an empty file is checked in and
-.Ar current
-is removed,
-otherwise
 .Ar current
 is moved to
 .Ar backup .



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609181249.u8ICnNPa015121>