Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 2002 17:01:42 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@FreeBSD.org>
Cc:        current@FreeBSD.org
Subject:   PAM modules dependency on PAM library (was: Re: cvs commit: src/lib/libpam/modules/pam_unix pam_unix.c)
Message-ID:  <20021114150142.GA38737@sunbay.com>
In-Reply-To: <xzpg026pd8f.fsf@flood.ping.uio.no>
References:  <200204072043.g37KhRi76699@freefall.freebsd.org> <20020408101138.GA68318@sunbay.com> <xzp1ydqqyx6.fsf@flood.ping.uio.no> <20020408110123.GB68318@sunbay.com> <xzpg026pd8f.fsf@flood.ping.uio.no>

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

--yNb1oOkm5a9FJOVX
Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+"
Content-Disposition: inline


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

On Mon, Apr 08, 2002 at 02:49:04PM +0200, Dag-Erling Smorgrav wrote:
> Ruslan Ermilov <ru@FreeBSD.org> writes:
> > You're right.  I forgot to relink pam_ssh.so library, and the diff was
> > against the wrong revision.  I will still commit the "const poisoning"
> > patch to libutil, as the impact turned out to be really low.
>=20
> Thanks, const poisoning is a Good Thing [tm].
>=20
> BTW, could you try to figure out a way we can split up the libpam
> build so the modules can depend on libpam.so?  What I'd like is:
>=20
>  1) build static modules
>  2) build static and dynamic libpam
>  3) build dynamic modules (with dependency on libpam.so)
>=20
> or
>=20
>  1) build dynamic libpam
>  2) build modules (with dependency on libpam.so)
>  3) build static libpam
>=20
> or something similar.
>=20
Uh oh, here is the version that seems to work.  Once I'm confident it
passes the "make release" test (it has already passed the preliminary
"make buildworld" test), I intend to commit it.

Note that I'm not passing the _NO_LIBPAM_SO_YET to the "depend" stage
intentionally; otherwise, it results in incomplete .depend files.


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p
Content-Transfer-Encoding: quoted-printable

Index: Makefile.inc1
=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/Makefile.inc1,v
retrieving revision 1.311
diff -u -r1.311 Makefile.inc1
--- Makefile.inc1	13 Nov 2002 13:49:29 -0000	1.311
+++ Makefile.inc1	14 Nov 2002 14:39:46 -0000
@@ -729,7 +729,8 @@
 .endif
=20
 _prebuild_libs+=3D lib/libcom_err lib/libcrypt lib/libkvm lib/libmd \
-		lib/libncurses lib/libopie lib/libradius lib/librpcsvc \
+		lib/libncurses lib/libopie lib/libpam lib/libradius \
+		lib/librpcsvc \
 		lib/libsbuf lib/libtacplus lib/libutil lib/libypclnt \
 		lib/libz lib/msun
=20
@@ -755,7 +756,7 @@
 _generic_libs+=3D	usr.sbin/pcvt/keycap
 .endif
=20
-.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
+.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_lib=
s}
 ${_lib}__L: .PHONY
 .if exists(${.CURDIR}/${_lib})
 	${ECHODIR} "=3D=3D=3D> ${_lib}"; \
@@ -765,6 +766,16 @@
 		${MAKE} DIRPRFX=3D${_lib}/ install
 .endif
 .endfor
+
+# libpam is special: we need to build static PAM modules before
+# static PAM library, and dynamic PAM library before dynamic PAM
+# modules.
+lib/libpam__L: .PHONY
+	${ECHODIR} "=3D=3D=3D> lib/libpam"; \
+		cd ${.CURDIR}/lib/libpam; \
+		${MAKE} DIRPRFX=3Dlib/libpam/ depend; \
+		${MAKE} DIRPRFX=3Dlib/libpam/ -D_NO_LIBPAM_SO_YET all; \
+		${MAKE} DIRPRFX=3Dlib/libpam/ -D_NO_LIBPAM_SO_YET install
=20
 _startup_libs: ${_startup_libs:S/$/__L/}
 _prebuild_libs: ${_prebuild_libs:S/$/__L/}
Index: lib/libpam/modules/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/lib/libpam/modules/Makefile.inc,v
retrieving revision 1.13
diff -u -r1.13 Makefile.inc
--- lib/libpam/modules/Makefile.inc	13 May 2002 10:53:24 -0000	1.13
+++ lib/libpam/modules/Makefile.inc	14 Nov 2002 14:39:46 -0000
@@ -4,7 +4,6 @@
=20
 NOINSTALLLIB=3D	yes
 NOPROFILE=3D	yes
-SHLIB_NAME?=3D	${LIB}.so.${SHLIB_MAJOR}
=20
 CFLAGS+=3D	-I${PAMDIR}/include
 CFLAGS+=3D	-I${.CURDIR}/../../libpam
@@ -14,8 +13,12 @@
 # This is nasty.
 # For the static case, libpam.a depends on the modules.
 # For the dynamic case, the modules depend on libpam.so.N
-# Punt for the time being until I can figure out how to do it.
-#DPADD+=3D		${LIBPAM}
-#LDADD+=3D		-lpam
+.if defined(_NO_LIBPAM_SO_YET)
+NOPIC=3D		YES
+.else
+SHLIB_NAME?=3D	${LIB}.so.${SHLIB_MAJOR}
+DPADD+=3D		${LIBPAM}
+LDADD+=3D		-lpam
+.endif
=20
 .include	"../Makefile.inc"

--8t9RHnE3ZwKMSgU+--

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

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

iD8DBQE907rWUkv4P6juNwoRAuN3AJ9ISNvrAg1mYch3DtUzAs+qIeirswCfbTkN
Xu3Zz4JvVNCBcRcbW/JapZk=
=hdr2
-----END PGP SIGNATURE-----

--yNb1oOkm5a9FJOVX--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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