NetBSD Problem Report #50116

From wiz@yt.nih.at  Mon Aug  3 13:46:46 2015
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6FD44A654F
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  3 Aug 2015 13:46:46 +0000 (UTC)
Message-Id: <20150803134637.D84F22AC113@yt.nih.at>
Date: Mon,  3 Aug 2015 15:46:37 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: MKREPRO: PostScript files include time stamp
X-Send-Pr-Version: 3.95

>Number:         50116
>Category:       misc
>Synopsis:       MKREPRO: PostScript files include time stamp
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 03 13:50:00 +0000 2015
>Closed-Date:    Thu Aug 06 08:45:01 +0000 2015
>Last-Modified:  Thu Aug 06 08:45:01 +0000 2015
>Originator:     Thomas Klausner
>Release:        NetBSD 7.99.20
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:


Architecture: x86_64
Machine: amd64
>Description:
Found in the debian MKREPRO builds for NetBSD:
Quite a number of PostScript files are built and gzipped, and they do
include timestamps -- once inside the .ps file, and a second one in the
.gz file.
This makes consecutive builds of the same tree differ.
>How-To-Repeat:
Look at /usr/share/doc, e.g. papers/mckusick84-ffs/mckusick84-ffs.ps.gz,
or morris*/*ps.gz or psd/*ps.gz, or reference/ref1/*/*.ps.gz, but at first glance
basically every *.ps.gz file there.
>Fix:
Do not include a
%%CreationDate:
in the PostScript files, remove it, or set it to a particular date,
like the date of the last change to the inputs, or the value of a
new MKREPROTIMESTAMP variable.

Then, find a similar solution for the time stamps inside the gzip(1)
headers of the .gz files.

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
Date: Mon, 3 Aug 2015 17:13:50 +0000

 On Mon, Aug 03, 2015 at 01:50:00PM +0000, Thomas Klausner wrote:
  > Do not include a
  > %%CreationDate:
  > in the PostScript files, remove it, or set it to a particular date,
  > like the date of the last change to the inputs, or the value of a
  > new MKREPROTIMESTAMP variable.

 Do you know how to make groff do this? Or do we have to hack it? Or is
 this problem going to sit around until we find a way to move to pdf
 files? :-/

  > Then, find a similar solution for the time stamps inside the gzip(1)
  > headers of the .gz files.

 same...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
Date: Mon, 3 Aug 2015 20:26:22 +0200

 On Mon, Aug 03, 2015 at 05:15:00PM +0000, David Holland wrote:
 >  On Mon, Aug 03, 2015 at 01:50:00PM +0000, Thomas Klausner wrote:
 >   > Do not include a
 >   > %%CreationDate:
 >   > in the PostScript files, remove it, or set it to a particular date,
 >   > like the date of the last change to the inputs, or the value of a
 >   > new MKREPROTIMESTAMP variable.
 >  
 >  Do you know how to make groff do this? Or do we have to hack it? Or is
 >  this problem going to sit around until we find a way to move to pdf
 >  files? :-/

 Reading src/gnu/dist/groff/src/devices/grops/ps.cpp I see that it's
 hardcoded that it'll always produce it.

 How about a postprocessing step that just does 'grep -v ^%%CreationDate:'?

 >   > Then, find a similar solution for the time stamps inside the gzip(1)
 >   > headers of the .gz files.
 >  
 >  same...

 Well, that one's easy: choose one of the methods-to-be-decided-upon in
 PR 50119 and touch the file to that date _before_ gzippping it.
  Thomas

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
Date: Tue, 4 Aug 2015 08:34:51 +0000

 On Mon, Aug 03, 2015 at 06:30:01PM +0000, Thomas Klausner wrote:
  >  Reading src/gnu/dist/groff/src/devices/grops/ps.cpp I see that it's
  >  hardcoded that it'll always produce it.
  >  
  >  How about a postprocessing step that just does 'grep -v ^%%CreationDate:'?

 Will that break the file? I suppose probably not.

  >  >   > Then, find a similar solution for the time stamps inside the gzip(1)
  >  >   > headers of the .gz files.
  >  >  
  >  >  same...
  >  
  >  Well, that one's easy: choose one of the methods-to-be-decided-upon in
  >  PR 50119 and touch the file to that date _before_ gzippping it.

 an easier way that doesn't confuse make: gzip -n

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50116 CVS commit: src/share/mk
Date: Tue, 4 Aug 2015 08:36:14 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Tue Aug  4 08:36:14 UTC 2015

 Modified Files:
 	src/share/mk: bsd.doc.mk

 Log Message:
 Remove CreationDate from the header of output postscript. Also, feed -n
 to gzip when compressing so it doesn't store the timestamp in the file
 header. For MKREPRO, but unconditional as the information omitted isn't
 particularly useful. PR 50116.


 To generate a diff of this commit:
 cvs rdiff -u -r1.67 -r1.68 src/share/mk/bsd.doc.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: John Nemeth <jnemeth@cue.bc.ca>
To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org,
        Thomas Klausner <wiz@NetBSD.org>
