From ohauer@FreeBSD.org  Sat Feb  8 11:15:36 2014
Return-Path: <ohauer@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 982506F3;
	Sat,  8 Feb 2014 11:15:36 +0000 (UTC)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 75BC7125A;
	Sat,  8 Feb 2014 11:15:36 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s18BFaKM031416;
	Sat, 8 Feb 2014 11:15:36 GMT
	(envelope-from ohauer@freefall.freebsd.org)
Received: (from ohauer@localhost)
	by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s18BFa4k031415;
	Sat, 8 Feb 2014 11:15:36 GMT
	(envelope-from ohauer)
Message-Id: <201402081115.s18BFa4k031415@freefall.freebsd.org>
Date: Sat, 8 Feb 2014 11:15:36 GMT
From: Olli Hauer <ohauer@FreeBSD.org>
Reply-To:
To: FreeBSD-gnats-submit@freebsd.org
Cc: <gk.freebsd@googlemail.com>
Subject: [patch] net/gpxe fix gpxe.iso building
X-Send-Pr-Version: 3.114
X-GNATS-Notify: gk.freebsd@googlemail.com

>Number:         186559
>Category:       ports
>Synopsis:       [patch] net/gpxe fix gpxe.iso building
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ohauer
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 08 11:20:00 UTC 2014
>Closed-Date:    Mon Apr 21 08:13:33 UTC 2014
>Last-Modified:  Mon Apr 21 08:20:01 UTC 2014
>Originator:     ohauer
>Release:        
>Organization:
>Environment:

>Description:
Even the path to isolinux.bin is corrected the file has wrong permission (444)
to create the gpxe.iso.  As workaround install isolinux.bin with mode 644 into
$WRKSRC and adjust the path in arch/i386/Makefile

Additional support staging

patch:
http://people.freebsd.org/~ohauer/diffs/gpxe.diff

>How-To-Repeat:

>Fix:
--- gpxe.diff begins here ---
Index: gpxe/Makefile
===================================================================
--- gpxe/Makefile	(revision 343314)
+++ gpxe/Makefile	(working copy)
@@ -9,15 +9,13 @@
 		http://slackware.cs.utah.edu/pub/kernel.org/pub/software/utils/boot/gpxe/
 
 MAINTAINER=	gk.freebsd@googlemail.com
-COMMENT=	Create an open-source PXE implementation and bootloader
+COMMENT=	Open Source (GPL) gPXE network bootloader
 
-BROKEN=		Fails to build
-
 LICENSE=	GPLv2
 
-BUILD_DEPENDS=	syslinux:${PORTSDIR}/sysutils/syslinux
+BUILD_DEPENDS=	syslinux:${PORTSDIR}/sysutils/syslinux \
+		mkisofs:${PORTSDIR}/sysutils/cdrtools
 
-USE_CDRTOOLS=	yes
 USES=		gmake perl5
 WRKSRC=		${WRKDIR}/${DISTNAME}/src
 
@@ -28,7 +26,6 @@
 
 SUB_FILES=	pkg-message
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 ONLY_FOR_ARCHS=		amd64 i386
@@ -38,16 +35,17 @@
 MAKE_ARGS+=	ARCH=i386
 .endif
 
+ISOLINUX_BIN=	${LOCALBASE}/share/syslinux/bios/core/isolinux.bin
+
 post-patch:
-	@${REINPLACE_CMD} "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/arch/i386/Makefile
+	@${REINPLACE_CMD} "s|%%WRKSRC%%|${WRKSRC}|" ${WRKSRC}/arch/i386/Makefile
+# ISO creation fails if isolinux.bin is read only
+	${INSTALL} -m 644 ${ISOLINUX_BIN} ${WRKSRC}
 
 do-install:
-	@${MKDIR} ${DATADIR}
-	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.dsk ${DATADIR}
-	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.usb ${DATADIR}
-	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.iso ${DATADIR}
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.dsk ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.usb ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.iso ${STAGEDIR}${DATADIR}
 
-post-install:
-	@${CAT} ${PKGMESSAGE}
-
 .include <bsd.port.mk>
Index: gpxe/files/patch-arch__i386__Makefile
===================================================================
--- gpxe/files/patch-arch__i386__Makefile	(revision 343314)
+++ gpxe/files/patch-arch__i386__Makefile	(working copy)
@@ -1,12 +1,12 @@
 --- ./arch/i386/Makefile.orig	2010-06-29 21:31:33.000000000 +0200
-+++ ./arch/i386/Makefile	2010-08-07 16:06:23.000000000 +0200
-@@ -72,7 +72,8 @@
++++ ./arch/i386/Makefile	2014-02-08 11:45:50.000000000 +0100
+@@ -71,8 +71,7 @@
+ #
  ISOLINUX_BIN_LIST	:= \
  	$(ISOLINUX_BIN) \
- 	/usr/lib/syslinux/isolinux.bin \
+-	/usr/lib/syslinux/isolinux.bin \
 -	/usr/share/syslinux/isolinux.bin
-+	%%PREFIX%%/share/syslinux/isolinux.bin \
-+	%%PREFIX%%/share/syslinux/isolinux.bin
++	%%WRKSRC%%/isolinux.bin
  ISOLINUX_BIN	= $(firstword $(wildcard $(ISOLINUX_BIN_LIST)))
  
  # i386-specific directories containing source files
