Bug 83170 - [patch] Allow 'install' to compare files by mtime instead of content
Summary: [patch] Allow 'install' to compare files by mtime instead of content
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 5.4-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2005-07-09 00:10 UTC by Dan Lukes
Modified: 2017-12-31 22:36 UTC (History)
0 users

See Also:

xinstall.patch (6.59 KB, patch)
2005-07-09 00:10 UTC, Dan Lukes
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Lukes 2005-07-09 00:10:14 UTC
	Imagine large number of similar computers (for example border
routers of company branches, workstations within computer lab or so). The
compile options used during 'buildworld' are identical for all computers
within such group. When SA issued and OS patched, we should update source
tree on all machines then 'buildworld'/'installworld'. It's time expensive.

	The other way is 'buildworld' on the selected machine, export
/usr/src & /usr/obj via NFS, mount'em on other computers then do

	The standard install transfer every file despite only few files has
been changed (assuming use of -DNOCLEAN during 'buildworld'). 

	Unnecesarry transfers of large amount of data may disturb during updates of
remote computers connected via slow links. Even on fast network the reading
of large amount of data can be time consuming.

	-C option of current 'install' didn't help - the source file is transfered
during comparsion.

	I would like to suggest to create option '-q' (quick) which allow user to modify
the comparsion alghoritm. It skip comparsion of content of files but use
modification time of files instead.

	It may substantially reduce the amount of transferred data and
transfer time during such update.

	It's usefull when mtime on destination files follows the mtime on
sources only - so '-q' imply '-p' ('-p' imply '-C' already).

Fix: I suggest to add '-q' option modifying compare alghoritm when used. The
most changes are related to compare(). The 'struct stat' of both files are
passed to it so mtimes are avaiable to function if necesarry (current code
pass st_size only to it).

	The patch of manual page should be reviewed by someone who speak
english better than me.
How-To-Repeat: 	N/A
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:08 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped