You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodrigo Parra Novo <rp...@terra.com.br> on 2001/10/02 23:56:40 UTC

Port of Apache 1.3.20 to AtheOS

   Hi there,

   I have ported Apache 1.3.20 to AtheOS (A new OS, described on
www.atheos.cx), following the rules described by the PORTING document,
which can be found in Apache's src/ directory.

   I'm sending the (rather simple) patch attached. It would be nice if
someone from the Apache team could take a look at the patch, and tell me
if anything is still missing. It would be also nice if (hopefully) this
patch could be added to the current Apache 1.3 branch, on CVS.

   I (and others) have been running Apache on AtheOS for some time now,
and everything seems to work correctly, with the following exceptions:

   1. AtheOS does not use mmap() and shmget(), so we are using the
ScoreBoard on disk, for now;
   2. AtheOS does not support DSO for the moment, as shared libraries
are treated a bit differently from the way they are treated on UNIX.

   The two limitations above should be *easily* addressed if (when) one
writes the necessary hooks, for Apache 2.0. (which leads me to a question)
Apache 1.3 has the nice src/PORTING document, which explains all
necessary steps to to port Apache to a new architecture. Is there a
document with the same function for Apache 2.0?

   Through a bit of searching/grepping, I've found that most necessary
modifications, to make Apache run *well* on AtheOS, would reside in the
following directories:

   - os/
   - server/mpm/ (adding a new MPM for AtheOS, which would resemble the
                  a lot the Win32 MPM)
   - srclib/apr/ (addding new directories for AtheOS, where necessary,
                  using the unix/ directory in the "common" places)

   Are there any documents available, pointing to the places I would
need to change? Is there any information regarding the development of
new MPMs?

   Thanks in advance,

   Rodrigo

-- 
Rodrigo Parra Novo                     iEmacs is the best editor<ESC>
[rodarvus@terra.com.br]                0cwVI(m)<ESC>
Terra Networks Brasil S.A.                              -- vim editor

Re: Port of Apache 1.3.20 to AtheOS

Posted by Ryan Bloom <rb...@covalent.net>.
On Tuesday 02 October 2001 06:03 pm, Rodrigo Parra Novo wrote:
> > >    - server/mpm/ (adding a new MPM for AtheOS, which would resemble the
> > >                   a lot the Win32 MPM)
> >
> > You will need this, but I would look at mpmt_os2, which provides a
> > multi-process multi-threaded MPM which should be basically portable.  It
> > may use a few native OS/2 APIs, but most of it should be using APR.
>
>    Nice. I took a look into each of the MPMs. mpmt_os2 and threaded
> seemed to be the best candidates. In fact, this quick search made
> believe that it should probably be possible to use the threaded MPM, and
> the only necessary changes regarding threading would be inside
> srclib/apr/threadproc/

Yeah, as long as you have fork(), threaded should work just fine for you.  I
would suggest worker personally.  It has a more scalable accept model IMHO.

> > >    - srclib/apr/ (addding new directories for AtheOS, where necessary,
> > >                   using the unix/ directory in the "common" places)
> >
> > Exactly.  If you have posix implemented, you are done already, the
> > autoconf script will choose to use the unix dir, and you can forget about
> > everything else. If you have any problems, then you will need to create
> > an atheos directory, and you will need to populate it.
>
>    Ok. A further study on the APR directory shows me that the only
> places where I will have to add AtheOS hooks are:
>
>    - memory management (AtheOS uses its own shared memory functions,
>      instead of mmap and friends ()
>    - DSO (likewise)
>    - multithreading (likewise)
>
>    AtheOS mostly supports the POSIX standard, but this is not one of the
> "main targets" of the OS. There is one point that make me feel a bit
> uncomfortable, for now - multithreading works in a different manner, inside
> AtheOS - I'm still not *completely* sure it will be able to write a well
> designed (ie. non-hacked) implementation of apr_thread_t and friends.
> errno is unique for each thread, inside AtheOS, for instance.

That's fine.  We don't really use errno inside of APR.  The only place errno is
used, is that we return the platform error code from all APR routines.  This means
that on Unix, we return errno.  On Windows, I don't think we ever use errno.

> > There is an old out-of-date APRDesign document in the APR directory, that
> > will at least help you get started.  Other than that, you should join
> > dev@apr.apache.org. The developers there will help you port APR to
> > AtheOS, especially if you can get us an account on a box.  Most of the
> > APR developers are portability freaks, so one more OS would be awesome!
>
>    Great. This document cleared quite a few doubts regarding the best
> way to implement APR inside AtheOS. A (little) question remains. let's
> suppose I define "OSDIR" to "atheos", inside configure.in. If this
> directory does not exist, inside any of the subdirectories, the default
> one (DEFAULT_OSDIR) will be used, right?

Exactly.  If you need anything else, let me know.  I'll do my best to review your
patches and get them applied ASAP.  I am a big fan of getting APR to support
the most platforms possible, and I have been toying with installing AtheOS for
a while.  This may be the incentive I need.  :-)

Ryan
______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: Port of Apache 1.3.20 to AtheOS

