Subject: Share common code/data across ports?
To: None <current-users@NetBSD.ORG>
From: Guenther Grau <s_grau@ira.uka.de>
List: current-users
Date: 01/07/1997 21:03:44
Hi,

I've seen this several times that when a new feature
is put into the tree, or an old one is changed, that
affects all ports, every port master (or someone else)
has to go into the tree and change sth. in 'their' port.

One recent example is the import of the ip-filter
(btw. thanx go to mgr for this!). Now I see commit
messages like this:

cgd
Update of /cvsroot/src/etc/etc.alpha

Modified Files:
	MAKEDEV 
Log Message:
add 'ipl' device node entry, for ip-filter.

...
veego
Update of /cvsroot/src/etc/etc.i386

Modified Files:
	MAKEDEV 
Log Message:
add 'ipl' device node entry, for ip-filter.

...
veego
Update of /cvsroot/src/etc/etc.amiga

Modified Files:
	MAKEDEV 
Log Message:
add 'ipl' device node entry, for ip-filter.

You get the idea...

NetBSD is probably the operating system that runs on
the broadest range of hardware, with more ports coming
along.

Shouldn't we try more carefully (and harder :-) to see what 
_can_ actually be shared among the different ports and then
actually share it. MAKEDEV is really a good example for this,
as in theory, all ports should be able to use the same
file. And even if we need a port-specific MAKEDEV,
there is definitely a lot to be shared, so a common part
would make sense, IMHO.

I fear, that some major/minor numbers might be used
in some ports for different things, but there is normally
no need to do so, except when you want to have the same
major/minor number that another OS running on this architecture
(like Digital Unix on the Alpha). I don't know if this is
really done, or not, and I don't want to say anything about
this being good or bad.
My point is that sharing as much as we can will help us
in supporting a large number of ports. Another benefit
of a shared MAKEDEV would be, that no duplicate device
names would happen, like the rd case lately shows.

I am sure there are other files out there, e.g. the config
stuff. Just recently general configuration options needed
in any file of one port we extracted, which is a good thing.
Taking a look a these extracted files on different ports
might show, that they have quite a lot in common.

Thus, my question, am I missing something, or is there
some potential savings in sharing more among the ports?
If I am not missing something, is it just lack of someone
devoting some time into this that prevented this from
happening?

  Guenther