From owner-ctm-users@FreeBSD.ORG Wed Aug 10 03:06:08 2011 Return-Path: Delivered-To: ctm-users@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C18EE106566C for ; Wed, 10 Aug 2011 03:06:08 +0000 (UTC) (envelope-from stephen@missouri.edu) Received: from wilberforce.math.missouri.edu (wilberforce.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3B58FC1A for ; Wed, 10 Aug 2011 03:06:08 +0000 (UTC) Received: from [127.0.0.1] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.4/8.14.4) with ESMTP id p7A367Ae063536 for ; Tue, 9 Aug 2011 22:06:07 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <4E41F59F.9020201@missouri.edu> Date: Tue, 09 Aug 2011 22:06:07 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: "ctm-users@freebsd.org" Content-Type: multipart/mixed; boundary="------------090306070104000700080905" Subject: Use of xz instead of gzip X-BeenThere: ctm-users@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CTM User discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2011 03:06:08 -0000 This is a multi-part message in MIME format. --------------090306070104000700080905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit It seems that xz has much better compression than gzip. How do people feel about moving CTM to use xz instead of gzip? This will give about a 40% reduction in the size of the CTM files. In particular, if I start putting SVN on CTM, this will save about 3G. It requires two things: First, the attached patch needs to be applied to /usr/src. (Any committers willing to commit it? It needs to MFC'ed rather quickly if I start using xz.) Secondly, if your version of FreeBSD is old (like 7.x or older) you need to install the archivers/xz port. If you don't, when you attempt to apply ctm to a "xz" compressed file, it replies with a rather helpful message "xz not found." Stephen --------------090306070104000700080905 Content-Type: text/plain; name="ddd" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ddd" diff -ur ~/FreeBSD-8/src/usr.sbin/ctm/ctm/ctm.c usr.sbin/ctm/ctm/ctm.c --- /home/stephen/FreeBSD-8/src/usr.sbin/ctm/ctm/ctm.c 2011-08-09 16:38:22.000000000 -0500 +++ usr.sbin/ctm/ctm/ctm.c 2011-08-09 21:11:31.000000000 -0500 @@ -211,6 +211,12 @@ strcat(p,filename); f = popen(p,"r"); if(!f) { warn("%s", p); return Exit_Garbage; } + } else if(p && !strcmp(p,".xz")) { + p = alloca(20 + strlen(filename)); + strcpy(p,"xz -dc < "); + strcat(p,filename); + f = popen(p,"r"); + if(!f) { warn("%s", p); return Exit_Garbage; } } else { p = 0; f = fopen(filename,"r"); --------------090306070104000700080905--