From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 26 21:17:09 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70D2816A417 for ; Fri, 26 Oct 2007 21:17:09 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by mx1.freebsd.org (Postfix) with ESMTP id E83C613C4A7 for ; Fri, 26 Oct 2007 21:17:08 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so838044nfb for ; Fri, 26 Oct 2007 14:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=Nn75QlrVj9o0Cr/ljyn8Y7j2vH1Xk4iPgcoCdhDcwr0=; b=JWaRunSslmI6C0MgYS0yUWFB5ocqQZ14LiiV+pQs/WkRaJKdxGn5lfxNBQXzVjmWUjH5kVC7MyiONXdNN6iZISL6165fM7TGfKtNjkpSGq4hJxUHqGE6TVqm8qxS4EG/L3cX5WIHFiMo1vOwPT/lbyQidXCXWw3SSHkNoUUBi4E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=VQYZpkEvdwcETtdnxx0B45VRVq7++e0eGIXhndeaqCCgTe3Iq7UnZFIuHhZGMT3p5NdYuopUjQuhJ89ArmR4OkZsDFESlRpNAombmOBZKDlzWUJpXWYuoo7c9ZZUABjwI2padyttJaS4cmGCeCjT7BHrEMGI0FdviOoHi3z1/4M= Received: by 10.86.36.11 with SMTP id j11mr2517749fgj.1193431936354; Fri, 26 Oct 2007 13:52:16 -0700 (PDT) Received: from roadrunner.spoerlein.net ( [85.180.174.64]) by mx.google.com with ESMTPS id g8sm7739359muf.2007.10.26.13.52.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 26 Oct 2007 13:52:15 -0700 (PDT) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.1/8.14.1) with ESMTP id l9QKT47A008649; Fri, 26 Oct 2007 22:29:04 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.spoerlein.net (8.14.1/8.14.1/Submit) id l9QKT4vd008648; Fri, 26 Oct 2007 22:29:04 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Fri, 26 Oct 2007 22:29:04 +0200 From: Ulrich Spoerlein To: Clifton Royston Message-ID: <20071026202904.GC1482@roadrunner.spoerlein.net> Mail-Followup-To: Clifton Royston , FreeBSD hackers list References: <20071014193813.GA2677@lava.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071014193813.GA2677@lava.net> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: FreeBSD hackers list Subject: Re: Creating install CD with custom ports - how to massage INDEX file? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2007 21:17:09 -0000 On Sun, 14.10.2007 at 09:38:14 -1000, Clifton Royston wrote: > I've been building my own install CDs for a planned multi-server > upgrade to 6.2Rp8 and ran into one last stumbling block this week. I > understand the process a lot better now than I did a few years back > when I was doing it for 4.8, but I'm still having trouble pieceing > together how I get my own package set onto the CD in a usable form. > > I built the release with NO_PORTS=yes, because I'm building the ports > from my own CVS tree, which is a tightly pared down subset of the > /usr/ports CVS, plus locally written software in ports format. I've > ensured that the tree is closed under the dependency operation (to use > some math jargon) - essentially that means that my ports subset includes > all the dependencies of every port I'm including and all of *its* > run/build dependencies in the tree, even if not being built. That > allows the dependency graph to be calculated and the INDEX-6 file to be > built properly. > > However, copying the INDEX-6 file and my private packages hierarchy > into the CD build area doesn't work; I can read them off the CD > post-install but sysinstall doesn't see them. It's not a disaster > because I can always put the CD back in after booting and install them > then, but it would would be nice to get them all zapped in with the > initial install. I'm doing something similar. I work with a complete ports tree and then build a subset of interesting packages (plus required packages). The problem with sysinstall is, that it requires the number of the CD, where the package resides. Since I make sure, that my ISO never exceeds one volume I decided to drop the volume number from the sysinstall INDEX altogether Here's the Makefile targets creating the packages and ISO packages: # prepare lots of stuff # ... .for pkg in ${PACKAGES} chroot ${TLR} /create_packages.sh ${pkg} .endfor ## Build a stripped down INDEX file, usually done by /usr/ports/Tools/scripts/release/scrubindex.pl, yet it would ## require manual handling. We assume all dependant packages are there (we just built them after all), so we simply ## take all lines where we have a package for it. ## First we grab the name of the indexfile (can be INDEX, INDEX-5, INDEX-6, etc.), then we loop over all entries of ## of the global index and test -f if the package was built, if so, we print the line. (INDEX=`sh -c "chroot ${TLR} /usr/bin/make -f /usr/ports/Makefile -V INDEXFILE"`; \ awk -F"|" '{if (system("test -f ${TLR}/usr/ports/packages/All/" $$1 ".tbz") == 0) print $$0}' \ ${TLR}/usr/ports/$$INDEX > ${TFR}/packages/INDEX) cd ${TFR} && find -d packages | cpio --quiet -dumpl ${TRR}/R/cdrom/disc1 iso: # Remove CD_VOLUME from the cdrom.inf, we only ship 'disc 0' echo "CD_VERSION = ${RELEASE}" > ${TRR}/R/cdrom/disc1/cdrom.inf mkisofs -r -J -V '${RELEASE}' -publisher 'Distribution made for 1822direkt' -o ${TFR}.iso \ -b boot/cdboot -no-emul-boot ${TRR}/R/cdrom/disc1 md5 ${TFR}.iso > ${TFR}.iso.md5 hth, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt.