Re: Creating install CD with custom ports - how to massage INDEX file?
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. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Creating install CD with custom ports - how to massage INDEX file?
On 2007-Oct-14 09:38:14 -1000, Clifton Royston [EMAIL PROTECTED] wrote: 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. In which case, you should be able to cd /usr/ports make index -- Peter Jeremy pgpUHKyAI7zJb.pgp Description: PGP signature
Re: Creating install CD with custom ports - how to massage INDEX file?
[Sorry, References: header lost] Peter Jeremy wrote: In which case, you should be able to cd /usr/ports make index I can see a few points of confusion here, so let me clarify: 1) As I said, it's under my own CVS tree, independent of the system ports, so the corresponding step is cd ~/sandbox/ports make index. That part works fine as of late, that's how I got to understand the dependency closure bit. 2) There are a couple funky steps involved right after that, because although the ports system includes a PORTSDIR makefile variable, AFAICT the index-building appears to not fully accept it, so I have to massage out references to /home/cliftonr/sandbox/ports/foo in the INDEX-6 file that comes out. Not a huge problem, just a few ugly perl lines in my Makefile. Now the tricky bits: 3) The INDEX-6 file built in ports is not actually the same format as the INDEX file on an install CD. They're close, but it appears that some of the fields are swapped around and an extra field added at the end. If it only meant appending a |1 to the end of each line, meaning everything's on disc 1, that would be easy, but as I say there appears to be some change in the field order and I'm having to guess what each field means. 4) I'm not currently trying to get it inside the chroot for the release build process, because that whole process is complex and rigid enough to be scary. To be more specific, it does its own complete CVS checkout from the local FreeBSD CVS repository for whatever tags you give it; if I were to enable ports/packages building, it appears to me it would likewise checkout the ports from the FreeBSD repository as part of make release, rather than get them from our own repository. 5) If there's a window or stage where I could halt the release build, copy the desired ports tree in there, and then give a comand to say continue, build the packages and index and slap them into the disc image, then that's exactly the set of commands I'm looking for. Whatever that command is, however, I believe it will either include the chrooted cd /usr/ports make index, or come after it. Someone pointed me at a particular .py script beneath /usr/src/release, so I need to go look at that, preferably after a bit more sleep and/or coffee. -- Clifton -- Clifton Royston -- [EMAIL PROTECTED] / [EMAIL PROTECTED] President - I and I Computing * http://www.iandicomputing.com/ Custom programming, network design, systems and network consulting services ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Creating install CD with custom ports - how to massage INDEX file?
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 think from reading the assorted documentation and people's notes on release-building that the problem is that the INDEX-6 file needs to be massaged into a slightly different format for sysinstall, and I am not clear on the right way to do that for an existing package set, if you're not doing it via the release build everything approach and not working off the vanilla ports CVS. To simplify matters further, it all fits on disc 1 - it's not a big file set, so it doesn't need to be split onto multiple disks. I've looked through the many fine manuals here, here, and here: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/releng/article.html http://www.gsoft.com.au/~doconnor/FreeBSD-release.html http://www.freebsd.org/doc/en_US.ISO8859-1/articles/releng-packages/article.html (This last comes tantalizingly close but doesn't get me quite there because it doesn't clarify under what directories or hierarchies these scripts should be installed and run, especially if you have a complete package set built.) This probably boils down to just one make release subcommand I need to give at the right stage, after putting my copied ports tree and/or package tree in the right magic place, but I'm not getting it. I'd appreciate a hint from anybody who knows this step. -- Clifton -- Clifton Royston -- [EMAIL PROTECTED] / [EMAIL PROTECTED] President - I and I Computing * http://www.iandicomputing.com/ Custom programming, network design, systems and network consulting services ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]