bin/54365: [PATCH] add -u option to install(1) for SysV compatibility

Georg-W. Koltermann gwk at
Fri Jul 11 04:50:16 PDT 2003

>Number:         54365
>Category:       bin
>Synopsis:       [PATCH] add -u option to install(1) for SysV compatibility
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 11 04:50:12 PDT 2003
>Originator:     Georg-W. Koltermann
>Release:        FreeBSD 5.1-RELEASE i386
System: FreeBSD 5.1-RELEASE FreeBSD 5.1-RELEASE #1: Fri Jul 4 12:25:16 CEST 2003 root at i386

I have some Makefiles originally destined for a System V system which
use "install -u user" to set the owner of the files during install.
Instead of hacking the Makefiles again and again after every CVS update,
I prefer to let install(1) recognize the -u option as synonymous to -o.

See fix section for my patch.


--- usr.bin/xinstall/xinstall.c.old	Mon Jun 23 14:27:31 2003
+++ usr.bin/xinstall/xinstall.c	Mon Jun 23 14:29:13 2003
@@ -112,7 +112,7 @@
 	iflags = 0;
 	group = owner = NULL;
-	while ((ch = getopt(argc, argv, "B:bCcdf:g:Mm:o:pSsv")) != -1)
+	while ((ch = getopt(argc, argv, "B:bCcdf:g:Mm:o:u:pSsv")) != -1)
 		switch((char)ch) {
 		case 'B':
 			suffix = optarg;
@@ -149,6 +149,7 @@
 		case 'o':
+		case 'u':
 			owner = optarg;
 		case 'p':
--- usr.bin/xinstall/install.1.old	Mon Jun 23 14:34:38 2003
+++ usr.bin/xinstall/install.1	Mon Jun 23 14:35:28 2003
@@ -164,6 +164,12 @@
 showing files as they are installed or backed up.
+.Fl u
+option is treated as synonymous with
+.Fl o
+for compatibility with some System V versions.
 By default,
 preserves all file flags, with the exception of the


More information about the freebsd-bugs mailing list