Bug 185725 - bsd.port.mk: xz-related fix and cleanup
Summary: bsd.port.mk: xz-related fix and cleanup
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-12 21:50 UTC by Christian Weisgerber
Modified: 2014-01-13 07:31 UTC (History)
0 users

See Also:


Attachments
file.diff (1.05 KB, patch)
2014-01-12 21:50 UTC, Christian Weisgerber
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Weisgerber freebsd_committer freebsd_triage 2014-01-12 21:50:00 UTC
(1) bsd.port.mk refers to XZCAT for extracting .xz patch files, but
XZCAT isn't defined anywhere. We need to add XZCAT to bsd.commands.mk.

(2) xz is included in the base system on all supported releases and
I just removed the archivers/xz port. Let's remove the checks and
assume xz is always available.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-12 21:50:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool)
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2014-01-12 23:51:13 UTC
On Sun, Jan 12, 2014 at 10:42:52PM +0100, Christian Weisgerber wrote:
> 
> >Number:         185725
> >Category:       ports
> >Synopsis:       bsd.port.mk: xz-related fix and cleanup
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-ports-bugs
> >State:          open
> >Quarter:        
> >Keywords:       
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Sun Jan 12 21:50:00 UTC 2014
> >Closed-Date:
> >Last-Modified:
> >Originator:     Christian Weisgerber
> >Release:        FreeBSD 10.0-PRERELEASE amd64
> >Organization:
> >Environment:
> System: FreeBSD lorvorc.mips.inka.de 10.0-PRERELEASE FreeBSD 10.0-PRERELEASE #0 r260565: Sun Jan 12 18:45:53 CET 2014 naddy@lorvorc.mips.inka.de:/usr/obj/usr/src/sys/GENERIC amd64
> 
> >Description:
> 
> (1) bsd.port.mk refers to XZCAT for extracting .xz patch files, but
> XZCAT isn't defined anywhere. We need to add XZCAT to bsd.commands.mk.
> 
> (2) xz is included in the base system on all supported releases and
> I just removed the archivers/xz port. Let's remove the checks and
> assume xz is always available.
> 
> >How-To-Repeat:
> 
> >Fix:
> 
> Index: bsd.commands.mk
> ===================================================================
> --- bsd.commands.mk	(revision 339548)
> +++ bsd.commands.mk	(working copy)
> @@ -98,15 +98,11 @@
>  WHICH?=		/usr/bin/which
>  XARGS?=		/usr/bin/xargs
>  XMKMF?=		${LOCALBASE}/bin/xmkmf
> +XZ?=		-Mmax
> +XZCAT?=		/usr/bin/xzcat ${XZ}
> +XZ_CMD?=	/usr/bin/xz ${XZ}
>  YACC?=		/usr/bin/yacc
>  
> -XZ?=	-Mmax
> -.if exists(/usr/bin/xz)
> -XZ_CMD?=	/usr/bin/xz ${XZ}
> -.else
> -XZ_CMD?=	${LOCALBASE}/bin/xz ${XZ}
> -.endif
> -
>  MD5?=		/sbin/md5
>  SHA256?=	/sbin/sha256
>  
> Index: bsd.port.mk
> ===================================================================
> --- bsd.port.mk	(revision 339548)
> +++ bsd.port.mk	(working copy)
> @@ -1701,9 +1701,6 @@
>  .if defined(USE_ZIP)
>  EXTRACT_DEPENDS+=	${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
>  .endif
> -.if defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )
> -EXTRACT_DEPENDS+=	${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz
> -.endif
>  .if defined(USE_MAKESELF)
>  EXTRACT_DEPENDS+=	unmakeself:${PORTSDIR}/archivers/unmakeself
>  .endif
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
> _______________________________________________
> freebsd-ports-bugs@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
> To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org"


Approved,
Bapt
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-01-13 07:28:39 UTC
Author: bapt
Date: Mon Jan 13 07:28:31 2014
New Revision: 339573
URL: http://svnweb.freebsd.org/changeset/ports/339573

Log:
  xz being included in all supported base system, remove code using version
  from ports
  while here properly define XSCAT is is used to allow xzed patches.
  
  PR:		ports/185725
  Submitted by:	naddy

Modified:
  head/Mk/bsd.commands.mk
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.commands.mk
==============================================================================
--- head/Mk/bsd.commands.mk	Mon Jan 13 07:23:43 2014	(r339572)
+++ head/Mk/bsd.commands.mk	Mon Jan 13 07:28:31 2014	(r339573)
@@ -101,11 +101,8 @@ XMKMF?=		${LOCALBASE}/bin/xmkmf
 YACC?=		/usr/bin/yacc
 
 XZ?=	-Mmax
-.if exists(/usr/bin/xz)
+XZCAT=	/usr/bin/xzcat ${XZ}
 XZ_CMD?=	/usr/bin/xz ${XZ}
-.else
-XZ_CMD?=	${LOCALBASE}/bin/xz ${XZ}
-.endif
 
 MD5?=		/sbin/md5
 SHA256?=	/sbin/sha256

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Mon Jan 13 07:23:43 2014	(r339572)
+++ head/Mk/bsd.port.mk	Mon Jan 13 07:28:31 2014	(r339573)
@@ -1701,9 +1701,6 @@ EXTRACT_DEPENDS+=	lha:${PORTSDIR}/archiv
 .if defined(USE_ZIP)
 EXTRACT_DEPENDS+=	${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
 .endif
-.if defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )
-EXTRACT_DEPENDS+=	${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz
-.endif
 .if defined(USE_MAKESELF)
 EXTRACT_DEPENDS+=	unmakeself:${PORTSDIR}/archivers/unmakeself
 .endif
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2014-01-13 07:31:19 UTC
State Changed
From-To: open->closed

Committed. Thanks!