Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2009 08:59:46 +0000 (UTC)
From:      Marc Fonvieille <blackend@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r195132 - in head: . release release/scripts usr.sbin/sysinstall
Message-ID:  <200906280859.n5S8xkjS006812@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: blackend (doc committer)
Date: Sun Jun 28 08:59:46 2009
New Revision: 195132
URL: http://svn.freebsd.org/changeset/base/195132

Log:
  - release/* update to use freebsd-doc-* packages instead of building
    FreeBSD docset during 'make release' this will speed up release
    builds;
  - sysinstall(8) has also been updated to use these packages with a new
    menu allowing people to choose what localized doc to install;
  - mention in UPDATING that docs from the FreeBSD Documentation project
    are now installed in /usr/local/share/doc/freebsd instead of
    /usr/share/doc.
  
  Approved by:	re (kensmith)

Modified:
  head/UPDATING
  head/release/Makefile
  head/release/scripts/package-split.py
  head/usr.sbin/sysinstall/dist.c
  head/usr.sbin/sysinstall/dist.h
  head/usr.sbin/sysinstall/doc.c
  head/usr.sbin/sysinstall/menus.c
  head/usr.sbin/sysinstall/sysinstall.h

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Sun Jun 28 08:42:17 2009	(r195131)
+++ head/UPDATING	Sun Jun 28 08:59:46 2009	(r195132)
@@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20090628:
+	The documentation from the FreeBSD Documentation Project
+	(Handbook, FAQ, etc.) is now installed via packages by
+	sysinstall(8) and under the /usr/local/share/doc/freebsd
+	directory instead of /usr/share/doc.
+
 20090624:
 	The ABI of various structures related to the SYSV IPC API have
 	been changed.  As a result, the COMPAT_FREEBSD[456] kernel

Modified: head/release/Makefile
==============================================================================
--- head/release/Makefile	Sun Jun 28 08:42:17 2009	(r195131)
+++ head/release/Makefile	Sun Jun 28 08:59:46 2009	(r195132)
@@ -39,6 +39,10 @@ BUILDNAME?=${BASE}-${DATE}-SNAP
 # checking out from a local CVS repository, set this option.
 #EXTPORTSDIR=/usr/ports
 #
+# To use a checked-out doc/ directory instead of
+# checking out from a local CVS repository, set this option.
+#EXTDOCDIR=/usr/doc
+#
 # To add other options to the CVS subcommands (co,up), set
 #CVSCMDARGS="-D '01/01/2002 00:00:00 UTC'"
 #
@@ -91,15 +95,13 @@ RELEASEPORTSMODULE?=	ports
 # the ports tree, so NOPORTS can be set together with NODOC in order
 # to have neither ports or docs.  If only NOPORTS is set to YES, but
 # docs are still desired, the DOMINIMALDOCPORTS logic below will only
-# install the ports that are minimally required for the docs.  This is
+# install the ports that are minimally required for the release note documentation.  This is
 # intended as a compromise, less disk space is required than for using
 # the entire ports collection (and much less time due to the huge number
 # of directories it would create), but still quite a bit as well as some
 # CPU cycles (some of the programs are C++, and things like ghostscript
 # belong to the required ports nevertheless).
 #
-# Setting this also disables building of release note documentation
-# (RELNOTESng).
 #NODOC=  YES
 #NOPORTS=  YES
 
@@ -141,11 +143,6 @@ NOPORTSATALL=	YES
 #
 # Doing 'make index' in /usr/ports requires Perl.
 MAKEINDEXPORTS=	lang/perl5.8
-# By default, documentation (Handbook, FAQ, etc.) is built for all
-# the languages.  To speed up building, set the DOC_LANG to just
-# the languages you need.  (The language for the release notes is
-# controlled by the RELNOTES_LANG variable above.)
-#DOC_LANG=	en_US.ISO8859-1
 DOCPORTS=	textproc/docproj
 # Set this to wherever the distfiles required by release procedures.
 .if defined(DOCDISTFILES)
@@ -348,7 +345,7 @@ release rerelease:
 	@echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false
 .endif
 .if defined(NOPORTSATALL) && !defined(NODOC)
-	@echo "Ports are required for building the docs.  Either set NODOC or"
+	@echo "Ports are required for building the release docs.  Either set NODOC or"
 	@echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
 	@exit 1
 .endif
@@ -477,7 +474,6 @@ release rerelease:
 	BUILDNAME \
 	CD_PACKAGE_TREE \
 	DISTRIBUTIONS \
-	DOC_LANG \
 	DOMINIMALDOCPORTS \
 	EXTRA_SRC \
 	FTP_PASSIVE_MODE \
@@ -1037,21 +1033,7 @@ cdrom.2:
 	@echo "Building CDROM docs filesystem image"
 	@mkdir -p ${CD_DOCS}
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DOCS}/cdrom.inf
-	@mkdir -p ${CD_DOCS}/usr/share/doc
-.if defined(MAKE_DVD)
-	@mkdir -p ${CD_DVD1}/usr/share/doc
-.endif
-	@for i in `ls ${CD_LIVEFS}/usr/share/doc`; do \
-		if [ -L ${CD_LIVEFS}/usr/share/doc/$$i -o \
-		    -d /usr/doc/$$i ]; then \
-			mv ${CD_LIVEFS}/usr/share/doc/$$i \
-			    ${CD_DOCS}/usr/share/doc; \
-		fi \
-	done
-.if defined(MAKE_DVD)
-	@cd ${CD_DOCS}/usr/share/doc && find . -print | \
-	    cpio -dumpl ${CD_DVD1}/usr/share/doc
-.endif
+	@echo "CD_VOLUME = 3" >> ${CD_DOCS}/cdrom.inf
 .endif
 	touch ${.TARGET}
 
@@ -1082,6 +1064,11 @@ CD_DISC1_PKGS=	${CD_PACKAGE_TREE}/disc1
 .if exists(${CD_PACKAGE_TREE}/disc2)
 CD_DISC2_PKGS=	${CD_PACKAGE_TREE}/disc2
 .endif
+# scripts/package-trees.sh names all discs according to the "discX"
+# scheme where X is the number of the disc
+.if exists(${CD_PACKAGE_TREE}/disc3)
+CD_DOCS_PKGS=	${CD_PACKAGE_TREE}/disc3
+.endif
 .if exists(${CD_PACKAGE_TREE}/dvd1)
 CD_DVD1_PKGS=	${CD_PACKAGE_TREE}/dvd1
 .endif
@@ -1113,7 +1100,8 @@ iso.1:
 .if !defined(NODOC)
 	@sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \
 	    FreeBSD_Documentation \
-	    ${CD}/${BUILDNAME}-${TARGET}-docs.iso ${CD_DOCS}
+	    ${CD}/${BUILDNAME}-${TARGET}-disc3.iso ${CD_DOCS} \
+	    ${CD_DOCS_PKGS}
 .endif
 .if defined(SEPARATE_LIVEFS)
 	@sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
@@ -1139,9 +1127,6 @@ doc.1:
 		make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \
 		WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \
 	done
-	@cd /usr/doc && make all install 'FORMATS=html html-split txt' \
-	    INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/base/usr/share/doc \
-	    URLS_ABSOLUTE=YES	
 	touch ${.TARGET}
 
 #

Modified: head/release/scripts/package-split.py
==============================================================================
--- head/release/scripts/package-split.py	Sun Jun 28 08:42:17 2009	(r195131)
+++ head/release/scripts/package-split.py	Sun Jun 28 08:59:46 2009	(r195132)
@@ -86,11 +86,34 @@ def disc2_packages():
             'ports-mgmt/portaudit'])
     return pkgs
 
+def docs_packages():
+    pkgs = ['misc/freebsd-doc-bn',
+	    'misc/freebsd-doc-da',
+	    'misc/freebsd-doc-de',
+	    'misc/freebsd-doc-el',
+	    'misc/freebsd-doc-en',
+	    'misc/freebsd-doc-es',
+	    'misc/freebsd-doc-fr',
+	    'misc/freebsd-doc-hu',
+	    'misc/freebsd-doc-it',
+	    'misc/freebsd-doc-ja',
+	    'misc/freebsd-doc-mn',
+	    'misc/freebsd-doc-nl',
+	    'misc/freebsd-doc-pl',
+	    'misc/freebsd-doc-pt',
+	    'misc/freebsd-doc-ru',
+	    'misc/freebsd-doc-sr',
+	    'misc/freebsd-doc-tr',
+	    'misc/freebsd-doc-zh_cn',
+	    'misc/freebsd-doc-zh_tw']
+    return pkgs
+
 # The list of desired packages
 def desired_packages():
     disc1 = disc1_packages()
     disc2 = disc2_packages()
-    return [disc1, disc2]
+    docs = docs_packages()
+    return [disc1, disc2, docs]
 
 # Suck the entire INDEX file into a two different dictionaries.  The first
 # dictionary maps port names (origins) to package names.  The second

Modified: head/usr.sbin/sysinstall/dist.c
==============================================================================
--- head/usr.sbin/sysinstall/dist.c	Sun Jun 28 08:42:17 2009	(r195131)
+++ head/usr.sbin/sysinstall/dist.c	Sun Jun 28 08:59:46 2009	(r195132)
@@ -44,6 +44,7 @@
 #include <libutil.h>
 
 unsigned int Dists;
+unsigned int DocDists;
 unsigned int SrcDists;
 unsigned int KernelDists;
 
@@ -60,6 +61,7 @@ typedef struct _dist {
     } my_data;
 } Distribution;
 
+static Distribution DocDistTable[];
 static Distribution KernelDistTable[];
 static Distribution SrcDistTable[];
 
@@ -77,7 +79,8 @@ static Distribution SrcDistTable[];
 static Distribution DistTable[] = {
     DTE_TARBALL("base",	    &Dists, BASE,     "/"),
     DTE_SUBDIST("kernels",  &Dists, KERNEL,   KernelDistTable),
-    DTE_TARBALL("doc",	    &Dists, DOC,      "/"),
+    DTE_TARBALL("doc",	    &Dists, DOCUSERLAND,      "/"),
+    DTE_SUBDIST("docproj",  &Dists, DOC,      DocDistTable),
     DTE_TARBALL("games",    &Dists, GAMES,    "/"),
     DTE_TARBALL("manpages", &Dists, MANPAGES, "/"),
     DTE_TARBALL("catpages", &Dists, CATPAGES, "/"),
@@ -128,6 +131,30 @@ static Distribution SrcDistTable[] = {
     DTE_END,
 };
 
+/* The Documentation distribution */
+static Distribution DocDistTable[] = {
+    DTE_PACKAGE("Bengali Documentation",		&DocDists, DOC_BN,	"bn-freebsd-doc"),
+    DTE_PACKAGE("Danish Documentation",			&DocDists, DOC_DA,	"da-freebsd-doc"),
+    DTE_PACKAGE("German Documentation",			&DocDists, DOC_DE,	"de-freebsd-doc"),
+    DTE_PACKAGE("Greek Documentation",			&DocDists, DOC_EL,	"el-freebsd-doc"),
+    DTE_PACKAGE("English Documentation",		&DocDists, DOC_EN,	"en-freebsd-doc"),
+    DTE_PACKAGE("Spanish Documentation",		&DocDists, DOC_ES,	"es-freebsd-doc"),
+    DTE_PACKAGE("French Documentation",			&DocDists, DOC_FR,	"fr-freebsd-doc"),
+    DTE_PACKAGE("Hungarian Documentation",		&DocDists, DOC_HU,	"hu-freebsd-doc"),
+    DTE_PACKAGE("Italian Documentation",		&DocDists, DOC_IT,	"it-freebsd-doc"),
+    DTE_PACKAGE("Japanese Documentation",		&DocDists, DOC_JA,	"ja-freebsd-doc"),
+    DTE_PACKAGE("Mongolian Documentation",		&DocDists, DOC_MN,	"mn-freebsd-doc-mn"),
+    DTE_PACKAGE("Dutch Documentation",			&DocDists, DOC_NL,	"nl-freebsd-doc"),
+    DTE_PACKAGE("Polish Documentation",			&DocDists, DOC_PL,	"pl-freebsd-doc"),
+    DTE_PACKAGE("Portuguese Documentation",		&DocDists, DOC_PT,	"pt-freebsd-doc"),
+    DTE_PACKAGE("Russian Documentation",		&DocDists, DOC_RU,	"ru-freebsd-doc"),
+    DTE_PACKAGE("Serbian Documentation",		&DocDists, DOC_SR,	"sr-freebsd-doc"),
+    DTE_PACKAGE("Turkish Documentation",		&DocDists, DOC_TR,	"tr-freebsd-doc"),
+    DTE_PACKAGE("Simplified Chinese Documentation",	&DocDists, DOC_ZH_CN,	"zh_cn-freebsd-doc"),
+    DTE_PACKAGE("Traditional Chinese Documentation",	&DocDists, DOC_ZH_TW,	"zh_tw-freebsd-doc"),
+    DTE_END,
+};
+
 static int	distMaybeSetPorts(dialogMenuItem *self);
 
 static void
