From mm@mail.vx.sk  Wed May  5 13:39:05 2010
Return-Path: <mm@mail.vx.sk>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id BC4D31065673
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 May 2010 13:39:05 +0000 (UTC)
	(envelope-from mm@mail.vx.sk)
Received: from mail.vx.sk (core.vx.sk [188.40.32.143])
	by mx1.freebsd.org (Postfix) with ESMTP id 39E018FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 May 2010 13:39:04 +0000 (UTC)
Received: from core.vx.sk (localhost [127.0.0.1])
	by mail.vx.sk (Postfix) with ESMTP id A8BDF9249A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 May 2010 15:39:03 +0200 (CEST)
Received: from mail.vx.sk ([127.0.0.1])
	by core.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id uwB1jqoRLdYI for <FreeBSD-gnats-submit@freebsd.org>;
	Wed,  5 May 2010 15:39:00 +0200 (CEST)
Received: by mail.vx.sk (Postfix, from userid 1001)
	id 521DD9248B; Wed,  5 May 2010 15:39:00 +0200 (CEST)
Message-Id: <20100505133900.521DD9248B@mail.vx.sk>
Date: Wed,  5 May 2010 15:39:00 +0200 (CEST)
From: Martin Matuska <mm@FreeBSD.org>
Reply-To: Martin Matuska <mm@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] add xz support to bsd.port.mk
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         146329
>Category:       ports
>Synopsis:       [patch] add xz support to bsd.port.mk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 05 13:40:01 UTC 2010
>Closed-Date:    Fri Jun 04 08:09:43 UTC 2010
>Last-Modified:  Fri Jun  4 08:10:05 UTC 2010
>Originator:     Martin Matuska
>Release:        FreeBSD 8.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.0-STABLE FreeBSD 8.0-STABLE #0 r207610M: Tue May 4 10:15:14 CEST 2010 root@neo.vx.sk:/usr/obj/stable/sys/NEO amd64
>Description:
Many ports offer nowadays LZMA compressed distfiles (.tar.xz) that
give (much) better compression than bzip2.

The attached patch updates bsd.port.mk and bsd.commands.mk to
support the USE_XZ flag for xz compressed files.

http://tukaani.org/xz/
>How-To-Repeat:
>Fix:
Index: ports/Mk/bsd.commands.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.commands.mk,v
retrieving revision 1.4
diff -u -r1.4 bsd.commands.mk
--- ports/Mk/bsd.commands.mk	3 Aug 2009 15:36:58 -0000	1.4
+++ ports/Mk/bsd.commands.mk	5 May 2010 12:35:43 -0000
@@ -91,6 +91,7 @@
 WHICH?=		/usr/bin/which
 XARGS?=		/usr/bin/xargs
 XMKMF?=		${LOCALBASE}/bin/xmkmf -a
+XZ_CMD?=	${LOCALBASE}/bin/xz
 YACC?=		/usr/bin/yacc
 
 .if exists(/sbin/md5)
Index: ports/Mk/bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.637
diff -u -r1.637 bsd.port.mk
--- ports/Mk/bsd.port.mk	27 Apr 2010 21:58:23 -0000	1.637
+++ ports/Mk/bsd.port.mk	5 May 2010 12:35:44 -0000
@@ -94,7 +94,8 @@
 # EXTRACT_SUFX	- Suffix for archive names
 #				  You never have to set both DISTFILES and EXTRACT_SUFX.
 #				  Default: .tar.bz2 if USE_BZIP2 is set, .zip if USE_ZIP is
-#				  set, .run if USE_MAKESELF is set, .tar.gz otherwise).
+#				  set, .tar.xz if USE_XZ is set, .run if USE_MAKESELF is set, 
+#				  .tar.gz otherwise).
 # MASTER_SITES	- Primary location(s) for distribution files if not found
 #				  locally.  See bsd.sites.mk for common choices for
 #				  MASTER_SITES.
@@ -296,6 +297,8 @@
 #
 # USE_BZIP2		- If set, this port tarballs use bzip2, not gzip, for
 #				  compression.
