From owner-freebsd-current Thu Nov 14 7: 2: 4 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75EB937B401; Thu, 14 Nov 2002 07:01:58 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30FBE43E4A; Thu, 14 Nov 2002 07:01:52 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with ESMTP id gAEF1g5V039787 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 14 Nov 2002 17:01:42 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Submit) id gAEF1gPo039782; Thu, 14 Nov 2002 17:01:42 +0200 (EET) Date: Thu, 14 Nov 2002 17:01:42 +0200 From: Ruslan Ermilov To: Dag-Erling Smorgrav 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> References: <200204072043.g37KhRi76699@freefall.freebsd.org> <20020408101138.GA68318@sunbay.com> <20020408110123.GB68318@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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 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