From 0a65345ca494092b1990c4924696781acbb3e290 Mon Sep 17 00:00:00 2001 From: Ken Smith Date: Tue, 16 Dec 2008 01:18:10 +0000 Subject: [PATCH] Stop treating Xorg as a distribution in the mainline portion of sysinstall and leave it to be handled in the packages section (or post-install completely) along with all the other packages. --- usr.sbin/sysinstall/dispatch.c | 2 -- usr.sbin/sysinstall/dist.c | 55 +------------------------------- usr.sbin/sysinstall/dist.h | 4 --- usr.sbin/sysinstall/menus.c | 48 +++------------------------- usr.sbin/sysinstall/sysinstall.8 | 52 ------------------------------ usr.sbin/sysinstall/sysinstall.h | 6 ---- usr.sbin/sysinstall/system.c | 2 +- 7 files changed, 6 insertions(+), 163 deletions(-) diff --git a/usr.sbin/sysinstall/dispatch.c b/usr.sbin/sysinstall/dispatch.c index b1d0099b6803..80348b1e5d04 100644 --- a/usr.sbin/sysinstall/dispatch.c +++ b/usr.sbin/sysinstall/dispatch.c @@ -70,10 +70,8 @@ static struct _word { { "distSetCustom", distSetCustom }, { "distUnsetCustom", distUnsetCustom }, { "distSetDeveloper", distSetDeveloper }, - { "distSetXDeveloper", distSetXDeveloper }, { "distSetKernDeveloper", distSetKernDeveloper }, { "distSetUser", distSetUser }, - { "distSetXUser", distSetXUser }, { "distSetMinimum", distSetMinimum }, { "distSetEverything", distSetEverything }, { "distSetSrc", distSetSrc }, diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c index 8e6c22954417..c3ec4c18326b 100644 --- a/usr.sbin/sysinstall/dist.c +++ b/usr.sbin/sysinstall/dist.c @@ -45,7 +45,6 @@ unsigned int Dists; unsigned int SrcDists; -unsigned int XOrgDists; unsigned int KernelDists; enum _disttype { DT_TARBALL, DT_SUBDIST, DT_PACKAGE }; @@ -63,7 +62,6 @@ typedef struct _dist { static Distribution KernelDistTable[]; static Distribution SrcDistTable[]; -static Distribution XOrgDistTable[]; #define DTE_TARBALL(name, mask, flag, directory) \ { name, mask, DIST_ ## flag, DT_TARBALL, { directory } } @@ -92,7 +90,6 @@ static Distribution DistTable[] = { DTE_SUBDIST("src", &Dists, SRC, SrcDistTable), DTE_TARBALL("ports", &Dists, PORTS, "/usr"), DTE_TARBALL("local", &Dists, LOCAL, "/"), - DTE_PACKAGE("X.Org", &Dists, XORG, "xorg"), DTE_END, }; @@ -138,15 +135,11 @@ distVerifyFlags(void) { if (SrcDists) Dists |= DIST_SRC; - if (XOrgDists) - Dists |= DIST_XORG; if (KernelDists) Dists |= DIST_KERNEL; - if (isDebug()) { + if (isDebug()) msgDebug("Dist Masks: Dists: %0x, Srcs: %0x Kernels: %0x\n", Dists, SrcDists, KernelDists); - msgDebug("XServer: %0x\n", XOrgDists); - } } int @@ -154,7 +147,6 @@ distReset(dialogMenuItem *self) { Dists = 0; SrcDists = 0; - XOrgDists = 0; KernelDists = 0; return DITEM_SUCCESS | DITEM_REDRAW; } @@ -172,9 +164,6 @@ distConfig(dialogMenuItem *self) if ((cp = variable_get(VAR_DIST_SRC)) != NULL) SrcDists = atoi(cp); - if ((cp = variable_get(VAR_DIST_X11)) != NULL) - XOrgDists = atoi(cp); - if ((cp = variable_get(VAR_DIST_KERNEL)) != NULL) KernelDists = atoi(cp); @@ -182,14 +171,6 @@ distConfig(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_REDRAW; } -static int -distSetX(void) -{ - Dists |= DIST_XORG; - XOrgDists = DIST_XORG_ALL; - return DITEM_SUCCESS; -} - int selectKernel(void) { @@ -215,17 +196,6 @@ distSetDeveloper(dialogMenuItem *self) return i; } -int -distSetXDeveloper(dialogMenuItem *self) -{ - int i; - - i = distSetDeveloper(self); - i |= distSetX(); - distVerifyFlags(); - return i; -} - int distSetKernDeveloper(dialogMenuItem *self) { @@ -240,17 +210,6 @@ distSetKernDeveloper(dialogMenuItem *self) return i; } -int -distSetXKernDeveloper(dialogMenuItem *self) -{ - int i; - - i = distSetKernDeveloper(self); - i |= distSetX(); - distVerifyFlags(); - return i; -} - int distSetUser(dialogMenuItem *self) { @@ -264,17 +223,6 @@ distSetUser(dialogMenuItem *self) return i; } -int -distSetXUser(dialogMenuItem *self) -{ - int i; - - i = distSetUser(self); - i |= distSetX(); - distVerifyFlags(); - return i; -} - int distSetMinimum(dialogMenuItem *self) { @@ -292,7 +240,6 @@ distSetEverything(dialogMenuItem *self) Dists = DIST_ALL; SrcDists = DIST_SRC_ALL; - XOrgDists = DIST_XORG_ALL; KernelDists = DIST_KERNEL_ALL; i = distMaybeSetPorts(self); distVerifyFlags(); diff --git a/usr.sbin/sysinstall/dist.h b/usr.sbin/sysinstall/dist.h index cfa82026482b..0eb42e19e7c6 100644 --- a/usr.sbin/sysinstall/dist.h +++ b/usr.sbin/sysinstall/dist.h @@ -12,7 +12,6 @@ #define DIST_SRC 0x00020 #define DIST_DOC 0x00040 #define DIST_INFO 0x00080 -#define DIST_XORG 0x00100 #define DIST_CATPAGES 0x00200 #define DIST_PORTS 0x00400 #define DIST_LOCAL 0x00800 @@ -46,9 +45,6 @@ #define DIST_SRC_CDDL 0x100000 #define DIST_SRC_ALL 0x3FFFFF -/* Subtypes for X.Org packages */ -#define DIST_XORG_ALL 0xFFFFF - /* Subtypes for KERNEL distribution */ #define DIST_KERNEL_GENERIC 0x00001 #define DIST_KERNEL_SMP 0x00002 diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index a600da1befe7..3406580147d2 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -86,36 +86,18 @@ checkDistDeveloper(dialogMenuItem *self) return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_ALL); } -static int -checkDistXDeveloper(dialogMenuItem *self) -{ - return IS_DEVELOPER(Dists, DIST_XORG) && _IS_SET(SrcDists, DIST_SRC_ALL); -} - static int checkDistKernDeveloper(dialogMenuItem *self) { return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_SYS); } -static int -checkDistXKernDeveloper(dialogMenuItem *self) -{ - return IS_DEVELOPER(Dists, DIST_XORG) && _IS_SET(SrcDists, DIST_SRC_SYS); -} - static int checkDistUser(dialogMenuItem *self) { return IS_USER(Dists, 0); } -static int -checkDistXUser(dialogMenuItem *self) -{ - return IS_USER(Dists, DIST_XORG); -} - static int checkDistMinimum(dialogMenuItem *self) { @@ -127,7 +109,6 @@ checkDistEverything(dialogMenuItem *self) { return Dists == DIST_ALL && _IS_SET(SrcDists, DIST_SRC_ALL) && - _IS_SET(XOrgDists, DIST_XORG_ALL) && _IS_SET(KernelDists, DIST_KERNEL_ALL); } @@ -137,17 +118,6 @@ srcFlagCheck(dialogMenuItem *item) return SrcDists; } -static int -x11FlagCheck(dialogMenuItem *item) -{ - if (XOrgDists != 0) - Dists |= DIST_XORG; - else - Dists &= ~DIST_XORG; - - return Dists & DIST_XORG; -} - static int kernelFlagCheck(dialogMenuItem *item) { @@ -191,10 +161,8 @@ DMenu MenuIndex = { { " Dists, Basic", "Basic FreeBSD distribution menu.", NULL, dmenuSubmenu, NULL, &MenuSubDistributions }, { " Dists, Developer", "Select developer's distribution.", checkDistDeveloper, distSetDeveloper }, { " Dists, Src", "Src distribution menu.", NULL, dmenuSubmenu, NULL, &MenuSrcDistributions }, - { " Dists, X Developer", "Select X developer's distribution.", checkDistXDeveloper, distSetXDeveloper }, { " Dists, Kern Developer", "Select kernel developer's distribution.", checkDistKernDeveloper, distSetKernDeveloper }, { " Dists, User", "Select average user distribution.", checkDistUser, distSetUser }, - { " Dists, X User", "Select average X user distribution.", checkDistXUser, distSetXUser }, { " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll }, { " Documentation", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation }, { " Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "README" }, @@ -904,22 +872,16 @@ DMenu MenuDistributions = { "distributions", { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, - { "All", "All system sources, binaries and X Window System", + { "All", "All system sources and binaries", checkDistEverything, distSetEverything, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset selected distribution list to nothing", NULL, distReset, NULL, NULL, ' ', ' ', ' ' }, { "4 Developer", "Full sources, binaries and doc but no games", checkDistDeveloper, distSetDeveloper }, - { "5 X-Developer", "Same as above + X Window System", - checkDistXDeveloper, distSetXDeveloper }, - { "6 Kern-Developer", "Full binaries and doc, kernel sources only", + { "5 Kern-Developer", "Full binaries and doc, kernel sources only", checkDistKernDeveloper, distSetKernDeveloper }, - { "7 X-Kern-Developer", "Same as above + X Window System", - checkDistXKernDeveloper, distSetXKernDeveloper }, - { "8 User", "Average user - binaries and doc only", + { "6 User", "Average user - binaries and doc only", checkDistUser, distSetUser }, - { "9 X-User", "Same as above + X Window System", - checkDistXUser, distSetXUser }, { "A Minimal", "The smallest configuration possible", checkDistMinimum, distSetMinimum }, { "B Custom", "Specify your own distribution set", @@ -936,7 +898,7 @@ DMenu MenuSubDistributions = { NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, - { "All", "All system sources, binaries and X Window System", + { "All", "All system sources and binaries", NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset all of the below", NULL, distReset, NULL, NULL, ' ', ' ', ' ' }, @@ -968,8 +930,6 @@ DMenu MenuSubDistributions = { dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS }, { " local", "Local additions collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL}, - { " X.Org", "The X.Org distribution", - dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XORG }, { NULL } }, }; diff --git a/usr.sbin/sysinstall/sysinstall.8 b/usr.sbin/sysinstall/sysinstall.8 index 9bdcf7fbfac4..689631e42d5f 100644 --- a/usr.sbin/sysinstall/sysinstall.8 +++ b/usr.sbin/sysinstall/sysinstall.8 @@ -470,38 +470,6 @@ The ports collection. /usr/src/usr.bin .It Li susbin /usr/src/usr.sbin -.It Li Xbin -X.Org client applications. -.It Li Xlib -X.Org libraries. -.It Li Xman -X.Org manual pages. -.It Li Xdoc -X.Org protocol and library documentation. -.It Li Xprog -X.Org imake distribution. -.It Li Xsrv -X.Org X server. -.It Li Xnest -X.Org nested X server. -.It Li Xprt -X.Org print server. -.It Li Xvfb -X.Org virtual frame-buffer X server. -.It Li Xfmsc -X.Org miscellaneous font set. -.It Li Xf75 -X.Org 75DPI font set. -.It Li Xf100 -X.Org 100DPI font set. -.It Li Xfcyr -X.Org Cyrillic font set. -.It Li Xft1 -X.Org Type 1 font set. -.It Li Xftt -X.Org TrueType font set. -.It Li Xfs -X.Org font server. .It Li local Local additions collection. .El @@ -511,26 +479,11 @@ Selects the standard Developer's distribution set. .Pp .Sy Variables : None -.It distSetXDeveloper -Selects the standard X Developer's distribution set. -.Pp -.Sy Variables : -None -.It distSetKernDeveloper -Selects the standard kernel Developer's distribution set. -.Pp -.Sy Variables : -None .It distSetUser Selects the standard user distribution set. .Pp .Sy Variables : None -.It distSetXUser -Selects the standard X user's distribution set. -.Pp -.Sy Variables : -None .It distSetMinimum Selects the very minimum distribution set. .Pp @@ -546,11 +499,6 @@ Interactively select source subcomponents. .Pp .Sy Variables : None -.It distSetXOrg -Interactively select X.Org subcomponents. -.Pp -.Sy Variables : -None .It distExtractAll Install all currently selected distributions (requires that media device also be selected). diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index b1dd5b9ab6cd..d10aac5f58ca 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -102,7 +102,6 @@ #define VAR_DISTS "dists" #define VAR_DIST_MAIN "distMain" #define VAR_DIST_SRC "distSRC" -#define VAR_DIST_X11 "distX11" #define VAR_DIST_KERNEL "distKernel" #define VAR_DEDICATE_DISK "dedicateDisk" #define VAR_DOMAINNAME "domainname" @@ -191,7 +190,6 @@ #define VAR_VAR_SIZE "varSize" #define VAR_TMP_SIZE "tmpSize" #define VAR_HOME_SIZE "homeSize" -#define VAR_XORG_CONFIG "_xorgconfig" #define VAR_TERM "TERM" #define VAR_CONSTERM "_consterm" @@ -417,7 +415,6 @@ 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 SrcDists; /* Which src distributions we want */ -extern unsigned int XOrgDists; /* Which X.Org dists we want */ extern unsigned int KernelDists; /* Which kernel dists we want */ extern int BootMgr; /* Which boot manager to use */ extern int StatusLine; /* Where to print our status messages */ @@ -593,11 +590,8 @@ extern int distConfig(dialogMenuItem *self); extern int distSetCustom(dialogMenuItem *self); extern int distUnsetCustom(dialogMenuItem *self); extern int distSetDeveloper(dialogMenuItem *self); -extern int distSetXDeveloper(dialogMenuItem *self); extern int distSetKernDeveloper(dialogMenuItem *self); -extern int distSetXKernDeveloper(dialogMenuItem *self); extern int distSetUser(dialogMenuItem *self); -extern int distSetXUser(dialogMenuItem *self); extern int distSetMinimum(dialogMenuItem *self); extern int distSetEverything(dialogMenuItem *self); extern int distSetSrc(dialogMenuItem *self); diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index 19307d5bbf9f..a0e60d062e17 100644 --- a/usr.sbin/sysinstall/system.c +++ b/usr.sbin/sysinstall/system.c @@ -187,7 +187,7 @@ systemInitialize(int argc, char **argv) printf("%s running as init on %s\n", argv[0], OnVTY ? "vty0" : "serial console"); ioctl(0, TIOCSCTTY, (char *)NULL); setlogin("root"); - setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1); + setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin", 1); setbuf(stdin, 0); setbuf(stderr, 0); #if 0