From avn@ns.any.ru  Sun Mar  4 11:52:20 2001
Return-Path: <avn@ns.any.ru>
Received: from ns.any.ru (ns.any.ru [194.67.127.11])
	by hub.freebsd.org (Postfix) with ESMTP id DD11537B718
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Mar 2001 11:52:19 -0800 (PST)
	(envelope-from avn@ns.any.ru)
Received: (from avn@localhost)
	by ns.any.ru (8.11.2/8.11.2) id f24Jpr821109
	for FreeBSD-gnats-submit@freebsd.org.AVP; Sun, 4 Mar 2001 22:51:53 +0300 (MSK)
	(envelope-from avn)
Received: (from avn@localhost)
	by ns.any.ru (8.11.2/8.11.2) id f24Jprc21100;
	Sun, 4 Mar 2001 22:51:53 +0300 (MSK)
	(envelope-from avn)
Message-Id: <200103041951.f24Jprc21100@ns.any.ru>
Date: Sun, 4 Mar 2001 22:51:53 +0300 (MSK)
From: "Alexey V. Neyman" <avn@ns.any.ru>
Reply-To: avn@ns.any.ru
To: FreeBSD-gnats-submit@freebsd.org
Subject: `man ldconfig' does not reflect its behavior
X-Send-Pr-Version: 3.2

>Number:         25527
>Category:       conf
>Synopsis:       `man ldconfig' does not reflect its behavior
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 04 12:00:02 PST 2001
>Closed-Date:    Tue Mar 29 21:03:41 GMT 2005
>Last-Modified:  Tue Mar 29 21:03:41 GMT 2005
>Originator:     Alexey V. Neyman
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
ANY.RU
>Environment:
FreeBSD srv2.any 4.2-STABLE FreeBSD 4.2-STABLE #0: Thu Mar  1 23:21:33 MSK 2001
    root@srv2.any:/usr2/obj/usr2/src/sys/AMD4  i386

>Description:

man ldconfig says:
     /etc/ld.so.conf              Conventional configuration file containing
	   			  directory names for invocations with -aout.
     /etc/ld-elf.so.conf          Conventional configuration file containing
				  directory names for invocations with -elf.
though these files are never used; either man page should be updated or
/etc/rc script should call ldconfig with directories from there files

>How-To-Repeat:


>Fix:

*** /usr/src/etc/rc	Sun Feb 18 02:50:41 2001
--- /etc/rc	Wed Feb 28 02:45:55 2001
*************** if [ -x /sbin/ldconfig ]; then
*** 395,401 ****
  	case `/usr/bin/objformat` in
  	elf)
  		_LDC=/usr/lib
! 		for i in ${ldconfig_paths}; do
  			if [ -d "${i}" ]; then
  				_LDC="${_LDC} ${i}"
  			fi
--- 395,405 ----
  	case `/usr/bin/objformat` in
  	elf)
  		_LDC=/usr/lib
! 		_LDCF=
! 		if [ -r /etc/ld-elf.so.conf ]; then
! 			_LDCF=`cat /etc/ld-elf.so.conf`
! 		fi
! 		for i in ${ldconfig_paths} ${_LDCF}; do
  			if [ -d "${i}" ]; then
  				_LDC="${_LDC} ${i}"
  			fi
*************** if [ -x /sbin/ldconfig ]; then
*** 411,417 ****
  		# Default the a.out ldconfig path.
  		: ${ldconfig_paths_aout=${ldconfig_paths}}
  		_LDC=/usr/lib/aout
! 		for i in ${ldconfig_paths_aout}; do
  			if [ -d "${i}" ]; then
  				_LDC="${_LDC} ${i}"
  			fi
--- 415,425 ----
  		# Default the a.out ldconfig path.
  		: ${ldconfig_paths_aout=${ldconfig_paths}}
  		_LDC=/usr/lib/aout
! 		_LDCF=
! 		if [ -r /etc/ld.so.conf ]; then
! 			_LDCF=`cat /etc/ld.so.conf`
! 		fi
! 		for i in ${ldconfig_paths_aout} ${_LDCF}; do
  			if [ -d "${i}" ]; then
  				_LDC="${_LDC} ${i}"
  			fi
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: vanilla 
Responsible-Changed-When: Fri Mar 16 16:41:51 PST 2001 
Responsible-Changed-Why:  
Misfiled PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25527 
Responsible-Changed-From-To: freebsd-bugs->jdp 
Responsible-Changed-By: ru 
Responsible-Changed-When: Fri May 18 08:06:12 PDT 2001 
Responsible-Changed-Why:  
John, could you please look at this? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=25527 
State-Changed-From-To: open->feedback 
State-Changed-By: jdp 
State-Changed-When: Sat Jul 21 14:17:43 PDT 2001 
State-Changed-Why:  
I think your patch can be simplified by taking advantage of the fact 
that if a regular file is specified on the ldconfig command line, it 
is expanded by reading a directory name from each line of the file. 
There is no need to expand it in /etc/rc with 

_LDCF=`cat /etc/ld-elf.so.conf` 

since the same result can be attained by simply adding /etc/ld-elf.so.conf 
to the ldconfig command line.  In fact, here is all I think needs 
to be done: 

1. In these loops in /etc/rc: 

for i in ${ldconfig_paths}; do 
if [ -d "${i}" ]; then 
_LDC="${_LDC} ${i}" 
fi 
done 

change "if [ -d" to "if [ -r" so that a regular file will pass the 
test, and 

2. Add /etc/ld-elf.so.conf to the default ldconfig_paths setting in 
/etc/defaults/rc.conf, and likewise for ldconfig_paths_aout. 

Do you agree? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=25527 

From: "Alexey V. Neyman" <alex.neyman@auriga.ru>
To: <freebsd-gnats-submit@freebsd.org>, <jdp@freebsd.org>,
	<avn@any.ru>
Cc:  
Subject: Re: conf/25527
Date: Tue, 4 Sep 2001 13:02:01 +0400 (MSD)

 Hello there!
 
 I agree with the solution supplied by John.
 
 Alexey.
 
 -- 
 -------------------------------+---------------------------------
      May the Sun and Water     |     Regards, Alexey V. Neyman
      always fall upon you!     |   mailto: alex.neyman@auriga.ru
 -------------------------------+---------------------------------
 
Responsible-Changed-From-To: jdp->freebsd-bugs 
Responsible-Changed-By: jdp 
Responsible-Changed-When: Mon May 26 11:41:03 PDT 2003 
Responsible-Changed-Why:  
Turn this PR back over to freebsd-bugs.  I don't want to be 
responsible for it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25527 
Responsible-Changed-From-To: freebsd-bugs->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Fri Jun 27 07:56:07 PDT 2003 
Responsible-Changed-Why:  
I'll review this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25527 

From: Alexey Neyman <avn@vagabond.auriga.ru>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: conf/25527
Date: Fri, 27 Jun 2003 20:38:35 +0400 (MSD)

 --- /etc/rc.d/ldconfig.orig	Fri Jun 27 20:05:32 2003
 +++ /etc/rc.d/ldconfig	Fri Jun 27 20:28:59 2003
 @@ -25,8 +25,8 @@
  		checkyesno ldconfig_insecure && _ins="-i"
  		if [ -x "${ldconfig_command}" ]; then
  			_LDC=/usr/lib
 -			for i in ${ldconfig_paths}; do
 -				if [ -d "${i}" ]; then
 +			for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
 +				if [ -r "${i}" ]; then
  					_LDC="${_LDC} ${i}"
  				fi
  			done
 @@ -39,8 +39,8 @@
  				# Default the a.out ldconfig path.
  				: ${ldconfig_paths_aout=${ldconfig_paths}}
  				_LDC=/usr/lib/aout
 -				for i in ${ldconfig_paths_aout}; do
 -					if [ -d "${i}" ]; then
 +				for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do
 +					if [ -r "${i}" ]; then
  						_LDC="${_LDC} ${i}"
  					fi
  				done

