Re: vnode_if.h: how should it be done ?

2000-06-28 Thread Kris Kennaway

On Sun, 25 Jun 2000, Warner Losh wrote:

 They aren't installed.  You must have a kernel tree to build the kld.
 Just add vnode_if.h to your SRCS and the rest happens automatically
 via bsd.kmod.mk.  It works great.  I do it all the time.  In fact, I
 added SYSDIR support to bsd.kmod.mk at Timing Solutions so that we
 could compile our drivers outside of the tree.

As I understand it, this is the only file which is required from the
kernel sources in order to build the arla port. ISTR FiST also needs it to
be present, and I also think I once came across another port that needed
it too. Is it really so wrong to make the lives of these third-party FS
tools harder by requiring full kernel sources to be present?

Kris

--
In God we Trust -- all others must submit an X.509 certificate.
-- Charles Forsythe [EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: vnode_if.h: how should it be done ?

2000-06-25 Thread Warner Losh

In message [EMAIL PROTECTED] Assar Westerlund writes:
: Warner Losh [EMAIL PROTECTED] writes:
:  In message [EMAIL PROTECTED] Assar Westerlund writes:
:  : The problem is that the source files are hidden in the kernel source
:  : directory and not installed.  Where should vnode_if.{src,pl} get
:  : installed?  It seems much simpler just to install vnode_if.h in
:  : /usr/include/sys.  Patch appended.
:  
:  No.  
: 
:  We don't install kenrel internal files.
: 
: But it's not kernel internal.  It's used by modules/KLDs ?  Where
: should these expect to find it?

'.'

:  Use SYSDIR instead.
: 
: I'm not sure what you mean by this?  Should vnode_if.h just reside in
: /sys/sys and be used from there or what?

No.  I mean that you need to have a kernel in $SYSDIR (or in /sys or
/usr/src) and that vnode_if.h will get built in '.'.

:  : + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
:  : + ${.OBJDIR}/vnode_if.h \
:  : + ${DESTDIR}/usr/include/sys
:  
:  I object to this part of the patch.  We shouldn't install this file.
:  It isn't needed by anything outside of the kernel/drivers.
: 
: Well, depends on your point of view if that's outside kernel/drivers,
: but it's sure used by modules/KLDs.

No.  That's part of the kernel, for the purposes of this discussion.
It isn't used by userland at all.  It should be build by the kld
system, and if it isn't, then it is a bug.  Go look at
sys/modules/msdos/Makefile for an example of how it is supposed to
work.

:  For drivers, it should be built automatically as part of the modules
:  build system ala the *_if.m stuff.
: 
: Where are these files installed so that they can be used by
: third-party KLDs?

They aren't installed.  You must have a kernel tree to build the kld.
Just add vnode_if.h to your SRCS and the rest happens automatically
via bsd.kmod.mk.  It works great.  I do it all the time.  In fact, I
added SYSDIR support to bsd.kmod.mk at Timing Solutions so that we
could compile our drivers outside of the tree.

There are lots of generated files like this that aren't installed, nor
should they be.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: vnode_if.h: how should it be done ?

2000-06-24 Thread Warner Losh

In message [EMAIL PROTECTED] Assar Westerlund writes:
: I think it's wrong that vnode_if.h is not installed, this means that
: you need to have kernel source to compile any third-party file system.
: 
: So I propose the patch below, to create vnode_if.h and then add it to CVS.

No.  I don't like it.  We generally don't commit generated files
(although there are exceptions).

: Any objectsions/comments/whatever?

Hmmm.  The module system should build it automatically.  It doesn't
need to be used outside of the drivers/modules.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: vnode_if.h: how should it be done ?

2000-06-24 Thread Warner Losh

In message [EMAIL PROTECTED] Assar Westerlund writes:
: The problem is that the source files are hidden in the kernel source
: directory and not installed.  Where should vnode_if.{src,pl} get
: installed?  It seems much simpler just to install vnode_if.h in
: /usr/include/sys.  Patch appended.

No.  We don't install kenrel internal files.  Use SYSDIR instead.

: + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
: + ${.OBJDIR}/vnode_if.h \
: + ${DESTDIR}/usr/include/sys

I object to this part of the patch.  We shouldn't install this file.
It isn't needed by anything outside of the kernel/drivers.  For
drivers, it should be built automatically as part of the modules build
system ala the *_if.m stuff.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: vnode_if.h: how should it be done ?

2000-06-24 Thread Assar Westerlund

Warner Losh [EMAIL PROTECTED] writes:
 In message [EMAIL PROTECTED] Assar Westerlund writes:
 : The problem is that the source files are hidden in the kernel source
 : directory and not installed.  Where should vnode_if.{src,pl} get
 : installed?  It seems much simpler just to install vnode_if.h in
 : /usr/include/sys.  Patch appended.
 
 No.  

 We don't install kenrel internal files.

But it's not kernel internal.  It's used by modules/KLDs ?  Where
should these expect to find it?

 Use SYSDIR instead.

I'm not sure what you mean by this?  Should vnode_if.h just reside in
/sys/sys and be used from there or what?

 : +   ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
 : +   ${.OBJDIR}/vnode_if.h \
 : +   ${DESTDIR}/usr/include/sys
 
 I object to this part of the patch.  We shouldn't install this file.
 It isn't needed by anything outside of the kernel/drivers.

Well, depends on your point of view if that's outside kernel/drivers,
but it's sure used by modules/KLDs.

 For drivers, it should be built automatically as part of the modules
 build system ala the *_if.m stuff.

Where are these files installed so that they can be used by
third-party KLDs?

/assar


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



vnode_if.h: how should it be done ?

2000-06-21 Thread Assar Westerlund

I think it's wrong that vnode_if.h is not installed, this means that
you need to have kernel source to compile any third-party file system.

So I propose the patch below, to create vnode_if.h and then add it to CVS.

Any objectsions/comments/whatever?

/assar

Index: Makefile
===
RCS file: /home/ncvs/src/sys/kern/Makefile,v
retrieving revision 1.6
diff -u -w -r1.6 Makefile
--- Makefile1999/11/14 13:54:42 1.6
+++ Makefile2000/06/22 01:34:13
@@ -6,7 +6,7 @@
 ARCH=  i386 # luna68k news3400 pmax sparc tahoe vax
 
 all:
-   @echo "make tags, make links or init_sysent.c only"
+   @echo "make tags, make links, init_sysent.c, or ../sys/vnode_if.h only"
 
 init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall-hide.h \
 ../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master
@@ -17,6 +17,10 @@
-mv -f ../sys/syscall.mk ../sys/syscall.mk.bak
-mv -f ../sys/sysproto.h ../sys/sysproto.h.bak
sh makesyscalls.sh syscalls.master
+
+../sys/vnode_if.h: vnode_if.pl vnode_if.src
+   perl vnode_if.pl -h vnode_if.src
+   mv vnode_if.h ../sys
 
 # Kernel tags:
 # Tags files are built in the top-level directory for each architecture,


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



vnode_if.h: how should it be done ?

2000-06-21 Thread Garrett Wollman

On 22 Jun 2000 03:35:01 +0200, Assar Westerlund [EMAIL PROTECTED] said:

 So I propose the patch below, to create vnode_if.h and then add it to CVS.

 Any objectsions/comments/whatever?

Yes.

There are too many generated files in CVS as it is.

If there is a problem here, the correct fix is to supply the source
files, not the generated output.

-GAWollman



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: vnode_if.h: how should it be done ?

2000-06-21 Thread Assar Westerlund

Garrett Wollman [EMAIL PROTECTED] writes:

 On 22 Jun 2000 03:35:01 +0200, Assar Westerlund [EMAIL PROTECTED] said:
 
  So I propose the patch below, to create vnode_if.h and then add it to CVS.
 
 There are too many generated files in CVS as it is.
 
 If there is a problem here, the correct fix is to supply the source
 files, not the generated output.

The problem is that the source files are hidden in the kernel source
directory and not installed.  Where should vnode_if.{src,pl} get
installed?  It seems much simpler just to install vnode_if.h in
/usr/include/sys.  Patch appended.

/assar

Index: Makefile
===
RCS file: /home/ncvs/src/include/Makefile,v
retrieving revision 1.113
diff -u -w -r1.113 Makefile
--- Makefile2000/05/19 22:08:18 1.113
+++ Makefile2000/06/22 03:55:52
@@ -6,7 +6,7 @@
 # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
 # links.
 
-CLEANFILES= osreldate.h version vers.c
+CLEANFILES= osreldate.h version vers.c vnode_if.h
 SUBDIR= rpcsvc
 FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
dlfcn.h elf.h err.h fnmatch.h fstab.h \
@@ -57,7 +57,7 @@
 #SHARED=   symlinks
 SHARED?=   copies
 
-all:   osreldate.h
+all:   osreldate.h vnode_if.h
 
 osreldate.h:   ${.CURDIR}/../sys/conf/newvers.sh \
${.CURDIR}/../sys/sys/param.h
@@ -68,6 +68,11 @@
echo \#'undef __FreeBSD_version'  osreldate.h;\
echo \#'define __FreeBSD_version' $$RELDATE  osreldate.h
 
+vnode_if.h:${.CURDIR}/../sys/kern/vnode_if.pl \
+   ${.CURDIR}/../sys/kern/vnode_if.src
+   @${ECHO} creating vnode_if.h
+   perl ${.CURDIR}/../sys/kern/vnode_if.pl -h ${.CURDIR}/../sys/kern/vnode_if.src
+
 beforeinstall: ${SHARED}
@rm -f ${DESTDIR}/usr/include/timepps.h
cd ${.CURDIR}; \
@@ -85,6 +90,9 @@
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
${.OBJDIR}/osreldate.h \
${DESTDIR}/usr/include
+   ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+   ${.OBJDIR}/vnode_if.h \
+   ${DESTDIR}/usr/include/sys
 .for i in ${LFILES}
ln -sf sys/$i ${DESTDIR}/usr/include/$i
 .endfor


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message