From owner-freebsd-current@FreeBSD.ORG Sun Aug 19 01:33:57 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49F5B16A417 for ; Sun, 19 Aug 2007 01:33:57 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 20FFA13C442 for ; Sun, 19 Aug 2007 01:33:57 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from [10.0.0.222] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id l7J1IiH7053482; Sat, 18 Aug 2007 18:18:49 -0700 (PDT) (envelope-from tim@kientzle.com) Message-ID: <46C79A74.9050703@kientzle.com> Date: Sat, 18 Aug 2007 18:18:44 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joerg Sonnenberger , "'freebsd-current@freebsd.org'" Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: RFC: #mtree signature X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 01:33:57 -0000 I'm experimenting with having bsdtar able to read mtree files and convert them into tar archives. This works quite well, although there is one stumbling block: libarchive likes to auto-detect formats and the current mtree format lacks any mandatory leading signature. Any concerns or thoughts about the following patch, which simply adds "#mtree" as the first line of every mtree file? I would also, of course, like to: * add this signature to the FreeBSD /etc/mtree/ files as a first step towards getting this convention to be more widely adopted and used, * update /etc/magic to reflect this convention, * get this added to NetBSD's "mtree" utility. Tim Kientzle Index: create.c =================================================================== RCS file: /usr/cvs/FreeBSD-CVS/src/usr.sbin/mtree/create.c,v retrieving revision 1.37 diff -u -r1.37 create.c --- create.c 29 Mar 2005 11:44:17 -0000 1.37 +++ create.c 18 Aug 2007 23:52:06 -0000 @@ -87,6 +87,7 @@ char dot[] = "."; int indent = 0; + (void)printf("#mtree\n"); if (!nflag) { (void)time(&cl); (void)gethostname(host, sizeof(host));