misc/44148: installworld in 4.7-STABLE does not install
IPFilter related header files
Ruslan Ermilov
ru at freebsd.org
Sat May 3 10:51:20 PDT 2003
On Sat, May 03, 2003 at 08:37:35AM +1000, Bruce Evans wrote:
> On Sat, 26 Apr 2003, Ruslan Ermilov wrote:
>
> > 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=symlinks concept.
> > > >
> > > > I depend on SHARED=symlinks a lot. However, the number of things that
> > > > must be installed manually when not using makeworld is large so another
> > > > 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.
>
> I tested it lightly. It seems OK except for having lots of style bugs.
>
No surprise. ;)
> % Index: Makefile
> % ===================================================================
> % 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+= 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 <bsd.prog.mk>
> % +
> % +installincludes: ${SHARED}
> % +${SHARED}: compat
> % +
> % +compat:
> % +.for i in ${LDIRS} ${LSUBDIRS} machine crypto
> % + if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \
> % + rm -f ${DESTDIR}${INCLUDEDIR}/$i; \
> % fi
>
> New style bug: indent of only 4 in a shell script (it's only a continued
> line at the level of the Makefile).
>
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:
.for 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.include.dist \
> % -p ${DESTDIR}/usr/include
>
> 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).
>
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.
> % +
> % +# INCLUDEDIR is defined only here.
>
> I don't understand this comment. INCLUDEDIR is defined in bsd.own.mk,
> not here. INCLUDEDIR is used before here.
>
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.
>
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
>
> More too-small indentations.
>
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}${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
>
> More too-small indentations and too-long lines.
>
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,
--
Ruslan Ermilov Sysadmin and DBA,
ru at sunbay.com Sunbay Software AG,
ru at 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
-------------- next part --------------
Index: Makefile.inc1
===================================================================
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/share/misc
+ usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts usr/libexec 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
===================================================================
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.
CLEANFILES= osreldate.h version vers.c
SUBDIR= 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
-# For SHARED=symlinks, cam, netatm, and netgraph are symlinks, so cam/scsi,
-# netatm/*, and netgraph/* are taken care of
-LSYMSUBDIRS= ${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 "<osreldate.h> cannot be used in the kernel, use <sys/param.h>"' >> osreldate.h; \
echo "#else" >> osreldate.h; \
echo \#'undef __FreeBSD_version' >> osreldate.h; \
echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h; \
@@ -80,48 +73,76 @@
INCSLINKS+= 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 <bsd.prog.mk>
+
+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.include.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
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 <bsd.prog.mk>
-
-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
-------------- 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/freebsd-bugs/attachments/20030503/97461194/attachment-0001.bin
More information about the freebsd-bugs
mailing list