Re: automated clean up of /usr/lib because of /lib

2003-09-01 Thread Alexander Leidinger
On Sun, 31 Aug 2003 15:02:21 -0700 (PDT)
Doug Barton <[EMAIL PROTECTED]> wrote:

> There was a discussion of this recently, and the conclusion was more or
> less that doing this in an automated fashion is frought with danger,
> since you don't know for sure what else besides system components the
> user has put in the various directories.
> 
> I've been using the following combination of a bash function (that could
> just as easily be its own script) and a script I call
> after_installworld.

[script which does the right thing]

> This combination keeps things squeaky clean for me.

Yes, it does it for you (and for everyone else who does the right
thing), but I've seen abuse of your system directories to many times, so
this would perhaps screw some of our users. So I don't think we should
add something like you do or something like David does into
installworld.

My snipped just looks if there are libs in /usr/lib which also are in
/lib and removes them from /usr/lib. That's one specific thing we know
we have to do now. I don't insist of adding it to installworld, but we
should at least add something into UPDATING which tells the user to
clean up his /usr/lib after we added /lib (and my snipped automates
this).

Bye,
Alexander.

-- 
Secret hacker rule #11: hackers read manuals.

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: automated clean up of /usr/lib because of /lib

2003-09-01 Thread David O'Brien
On Sun, Aug 31, 2003 at 08:31:49PM +0200, Alexander Leidinger wrote:
> shouldn't we add something like
> ---snip---
> for i in /lib/lib*.so.*; do
>   lib=$(basename $i)
>   [ -f /usr/lib/$lib ] && chflags noschg /usr/lib/$lib && rm /usr/lib/$lib
> done
> ---snip---
> into UPDATING or append it to the end of installworld?

I think a better way is to add a new target to src/Makefile.inc1, say
"installcleanworld".  It would do this:

mv /usr/include /usr/include.OLD
mkdir /usr/lib.OLD
mv /usr/lib/*.* /usr/lib.OLD
ldconfig -m /usr/lib.OLD
make installworld
rm -rf /usr/lib.OLD /usr/include.OLD

I may even make a patch for this myself.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: automated clean up of /usr/lib because of /lib

2003-08-31 Thread Doug Barton
There was a discussion of this recently, and the conclusion was more or
less that doing this in an automated fashion is frought with danger,
since you don't know for sure what else besides system components the
user has put in the various directories.

I've been using the following combination of a bash function (that could
just as easily be its own script) and a script I call
after_installworld.

doinstall ()
{
cd /usr && [ -d include-old ] && /bin/rm -r include-old;
[ ! -e include-old ] && mv -i include include-old;
/bin/rm -r /usr/share/man;
cd /usr/src && touch installdate && make installworld
}


#!/bin/sh

PATH=/usr/bin:/bin
export PATH

for dir in /bin /lib /libexec /rescue /sbin \
/usr/bin /usr/games /usr/lib /usr/libdata /usr/libexec /usr/sbin ; do
for file in `find $dir \( -type f -o -type l \) -a \
! -newer /usr/src/installdate`; do
case "${file}" in
/usr/lib/compat/*|*/0ld/*|/usr/libdata/perl/*) ;;
*)  echo ''
ls -lao ${file}
read -p "  *** Move ${file} to ${file%/*}/0ld? [n] " M
case ${M} in
[yY]*)  mkdir -p ${file%/*}/0ld
chflags 0 ${file} &&
mv -i ${file} ${file%/*}/0ld/
;;
esac
;;
esac
done
done

exit 0


This combination keeps things squeaky clean for me.

HTH,

Doug

-- 

This .signature sanitized for your protection


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


automated clean up of /usr/lib because of /lib

2003-08-31 Thread Alexander Leidinger
Hi,

shouldn't we add something like
---snip---
for i in /lib/lib*.so.*; do
lib=$(basename $i)
[ -f /usr/lib/$lib ] && chflags noschg /usr/lib/$lib && rm /usr/lib/$lib
done
---snip---
into UPDATING or append it to the end of installworld?

Bye,
Alexander.

-- 
   I believe the technical term is "Oops!"

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"