From dmaddox@scsn.net  Thu Sep 10 19:05:24 1998
Received: from mail.scsn.net (scsn.net [206.25.246.12])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA20300
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 10 Sep 1998 19:05:15 -0700 (PDT)
          (envelope-from dmaddox@scsn.net)
Received: from rhiannon.scsn.net ([209.12.57.79]) by mail.scsn.net
          (Post.Office MTA v3.1.2 release (PO205-101c)
          ID# 0-41950U6000L1100S0) with ESMTP id AAA176
          for <FreeBSD-gnats-submit@freebsd.org>;
          Thu, 10 Sep 1998 21:56:26 -0400
Received: (from root@localhost)
	by rhiannon.scsn.net (8.9.1/8.9.1) id WAA14662;
	Thu, 10 Sep 1998 22:05:32 GMT
	(envelope-from root)
Message-Id: <199809102205.WAA14662@rhiannon.scsn.net>
Date: Thu, 10 Sep 1998 22:05:32 GMT
From: dmaddox@scsn.net (Donald J. Maddox)
Reply-To: dmaddox@scsn.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: move_aout_libs.sh doesn't use ldconfig correctly.
X-Send-Pr-Version: 3.2

>Number:         7889
>Category:       misc
>Synopsis:       move_aout_libs.sh doesn't use ldconfig correctly.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 10 19:10:01 PDT 1998
>Closed-Date:    Tue Mar 23 05:02:19 PST 1999
>Last-Modified:  Tue Mar 23 05:05:09 PST 1999
>Originator:     Donald J. Maddox
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

FreeBSD rhiannon.scsn.net 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Mon Sep  7 13:22:29 GMT 1998     root@rhiannon.scsn.net:/usr/src/sys/compile/RHIANNON  i386

>Description:

	Recent changes to the ldconfig command require that the -aout
switch be used when configuring the search path for aout libs.  The
src/tools/tools/upgrade/move_aout_libs.sh script moves libs, then rebuilds
the lib search path using ldconfig; however, it uses ldconfig without the
-aout switch, and on systems where ELF is the default objformat, this only
succeeds in building a bogus ELF lib search path, and doesn't affect the
aout lib search path at all.

>How-To-Repeat:

# sh /usr/tools/tools/upgrade/move_aout_libs.sh /usr/X11R6/lib /usr/local/lib

>Fix:

	I'm not sure if this tool is ever intended to be used on 
non-current systems or not...  If it is then a few conditionals will
need to be added to this patch:

--- /usr/src/tools/tools/upgrade/move_aout_libs.sh	Wed Sep  9 05:28:18 1998
+++ move_aout_libs.sh	Thu Sep 10 21:45:33 1998
@@ -32,7 +32,7 @@
 	else
 		echo "Creating directory $dir/aout"
 		mkdir $dir/aout
-		ldconfig -m $dir/aout
+		ldconfig -aout -m $dir/aout
 	fi
 	fname=${file#$dir/}
 	if test -f $dir/aout/$fname; then
@@ -63,7 +63,7 @@
 			if test $answer = "y"; then
 				echo Overwriting $dir/aout/$fname with $file
 				mv $file $dir/aout/$fname
-				ldconfig -R
+				ldconfig -aout -R
 			else
 				echo "You need to move $file out of $dir because that's an elf directory"
 			fi
@@ -71,7 +71,7 @@
 	else
 		echo Move $fname from $dir to $dir/aout
 		mv $file $dir/aout/$fname
-		ldconfig -R
+		ldconfig -aout -R
 	fi
 	return
 }
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Tue Mar 23 05:02:19 PST 1999 
State-Changed-Why:  
The script is used during aout-to-elf at a time when ldconfig only 
understands aout libs, so it's not a problem for the upgrade target. 
>Unformatted:
