[Differential] [Accepted] D3175: ar: add -U (unique) option to disable -D (deterministic) mode

2015-07-23 Thread bapt (Baptiste Daroussin)
bapt accepted this revision.
bapt added a comment.

This is one of the changes I really needed!


REVISION DETAIL
  https://reviews.freebsd.org/D3175

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: emaste, imp, brooks, bapt
Cc: freebsd-toolchain-list
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Differential] [Accepted] D3175: ar: add -U (unique) option to disable -D (deterministic) mode

2015-07-23 Thread brooks (Brooks Davis)
brooks accepted this revision.
brooks added a comment.

Looks good to me


REVISION DETAIL
  https://reviews.freebsd.org/D3175

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: emaste, bapt, imp, brooks
Cc: freebsd-toolchain-list
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Differential] [Accepted] D3175: ar: add -U (unique) option to disable -D (deterministic) mode

2015-07-23 Thread imp (Warner Losh)
imp accepted this revision.
imp added a reviewer: imp.
This revision has a positive review.

REVISION DETAIL
  https://reviews.freebsd.org/D3175

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: emaste, brooks, bapt, imp
Cc: freebsd-toolchain-list
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Differential] [Request, 39 lines] D3175: ar: add -U (unique) option to disable -D (deterministic) mode

2015-07-23 Thread emaste (Ed Maste)
emaste created this revision.
emaste added reviewers: brooks, bapt.
emaste added a subscriber: freebsd-toolchain-list.

REVISION SUMMARY
  I'd like to make ar(1) produce deterministic output by default. In order to 
do so we'll first need an option to turn off deterministic mode.
  
  Note that this is against upstream ELF Tool Chain ar(1), which is a little 
different from the one in the FreeBSD tree. I plan to migrate to ELF Tool 
Chain's eventually, but this change should apply (perhaps with trivial 
modification) to FreeBSD's.

REVISION DETAIL
  https://reviews.freebsd.org/D3175

AFFECTED FILES
  ar/ar.1
  ar/ar.c

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: emaste, brooks, bapt
Cc: freebsd-toolchain-list
diff --git a/ar/ar.c b/ar/ar.c
--- a/ar/ar.c
+++ b/ar/ar.c
@@ -123,15 +123,18 @@
 	len = strlen(bsdar->progname);
 	if (len >= strlen("ranlib") &&
 	strcmp(bsdar->progname + len - strlen("ranlib"), "ranlib") == 0) {
-		while ((opt = getopt_long(argc, argv, "tDV", longopts,
+		while ((opt = getopt_long(argc, argv, "tDUV", longopts,
 		NULL)) != -1) {
 			switch(opt) {
 			case 't':
 /* Ignored. */
 break;
 			case 'D':
 bsdar->options |= AR_D;
 break;
+			case 'U':
+bsdar->options &= ~AR_D;
+break;
 			case 'V':
 bsdar_version();
 break;
@@ -169,7 +172,7 @@
 		}
 	}
 
-	while ((opt = getopt_long(argc, argv, "abCcdDfF:ijlMmopqrSsTtuVvxz",
+	while ((opt = getopt_long(argc, argv, "abCcdDfF:ijlMmopqrSsTtUuVvxz",
 	longopts, NULL)) != -1) {
 		switch(opt) {
 		case 'a':
@@ -237,6 +240,9 @@
 		case 't':
 			set_mode(bsdar, opt);
 			break;
+		case 'U':
+			bsdar->options &= ~AR_D;
+			break;
 		case 'u':
 			bsdar->options |= AR_U;
 			break;
@@ -400,7 +406,8 @@
   -DUse fixed metadata, for consistent archive checksums.\n\
   -F FORMAT | --flavor=FORMAT\n\
 Create archives with the specified format.\n\
-  -SDo not generate an archive symbol table.\n"
+  -SDo not generate an archive symbol table.\n\
+  -UUse original metadata, for unique archive checksums.\n"
 
 static void
 bsdar_usage(void)
@@ -415,6 +422,7 @@
   Options:\n\
   -t  (This option is accepted, but ignored).\n\
   -D  Use fixed metadata, for consistent archive checksums.\n\
+  -U  Use original metadata, for unique archive checksums.\n\
   -V  Print a version identifier and exit.\n"
 
 static void
diff --git a/ar/ar.1 b/ar/ar.1
--- a/ar/ar.1
+++ b/ar/ar.1
@@ -23,7 +23,7 @@
 .\"
 .\" $Id$
 .\"
-.Dd December 10, 2012
+.Dd July 23, 2015
 .Os
 .Dt AR 1
 .Sh NAME
@@ -66,6 +66,7 @@
 .Op Fl f
 .Op Fl F Ar flavor | Fl -flavor Ar flavor
 .Op Fl s | Fl S
+.Op Fl U
 .Op Fl v
 .Op Fl z
 .Ar archive
@@ -83,14 +84,16 @@
 .Op Fl j
 .Op Fl s | Fl S
 .Op Fl u
+.Op Fl U
 .Op Fl v
 .Op Fl z
 .Ar archive
 .Ar
 .Nm
 .Fl s
 .Op Fl D
 .Op Fl j
+.Op Fl U
 .Op Fl z
 .Ar archive
 .Nm
@@ -203,6 +206,12 @@
 .Ar .
 This ensures that checksums on the resulting archives are reproducible
 when member contents are identical.
+If the
+.It Fl D
+and
+.It Fl U
+options are both specified, the one specified later in the command line
+takes effect.
 .It Fl f
 Synonymous with option
 .Fl T .
@@ -335,6 +344,20 @@
 .Ar
 will be extracted only if they are newer than the corresponding
 files in the file system.
+.It Fl U
+When used in combination with the
+.Fl r
+or
+.Fl q
+option, insert the real mtime, uid and gid, and file mode values
+from the members named by arguments
+.Ar .
+If the
+.It Fl D
+and
+.It Fl U
+options are both specified, the one specified later in the command line
+takes effect.
 .It Fl v
 Provide verbose output.
 When used with the

___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

[Differential] [Accepted] D2338: readelf: avoid division by zero for files with invalid sh_entsize

2015-07-23 Thread brooks (Brooks Davis)
brooks accepted this revision.
brooks added a comment.
This revision has a positive review.

Looks good to me.


REVISION DETAIL
  https://reviews.freebsd.org/D2338

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: emaste, brooks
Cc: brooks, freebsd-toolchain-list
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Differential] [Commented On] D2338: readelf: avoid division by zero for files with invalid sh_entsize

2015-07-23 Thread emaste (Ed Maste)
emaste added a comment.

Yes - sorry for the delay. I realized I had a newer implementation that 
factored the divide-by-zero checks into a  helper function, and uploaded the 
new diff a few days ago.


REVISION DETAIL
  https://reviews.freebsd.org/D2338

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: emaste, brooks
Cc: brooks, freebsd-toolchain-list
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Differential] [Commented On] D2338: readelf: avoid division by zero for files with invalid sh_entsize

2015-07-23 Thread brooks (Brooks Davis)
brooks added a comment.

Is this still live?


REVISION DETAIL
  https://reviews.freebsd.org/D2338

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: emaste, brooks
Cc: brooks, freebsd-toolchain-list
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"