--- gpxe.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat Feb 8 11:20:08 UTC 2014 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: gk.freebsd@googlemail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/186559: [patch] net/gpxe fix gpxe.iso building
Date: Sat, 8 Feb 2014 11:20:08 UT

 Maintainer of net/gpxe,
 
 Please note that PR ports/186559 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186559
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
Responsible-Changed-From-To: freebsd-ports-bugs->ohauer 
Responsible-Changed-By: ohauer 
Responsible-Changed-When: Sat Feb 8 11:42:30 UTC 2014 
Responsible-Changed-Why:  
Take my own PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186559 
State-Changed-From-To: feedback->closed 
State-Changed-By: ohauer 
State-Changed-When: Mon Apr 21 08:12:37 UTC 2014 
State-Changed-Why:  
- Fix build on FreeBSD <= 10 in r351669 


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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/186559: commit references a PR
Date: Mon, 21 Apr 2014 08:10:02 +0000 (UTC)

 Author: ohauer
 Date: Mon Apr 21 08:09:57 2014
 New Revision: 351669
 URL: http://svnweb.freebsd.org/changeset/ports/351669
 QAT: https://qat.redports.org/buildarchive/r351669/
 
 Log:
   - fix build on FreeBSD <= 10
   - add stage support
   
   PR:		186559 [1]
   PR:		183444
   Submitted by:	ohauer [1]
   Approved by:	maintainer-timeout
 
 Modified:
   head/net/gpxe/Makefile
   head/net/gpxe/files/patch-arch__i386__Makefile
 
 Modified: head/net/gpxe/Makefile
 ==============================================================================
 --- head/net/gpxe/Makefile	Mon Apr 21 07:52:16 2014	(r351668)
 +++ head/net/gpxe/Makefile	Mon Apr 21 08:09:57 2014	(r351669)
 @@ -9,15 +9,13 @@ MASTER_SITES=	http://etherboot.org/rel/g
  		http://slackware.cs.utah.edu/pub/kernel.org/pub/software/utils/boot/gpxe/
  
  MAINTAINER=	gk.freebsd@googlemail.com
 -COMMENT=	Create an open-source PXE implementation and bootloader
 -
 -BROKEN=		Fails to build
 +COMMENT=	Open Source (GPL) gPXE network bootloader
  
  LICENSE=	GPLv2
  
 -BUILD_DEPENDS=	syslinux:${PORTSDIR}/sysutils/syslinux
 +BUILD_DEPENDS=	syslinux:${PORTSDIR}/sysutils/syslinux \
 +		mkisofs:${PORTSDIR}/sysutils/cdrtools
  
 -USE_CDRTOOLS=	yes
  USES=		gmake perl5
  WRKSRC=		${WRKDIR}/${DISTNAME}/src
  
 @@ -28,26 +26,32 @@ PLIST_FILES=	%%DATADIR%%/gpxe.dsk \
  
  SUB_FILES=	pkg-message
  
 -NO_STAGE=	yes
  .include <bsd.port.options.mk>
  
  ONLY_FOR_ARCHS=		amd64 i386
  ONLY_FOR_ARCHS_REASON=	not yet ported to anything other than amd64/i386
  
 +.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000
 +BROKEN=	does not build on FreeBSD 10.x and later
 +.endif
 +
  .if ${ARCH} == "amd64"
  MAKE_ARGS+=	ARCH=i386
  .endif
  
 +ISOLINUX_BIN?=	${LOCALBASE}/share/syslinux/bios/core/isolinux.bin
 +
  post-patch:
 -	@${REINPLACE_CMD} "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/arch/i386/Makefile
 +	@${REINPLACE_CMD} "s|%%WRKSRC%%|${WRKSRC}|" ${WRKSRC}/arch/i386/Makefile
  
 -do-install:
 -	@${MKDIR} ${DATADIR}
 -	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.dsk ${DATADIR}
 -	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.usb ${DATADIR}
 -	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.iso ${DATADIR}
 +pre-build:
 +# ISO creation fails if isolinux.bin is read only
 +	${INSTALL} -m 644 ${ISOLINUX_BIN} ${WRKSRC}
  
 -post-install:
 -	@${CAT} ${PKGMESSAGE}
 +do-install:
 +	@${MKDIR} ${STAGEDIR}${DATADIR}
 +	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.dsk ${STAGEDIR}${DATADIR}
 +	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.usb ${STAGEDIR}${DATADIR}
 +	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.iso ${STAGEDIR}${DATADIR}
  
  .include <bsd.port.mk>
 
 Modified: head/net/gpxe/files/patch-arch__i386__Makefile
 ==============================================================================
 --- head/net/gpxe/files/patch-arch__i386__Makefile	Mon Apr 21 07:52:16 2014	(r351668)
 +++ head/net/gpxe/files/patch-arch__i386__Makefile	Mon Apr 21 08:09:57 2014	(r351669)
 @@ -1,12 +1,12 @@
  --- ./arch/i386/Makefile.orig	2010-06-29 21:31:33.000000000 +0200
 -+++ ./arch/i386/Makefile	2010-08-07 16:06:23.000000000 +0200
 -@@ -72,7 +72,8 @@
 ++++ ./arch/i386/Makefile	2014-02-08 11:45:50.000000000 +0100
 +@@ -71,8 +71,7 @@
 + #
   ISOLINUX_BIN_LIST	:= \
   	$(ISOLINUX_BIN) \
 - 	/usr/lib/syslinux/isolinux.bin \
 +-	/usr/lib/syslinux/isolinux.bin \
  -	/usr/share/syslinux/isolinux.bin
 -+	%%PREFIX%%/share/syslinux/isolinux.bin \
 -+	%%PREFIX%%/share/syslinux/isolinux.bin
 ++	%%WRKSRC%%/isolinux.bin
   ISOLINUX_BIN	= $(firstword $(wildcard $(ISOLINUX_BIN_LIST)))
   
   # i386-specific directories containing source files
 _______________________________________________
 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"
 
>Unformatted:
