From nobody@FreeBSD.org  Sun Nov  6 18:27:14 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 420F9106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  6 Nov 2011 18:27:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 321C88FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  6 Nov 2011 18:27:14 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pA6IRDu0074876
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 6 Nov 2011 18:27:13 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id pA6IRDMv074875;
	Sun, 6 Nov 2011 18:27:13 GMT
	(envelope-from nobody)
Message-Id: <201111061827.pA6IRDMv074875@red.freebsd.org>
Date: Sun, 6 Nov 2011 18:27:13 GMT
From: Alexander Sack <alex@niksun.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: POLA: mkisoimages.sh does not support extra-bits-dir parameter
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         162338
>Category:       misc
>Synopsis:       POLA: mkisoimages.sh does not support extra-bits-dir parameter
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 06 18:30:11 UTC 2011
>Closed-Date:    
>Last-Modified:  Thu Feb 23 20:10:10 UTC 2012
>Originator:     Alexander Sack
>Release:        9.0RC1
>Organization:
Niksun, Inc.
>Environment:
FreeBSD insomnium 9.0-BETA1 FreeBSD 9.0-BETA1 #0: Thu Jul 28 17:15:31 UTC 2011     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
The release/amd64/mkisoimages.sh script is suppose to support an extra-bits-dir argument.  Because the script now uses makefs instead of mkisofs, extra-bits-dir is no longer supported.

Patch below.
>How-To-Repeat:
Call mkisoimages.sh with an extra argument results in failure.
>Fix:
Patch submitted for review.  Patch honors an extra-bits-dir argument before creating the ISO.

Patch attached with submission follows:

--- ../../../vendor/freebsd/dist/release/amd64/mkisoimages.sh	2011-10-18 10:40:26.000000000 -0400
+++ mkisoimages.sh	2011-11-06 08:41:32.000000000 -0500
@@ -38,7 +39,14 @@
 
 LABEL=$1; shift
 NAME=$1; shift
+BASE=$1; shift
+EXTRA=$1; shift
 
-echo "/dev/iso9660/`echo $LABEL | tr '[:lower:]' '[:upper:]'` / cd9660 ro 0 0" > $1/etc/fstab
-makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $*
-rm $1/etc/fstab
+# If extra-bits-dir was passed and its a valid directory, include its contents.
+if [ -d "$EXTRA" ]; then
+	cp -a $EXTRA/ $BASE || exit 1
+fi
+
+echo "/dev/iso9660/`echo $LABEL | tr '[:lower:]' '[:upper:]'` / cd9660 ro 0 0" > $BASE/etc/fstab
+makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $BASE
+rm $BASE/etc/fstab


>Release-Note:
>Audit-Trail:

From: Charles Owens <cowens@greatbaysoftware.com>
To: bug-followup@FreeBSD.org, alex@niksun.com
Cc:  
Subject: Re: misc/162338: POLA: mkisoimages.sh does not support extra-bits-dir
 parameter
Date: Thu, 23 Feb 2012 11:52:48 -0500

 This problem is currently true for 8-STABLE as well.  Manual 
 intervention needed to cut a release ISO.
 
 -- 
 Charles Owens
 Great Bay Software, Inc.
 
>Unformatted:
