From nobody@FreeBSD.org  Sat Jul  1 16:35:29 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 12DB116A407
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Jul 2006 16:35:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C2C0B44F82
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Jul 2006 16:35:28 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k61GZReB046245
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 1 Jul 2006 16:35:27 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k61GZR7O046244;
	Sat, 1 Jul 2006 16:35:27 GMT
	(envelope-from nobody)
Message-Id: <200607011635.k61GZR7O046244@www.freebsd.org>
Date: Sat, 1 Jul 2006 16:35:27 GMT
From: pri vate <nobody@nowh.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] add magic(5)/file(1) support for FreeBSD 6.1 dump(8) format
X-Send-Pr-Version: www-2.3

>Number:         99693
>Category:       bin
>Synopsis:       [patch] add magic(5)/file(1) support for FreeBSD 6.1 dump(8) format
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    antoine
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 01 16:40:18 GMT 2006
>Closed-Date:    Fri Jan 02 11:03:12 UTC 2009
>Last-Modified:  Fri Jan 02 11:03:12 UTC 2009
>Originator:     pri vate
>Release:        RELENG_6_1_0_RELEASE
>Organization:
yes it's me
>Environment:
>Description:
file(1) does not grok 6.1's new dump format (ufs2).
>How-To-Repeat:

>Fix:
the fix is ugly because it does not support the 64 bit date stamps, but here it goes anyway:

+ 
+ ##############################################################################
+ 
+ 24    belong  0x19540119      new-fs dump file (ufs2, big endian),
+ >12   belong  >0              Volume %ld,
+ >692  belong  0               Level zero, type:
+ >692  belong  >0              Level %d, type:
+ >0    belong  1               tape header,
+ >0    belong  2               beginning of file record,
+ >0    belong  3               map of inodes on tape,
+ >0    belong  4               continuation of file record,
+ >0    belong  5               end of volume,
+ >0    belong  6               map of inodes deleted,
+ >0    belong  7               end of medium (for floppy),
+ >676  string  >\0             Label %s,
+ >696  string  >\0             Filesystem %s,
+ >760  string  >\0             Device %s,
+ >824  string  >\0             Host %s,
+ >888  belong  >0              Flags %x
+ # next two are actually 64-bit times, we use only the lowermost 32 bits
+ >900  bedate  x               This dump %s,
+ >908  bedate  x               Previous dump %s,
+ 
+ 24    lelong  0x19540119      new-fs dump file (ufs2, little endian),
+ >12   lelong  >0              Volume %ld,
+ >692  lelong  0               Level zero, type:
+ >692  lelong  >0              Level %d, type:
+ >0    lelong  1               tape header,
+ >0    lelong  2               beginning of file record,
+ >0    lelong  3               map of inodes on tape,
+ >0    lelong  4               continuation of file record,
+ >0    lelong  5               end of volume,
+ >0    lelong  6               map of inodes deleted,
+ >0    lelong  7               end of medium (for floppy),
+ >676  string  >\0             Label %s,
+ >696  string  >\0             Filesystem %s,
+ >760  string  >\0             Device %s,
+ >824  string  >\0             Host %s,
+ >888  lelong  >0              Flags %x
+ # next two are actually 64-bit times, we use only the lowermost 32 bits
+ >896  ledate  x               This dump %s,
+ >904  ledate  x               Previous dump %s,

>Release-Note:
>Audit-Trail:

From: Martin Birgmeier <martin@email.aon.at>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/99693: [patch] add magic(5)/file(1) support for FreeBSD 6.1 dump(8) format
Date: Sun, 2 Jul 2006 09:58:30 +0200 (CEST)

 The 'Previous' and 'This' dump date lines should go directly after the
 'new-fs' dump lines
State-Changed-From-To: open->suspended 
State-Changed-By: kris 
State-Changed-When: Sat Aug 19 20:39:39 UTC 2006 
State-Changed-Why:  
Submitter address is invalid 

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