@@ -137,15 +164,18 @@ distVerifyFlags(void)
 	Dists |= DIST_SRC;
     if (KernelDists)
 	Dists |= DIST_KERNEL;
+    if (DocDists)
+	Dists |= DIST_DOC;
     if (isDebug())
-	msgDebug("Dist Masks: Dists: %0x, Srcs: %0x Kernels: %0x\n", Dists,
-	    SrcDists, KernelDists);
+	msgDebug("Dist Masks: Dists: %0x, Srcs: %0x Kernels: %0x Docs: %0x\n", Dists,
+	    SrcDists, KernelDists, DocDists);
 }
 
 int
 distReset(dialogMenuItem *self)
 {
     Dists = 0;
+    DocDists = 0;
     SrcDists = 0;
     KernelDists = 0;
     return DITEM_SUCCESS | DITEM_REDRAW;
@@ -161,6 +191,9 @@ distConfig(dialogMenuItem *self)
     if ((cp = variable_get(VAR_DIST_MAIN)) != NULL)
 	Dists = atoi(cp);
 
+    if ((cp = variable_get(VAR_DIST_DOC)) != NULL)
+	DocDists = atoi(cp);
+
     if ((cp = variable_get(VAR_DIST_SRC)) != NULL)
 	SrcDists = atoi(cp);
 
@@ -191,7 +224,8 @@ distSetDeveloper(dialogMenuItem *self)
     Dists = _DIST_DEVELOPER;
     SrcDists = DIST_SRC_ALL;
     KernelDists = selectKernel();
-    i = distMaybeSetPorts(self);
+    i = distSetDoc(self);
+    i |= distMaybeSetPorts(self);
     distVerifyFlags();
     return i;
 }