+# USE_XZ		- If set, this port tarballs use xz (lzma)
+#				  for compression
 # USE_ZIP		- If set, this port distfile uses zip, not tar w/[bg]zip
 #				  for compression.
 # USE_MAKESELF		- If set, this port distfile uses makeself, not tar w/[bg]zip
@@ -1413,6 +1416,8 @@
 EXTRACT_SUFX?=			.tar.bz2
 .elif defined(USE_ZIP)
 EXTRACT_SUFX?=			.zip
+.elif defined(USE_XZ)
+EXTRACT_SUFX?=			.tar.xz
 .elif defined(USE_MAKESELF)
 EXTRACT_SUFX?=			.run
 .else
@@ -1731,6 +1736,9 @@
 .if defined(USE_ZIP)
 EXTRACT_DEPENDS+=	${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
 .endif
+.if defined(USE_XZ)
+EXTRACT_DEPENDS+=	${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz
+.endif
 .if defined(USE_MAKESELF)
 EXTRACT_DEPENDS+=	unmakeself:${PORTSDIR}/archivers/unmakeself
 .endif
@@ -2368,6 +2376,8 @@
 .endif
 .if defined(USE_BZIP2)
 EXTRACT_CMD?=			${BZIP2_CMD}
+.elif defined(USE_XZ)
+EXTRACT_CMD?=			${XZ_CMD}
 .else
 EXTRACT_CMD?=			${GZIP_CMD}
 .endif
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed May 5 13:40:11 UTC 2010 
Responsible-Changed-Why:  
bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool) 

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

From: Florent Thoumie <flz@xbsd.org>
To: bug-followup@freebsd.org, mm@freebsd.org
Cc:  
Subject: Re: ports/146329: [patch] add xz support to bsd.port.mk
Date: Tue, 11 May 2010 19:33:52 +0100

 How many ports are we talking about here?
 
 I see you just added some lzma support to base system but I don't know
 whether it's compatible with archivers/xz. If it is, it might be worth
 changing the patch to use it.
 
 -- 
 Florent Thoumie
 flz@FreeBSD.org
 FreeBSD Committer

From: Martin Matuska <mm@FreeBSD.org>
To: Florent Thoumie <flz@xbsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/146329: [patch] add xz support to bsd.port.mk
Date: Tue, 11 May 2010 21:05:32 +0200

 Yes, the patch should actually detect if it is available in the base
 system and if not use the port.
 
 We are talking about many ports but not a killing number.
 
 I can give examples of ports distributing .xz or .lzma files:
 GNU is adopting this widely: grep, patch, autoconf, automake, gawk,
 libtool, wget, .....
 Others: ImageMagick, ghostscript, libpng, ....
 
 The main benefits for compressed source code are:
 a) it decompresses up twice as fast than bz2 (but always faster)
 b) it compresses much better than bz2 (I yield results of 30% and better
 in my tests) (but always better)

From: Florent Thoumie <flz@xbsd.org>
To: Martin Matuska <mm@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/146329: [patch] add xz support to bsd.port.mk
Date: Tue, 11 May 2010 20:14:27 +0100

 On Tue, May 11, 2010 at 8:05 PM, Martin Matuska <mm@freebsd.org> wrote:
 > Yes, the patch should actually detect if it is available in the base
 > system and if not use the port.
 >
 > We are talking about many ports but not a killing number.
 >
 > I can give examples of ports distributing .xz or .lzma files:
 > GNU is adopting this widely: grep, patch, autoconf, automake, gawk,
 > libtool, wget, .....
 > Others: ImageMagick, ghostscript, libpng, ....
 >
 > The main benefits for compressed source code are:
 > a) it decompresses up twice as fast than bz2 (but always faster)
 > b) it compresses much better than bz2 (I yield results of 30% and better
 > in my tests) (but always better)
 
 Beside updating the patch to use base system tools if available, could
 you follow-up with a patch to update a few ports to use USE_XZ?
 
 -- 
 Florent Thoumie
 flz@FreeBSD.org
 FreeBSD Committer