From: Alexey Neyman <alex.neyman@auriga.ru>
To: freebsd-gnats-submit@freebsd.org
Cc: trhodes@freebsd.org
Subject: Re: conf/25527: `man ldconfig' does not reflect its behavior
Date: Fri, 27 Jun 2003 21:03:01 +0400 (MSD)

 --- /etc/rc.d/ldconfig.orig	Fri Jun 27 20:05:32 2003
 +++ /etc/rc.d/ldconfig	Fri Jun 27 20:28:59 2003
 @@ -25,8 +25,8 @@
  		checkyesno ldconfig_insecure && _ins="-i"
  		if [ -x "${ldconfig_command}" ]; then
  			_LDC=/usr/lib
 -			for i in ${ldconfig_paths}; do
 -				if [ -d "${i}" ]; then
 +			for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
 +				if [ -r "${i}" ]; then
  					_LDC="${_LDC} ${i}"
  				fi
  			done
 @@ -39,8 +39,8 @@
  				# Default the a.out ldconfig path.
  				: ${ldconfig_paths_aout=${ldconfig_paths}}
  				_LDC=/usr/lib/aout
 -				for i in ${ldconfig_paths_aout}; do
 -					if [ -d "${i}" ]; then
 +				for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do
 +					if [ -r "${i}" ]; then
  						_LDC="${_LDC} ${i}"
  					fi
  				done
State-Changed-From-To: feedback->patched 
State-Changed-By: trhodes 
State-Changed-When: Mon Jun 30 08:02:24 PDT 2003 
State-Changed-Why:  
Patch applied, MFC pending.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25527 

From: Matteo Riondato <rionda@gufi.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: conf/25527: `man ldconfig' does not reflect its behavior
Date: Tue, 29 Mar 2005 17:58:44 +0200

 --/7+LvQqw8N5lf/3J
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 This PR can be closed: the patch was committed and the commit MFCed.
 Best Regards
 
 --=20
 Rionda aka Matteo Riondato
 Disinformato per default
 G.U.F.I. Staff Member (http://www.gufi.org)
 FreeSBIE Developer (http://www.freesbie.org)
 
 --/7+LvQqw8N5lf/3J
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFCSXs02Mp4pR7Fa+wRAsnSAKCV+kPFUiiZs7priDZ06rkNqcHv1wCgv9n0
 cZaVOTrN9fzuhJyuNQJhyOE=
 =D1Rb
 -----END PGP SIGNATURE-----
 
 --/7+LvQqw8N5lf/3J--

From: Matteo Riondato <rionda@gufi.org>
To: freebsd-bugs@freebsd.org
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: conf/25527: man ldconfig does not reflect its behavior
Date: Tue, 29 Mar 2005 20:23:36 +0200

 --sL7C0a98p/u5aVah
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 This PR can be closed: the patch was committed and the commit MFCed.
 Best Regards
 --=20
 Rionda aka Matteo Riondato
 Disinformato per default
 G.U.F.I. Staff Member (http://www.gufi.org)
 FreeSBIE Developer (http://www.freesbie.org)
 
 --sL7C0a98p/u5aVah
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFCSZ0o2Mp4pR7Fa+wRAqXQAJwIyEzNuEhbxrtoxK7wpdS9JEs/fgCggKHZ
 xCteC12PaPGvr9HsPfe/91w=
 =a8if
 -----END PGP SIGNATURE-----
 
 --sL7C0a98p/u5aVah--
State-Changed-From-To: patched->closed 
State-Changed-By: trhodes 
State-Changed-When: Tue Mar 29 21:03:13 GMT 2005 
State-Changed-Why:  
Close long standing PR. 
Reminded by: Matteo Riondato <rionda@gufi.org> 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25527 
>Unformatted:
