HEADS UP: /bin and /sbin are now dynamically linked

Matthew D. Fuller fullermd at over-yonder.net
Wed Nov 26 08:25:28 PST 2003

On Tue, Nov 25, 2003 at 02:17:02PM -0500 I heard the voice of
slave-mike, and lo! it spake thus:
> Would it be possible to get a copy of this script?
> Please! :)

Oh, it's pretty simplistic.  It's actually on a box that's in the closet
right now, but I think this is an older working version:
    @echo '==> Getting needed libraries'
    -@(cd ${SRCBASE}/bin && ldd ${BINFILES}) > liblist.raw
    -@(cd ${SRCBASE}/sbin && ldd ${SBINFILES}) >> liblist.raw
[ ... similar stuff for other dirs ... ]
    - at grep -v '^[a-z]' liblist.raw | awk '{print $$3}' | sort | uniq \
        | sed 's,^${SRCBASE},,' | sed 's,^/,,' > liblist.cooked
    - at echo >> liblist.cooked
    @tar -cf - -C ${SRCBASE} `cat liblist.cooked` \
        | tar -xvpf - -C ${DSTBASE}
    -@(cd ${SRCBASE}/usr/lib && install -c -m 444 pam_* ${DSTBASE}/usr/lib)
    @echo '<== Done libraries'

You'll note that I already manually slipped in the pam_* .so's, which is
one of those additional non-obvious "extra files" things that Garance
mentioned in the other message.  I could probably replace the whole
transformation pipeline with a few lines of actual scripted awk(1); I
just did it all inline in the Makefile because I was lazy.

${SRCBASE} is somewhere I DESTDIR='d an installworld previously, and
${DSTBASE} becomes (as a result of a bunch of other make targets, of
which this is one of the later ones) a dir I can tar up and untar
somewhere as /.

Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/

"The only reason I'm burning my candle at both ends, is because I
      haven't figured out how to light the middle yet"

More information about the freebsd-current mailing list