From nobody@FreeBSD.org  Tue May 26 11:10:02 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 65429106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 26 May 2009 11:10:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 53BE68FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 26 May 2009 11:10:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n4QBA1Lc049308
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 26 May 2009 11:10:01 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n4QBA1QV049307;
	Tue, 26 May 2009 11:10:01 GMT
	(envelope-from nobody)
Message-Id: <200905261110.n4QBA1QV049307@www.freebsd.org>
Date: Tue, 26 May 2009 11:10:01 GMT
From: Helmut Schneider <jumper99@gmx.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: gzip always stores time stamp since 6.3-RELEASE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         134955
>Category:       bin
>Synopsis:       gzip(1) always stores time stamp since 6.3-RELEASE [regression]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 26 11:20:01 UTC 2009
>Closed-Date:    Tue Jul 21 04:30:01 UTC 2009
>Last-Modified:  Tue Jul 21 04:30:01 UTC 2009
>Originator:     Helmut Schneider
>Release:        7.2-RELEASE
>Organization:
>Environment:
>Description:
Since 6.3 (according to the manual) -n (--no-name) does store the timestamp of a file. With 6.2 gzip behaved as expected.

http://www.freebsd.org/cgi/man.cgi?query=gzip&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE&format=html
http://www.freebsd.org/cgi/man.cgi?query=gzip&apropos=0&sektion=0&manpath=FreeBSD+6.3-RELEASE&format=html
http://www.gnu.org/software/gzip/manual/gzip.html#Sample

Problem: 2 archives cannot easily be compared e.g. using CRC even if the files are identical but have a different time stamp. One must either extract the files, use -vl and cut the CRC, ...
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Tue May 26 23:12:32 UTC 2009 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=134955 
State-Changed-From-To: open->feedback 
State-Changed-By: delphij 
State-Changed-When: Wed Jun 24 21:48:19 UTC 2009 
State-Changed-Why:  
Dear submitter, 

It looks like that this is a documentary problem, with gzip(1) doing the 
right thing.  I've committed a fix against head.  In the meantime I don't 
really understand what we can do for your problem #2? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=134955 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/134955: commit references a PR
Date: Wed, 24 Jun 2009 21:51:15 +0000 (UTC)

 Author: delphij
 Date: Wed Jun 24 21:51:02 2009
 New Revision: 194916
 URL: http://svn.freebsd.org/changeset/base/194916
 
 Log:
   Sync with NetBSD:
    - gzip -n does not store timestamp; [1]
    - Reduce diff against NetBSD by moving some casts in our local
      versions.
   
   PR:		bin/134955
   Obtained from:	NetBSD
   MFC after:	1 month
 
 Modified:
   head/usr.bin/gzip/gzip.1
   head/usr.bin/gzip/gzip.c
   head/usr.bin/gzip/zuncompress.c
 
 Modified: head/usr.bin/gzip/gzip.1
 ==============================================================================
 --- head/usr.bin/gzip/gzip.1	Wed Jun 24 21:39:50 2009	(r194915)
 +++ head/usr.bin/gzip/gzip.1	Wed Jun 24 21:51:02 2009	(r194916)
 @@ -1,4 +1,4 @@
 -.\"	$NetBSD: gzip.1,v 1.19 2008/05/29 14:51:27 mrg Exp $
 +.\"	$NetBSD: gzip.1,v 1.20 2009/04/01 08:15:37 mrg Exp $
  .\"
  .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green
  .\" All rights reserved.
 @@ -25,7 +25,7 @@
  .\" SUCH DAMAGE.
  .\"
  .\" $FreeBSD$
 -.Dd June 30, 2008
 +.Dd June 24, 2009
  .Dt GZIP 1
  .Os
  .Sh NAME
 @@ -152,8 +152,8 @@ embedded in the file.
  This option causes the stored filename in the input file to be used
  as the output file.
  .It Fl n , -no-name
 -This option stops the filename from being stored in the output
 -file.
 +This option stops the filename and timestamp from being stored in
 +the output file.
  .It Fl q , -quiet
  With this option, no warnings or errors are printed.
  .It Fl r , -recursive
 @@ -206,7 +206,7 @@ This implementation of
  was ported based on the
  .Nx
  .Nm
 -20060927, and first appeared in
 +20090412, and first appeared in
  .Fx 7.0 .
  .Sh AUTHORS
  This implementation of
 
 Modified: head/usr.bin/gzip/gzip.c
 ==============================================================================
 --- head/usr.bin/gzip/gzip.c	Wed Jun 24 21:39:50 2009	(r194915)
 +++ head/usr.bin/gzip/gzip.c	Wed Jun 24 21:51:02 2009	(r194916)
 @@ -1,4 +1,4 @@
 -/*	$NetBSD: gzip.c,v 1.92 2008/07/21 14:19:22 lukem Exp $	*/
 +/*	$NetBSD: gzip.c,v 1.94 2009/04/12 10:31:14 lukem Exp $	*/
  
  /*-
   * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
 @@ -1360,10 +1360,10 @@ file_uncompress(char *file, char *outfil
  #ifndef SMALL
  	if (method == FT_GZIP && Nflag) {
  		unsigned char ts[4];	/* timestamp */
 -		int rv;
 +		ssize_t rv;
  
  		rv = pread(fd, ts, sizeof ts, GZIP_TIMESTAMP);
 -		if (rv >= 0 && (size_t)rv < sizeof ts)
 +		if (rv >= 0 && rv < (ssize_t)(sizeof ts))
  			goto unexpected_EOF;
  		if (rv == -1) {
  			if (!fflag)
 
 Modified: head/usr.bin/gzip/zuncompress.c
 ==============================================================================
 --- head/usr.bin/gzip/zuncompress.c	Wed Jun 24 21:39:50 2009	(r194915)
 +++ head/usr.bin/gzip/zuncompress.c	Wed Jun 24 21:51:02 2009	(r194916)
 @@ -1,4 +1,4 @@
 -/*	$NetBSD: zuncompress.c,v 1.6 2005/11/22 09:05:30 mrg Exp $ */
 +/*	$NetBSD: zuncompress.c,v 1.7 2009/04/12 10:31:14 lukem Exp $ */
  
  /*-
   * Copyright (c) 1985, 1986, 1992, 1993
 @@ -147,7 +147,7 @@ zuncompress(FILE *in, FILE *out, char *p
  		compressed_pre = NULL;
  
  	while ((bin = fread(buf, 1, sizeof(buf), in)) != 0) {
 -		if (tflag == 0 && fwrite(buf, 1, bin, out) != (size_t)bin) {
 +		if (tflag == 0 && (off_t)fwrite(buf, 1, bin, out) != bin) {
  			free(buf);
  			return -1;
  		}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: delphij 
State-Changed-When: Tue Jul 21 04:27:45 UTC 2009 
State-Changed-Why:  
Patch applied against HEAD, 7-STABLE and 6-STABLE (document 
timestamp is not being stored with the same switch). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=134955 
>Unformatted:
