From cperciva@www.idlepower.net  Thu Nov 28 03:44:56 2002
Return-Path: <cperciva@www.idlepower.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id CA67837B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 28 Nov 2002 03:44:56 -0800 (PST)
Received: from www.idlepower.net (h24-79-84-133.vc.shawcable.net [24.79.84.133])
	by mx1.FreeBSD.org (Postfix) with SMTP id E198943E4A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 28 Nov 2002 03:44:55 -0800 (PST)
	(envelope-from cperciva@www.idlepower.net)
Received: (qmail 50373 invoked by uid 1000); 28 Nov 2002 11:44:48 -0000
Received: (for user cperciva)
Message-Id: <20021128114448.50371.qmail@www.idlepower.net>
Date: 28 Nov 2002 11:44:48 -0000
From: Colin Percival <cperciva@sfu.ca>
Reply-To: Colin Percival <cperciva@sfu.ca>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Fortune files are needlessly randomized
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         45817
>Category:       bin
>Synopsis:       [PATCH] Fortune files are needlessly randomized
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 28 03:50:01 PST 2002
>Closed-Date:    Thu Jul 10 01:14:42 PDT 2003
>Last-Modified:  Thu Jul 10 01:14:42 PDT 2003
>Originator:     Colin Percival
>Release:        FreeBSD 5.0-CURRENT
>Organization:
>Environment:
System: All versions of FreeBSD including the fortunes.
>Description:
In the build process, fortune files are randomized.  This is
1. Entirely pointless, since fortune(6) performs its own randomization, and
2. Causes the fortune files to be different every time they are rebuilt.
   This will set off flags in any process which compares file checksums (to
   determine if files have been tampered with, or to determine which files
   need to be redistributed following a rebuild.)
>How-To-Repeat:
Build the fortune files twice, and compare their md5sums.
>Fix:
Remove the -r flag in the call to strfile:

--- fortune.patch begins here ---
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/src/games/fortune/datfiles/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- Makefile	10 Nov 2002 23:41:01 -0000	1.29
+++ Makefile	28 Nov 2002 11:21:22 -0000
@@ -29,12 +29,12 @@
 .for f in fortunes fortunes2 fortunes2-o freebsd-tips gerrold.limerick limerick murphy murphy-o startrek zippy
 $f.dat: $f
 	PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \
-	    strfile -Crs ${.ALLSRC} ${.TARGET}
+	    strfile -Cs ${.ALLSRC} ${.TARGET}
 .endfor
 
 fortunes-o.dat: fortunes-o
 	PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \
-	    strfile -Crsx ${.ALLSRC} ${.TARGET}
+	    strfile -Csx ${.ALLSRC} ${.TARGET}
 
 fortunes-o: fortunes-o.${TYPE}
 	tr a-zA-Z n-za-mN-ZA-M < ${.ALLSRC} > ${.TARGET}
--- fortune.patch ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Fri May 30 22:32:13 PDT 2003 
Responsible-Changed-Why:  
This does seem silly.  I'll investigate this further. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=45817 
State-Changed-From-To: open->patched 
State-Changed-By: murray 
State-Changed-When: Thu Jun 19 00:02:15 PDT 2003 
State-Changed-Why:  
Patch applied to -CURRENT.  I will MFC to stable in a week or so. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=45817 
State-Changed-From-To: patched->closed 
State-Changed-By: murray 
State-Changed-When: Thu Jul 10 01:14:20 PDT 2003 
State-Changed-Why:  
This change has been MFCed.  Thanks for the submission and sorry for 
the delay. 


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