Cc: 
Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
Date: Tue, 4 Aug 2015 02:24:55 -0700

 On Aug 4,  8:35am, David Holland wrote:
 }
 } The following reply was made to PR misc/50116; it has been noted by GNATS.
 } 
 } From: David Holland <dholland-bugs@netbsd.org>
 } To: gnats-bugs@NetBSD.org
 } Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
 } Date: Tue, 4 Aug 2015 08:34:51 +0000
 } 
 }  On Mon, Aug 03, 2015 at 06:30:01PM +0000, Thomas Klausner wrote:
 }   >  Reading src/gnu/dist/groff/src/devices/grops/ps.cpp I see that it's
 }   >  hardcoded that it'll always produce it.
 }   >  
 }   >  How about a postprocessing step that just does 'grep -v ^%%CreationDate:'?
 }  
 }  Will that break the file? I suppose probably not.

      "%" is the PostScript comment indicator.  From "PostScript Language
 Reference Manual  Second Edition":

 %%CreationDate:	<textline>

 		The comment indicates the date and time the document was
 		created.  Neither the date nor time need be in any standard
 		format.  This comment is meant to be used purely for
 		informational purposes, such as printing on banner pages.

 In other words, leaving it out won't break the file.  Hopefully there
 aren't any tools that demand it.  If there is, the tool is probably
 broken anyways.

 }-- End of excerpt from David Holland

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 05 Aug 2015 06:50:06 +0000
State-Changed-Why:
Did that catch all of them or are there stragglers?


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
Date: Wed, 5 Aug 2015 06:49:35 +0000

 On Tue, Aug 04, 2015 at 09:25:01AM +0000, John Nemeth wrote:
  >  }   >  How about a postprocessing step that just does 'grep -v ^%%CreationDate:'?
  >  }  
  >  }  Will that break the file? I suppose probably not.
  >  
  >       "%" is the PostScript comment indicator.  From "PostScript Language
  >  Reference Manual  Second Edition":
  >  
  >  %%CreationDate:	<textline>
  >  
  >  		The comment indicates the date and time the document was
  >  		created.  Neither the date nor time need be in any standard
  >  		format.  This comment is meant to be used purely for
  >  		informational purposes, such as printing on banner pages.
  >  
  >  In other words, leaving it out won't break the file.  Hopefully there
  >  aren't any tools that demand it.  If there is, the tool is probably
  >  broken anyways.

 Yes, except that at least some programs examine or check the comment
 at the beginning of a postscript file to determine if it is, in fact,
 a postscript file.

 One possible way for this change to go wrong is that lpr and/or
 printers stop recognizing the files as postscript and print the
 postscript as text... probably this is not going to be an issue with
 just removing CreationDate. I hope.

 -- 
 David A. Holland
 dholland@netbsd.org

From: John Nemeth <jnemeth@cue.bc.ca>
To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org, gnats-admin@netbsd.org,
        netbsd-bugs@netbsd.org, Thomas Klausner <wiz@NetBSD.org>
Cc: 
Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
Date: Wed, 5 Aug 2015 05:54:12 -0700

 On Aug 5,  7:05am, David Holland wrote:
 } Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
 } The following reply was made to PR misc/50116; it has been noted by GNATS.
 } 
 } From: David Holland <dholland-bugs@netbsd.org>
 } To: gnats-bugs@NetBSD.org
 } Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
 } Date: Wed, 5 Aug 2015 06:49:35 +0000
 } 
 }  On Tue, Aug 04, 2015 at 09:25:01AM +0000, John Nemeth wrote:
 }   >  }   >  How about a postprocessing step that just does 'grep -v ^%%CreationDate:'?
 }   >  }  
 }   >  }  Will that break the file? I suppose probably not.
 }   >  
 }   >       "%" is the PostScript comment indicator.  From "PostScript Language
 }   >  Reference Manual  Second Edition":
 }   >  
 }   >  %%CreationDate:	<textline>
 }   >  
 }   >  		The comment indicates the date and time the document was
 }   >  		created.  Neither the date nor time need be in any standard
 }   >  		format.  This comment is meant to be used purely for
 }   >  		informational purposes, such as printing on banner pages.
 }   >  
 }   >  In other words, leaving it out won't break the file.  Hopefully there
 }   >  aren't any tools that demand it.  If there is, the tool is probably
 }   >  broken anyways.
 }  
 }  Yes, except that at least some programs examine or check the comment
 }  at the beginning of a postscript file to determine if it is, in fact,
 }  a postscript file.
 }  
 }  One possible way for this change to go wrong is that lpr and/or
 }  printers stop recognizing the files as postscript and print the
 }  postscript as text... probably this is not going to be an issue with
 }  just removing CreationDate. I hope.

       Many PostScript documents will start with this line:

 %!PS-Adobe-3.0

 However, they are only allowed to do so if they conform to the
 Docuement Structuring Convention.  A shortcut in recognizing
 PostScript documents would be to look for "%!" as the first two
 characters.  Blowing up because "%%CreationDate: " is missing is
 just plain broken.  BTW, a line starting with "%%" indicates a
 special Document Structuring Convention comment.

 }-- End of excerpt from David Holland

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/50116: MKREPRO: PostScript files include time stamp
Date: Wed, 5 Aug 2015 16:53:25 +0000

 On Wed, Aug 05, 2015 at 12:20:00PM +0000, John Nemeth wrote:
  >        Many PostScript documents will start with this line:
  >  
  >  %!PS-Adobe-3.0
  >  
  >  However, they are only allowed to do so if they conform to the
  >  Docuement Structuring Convention.  A shortcut in recognizing
  >  PostScript documents would be to look for "%!" as the first two
  >  characters.  Blowing up because "%%CreationDate: " is missing is
  >  just plain broken.  BTW, a line starting with "%%" indicates a
  >  special Document Structuring Convention comment.

 Ok, fair enough. Many printers are "just plain broken" in one way or
 another, but like I said I hope it won't be a problem.

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 06 Aug 2015 08:45:01 +0000
State-Changed-Why:
Confirmed fixed, thank you!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.