From: Martin Matuska <mm@FreeBSD.org>
To: Florent Thoumie <flz@xbsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/146329: [patch] add xz support to bsd.port.mk
Date: Wed, 12 May 2010 15:14:30 +0200

 I will start with ImageMagick right away and I would recommend
 ghostscript as well.
 
 Dňa 11. 5. 2010 21:14, Florent Thoumie wrote / napísal(a):
 > On Tue, May 11, 2010 at 8:05 PM, Martin Matuska <mm@freebsd.org> wrote:
 >   
 >> Yes, the patch should actually detect if it is available in the base
 >> system and if not use the port.
 >>
 >> We are talking about many ports but not a killing number.
 >>
 >> I can give examples of ports distributing .xz or .lzma files:
 >> GNU is adopting this widely: grep, patch, autoconf, automake, gawk,
 >> libtool, wget, .....
 >> Others: ImageMagick, ghostscript, libpng, ....
 >>
 >> The main benefits for compressed source code are:
 >> a) it decompresses up twice as fast than bz2 (but always faster)
 >> b) it compresses much better than bz2 (I yield results of 30% and better
 >> in my tests) (but always better)
 >>     
 > Beside updating the patch to use base system tools if available, could
 > you follow-up with a patch to update a few ports to use USE_XZ?
 >
 >   

From: Martin Matuska <mm@FreeBSD.org>
To: Florent Thoumie <flz@xbsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/146329: [patch] add xz support to bsd.port.mk
Date: Wed, 12 May 2010 22:39:53 +0200

 http://people.freebsd.org/~mm/patches/xz/ports-lzma.patch

From: Florent Thoumie <flz@xbsd.org>
To: Martin Matuska <mm@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/146329: [patch] add xz support to bsd.port.mk
Date: Wed, 12 May 2010 21:53:17 +0100

 On Wed, May 12, 2010 at 9:39 PM, Martin Matuska <mm@freebsd.org> wrote:
 > http://people.freebsd.org/~mm/patches/xz/ports-lzma.patch
 
 Just mentioning that the patch contains the following changes that I
 discussed with Martin over IRC:
 
 - change USE_XZ to USE_LZMA because it'll be more meaningful.
 - change default EXTRACT_SUFX to .tar.lzma as it seems more common than .tar.xz.
 
 -- 
 Florent Thoumie
 flz@FreeBSD.org
 FreeBSD Committer

From: Martin Matuska <mm@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: Florent Thoumie <flz@xbsd.org>, 
 Christian Weisgerber <naddy@FreeBSD.org>
Subject: Re: ports/146329: [patch] add xz support to bsd.port.mk
Date: Sat, 22 May 2010 13:53:37 +0200

 Here are the patches, but som ports got updated since I wrote the patches:
 
 http://people.freebsd.org/~mm/patches/xz/ports-lzma.patch
 http://people.freebsd.org/~mm/patches/xz/ports-lzma-2.patch
 
 The main question is:
 USE_LZMA or USE_XZ?
 
 Some ports use .tar.xz, some .tar.lzma (both are extractable with xz)

