Index: etc/mtree/BSD.local.dist =================================================================== RCS file: /home/ncvs/src/etc/mtree/BSD.local.dist,v retrieving revision 1.117 diff -u -r1.117 BSD.local.dist --- etc/mtree/BSD.local.dist 10 Jun 2005 20:14:38 -0000 1.117 +++ etc/mtree/BSD.local.dist 29 Dec 2005 23:28:49 -0000 @@ -20,6 +20,10 @@ lib .. libdata + ldconfig + .. + ldconfig32 + .. pkgconfig .. .. Index: etc/rc.d/ldconfig =================================================================== RCS file: /home/ncvs/src/etc/rc.d/ldconfig,v retrieving revision 1.14 diff -u -r1.14 ldconfig --- etc/rc.d/ldconfig 16 Jan 2005 08:34:30 -0000 1.14 +++ etc/rc.d/ldconfig 29 Dec 2005 23:28:49 -0000 @@ -22,6 +22,11 @@ checkyesno ldconfig_insecure && _ins="-i" if [ -x "${ldconfig_command}" ]; then _LDC="/lib /usr/lib" + for i in ${ldconfig_local_dirs}; do + if [ -d "${i}" ]; then + ldconfig_paths="${ldconfig_paths} `find ${i} -type f`" + fi + done for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do if [ -r "${i}" ]; then _LDC="${_LDC} ${i}" @@ -30,6 +35,18 @@ echo 'ELF ldconfig path:' ${_LDC} ${ldconfig} -elf ${_ins} ${_LDC} + case `sysctl -n hw.machine_arch` in + amd64) + for i in ${ldconfig32_local_dirs}; do + if [ -d "${i}" ]; then + ldconfig32_paths="${ldconfig32_paths} `find ${i} -type f`" + fi + done + echo '32-bits compatibility ldconfig path:' ${ldconfig32_paths} + ${ldconfig} -32 -m ${_ins} ${ldconfig32_paths} + ;; + esac + # Legacy aout support for i386 only case `sysctl -n hw.machine_arch` in i386) Index: etc/defaults/rc.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.267 diff -u -r1.267 rc.conf --- etc/defaults/rc.conf 15 Dec 2005 01:04:48 -0000 1.267 +++ etc/defaults/rc.conf 29 Dec 2005 23:28:49 -0000 @@ -493,6 +493,11 @@ # shared library search paths ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout" # a.out shared library search paths +ldconfig_local_dirs="/usr/local/libdata/ldconfig /usr/X11R6/libdata/ldconfig" + # Local directories with ldconfig configuration files. +ldconfig32_local_dirs="/usr/local/libdata/ldconfig32 /usr/X11R6/libdata/ldconfig32" + # Local directories with 32-bits compatibility ldconfig + # configuration files. kern_securelevel_enable="NO" # kernel security level (see init(8)), kern_securelevel="-1" # range: -1..3 ; `-1' is the most insecure # Note that setting securelevel to 0 will result Index: share/man/man5/rc.conf.5 =================================================================== RCS file: /home/ncvs/src/share/man/man5/rc.conf.5,v retrieving revision 1.274 diff -u -r1.274 rc.conf.5 --- share/man/man5/rc.conf.5 19 Dec 2005 10:57:00 -0000 1.274 +++ share/man/man5/rc.conf.5 29 Dec 2005 23:28:50 -0000 @@ -2822,6 +2822,23 @@ Set this variable to .Dq Li YES to disable that security check during system startup. +.It Va ldconfig_local_dirs +.Pq Vt str +Set to the list of local +.Xr ldconfig 8 +directories. +The names of all files in the directories listed will be +passed as arguments to +.Xr ldconfig 8 . +.It Va ldconfig32_local_dirs +.Pq Vt str +Set to the list of local 32-bits compatibility +.Xr ldconfig 8 +directories. +The names of all files in the directories listed will be +passed as arguments to +.Xr ldconfig 8 +.Fl 32 . .It Va kern_securelevel_enable .Pq Vt bool Set to