/pub/FreeBSD or /FreeBSD

Oliver Fromme olli at lurza.secnetix.de
Tue Nov 9 12:30:51 UTC 2010


Dominic Fandrey wrote:
 > I have an application that does parallel package downloads from
 > a list of mirrors and the different Layouts cause me some trouble.
 > 
 > A lot of mirrors locate everything in /FreeBSD instead of
 > /pub/FreeBSD. Mirrors that don't follow the /pub/FreeBSD layout
 > are currently subject to unnecessary load caused by my application
 > and cause significant CPU load on my side.

Traditionally the FreeBSD tree was placed in /pub/FreeBSD
because that's the location where sysinstall looks for the
installation sets and packages.  It can be a symlink, too.

You can find the set of paths where sysinstall looks for
the installation data on FTP servers at the beginning of
the file src/usr.sbin/sysinstall/ftp.c (reformatted):

/* List of sub directories to look for under a given FTP server. */
const char *ftp_dirs[] = {
        ".",
        "releases/"MACHINE,
        "snapshots/"MACHINE,
        "pub/FreeBSD",
        "pub/FreeBSD/releases/"MACHINE,
        "pub/FreeBSD/snapshots/"MACHINE,
        NULL
};

where MACHINE is "i386", "amd64" etc.  The first of those
directories that does exists and contains a subdirectory
naming the desired release (e.g. 8.2-RELEASE) will be used
to download the installation data.  Typically, that's the
second to last entry:  /pub/FreeBSD/releases/8.2-RELEASE

A similar algorithm is used to locate packages, distfiles
for ports, documentation files and possibly other data.

There are some mirrors that have the FreeBSD data somewhere
else, including /FreeBSD, for example.  If one of those is
used for installation with sysinstall, the FTP path has to
be changed manually in the options screen of sysinstall.

I think all of the "official" mirrors (i.e. those who can
be found in the .freebsd.org domain) use /pub/FreeBSD, so
it works with sysinstall out of the box, without having to
modify any options.  As mentioned above, it can also be a
symlink.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"Perl will consistently give you what you want,
unless what you want is consistency."
        -- Larry Wall


More information about the freebsd-hubs mailing list