Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Aug 2004 11:51:35 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Dag-Erling Sm?rgrav <des@des.no>, Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: 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 ...
Message-ID:  <20040802085135.GA3559@ip.net.ua>
In-Reply-To: <xzp1xiql5ya.fsf@dwp.des.no>
References:  <200407302313.i6UNDj5H004714@repoman.freebsd.org> <xzp3c38vbc8.fsf@dwp.des.no> <20040801135944.GF39839@darkness.comp.waw.pl> <xzp1xiql5ya.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help

--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 02, 2004 at 02:49:33AM +0200, Dag-Erling Sm?rgrav wrote:
> Pawel Jakub Dawidek <pjd@FreeBSD.org> writes:
> > How to fix it to force symlink creation under /lib/geom/, but without
> > creaking DPADD?
>=20
> 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.
>=20
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
=2Eso'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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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 $
=20
 SHLIBDIR?=3D${CLASS_DIR}
-SHLIB_MAJOR=3D${CLASS_MAJOR}
-SHLIB_NAME?=3Dgeom_${CLASS}.so.${SHLIB_MAJOR}
+SHLIB_NAME?=3Dgeom_${CLASS}.so
 LINKS=3D  ${BINDIR}/geom ${BINDIR}/g${CLASS}
 MAN=3D	g${CLASS}.8
 SRCS=3D   geom_${CLASS}.c subr.c
%%%


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--UlVJffcvxoiEqYs2
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBDgCWqRfpzJluFF4RAli6AJ0WXfvfWQwkvIK4HZlMNpMqkKQ8HgCdGhCE
HeNSLcr1fezpf/mckSWYZJM=
=zDOY
-----END PGP SIGNATURE-----

--UlVJffcvxoiEqYs2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040802085135.GA3559>