@@ -205,7 +239,8 @@ distSetKernDeveloper(dialogMenuItem *sel
     Dists = _DIST_DEVELOPER;
     SrcDists = DIST_SRC_SYS | DIST_SRC_BASE;
     KernelDists = selectKernel();
-    i = distMaybeSetPorts(self);
+    i = distSetDoc(self);
+    i |= distMaybeSetPorts(self);
     distVerifyFlags();
     return i;
 }
@@ -218,7 +253,8 @@ distSetUser(dialogMenuItem *self)
     distReset(NULL);
     Dists = _DIST_USER;
     KernelDists = selectKernel();
-    i = distMaybeSetPorts(self);
+    i = distSetDoc(self);
+    i |= distMaybeSetPorts(self);
     distVerifyFlags();
     return i;
 }
@@ -241,6 +277,7 @@ distSetEverything(dialogMenuItem *self)
     Dists = DIST_ALL;
     SrcDists = DIST_SRC_ALL;
     KernelDists = DIST_KERNEL_ALL;
+    DocDists = DIST_DOC_ALL;
     i = distMaybeSetPorts(self);
     distVerifyFlags();
     return i | DITEM_REDRAW;
@@ -741,6 +778,61 @@ distExtract(char *parent, Distribution *
     return status;
 }
 
