Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uunet!super!rminnich From: rminnich@super.ORG (Ronald G Minnich) Newsgroups: comp.windows.x Subject: Not cluttering up /usr with R4 Message-ID: <22726@metropolis.super.ORG> Date: 21 Mar 90 19:17:30 GMT References: <7009@uhccux.uhcc.hawaii.edu> Sender: news@super.ORG Reply-To: rminnich@metropolis.UUCP (Ronald G Minnich) Distribution: usa Organization: Supercomputing Research Center, Bowie, Md. Lines: 98 In article <7009@uhccux.uhcc.hawaii.edu> steven@uhccux.UUCP () writes: >When I install X11, it puts the executables and libraries in /usr/bin/X11 and >/usr/lib respectively. In other words, it puts these files in the file systems >that aren't available via nfs mounts. Thus making it usable for only one >system. Also, It is filling up the / and /usr file systems. Time i did this. This is the result of work Dan Kopetzki and I have done at SRC. I can't post the actual diffs cause they are on an isolated network. sorry. First off, make a copy of the entire tree using the very nice lndir.sh script. Do one tree per architecture. Then make a special directory somewhere (call it localmods or something) and in this directory place all the files that are different. There are so few that I didn't even preserve the hierarchy. Then in your shadow soft link trees delete links from the shadow tree to the source tree for each changed file, and ln -s to the localmods file instead. For example, you might have after the lndir.sh XR4.sun3/mit/lib/Xt/Imakefile -> /usr/local/src/XR4/mit/lib/Xt/Imakefile Since we need to change this makefile, rm XR4.sun3/blah blah blah and ln -s /usr/local/src/XR4.localmods/Imakefile.Xt \\ /usr/local/src/XR4.sun3/mit/lib/Xt/Imakefile anyways, For the rest of this letter assume that your destination directory is /usr/local. lib is /usr/local/lib/X11R4, bin is /usr/local/bin/X11R4, include is /usr/local/include/X11R4. Since /usr/local/lib/X11R4 corresponds (roughly) to /usr/lib, there is a directory in /usr/local/lib/X11R4 called X11. .so and .sa files go in /usr/local/include/X11R4, other stuff like config in /usr/local/include/X11R4/X11. --- in mit/lib/Xt/Imakefile fix FS_DEFINES FS_DEFINES= -DXFILESEARCHPATHDEFAULT=\"/usr/local/lib/X11R4/X11/%T/%N%S:\ \" add a SpecialSharedAndDebuggedObjectRule for Intrinsic.o. Just copy the line for Initialize.o, and change APP_DEFINES to FS_DEFINES Everywhere else you see a fule for Initalize.o, make a corresponding rule for Intrinsic.o, with the same replacement for FS_DEFINES --- in the mit/rgb/Imakefile, add the lines: #ifdef DefaultFontPath SITE_FONT_PATH = -DCOMPILEDDEFAULTFONTPATH=\"DefaultFontPath\" #else SITE_FONT_PATH = #endif #ifdef DefaultRGBDataBase SITE_RGB_DB=\"DefaultRGBDataBase\" #else SITE_RGB_DB= #endif SITE_DEFINES = $(SITE_FONT_PATH) $(SITE_RGB_DB) $(SITE_DISPLAY_CLASS) SpecialObjectRule(rgb.o, $(IRULESRC)/Imake.tmpl, $(SITE_DEFINES) SpecialObjectRule(showrgb.o, $(IRULESRC)/Imake.tmpl, $(SITE_DEFINES) Note that in your site.def you must now define DefaultFontPath (i.e. /usr/local/lib/X11R4/X11/fonts) and DefaultRGBDataBase) --- in mit/clients/twm: in twm.h fix the definition of BITMAPS. I was getting tired at this point so i did not fix it right, but do it via site.def. in parse.c, fix the definition of SYSTEM_INIT_FILE --- site.def Define ExtraLibraries (i assume you want shared libraries) as, e.g., #ifndef ExtraLibraries #define ExtraLibraries /usr/local/lib/X11R4 #endif #ifndef UsrLibDir #define UsrLibDir /usr/local/lib/X11R4 #endif #ifndef BinDir #define BinDir /usr/local/bin/X11R4 #endif #ifndef IncRoot #define IncRoot /usr/local/include/X11R4 #endif #ifndef DefaultRGBDataBase #define #endif #ifndef ManDirectoryRoot #define #endif --- It is some measure of how good a job the X guys did that it is this easy. That is it. I have NO X stuff in /usr, not even soft links. I don't run ldconfig, or set LD_ENV_PATH. Why the -L switch works has me mystified; ldd on oclock reports dependencies on libs in /usr/local/lib/X11R4, but strings /usr/local/bin/X11R4/oclock shows *no* strings with a local in them! Where the info is stored is something of a mystery. Let me know if i can help further. Dan and I have done work on contrib too; I will send something on that later when my typing fingers are less tired. ron -- rminnich@super.org