Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2001 13:07:54 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        arch@FreeBSD.org
Cc:        Bruce Evans <bde@FreeBSD.org>, Jonathan Lemon <jlemon@FreeBSD.org>, Peter Wemm <peter@FreeBSD.org>, "David O'Brien" <obrien@FreeBSD.org>, Darren Reed <darrenr@FreeBSD.org>
Subject:   SHARED=symlinks, /sys/contrib/ipfilter/netinet: problems and the fix
Message-ID:  <20010614130754.A13655@sunbay.com>

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

[-- Attachment #1 --]
Hi!

There are some problems with the current location of IPFilter sources.

1.  The idea of http://people.freebsd.org/~jhb/docs/sysorg.txt was
    that src/sys/contrib/ mirrors the structure of src/sys/; this is
    currently broken.  src/sys/contrib/ipfilter/netinet/ should have
    been actually called the src/sys/contrib/netinet/.

2.  We (for no apparent reason) have two distinct copies of the
    kernel part IPFilter sources (20 files), the first (stock) one
    being in src/contrib/ipfilter/ and the second (with local FreeBSD
    modifications) in src/sys/contrib/ipfilter/netinet/.

    `cvs up -rold_DARRENR' in src/sys/contrib/ipfilter/netinet/ and
    diff(1)'ing against src/contrib/ipfilter/ shows they are the same.
    (Whoever did the repocopies may want to restore the DARRENR tag.)

3.  We are currently unable to install headers in SHARED=symlinks mode.

4.  Most of userland IPFilter stuff (ipf, ipfstat, etc.) had bogus -I
    directives in their Makefiles to pick up the correct headers.  I
    have removed these as part of "-I${.CURDIR}/..../sys" cleanup as
    I didn't realize that they were required to pick up the _correct_
    headers from src/sys/netinet (before the last repocopies were made).
    Peter Wemm pointed to the problem, and I restored the -I lines, but
    these now have no effect because destination has changed.  (See
    the attached mail for details.)


What I propose.

1.  Remove duplicate copies of the kernel part of IPFilter files from
    src/contrib/ipfilter/.

2.  Move src/sys/contrib/ipfilter/netinet/ to src/sys/contrib/netinet/
    to align with sysorg.txt requirements.  "Move" should be OK, as
    these don't (yet) have any RELEASE tags.

3.  Introduce new /usr/include/contrib/ and make it a part of standard
    include dirs for our gcc(1):

	#define SYSTEM_INCLUDE_DIR PREFIX"/include/contrib"

    which will mirror the organization of /usr/include/.
    src/sys/contrib/netinet/ headers will then go to
    /usr/include/contrib/netinet/, and SHARED=symlinks could made
    be working again.


Comments, thoughts, objections?


Cheers,
-- 
Ruslan Ermilov		Oracle Developer/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

[-- Attachment #2 --]
Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119])
	by whale.sunbay.crimea.ua (8.11.2/8.11.2) with ESMTP id f5C33k091767
	for <ru@sunbay.crimea.ua>; Tue, 12 Jun 2001 06:03:47 +0300 (EEST)
	(envelope-from bde@zeta.org.au)
Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18])
	by mx2.freebsd.org (Postfix) with ESMTP id C56BF554F6
	for <ru@sunbay.crimea.ua>; Mon, 11 Jun 2001 20:03:42 -0700 (PDT)
	(envelope-from bde@zeta.org.au)
Received: by hub.freebsd.org (Postfix)
	id A612237B405; Mon, 11 Jun 2001 20:03:42 -0700 (PDT)
Delivered-To: ru@freebsd.org
Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16])
	by hub.freebsd.org (Postfix) with ESMTP
	id 4421537B403; Mon, 11 Jun 2001 20:03:41 -0700 (PDT)
	(envelope-from bde@zeta.org.au)
Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102])
	by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id NAA06671;
	Tue, 12 Jun 2001 13:03:36 +1000
Date: Tue, 12 Jun 2001 13:01:23 +1000 (EST)
From: Bruce Evans <bde@zeta.org.au>
X-Sender: bde@besplex.bde.org
To: Ruslan Ermilov <ru@FreeBSD.org>
Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject: Re: cvs commit: src/sbin/ipf Makefile src/sbin/ipfstat Makefile   
      src/sbin/ipnat Makefile src/usr.sbin/ipftest Makefile        
 src/usr.sbin/ipresend Makefile src/usr.sbin/ipsend Makefile        
 src/usr.sbin/iptest Makefile
In-Reply-To: <200106111741.f5BHfw495372@freefall.freebsd.org>
Message-ID: <Pine.BSF.4.21.0106121240001.56809-100000@besplex.bde.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 11 Jun 2001, Ruslan Ermilov wrote:

> ru          2001/06/11 10:41:58 PDT
> 
>   Modified files:
>     sbin/ipf             Makefile 
>     sbin/ipfstat         Makefile 
>     sbin/ipnat           Makefile 
>     usr.sbin/ipftest     Makefile 
>     usr.sbin/ipresend    Makefile 
>     usr.sbin/ipsend      Makefile 
>     usr.sbin/iptest      Makefile 
>   Log:
>   Backout previous change (removal of -I${.CURDIR}/../../sys/netinet).
>   This is needed to pick up the right headers.  Wrong headers from
>   src/contrib/ipfilter are used otherwise.
>   
>   The right fix would be to fix contrib/ipfilter C sources to pick up
>   headers from <sys/netinet>.
>   
>   Noticed by:	peter

Wrong headers are still used.  There are no ipfiliter headers in
${.CURDIR}/../../sys/netinet any more.  ipfilter headers are now in:

   (1) ${.CURDIR}/../../sys/contrib/ipfilter/netinet (active sources)
   (2) ${.CURDIR}/../../contrib/ipfilter (rotting copy of distribution sources)
   (3) /usr/include/netinet (copy of (1), modulo bugs)
   (4) ${WORLDTMP}/usr/include/netinet (copy of (1), modulo bugs)

and the purpose of some the -I paths is to prefer (1) after breaking the
default of (3) or (4) by putting a -I to (2) in CFLAGS before the -I to (3)
or (4).  Using ${.CURDIR}/../../sys/netinet and/or ${.CURDIR}/../../sys
instead of (1) does not help avoid the main ipfilter headers in (2), but
it might help avoid other garbage.

Bruce

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