Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jun 2003 22:25:26 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Gordon Tetlow <gordont@gnf.org>
Cc:        Julian Elischer <julian@elischer.org>
Subject:   Re: Moving some items out of src/sbin to src/usr.sbin
Message-ID:  <20030601221123.B11577@gamplex.bde.org>
In-Reply-To: <20030531225040.GV87863@roark.gnf.org>
References:  <20030531202221.GA22056@dragon.nuxi.com> <Pine.BSF.4.21.0305311527220.4662-100000@InterJet.elischer.org> <20030531225040.GV87863@roark.gnf.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 31 May 2003, Gordon Tetlow wrote:

> On Sat, May 31, 2003 at 03:28:22PM -0700, Julian Elischer wrote:

> > > On Sat, May 31, 2003 at 12:38:49PM -0700, Gordon Tetlow wrote:
> > > > To cut down on the size of a dynamically-linked root, I'd like to
> > > > repo-copy the following utilities from src/sbin to src/usr.sbin:
> > > >
> > > > mount_portalfs
> > > > mount_nwfs
> > > > mount_smbfs
> > > > natd
> > > > ipnat
> > > >
> > > > Does anyone have any objections?
> > it would make it hard to mount an smbfs /usr right?
> >
> > I think it goes against POLA to mofe mount subtypes away from where they
> > are..
>
> mount_smbfs is dynamically linked currently. You can't use it to mount
> /usr even if you wanted to. No POLA will be broken by moving it. And
> if you are using nwfs or portalfs for /usr, may $DEITY have pity on your
> soul.

There is little point in moving the utilities for the dynamically linked
case, since they are small in that case.  Just don't put their libraries
in the root partition, so that they work like mount_smbfs does now (not,
if /usr is not mounted).

mount_smbfs isn't actually dynamically linked currently:

%%%
$ file /sbin/mount_smbfs
/sbin/mount_smbfs: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 5.0, statically linked, stripped
%%%

The world was built with NOSHARED=yes.

This seems to be a bug in mount_smbfs/Makefile:

%%%
# Needs to be dynamically linked for optional dlopen() access to
# userland libiconv (see the -E option).
#
NOSHARED?=	NO
%%%

If it really needs to be dynamically linked, then NOSHARED should
be set unconditionally.

BTW, rc.ng still doesn't support nfs-mounting /usr.  It attempts to use
utilities in /usr before /usr is mounted.  From console.log:

%%%
...
May 29 20:51:15 gamplex kernel: /dev/ad0s2h: clean, 1098574 free (14 frags, 137320 blocks, 0.0% fragmentation)
May 29 20:51:15 gamplex kernel: chown: not found
May 29 20:51:15 gamplex kernel: Setting hostname: gamplex.bde.org.
May 29 20:51:15 gamplex kernel: fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
May 29 20:51:15 gamplex kernel: inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255
May 29 20:51:15 gamplex kernel: ether 00:90:27:99:02:99
May 29 20:51:15 gamplex kernel: media: Ethernet autoselect (100baseTX <full-duplex>)
May 29 20:51:15 gamplex kernel: status: active
May 29 20:51:15 gamplex kernel: lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
May 29 20:51:15 gamplex kernel: inet 127.0.0.1 netmask 0xff000000
May 29 20:51:15 gamplex kernel: id: not found
...
%%%

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030601221123.B11577>