Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!usc!venera.isi.edu!raveling From: raveling@isi.edu (Paul Raveling) Newsgroups: comp.windows.x Subject: Re: difficulty installing in other than /usr/[bin,lib,include]/X11 Message-ID: <10782@venera.isi.edu> Date: 2 Dec 89 05:07:10 GMT References: <29421@shemp.CS.UCLA.EDU> <29336@shemp.CS.UCLA.EDU> <3294@convex.UUCP> Sender: news@venera.isi.edu Reply-To: raveling@isi.edu (Paul Raveling) Organization: USC Information Sciences Institute Lines: 130 In article <29421@shemp.CS.UCLA.EDU>, wine@maui.cs.ucla.edu (David Wine) writes: > > > I'd suggest just making /usr/bin/X11, /usr/lib/X11, and /usr/include/X11 > > links to directories where you want things to really be. > > This would certainly be the most straightforward approach, but I don't > want to be messing with things while people are using release 2. We're using an awkward but working solution to this problem. We usually have 3 versions of X11 simultaneously available from the same file server. Each workstation has a /private subtree on local disk that's referenced from lots of places on the file server's tree via symbolic links. Many things in /private are symbolic links back to the file server, so changing the link in /private can select a private version. For example, Directory /usr/bin/X11 -> /private/bin/X11 -> /pd/X11R3/usr/bin Back on the file server we have /pd/X11R3, /pd/X11R2.hp, and various other trees with a similarly structured usr subtree. A shell script selects which X11 version to use by changing the symbolic links in /private. There are some tricks in setting symbolic links though. For example, /usr/lib/libX11.a and many other libraries must be links to /private/lib/.a. They must be mingled with other non-X libraries instead of being neatly segregated into a /usr/lib/X11 directory. This calls for LOTS of caution when installing a new OS version on the file server -- a "normal" update would overwrite many of the needed links. We've also adopted a local convention that X11 manual entries go into man1 and man3 subdirectories of /usr/man/X11. This greatly simplifies manual housekeeping, except that "make install.man" doesn't normally put things in the right place. At best this means being prepared with a couple more unusual symbolic links; at worst it means doing "make -n install.man > install_script", then editing and running "install_script". For the benefit of anyone with slightly masochistic tendencies I'll append a copy of the select_x11 shell script that selects which version of X11 any given workstation uses. A typical invocation would be select_x11 X11R3 to select files in the /pd/X11R3/usr subtree on the file server. ---------------- Paul Raveling Raveling@isi.edu ------------------------------------------------------------------------ #!/bin/csh # # Script to select a version of X11 # Example: "select_x11 X11R3" selects MIT's X11R3 release, # with installed files rooted at /pd/X11R3/usr # # Paul Raveling May 19, 1989 if ( -e /private/bin ) then # OK if it exists else mkdir /private/bin endif if ( -e /private/include ) then # OK if it exists else mkdir /private/include endif if ( -e /private/lib ) then # OK if it exists else mkdir /private/lib endif if ( -e /private/man ) then # OK if it exists else mkdir /private/man endif rm -f /private/bin/X11 ln -s /pd/$1/usr/bin /private/bin/X11 rm -f /private/include/X11 ln -s /pd/$1/usr/include /private/include/X11 rm -f /private/lib/X11 ln -s /pd/$1/usr/lib /private/lib/X11 rm -f /private/man/X11 ln -s /pd/$1/usr/man /private/man/X11 rm -f /private/lib/libX11.a ln -s /pd/$1/usr/lib/libX11.a /private/lib/libX11.a rm -f /private/lib/libXaw.a ln -s /pd/$1/usr/lib/libXaw.a /private/lib/libXaw.a rm -f /private/lib/libXext.a ln -s /pd/$1/usr/lib/libXext.a /private/lib/libXext.a rm -f /private/lib/libXmu.a ln -s /pd/$1/usr/lib/libXmu.a /private/lib/libXmu.a rm -f /private/lib/libXt.a ln -s /pd/$1/usr/lib/libXt.a /private/lib/libXt.a rm -f /private/lib/libXw.a ln -s /pd/$1/usr/lib/libXw.a /private/lib/libXw.a rm -f /private/lib/liboldX.a ln -s /pd/$1/usr/lib/liboldX.a /private/lib/liboldX.a if ( !~ -e /private/lib/X0devices ) then cp /pd/$1/usr/lib/X0devices.default /private/lib/X0devices endif if ( !~ -e /private/lib/X0screens ) then cp /pd/$1/usr/lib/X0screens.default /private/lib/X0screens endif ## Should we also do something like this? ##if ( !~ -e /etc/X0.hosts) then ## cp /pd/$1/usr/lib/X0.hosts.default /etc/X0.hosts ##endif if ( $1 == "X11R3" ) then echo "setenv X11ALTBIN /pd/X11R2.hp/usr/bin" > /private/X11ALTBIN else echo "setenv X11ALTBIN /pd/X11R3/usr/bin" > /private/X11ALTBIN endif