+int
+distSetDoc(dialogMenuItem *self)
+{
+    int i;
+
+    dialog_clear_norefresh();
+    if (!dmenuOpenSimple(&MenuDocInstall, FALSE))
+	i = DITEM_FAILURE;
+    else
+	i = DITEM_SUCCESS;
+
+    distVerifyFlags();
+
+    return i | DITEM_RESTORE;
+}
+
+int
+distSetDocMenu(dialogMenuItem *self)
+{
+    int i, status;
+    WINDOW *w;
+
+    if (RunningAsInit && !strstr(variable_get(SYSTEM_STATE), "install")) {
+	    msgConfirm("This option may only be used after the system is installed, sorry!");
+	    return DITEM_FAILURE;
+    }
+
+    dialog_clear_norefresh();
+    if (!dmenuOpenSimple(&MenuDocInstall, FALSE))
+	i = DITEM_FAILURE;
+    else
+	i = DITEM_SUCCESS;
+
+    distVerifyFlags();
+
+    dialog_clear_norefresh();
+    w = savescr();
+    msgNotify("Attempting to install all selected documentations...");
+
+    for (i = 0; DocDistTable[i].my_name; i++) {
+	    if (!(DocDistTable[i].my_bit & *(DocDistTable[i].my_mask)))
+		    continue;
+	     dialog_clear_norefresh();
+	     msgNotify("Installing %s distribution...", DocDistTable[i].my_name);
+	     status = (package_add(DocDistTable[i].my_data.my_string) == DITEM_SUCCESS);
+	     if (!status)
+		     break;
+    }
+
+    dialog_clear_norefresh();
+
+    restorescr(w);
+    return (status ? DITEM_SUCCESS : DITEM_FAILURE);
+}
+
 static void
 printSelected(char *buf, int selected, Distribution *me, int *col)
 {

Modified: head/usr.sbin/sysinstall/dist.h
==============================================================================
--- head/usr.sbin/sysinstall/dist.h	Sun Jun 28 08:42:17 2009	(r195131)
+++ head/usr.sbin/sysinstall/dist.h	Sun Jun 28 08:59:46 2009	(r195132)
@@ -10,6 +10,7 @@
 #define DIST_PROFLIBS		0x00008
 #define DIST_DICT		0x00010
 #define DIST_SRC		0x00020
+/* Documentation from FreeBSD docproj */
 #define DIST_DOC		0x00040
 #define DIST_INFO		0x00080
 #define DIST_CATPAGES		0x00200
@@ -19,8 +20,32 @@
 #define DIST_LIB32		0x01000
 #endif
 #define	DIST_KERNEL		0x02000
+/* Userland documentation */
+#define DIST_DOCUSERLAND	0x04000
 #define DIST_ALL		0xFFFFF
 
+/* Subtypes for DOC packages */
+#define DIST_DOC_BN		0x00001
+#define DIST_DOC_DA		0x00002
+#define DIST_DOC_DE		0x00004
+#define DIST_DOC_EL		0x00008
+#define DIST_DOC_EN		0x00010
+#define DIST_DOC_ES		0x00020
+#define DIST_DOC_FR		0x00040
+#define DIST_DOC_HU		0x00080
+#define DIST_DOC_IT		0x00100
+#define DIST_DOC_JA		0x00200
+#define DIST_DOC_MN		0x00400
+#define DIST_DOC_NL		0x00800
+#define DIST_DOC_PL		0x01000
+#define DIST_DOC_PT		0x02000
+#define DIST_DOC_RU		0x04000
+#define DIST_DOC_SR		0x08000
+#define DIST_DOC_TR		0x10000
+#define DIST_DOC_ZH_CN		0x20000
+#define DIST_DOC_ZH_TW		0x40000
+#define DIST_DOC_ALL		0xFFFFF
+
 /* Subtypes for SRC distribution */
 #define DIST_SRC_BASE		0x00001
 #define DIST_SRC_CONTRIB	0x00002
@@ -53,7 +78,7 @@
 /* Canned distribution sets */
 
 #define _DIST_USER \
-	( DIST_BASE | DIST_KERNEL | DIST_DOC | DIST_MANPAGES | DIST_DICT )
+	( DIST_BASE | DIST_KERNEL | DIST_DOC | DIST_DOCUSERLAND | DIST_MANPAGES | DIST_DICT )
 
 #define _DIST_DEVELOPER \
 	( _DIST_USER | DIST_PROFLIBS | DIST_INFO | DIST_SRC )

Modified: head/usr.sbin/sysinstall/doc.c
==============================================================================
--- head/usr.sbin/sysinstall/doc.c	Sun Jun 28 08:42:17 2009	(r195131)
+++ head/usr.sbin/sysinstall/doc.c	Sun Jun 28 08:59:46 2009	(r195132)
@@ -101,12 +101,12 @@ docShowDocument(dialogMenuItem *self)
 	    strcpy(target, where);
     }
     else if (strstr(str, "FAQ")) {
-	where = strcpy(target, "/usr/share/doc/faq/index.html");
+	where = strcpy(target, "/usr/local/share/doc/freebsd/faq/index.html");
 	if (!file_readable(target))
 	    where = strcpy(target, "http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq");
     }
     else if (strstr(str, "Handbook")) {
-	where = strcpy(target, "/usr/share/doc/handbook/index.html");
+	where = strcpy(target, "/usr/local/share/doc/freebsd/handbook/index.html");
 	if (!file_readable(target))
 	    where = strcpy(target, "http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook");
     }
