cvs commit: src/sbin/geom/class/mirror Makefile geom_mirror.c src/sys/geom/mirror g_mirror.c g_mirror.h g_mirror_ctl.c src/sys/modules/geom/geom_mirror Makefile src/tools/regression/geom_mirror Makefile runtests.sh test-1.sh test-2.sh test-3.sh test-4.sh ...

Ruslan Ermilov ru at FreeBSD.org
Mon Aug 2 01:51:59 PDT 2004


On Mon, Aug 02, 2004 at 02:49:33AM +0200, Dag-Erling Sm?rgrav wrote:
> Pawel Jakub Dawidek <pjd at FreeBSD.org> writes:
> > How to fix it to force symlink creation under /lib/geom/, but without
> > creaking DPADD?
> 
> The problem is that LIBDIR is used to mean two things: the place where
> existing libraries are located, and the place where the ones we build
> will be installed.  The ports tree maintains a very clear separation
> between these two meanings: existing software resides in LOCALBASE,
> new software is installed into PREFIX.  LIBDIR should likewise be
> split into two separate variables.
> 
We symlink .so.X from SHLIBDIR to .so in LIBDIR mainly to support dynamic
linking in the dynamic root (/lib, /usr/lib) environment.

In this case, the libraries (the GEOM modules) are not meant to be linked
with applications, from what I can tell.  Instead, they are read directly
by dlopen(), by the core GEOM code, and the intent is to have both .so.X
and .so under /lib/geom (while other standard system libraries still live
in /usr/lib).

Just splitting LIBDIR into two separate variables won't buy us much in
this case, and will only obfuscate things ever more, IMO.  A better
solution would probably be to have the (optional) per-library knobs such
as LIBDIR, SHLIBDIR, etc., which would mimic the bsd.files.mk and
bsd.incs.mk interface.

The best workaround I can offer at the moment, which is rude enough,
is to override the internal bsd.lib.mk _libinstall target in
sbin/geom/class/Makefile.inc.

Another alternative to consider is to rename GEOM modules to be plain
.so's.  Is there any real benefit in versioning them, as there's
unlikely that applications will be linked to them.  Partial patch:

%%%
Index: Makefile.inc
===================================================================
RCS file: /home/ncvs/src/sbin/geom/class/Makefile.inc,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile.inc
--- Makefile.inc	1 Aug 2004 22:24:06 -0000	1.5
+++ Makefile.inc	2 Aug 2004 08:46:59 -0000
@@ -1,8 +1,7 @@
 # $FreeBSD: src/sbin/geom/class/Makefile.inc,v 1.5 2004/08/01 22:24:06 pjd Exp $
 
 SHLIBDIR?=${CLASS_DIR}
-SHLIB_MAJOR=${CLASS_MAJOR}
-SHLIB_NAME?=geom_${CLASS}.so.${SHLIB_MAJOR}
+SHLIB_NAME?=geom_${CLASS}.so
 LINKS=  ${BINDIR}/geom ${BINDIR}/g${CLASS}
 MAN=	g${CLASS}.8
 SRCS=   geom_${CLASS}.c subr.c
%%%


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20040802/61d77f6a/attachment.bin


More information about the cvs-src mailing list