This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: directory structure


Earnie Boyd <earnie_boyd@yahoo.com> writes:

> I mv the "important" programs to /bin, I.E.: cygwin1.dll, sh.exe, bash.exe,
> mount.exe, umount.exe, cygcheck.exe and cygpath.exe.
> 
> Also, I don't mount the cygwin H-* director(y|ies) to /usr, etc. but create the
> /bin /etc /var/... /usr/... and /usr/local/... directories and mv things to the
> appropriate directories.  This has the advantage of fewer mount entries in the
> registry, I can support more than one version of cygwin and a time, and I can
> segregate the mingw32 versions into a separate directory.  This is accomplished
> by simply executing from dos `sh -c "cd /bin && ./umount / && ./mount
> C:\\newroot /"'.  I use the prompt to remind me which root I'm in.

I used Earnie's setup guide as a starting point. (Thanks, Earnie!)

The setup I ended up with is akin to a "chroot jail". It is
basically a symlink farm and looks approximately like this:

  D:/cygnus/cygwin-b20/...

        -- B20.1 structure as per full.exe

  D:/cygwin                                     -- mount D:\\cygwin /

        /cygnus -> //d/cygnus/cygwin-b20

                -- this is the clever bit, a link to *some* Cygwin
                   release; re-symlinking here allows to quickly try
                   out different release

        -- The rest we make look UNIXish.

        /bin
                sh.exe -> /usr/bin/sh.exe
                echo.exe -> /usr/bin/echo.exe
                ...

        /etc
                group
                passwd
                termcap -> /cygnus/etc/termcap
                ...

        /lib
                libiberty.a -> /cygnus/lib/libiberty.a

        /mnt
                c -> //c/       -- trailing slash is significant!
                d -> //d/
                ...

        /opt
                mypackage       -- local^2 stuff

        /tmp -> //c/temp        -- shared scratch area

        /usr
                H-i586-cygwin32 -> /cygnus/H-i586-cygwin32
                bin -> H-i586-cygwin32/bin
                i586-cygwin32 -> i586-pc-cygwin32
                i586-pc-cygwin32 -> H-i586-cygwin32/i586-pc-cygwin32
                include -> /cygnus/include
                lib -> H-i586-cygwin32/lib

                /local
                        -- Andy Piper's local tree
                        -- Sergey Okhapine's remote tools

                        mypackage -> /opt/mypackage

                share -> /cygnus/share

Advantages:

  * Nothing is changed in the installed Cygnus tree. The desired
    UNIXish structure is made up in the jail.

  * All local config in one place, independent of Cygnus release.

  * Only need root mountpoint to bootstrap.

  * All config represented in file system, so can be tarballed and
    distributed.

Problem:

  * People hate symlink farms...

Comments?

-- 
Michael Diers                            mailto:mdiers@logware.de

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]