From: Kris Kennaway <kris@obsecurity.org>
To: pri vate <nobody@nowh.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/99693: [patch] add magic(5)/file(1) support for FreeBSD 6.1 dump(8) format
Date: Sat, 19 Aug 2006 16:34:26 -0400

 > the fix is ugly because it does not support the 64 bit date stamps, but here it goes anyway:
 
 This should probably be submitted to the file maintainers since that
 utility is not separately maintained by FreeBSD (and perhaps
 "de-uglified" first).
 
 Kris

From: Antoine Brodin <antoine@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/99693: [patch] add magic(5)/file(1) support for FreeBSD 6.1
 dump(8) format
Date: Thu, 7 Feb 2008 19:35:03 +0100

 This is a multi-part message in MIME format.
 
 --Multipart=_Thu__7_Feb_2008_19_35_03_+0100_YFrFONxarmx4+w7O
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 
 The attached patch has been submitted upstream.
 It handles 64bit dates correctly.
 
 --Multipart=_Thu__7_Feb_2008_19_35_03_+0100_YFrFONxarmx4+w7O
 Content-Type: text/x-diff;
  name="file-4.23-dump-ufs2.diff"
 Content-Disposition: attachment;
  filename="file-4.23-dump-ufs2.diff"
 Content-Transfer-Encoding: 7bit
 
 --- file-4.23/magic/Magdir/dump.orig	2008-02-06 19:58:22.000000000 +0100
 +++ file-4.23/magic/Magdir/dump	2008-02-06 20:38:00.000000000 +0100
 @@ -91,3 +91,41 @@
  >0	leshort	5		end of volume.
  >0	leshort	6		map of inodes deleted.
  >0	leshort	7		end of medium (for floppy).
 +
 +24	belong	0x19540119	new-fs dump file (ufs2, big endian),
 +>896	beqldate	x		Previous dump %s,
 +>904	beqldate	x		This dump %s,
 +>12	belong	>0		Volume %ld,
 +>692	belong	0		Level zero, type:
 +>692	belong	>0		Level %d, type:
 +>0	belong	1		tape header,
 +>0	belong	2		beginning of file record,
 +>0	belong	3		map of inodes on tape,
 +>0	belong	4		continuation of file record,
 +>0	belong	5		end of volume,
 +>0	belong	6		map of inodes deleted,
 +>0	belong	7		end of medium (for floppy),
 +>676	string	>\0		Label %s,
 +>696	string	>\0		Filesystem %s,
 +>760	string	>\0		Device %s,
 +>824	string	>\0		Host %s,
 +>888	belong	>0		Flags %x
 +
 +24	lelong	0x19540119	new-fs dump file (ufs2, little endian),
 +>896	leqldate	x		This dump %s,
 +>904	leqldate	x		Previous dump %s,
 +>12	lelong	>0		Volume %ld,
 +>692	lelong	0		Level zero, type:
 +>692	lelong	>0		Level %d, type:
 +>0	lelong	1		tape header,
 +>0	lelong	2		beginning of file record,
 +>0	lelong	3		map of inodes on tape,
 +>0	lelong	4		continuation of file record,
 +>0	lelong	5		end of volume,
 +>0	lelong	6		map of inodes deleted,
 +>0	lelong	7		end of medium (for floppy),
 +>676	string	>\0		Label %s,
 +>696	string	>\0		Filesystem %s,
 +>760	string	>\0		Device %s,
 +>824	string	>\0		Host %s,
 +>888	lelong	>0		Flags %x
 
 
 --Multipart=_Thu__7_Feb_2008_19_35_03_+0100_YFrFONxarmx4+w7O--
Responsible-Changed-From-To: freebsd-bugs->antoine 
Responsible-Changed-By: antoine 
Responsible-Changed-When: Thu Feb 7 19:21:29 UTC 2008 
Responsible-Changed-Why:  
Take this PR.  Hopefully it can be fixed with next vendor release/import. 
Approved by:	rwatson (mentor) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99693 
State-Changed-From-To: suspended->closed 
State-Changed-By: antoine 
State-Changed-When: Fri Jan 2 11:01:18 UTC 2009 
State-Changed-Why:  
Close: this is fixed in head with file 4.26 import. 
If you don't use head, you can take file 4.26 from the ports tree. 

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