Subject: Building Static copy of ls

From: Brad Groshok <[email-masked]>
Date: Wed, 19 Mar 1997 22:49:38 -0500 (EST)

I'm just starting an install of wu_ftpd (13) on a Sun running Solaris 2.5.1

>From scanning this mailing list for the last several months I have seen many
references to building a statically linked copy of ls. But have not actually
seen simple step by step instructions for doing it.

Can someone point me (or explain for all on the list) how to build a static
copy of ls.
So far I have downloaded GNU fileutils-3.16. It compiles all modules just
fine. just not static.

If I run truss on the new ls command it has reference to:
open("/usr/lib/libintl.so.1", O_RDONLY)         = 4
which looks like it is still using libraries.

After ls is compiled
I assume that by placing ls in the ~ftp/bin directory and maybe even
~ftp/usr/bin that I will not have to include any of the libs (~ftp/usr/lib)

After this step I also assume that the same will hold true for customer
directories. ~user/bin and ~user/usr/bin will have the static copy of ls in
them. But I can omit replicating any of the libs in ~user/usr/lib.

Also any pointers to any FAQ's on installing and setting up wu_ftp would
also be appreciated. I have the O'Riely stuff just looking for other
comments. Can't have too many references. (or can you :-)  )

Thanks in advance.

======================================================================
Regards:  Brad Groshok ([email-masked])
          President Odyssey Network Inc
          London Ontario Canada (519) 660-8883
          http://www.odyssey.on.ca
======================================================================

---

From: Jim Davis <[email-masked]>
Date: Wed, 19 Mar 1997 21:41:54 -0700 (MST)

> Can someone point me (or explain for all on the list) how to build a static

You don't need a statically linked ls for wu-ftpd to work properly on
Solaris 2.5.1.  If you really want to try to build one, the
comp.unix.solaris FAQ discusses your options.

> them. But I can omit replicating any of the libs in ~user/usr/lib.

Ah, if that's your reason for pursuing a statically linked ls, then there
is another way to avoid 100 copies of libc.so in the ftp tree:  Use
loopback mounts.  They're like symbolic links, but (unlike symbolic links) 
will work in a chrooted environment.

Here's a simple example of a loopback mount in /etc/vfstab on our ftp
server to make /usr/ftp readonly.  The real filesystem where ftp stuff
lives is /local/ftp:

/local/ftp	-	/usr/ftp	lofs	-	yes	ro

You could do something analogous to make /customer1/ftp/lib,
/customer2/ftp/lib, ..., /customer100/ftp/lib loopback mounts of ~ftp/lib.