From owner-freebsd-bugs@FreeBSD.ORG Sat May 3 10:51:20 2003 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A74E037B401 for ; Sat, 3 May 2003 10:51:20 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id E06EA43F85 for ; Sat, 3 May 2003 10:51:15 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h43Hon62003360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 3 May 2003 20:50:49 +0300 (EEST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h43HoYg3003351; Sat, 3 May 2003 20:50:34 +0300 (EEST) (envelope-from ru) Date: Sat, 3 May 2003 20:50:34 +0300 From: Ruslan Ermilov To: Bruce Evans Message-ID: <20030503175034.GB97244@sunbay.com> References: <20030426052507.N40408@gamplex.bde.org> <200304260556.PAA10193@avalon.reed.wattle.id.au> <20030426203002.GA66677@sunbay.com> <20030503081416.J24793@gamplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="adJ1OR3c6QgCpb/j" Content-Disposition: inline In-Reply-To: <20030503081416.J24793@gamplex.bde.org> User-Agent: Mutt/1.5.4i cc: simon@comsys.ntu-kpi.kiev.ua cc: freebsd-bugs@freebsd.org cc: Darren Reed Subject: Re: misc/44148: installworld in 4.7-STABLE does not install IPFilter related header files X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2003 17:51:20 -0000 --adJ1OR3c6QgCpb/j Content-Type: multipart/mixed; boundary="CdrF4e02JqNVZeln" Content-Disposition: inline --CdrF4e02JqNVZeln Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 03, 2003 at 08:37:35AM +1000, Bruce Evans wrote: > On Sat, 26 Apr 2003, Ruslan Ermilov wrote: >=20 > > On Sat, Apr 26, 2003 at 03:56:54PM +1000, Darren Reed wrote: > > > In some email I received from Bruce Evans, sie wrote: > > > > > > > > > So, I'd like to either do this on a directory level, or kill > > > > > the SHARED=3Dsymlinks concept. > > > > > > > > I depend on SHARED=3Dsymlinks a lot. However, the number of things= that > > > > must be installed manually when not using makeworld is large so ano= ther > > > > set of includes wouldn't make much difference. > > > > > > So are we agreed then that we can move to netinet being created as a > > > directory and populated with symbolic links ? > > > > > Here's an implementation (without ipfilter). Please review. >=20 > I tested it lightly. It seems OK except for having lots of style bugs. >=20 No surprise. ;) > % Index: Makefile > % =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/include/Makefile,v > % retrieving revision 1.196 > % diff -u -r1.196 Makefile > % --- Makefile 17 Apr 2003 14:14:21 -0000 1.196 > % +++ Makefile 26 Apr 2003 20:22:19 -0000 > % ... > % @@ -80,48 +76,74 @@ > % INCSLINKS+=3D posix4/$i ${INCLUDEDIR}/$i > % .endfor > % > % -copies: > % -.for i in ${LDIRS} ${LSYMSUBDIRS} machine crypto > % - if [ -L ${DESTDIR}/usr/include/$i ]; then \ > % - rm -f ${DESTDIR}/usr/include/$i; \ > % +.include > % + > % +installincludes: ${SHARED} > % +${SHARED}: compat > % + > % +compat: > % +.for i in ${LDIRS} ${LSUBDIRS} machine crypto > % + if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ > % + rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ > % fi >=20 > New style bug: indent of only 4 in a shell script (it's only a continued > line at the level of the Makefile). >=20 Moot, as this is not a shell script, but rather a string argument passed to a shell via -c. Strictly speaking, it should be formatted like follows: compat: =2Efor i in ${LDIRS} ${LSUBDIRS} machine crypto if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ fi But that would look uglier, so I take your advice. ;) > % .endfor > % mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/../etc/mtree/BSD.i= nclude.dist \ > % -p ${DESTDIR}/usr/include >=20 > Inherited style bugs: indent of 8 for a continued line (it really is a > continued line), and line longer than 80 characters (particularly stupid > since the line is split to make it not so long). >=20 Fixed. > Maybe the compat stuff can be cleaned up a bit. mtree could be run more > globally as in all other Makefiles excrpt for the problem of removing the > symlinks to directories. > Not sure I understand what you mean. This is only to deal with the old directory-level symlinks; when we are sure we won't run this on such an old system, we can safely remove it. =20 > % + > % +# INCLUDEDIR is defined only here. >=20 > I don't understand this comment. INCLUDEDIR is defined in bsd.own.mk, > not here. INCLUDEDIR is used before here. >=20 We can't use INCLUDEDIR in the exists() context until it's really defined (only after bsd.prog.mk is included), because exists() expands its argument at parse time; the rest of stuff uses the INCLUDEDIR at run time. I've removed this comment. > It never actually worked, > even at install time, since it was hard-coded in many places. You > fixed a few of these places, but it is still hard-coded in 2 comments, > 1 error message and the main mtree step. >=20 I've fixed mtree step, changed the #error to not use /usr/include, but left comments with /usr/include. I've also removed the comment at the top of the file that no longer applies. > % +copies: > % +.for i in ${LDIRS} ${LSUBDIRS} crypto machine machine/pc > % +.if exists(${DESTDIR}${INCLUDEDIR}/$i) > % + cd ${DESTDIR}${INCLUDEDIR}/$i; \ > % + for h in *.h; do \ > % + if [ -L $$h ]; then \ > % + rm -f $$h; \ > % + fi; \ > % + done >=20 > More too-small indentations. >=20 This case is more complicated. I'm not sure how to format it properly (I always wondered how to do it, BTW). I now have used the "make it look like a normal shell script" rule of thumb, this now at least looks sane. > % ... > % -installincludes: ${SHARED} > % + cd ${.CURDIR}/../sys/$i; \ > % + for h in *.h; do \ > % + ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ > % + done > % +.endfor > % +.for i in ${LSUBDIRS} > % + cd ${.CURDIR}/../sys/$i; \ > % + for h in *.h; do \ > % + ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ > % + done > % +.endfor > % + cd ${.CURDIR}/../sys/opencrypto; \ > % + for h in *.h; do \ > % + ln -fs ../../../sys/opencrypto/$$h ${DESTDIR}${INCLUDEDIR}/crypto; \ > % + done > % + cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ > % + for h in *.h; do \ > % + ln -fs ../../../sys/${MACHINE_ARCH}/include/$$h ${DESTDIR}${INCLUDED= IR}/machine; \ > % + done > % +.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) > % + cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ > % + for h in *.h; do \ > % + ln -fs ../../../../sys/${MACHINE_ARCH}/include/$$h ${DESTDIR}${INCLU= DEDIR}/machine/pc; \ > % + done > % +.endif >=20 > More too-small indentations and too-long lines. >=20 Fixed. Bruce, if you reply and get my ~/.vacation.msg back this would mean that I won't have a chance to commit it until I'm back, which 90% means it won't be committed up until code freeze in 5.x is over. I'd like to avoid it, so if you get my vacation message back, please take a moment and commit it for me, making any necessary style fixes. Thanks! After I am back from my vacation, I will add ipfilter headers back, if someone doesn't bite me. ;) 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 --CdrF4e02JqNVZeln 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.353 diff -u -r1.353 Makefile.inc1 --- Makefile.inc1 1 May 2003 20:41:03 -0000 1.353 +++ Makefile.inc1 3 May 2003 17:45:57 -0000 @@ -277,13 +277,8 @@ mkdir -p ${WORLDTMP}/legacy/${_dir} .endfor .for _dir in \ - usr/bin usr/lib/compat/aout usr/libdata/ldscripts usr/libexec usr/shar= e/misc + usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts usr/libe= xec usr/share/misc mkdir -p ${WORLDTMP}/${_dir} -.endfor -.for _dir in \ - arpa dev fs g++/backward g++/bits g++/ext isc isofs libmilter \ - objc openssl protocols readline rpc rpcsvc security ufs - mkdir -p ${WORLDTMP}/usr/include/${_dir} .endfor ln -sf ${.CURDIR}/sys ${WORLDTMP} _legacy: Index: include/Makefile =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/include/Makefile,v retrieving revision 1.196 diff -u -r1.196 Makefile --- include/Makefile 17 Apr 2003 14:14:21 -0000 1.196 +++ include/Makefile 3 May 2003 17:41:38 -0000 @@ -1,10 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 1/4/94 # $FreeBSD: src/include/Makefile,v 1.196 2003/04/17 14:14:21 nectar Exp $ # -# Doing a make install builds /usr/include -# -# The ``rm -rf''s used below are safe because rm doesn't follow symbolic -# links. +# Doing a "make install" builds /usr/include. =20 CLEANFILES=3D osreldate.h version vers.c SUBDIR=3D arpa protocols rpcsvc rpc @@ -43,10 +40,6 @@ security/mac_biba security/mac_bsdextended security/mac_lomac\ security/mac_mls security/mac_partition ufs/ffs ufs/ufs =20 -# For SHARED=3Dsymlinks, cam, netatm, and netgraph are symlinks, so cam/sc= si, -# netatm/*, and netgraph/* are taken care of -LSYMSUBDIRS=3D ${LSUBDIRS:Ncam/scsi:Nnetatm/*:Nnetgraph/*} - # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is # probably only useful for developers and should be avoided if you do not @@ -64,7 +57,7 @@ . ${.CURDIR}/../sys/conf/newvers.sh; \ echo "$$COPYRIGHT" > osreldate.h; \ echo "#ifdef _KERNEL" >> osreldate.h; \ - echo '#error "/usr/include/osreldate.h cannot be used in the kernel, use = sys/param.h"' >> osreldate.h; \ + echo '#error " cannot be used in the kernel, use "' >> osreldate.h; \ echo "#else" >> osreldate.h; \ echo \#'undef __FreeBSD_version' >> osreldate.h; \ echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h; \ @@ -80,48 +73,76 @@ INCSLINKS+=3D posix4/$i ${INCLUDEDIR}/$i .endfor =20 -copies: -.for i in ${LDIRS} ${LSYMSUBDIRS} machine crypto - if [ -L ${DESTDIR}/usr/include/$i ]; then \ - rm -f ${DESTDIR}/usr/include/$i; \ +.include + +installincludes: ${SHARED} +${SHARED}: compat + +# Take care of stale directory-level symlinks. +compat: +.for i in ${LDIRS} ${LSUBDIRS} machine crypto + if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ + rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ fi .endfor - mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/../etc/mtree/BSD.inclu= de.dist \ - -p ${DESTDIR}/usr/include + mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ + -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ + -p ${DESTDIR}${INCLUDEDIR} + +copies: +.for i in ${LDIRS} ${LSUBDIRS} crypto machine machine/pc +.if exists(${DESTDIR}${INCLUDEDIR}/$i) + cd ${DESTDIR}${INCLUDEDIR}/$i; \ + for h in *.h; do \ + if [ -L $$h ]; then rm -f $$h; fi; \ + done +.endif +.endfor .for i in ${LDIRS} ${LSUBDIRS} cd ${.CURDIR}/../sys; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ - ${DESTDIR}/usr/include/$i + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ + ${DESTDIR}${INCLUDEDIR}/$i .endfor cd ${.CURDIR}/../sys; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 opencrypto/*.h \ - ${DESTDIR}/usr/include/crypto -.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include) + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 opencrypto/*.h \ + ${DESTDIR}${INCLUDEDIR}/crypto cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}/usr/include/machine + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ + ${DESTDIR}${INCLUDEDIR}/machine .if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}/usr/include/machine/pc -.endif + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ + ${DESTDIR}${INCLUDEDIR}/machine/pc .endif =20 symlinks: @${ECHO} "Setting up symlinks to kernel source tree..." .for i in ${LDIRS} - rm -rf ${DESTDIR}/usr/include/$i - ln -s ../../sys/$i ${DESTDIR}/usr/include/$i -.endfor - rm -rf ${DESTDIR}/usr/include/crypto - ln -s ../../sys/opencrypto ${DESTDIR}/usr/include/crypto -.for i in ${LSYMSUBDIRS} - rm -rf ${DESTDIR}/usr/include/$i - ln -s ../../../sys/$i ${DESTDIR}/usr/include/$i -.endfor - rm -rf ${DESTDIR}/usr/include/machine - ln -s ../../sys/${MACHINE_ARCH}/include ${DESTDIR}/usr/include/machine - -.include - -installincludes: ${SHARED} + cd ${.CURDIR}/../sys/$i; \ + for h in *.h; do \ + ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + done +.endfor +.for i in ${LSUBDIRS} + cd ${.CURDIR}/../sys/$i; \ + for h in *.h; do \ + ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + done +.endfor + cd ${.CURDIR}/../sys/opencrypto; \ + for h in *.h; do \ + ln -fs ../../../sys/opencrypto/$$h \ + ${DESTDIR}${INCLUDEDIR}/crypto; \ + done + cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ + for h in *.h; do \ + ln -fs ../../../sys/${MACHINE_ARCH}/include/$$h \ + ${DESTDIR}${INCLUDEDIR}/machine; \ + done +.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) + cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ + for h in *.h; do \ + ln -fs ../../../../sys/${MACHINE_ARCH}/include/$$h \ + ${DESTDIR}${INCLUDEDIR}/machine/pc; \ + done +.endif --CdrF4e02JqNVZeln-- --adJ1OR3c6QgCpb/j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+tAFpUkv4P6juNwoRAtU5AKCBEqBX3Td4kEfaFQRee5mo68m+aQCffTZ0 lxzdsDCHsygAkvu7oUvY06s= =hRO2 -----END PGP SIGNATURE----- --adJ1OR3c6QgCpb/j--