@@ -117,7 +117,7 @@ docShowDocument(dialogMenuItem *self)
     }
     else {
 	msgConfirm("Hmmmmm!  I can't seem to access the documentation you selected!\n"
-		   "Have you loaded the base distribution?  Is your network connected?");
+		   "Have you installed the english documentation?  Is your network connected?");
 	return DITEM_FAILURE;
     }
 }

Modified: head/usr.sbin/sysinstall/menus.c
==============================================================================
--- head/usr.sbin/sysinstall/menus.c	Sun Jun 28 08:42:17 2009	(r195131)
+++ head/usr.sbin/sysinstall/menus.c	Sun Jun 28 08:59:46 2009	(r195132)
@@ -72,6 +72,15 @@ clearKernel(dialogMenuItem *self)
     return DITEM_SUCCESS | DITEM_REDRAW;
 }
 
+static int
+setDocAll(dialogMenuItem *self)
+{
+    Dists |= DIST_DOC;
+    DocDists = DIST_DOC_ALL;
+    return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+
 #define _IS_SET(dist, set) (((dist) & (set)) == (set))
 
 #define IS_DEVELOPER(dist, extra) (_IS_SET(dist, _DIST_DEVELOPER | extra) || \
@@ -108,6 +117,7 @@ static int
 checkDistEverything(dialogMenuItem *self)
 {
     return Dists == DIST_ALL &&
+	_IS_SET(DocDists, DIST_DOC_ALL) &&
 	_IS_SET(SrcDists, DIST_SRC_ALL) &&
 	_IS_SET(KernelDists, DIST_KERNEL_ALL);
 }
@@ -125,6 +135,12 @@ kernelFlagCheck(dialogMenuItem *item)
 }
 
 static int
