Creating install CD with custom ports - how to massage INDEX file?

Clifton Royston cliftonr at lava.net
Tue Oct 16 12:08:37 PDT 2007


[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  --  cliftonr at iandicomputing.com / cliftonr at lava.net
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services


More information about the freebsd-hackers mailing list