Posted by Rodrigo Parra Novo <rp...@terra.com.br>.
> >    - server/mpm/ (adding a new MPM for AtheOS, which would resemble the
> >                   a lot the Win32 MPM)
> 
> You will need this, but I would look at mpmt_os2, which provides a multi-process
> multi-threaded MPM which should be basically portable.  It may use a few
> native OS/2 APIs, but most of it should be using APR.

   Nice. I took a look into each of the MPMs. mpmt_os2 and threaded
seemed to be the best candidates. In fact, this quick search made
believe that it should probably be possible to use the threaded MPM, and
the only necessary changes regarding threading would be inside
srclib/apr/threadproc/

> >    - srclib/apr/ (addding new directories for AtheOS, where necessary,
> >                   using the unix/ directory in the "common" places)
> 
> Exactly.  If you have posix implemented, you are done already, the autoconf
> script will choose to use the unix dir, and you can forget about everything else.
> If you have any problems, then you will need to create an atheos directory, and
> you will need to populate it.

   Ok. A further study on the APR directory shows me that the only
places where I will have to add AtheOS hooks are:

   - memory management (AtheOS uses its own shared memory functions,
     instead of mmap and friends ()
   - DSO (likewise)
   - multithreading (likewise)

   AtheOS mostly supports the POSIX standard, but this is not one of the
"main targets" of the OS. There is one point that make me feel a bit
uncomfortable, for now - multithreading works in a different manner, inside
AtheOS - I'm still not *completely* sure it will be able to write a well
designed (ie. non-hacked) implementation of apr_thread_t and friends.
errno is unique for each thread, inside AtheOS, for instance.

> There is an old out-of-date APRDesign document in the APR directory, that will
> at least help you get started.  Other than that, you should join dev@apr.apache.org.
> The developers there will help you port APR to AtheOS, especially if you can get
> us an account on a box.  Most of the APR developers are portability freaks, so one
> more OS would be awesome!

   Great. This document cleared quite a few doubts regarding the best
way to implement APR inside AtheOS. A (little) question remains. let's
suppose I define "OSDIR" to "atheos", inside configure.in. If this
directory does not exist, inside any of the subdirectories, the default
one (DEFAULT_OSDIR) will be used, right?

   Thanks again for your help,

   Rodrigo

-- 
Rodrigo Parra Novo                     iEmacs is the best editor<ESC>
[rodarvus@terra.com.br]                0cwVI(m)<ESC>
Terra Networks Brasil S.A.                              -- vim editor


Re: Port of Apache 1.3.20 to AtheOS

Posted by Ryan Bloom <rb...@covalent.net>.
On Tuesday 02 October 2001 02:56 pm, Rodrigo Parra Novo wrote:

> necessary steps to to port Apache to a new architecture. Is there a
> document with the same function for Apache 2.0?

Not yet, but it looks like you have found them all already.

>
>    Through a bit of searching/grepping, I've found that most necessary
> modifications, to make Apache run *well* on AtheOS, would reside in the
> following directories:
>
>    - os/

You can probably ignore this directory.  You are likely to need a file in here only
if you want to use SuExec.  Everything else in the Unix directory is to support
changing user ID's of the process running the server, and to detach from the
terminal.  If you write your own MPM, all of that type of logic can go directly
into the MPM.

>    - server/mpm/ (adding a new MPM for AtheOS, which would resemble the
>                   a lot the Win32 MPM)

You will need this, but I would look at mpmt_os2, which provides a multi-process
multi-threaded MPM which should be basically portable.  It may use a few
native OS/2 APIs, but most of it should be using APR.

>    - srclib/apr/ (addding new directories for AtheOS, where necessary,
>                   using the unix/ directory in the "common" places)

Exactly.  If you have posix implemented, you are done already, the autoconf
script will choose to use the unix dir, and you can forget about everything else.
If you have any problems, then you will need to create an atheos directory, and
you will need to populate it.

There is an old out-of-date APRDesign document in the APR directory, that will
at least help you get started.  Other than that, you should join dev@apr.apache.org.
The developers there will help you port APR to AtheOS, especially if you can get
us an account on a box.  Most of the APR developers are portability freaks, so one
more OS would be awesome!

>    Are there any documents available, pointing to the places I would
> need to change? Is there any information regarding the development of
> new MPMs?

The docs for porting aren't written yet.  The writing MPM docs aren't written
yet either.  I have written a couple of chapters about how to do this for my book,
but they are a bit out of date, and they aren't clear yet.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: Port of Apache 1.3.20 to AtheOS

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Tue, Oct 02, 2001 at 06:56:40PM -0300, Rodrigo Parra Novo wrote:
>    I'm sending the (rather simple) patch attached. [...]

As it really does not clash with anything else in apache, I committed
your patch for 1.3.22.

Thanks!
   Martin
-- 
<Ma...@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

RE: Port of Apache 1.3.20 to AtheOS

Posted by Lars Eilebrecht <la...@hyperreal.org>.
According to Rodrigo Parra Novo:

>     I'm sending the (rather simple) patch attached. It would be nice if
>  someone from the Apache team could take a look at the patch, and tell me
>  if anything is still missing. It would be also nice if (hopefully) this
>  patch could be added to the current Apache 1.3 branch, on CVS.

+1

ciao...
-- 
Lars Eilebrecht                  - Facts are the enemy of truth.
lars@hyperreal.org                                 (Don Quixote)