+docFlagCheck(dialogMenuItem *item)
+{
+    return DocDists;
+}
+
+static int
 checkTrue(dialogMenuItem *item)
 {
     return TRUE;
@@ -167,6 +183,7 @@ DMenu MenuIndex = {
       { " Dists, User",		"Select average user distribution.",	checkDistUser, distSetUser },
       { " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll },
       { " Documentation",	"Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
+      { " Documentation Installation",	"Installation of FreeBSD documentation set", NULL, distSetDocMenu },
       { " Doc, README",		"The distribution README file.",	NULL, dmenuDisplayFile, NULL, "README" },
       { " Doc, Errata",		"The distribution errata.",	NULL, dmenuDisplayFile, NULL, "ERRATA" },
       { " Doc, Hardware",	"The distribution hardware guide.",	NULL, dmenuDisplayFile,	NULL, "HARDWARE" },
@@ -286,6 +303,62 @@ DMenu MenuDocumentation = {
       { NULL } },
 };
 
+/* The FreeBSD documentation installation menu */
+DMenu MenuDocInstall = {
+    DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
+    "FreeBSD Documentation Installation Menu",
+    "This menu will allow you to install the whole documentation set\n"
+    "from the FreeBSD Documentation Project: Handbook, FAQ and articles.\n\n"
+    "Please select the language versions you wish to install.  At minimum,\n"
+    "you should install the English version, this is the original version\n"
+    "of the documentation.",
+    NULL,
+    NULL,
+    { { "X Exit",	"Exit this menu (returning to previous)",
+	      checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
+      { "All",		"Select all below",
+	      NULL,	      setDocAll, NULL, NULL, ' ', ' ', ' ' },
+      { " bn", 	"Bengali Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_BN },
+      { " da", 	"Danish Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_DA },
+      { " de", 	"German Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_DE },
+      { " el", 	"Greek Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_EL },
+      { " en", 	"English Documentation (recommended)",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_EN },
+      { " es", 	"Spanish Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_ES },
+      { " fr", 	"French Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_FR },
+      { " hu", 	"Hungarian Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_HU },
+      { " it", 	"Italian Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_IT },
+      { " ja", 	"Japanese Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_JA },
+      { " mn", 	"Mongolian Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_MN },
+      { " nl", 	"Dutch Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_NL },
+      { " pl", 	"Polish Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_PL },
+      { " pt", 	"Portuguese Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_PT },
+      { " ru", 	"Russian Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_RU },
+      { " sr", 	"Serbian Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_SR },
+      { " tr", 	"Turkish Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_TR },
+      { " zh_cn", 	"Simplified Chinese Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_ZH_CN },
+      { " zh_tw", 	"Traditional Chinese Documentation",
+	      dmenuFlagCheck, dmenuSetFlag, NULL, &DocDists, '[', 'X', ']', DIST_DOC_ZH_TW },
+      { NULL } },
+};
+
 #ifdef WITH_MICE
 DMenu MenuMouseType = {
     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
@@ -917,8 +990,10 @@ DMenu MenuSubDistributions = {
 	kernelFlagCheck,distSetKernel },
       { " dict",	"Spelling checker dictionary files",
 	dmenuFlagCheck,	dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT },
-      { " doc",		"Miscellaneous FreeBSD online docs",
-	dmenuFlagCheck,	dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC },
+      { " doc",		"FreeBSD Documentation set",
+	docFlagCheck,	distSetDoc },
+      { " docuser",		"Miscellaneous userland docs",
+	dmenuFlagCheck,	dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOCUSERLAND },
       { " games",	"Games (non-commercial)",
 	dmenuFlagCheck,	dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
       { " info",	"GNU info files",
@@ -1138,6 +1213,8 @@ DMenu MenuConfigure = {
 	NULL,	dmenuExit },
       { " Distributions", "Install additional distribution sets",
 	NULL, distExtractAll },
+      { " Documentation installation", "Install FreeBSD Documentation set",
+	NULL, distSetDocMenu },
       { " Packages",	"Install pre-packaged software for FreeBSD",
 	NULL, configPackages },
       { " Root Password", "Set the system manager's password",

Modified: head/usr.sbin/sysinstall/sysinstall.h
==============================================================================
--- head/usr.sbin/sysinstall/sysinstall.h	Sun Jun 28 08:42:17 2009	(r195131)
+++ head/usr.sbin/sysinstall/sysinstall.h	Sun Jun 28 08:59:46 2009	(r195132)
@@ -103,6 +103,7 @@
 #define VAR_DIST_MAIN			"distMain"
 #define VAR_DIST_SRC			"distSRC"
 #define VAR_DIST_KERNEL			"distKernel"
+#define VAR_DIST_DOC			"distDoc"
 #define VAR_DEDICATE_DISK		"dedicateDisk"
 #define VAR_DOMAINNAME			"domainname"
 #define VAR_EDITOR			"editor"
@@ -414,6 +415,7 @@ extern Boolean		have_volumes;		/* Media 
 extern Variable		*VarHead;		/* The head of the variable chain		*/
 extern Device		*mediaDevice;		/* Where we're getting our distribution from	*/
 extern unsigned int	Dists;			/* Which distributions we want			*/
+extern unsigned int	DocDists;		/* Which Doc dists we want			*/
 extern unsigned int	SrcDists;		/* Which src distributions we want		*/
 extern unsigned int	KernelDists;		/* Which kernel dists we want			*/
 extern int		BootMgr;		/* Which boot manager to use 			*/
@@ -429,6 +431,7 @@ extern DMenu		MenuMBRType;		/* Type of M
 #endif
 #endif
 extern DMenu		MenuConfigure;		/* Final configuration menu			*/
+extern DMenu		MenuDocInstall;		/* Documentation Installation menu		*/
 extern DMenu		MenuDocumentation;	/* Documentation menu				*/
 extern DMenu		MenuFTPOptions;		/* FTP Installation options			*/
 extern DMenu		MenuIndex;		/* Index menu					*/
@@ -599,6 +602,8 @@ extern int	distSetMinimum(dialogMenuItem
 extern int	distSetEverything(dialogMenuItem *self);
 extern int	distSetSrc(dialogMenuItem *self);
 extern int	distSetKernel(dialogMenuItem *self);
+extern int	distSetDoc(dialogMenuItem *self);
+extern int	distSetDocMenu(dialogMenuItem *self);
 extern int	distExtractAll(dialogMenuItem *self);
 extern int	selectKernel(void);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906280859.n5S8xkjS006812>