From: Christian Weisgerber <naddy@FreeBSD.org>
To: Martin Matuska <mm@FreeBSD.org>
Cc: bug-followup@FreeBSD.org, Florent Thoumie <flz@xbsd.org>
Subject: Re: ports/146329: [patch] add xz support to bsd.port.mk
Date: Sat, 22 May 2010 16:16:56 +0200

 Martin Matuska:
 
 > The main question is:
 > USE_LZMA or USE_XZ?
 > 
 > Some ports use .tar.xz, some .tar.lzma (both are extractable with xz)
 
 Those are different container formats.  (The container format
 provides a file(1) signature, integrity checks, etc.)
 
 Lasse Collin started the project under the name LZMA Utils and used
 a provisional container format; those are the .tar.lzma file you
 see.  When he had finished designing the permanent file format (see
 http://tukaani.org/xz/format.html), he also changed the project
 name to XZ Utils and the file suffix to .xz.  xz(1) can still extract
 the old .lzma files, but they should go away eventually.
 
 With this in mind, and speaking as the (ex-)maintainer of archivers/xz,
 I vote for USE_XZ.
 
 I disagree that USE_LZMA would be "more meaningful".  There are a
 number of different compressors that use a variant of the LZMA
 algorithm, e.g. archivers/lzip, but they don't all use the same
 file format.
 
 -- 
 Christian "naddy" Weisgerber                          naddy@mips.inka.de
Responsible-Changed-From-To: portmgr->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Mon May 31 14:11:06 UTC 2010 
Responsible-Changed-Why:  
Grab for exp 
http://people.freebsd.org/~mm/patches/xz/ports-lzma-3.patch 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146329 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Fri Jun 4 08:04:46 UTC 2010 
State-Changed-Why:  
Committed with a change of exists -> osversion 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/146329: commit references a PR
Date: Fri,  4 Jun 2010 08:09:29 +0000 (UTC)

 pav         2010-06-04 08:09:20 UTC
 
   FreeBSD ports repository
 
   Modified files:
     Mk                   bsd.commands.mk bsd.port.mk 
     devel/libtool22      Makefile distinfo 
     devel/patch          Makefile distinfo 
     dns/dnsmasq          Makefile distinfo 
     ftp/lftp             Makefile distinfo 
     ftp/wget             Makefile distinfo 
     graphics/ImageMagick Makefile distinfo 
     graphics/png         Makefile distinfo 
     japanese/font-ume    Makefile 
     math/mpfr            Makefile distinfo 
     misc/mc              Makefile distinfo 
     print/ghostscript8   Makefile distinfo 
     sysutils/coreutils   Makefile distinfo 
     textproc/gnugrep     Makefile distinfo 
   Log:
   - Introduce a new USE_XZ knob that handles lzma/xz compressed distfiles
   - Convert a bunch of ports to use it
   
   PR:             ports/146329
   Submitted by:   mm
   With hat:       portmgr
   
   Revision  Changes    Path
   1.5       +7 -1      ports/Mk/bsd.commands.mk
   1.642     +12 -2     ports/Mk/bsd.port.mk
   1.4       +2 -0      ports/devel/libtool22/Makefile
   1.3       +3 -3      ports/devel/libtool22/distinfo
   1.22      +1 -0      ports/devel/patch/Makefile
   1.8       +3 -3      ports/devel/patch/distinfo
   1.62      +3 -0      ports/dns/dnsmasq/Makefile
   1.44      +3 -3      ports/dns/dnsmasq/distinfo
   1.146     +2 -1      ports/ftp/lftp/Makefile
   1.101     +3 -3      ports/ftp/lftp/distinfo
   1.94      +2 -1      ports/ftp/wget/Makefile
   1.31      +3 -3      ports/ftp/wget/distinfo
   1.307     +2 -3      ports/graphics/ImageMagick/Makefile
   1.148     +3 -3      ports/graphics/ImageMagick/distinfo
   1.108     +1 -1      ports/graphics/png/Makefile
   1.55      +3 -3      ports/graphics/png/distinfo
   1.12      +2 -10     ports/japanese/font-ume/Makefile
   1.18      +1 -1      ports/math/mpfr/Makefile
   1.12      +3 -3      ports/math/mpfr/distinfo
   1.129     +2 -1      ports/misc/mc/Makefile
   1.36      +3 -3      ports/misc/mc/distinfo
   1.198     +1 -0      ports/print/ghostscript8/Makefile
   1.73      +3 -3      ports/print/ghostscript8/distinfo
   1.28      +1 -0      ports/sysutils/coreutils/Makefile
   1.9       +3 -3      ports/sysutils/coreutils/distinfo
   1.5       +2 -0      ports/textproc/gnugrep/Makefile
   1.3       +3 -3      ports/textproc/gnugrep/distinfo
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
