Subject: /usr/share differs between archs
To: None <tech-userlevel@netbsd.org>
From: Nino Dehne <TeCeEm@gmx.de>
List: tech-userlevel
Date: 05/11/2003 13:19:06
Hi list,

currently I'm playing around with different archs (namely alpha, amiga, 
i386, sgimips) and NetBSD. I could crossbuild amiga and sgimips on the 
i386 (thank $DEITY!). Poor 21066 is still building his own world since 2 
days, though. All machines are diskless as far as NetBSD is concerned.

Anyway, looking at the completed builds I got reminded about some 
principles of BSD's file structure, i.e. /usr/share/ ought to be 
shareable among different machines, hence the name. Making up about 53M 
each it also occupies a quite large portion of a whole build (130-150M) 
so i could gain about 150M by keeping it on the server only once. 
hier(7) seems to be with me:

      /usr/      contains the majority of the system utilities and files
                 [...]
                 share/    architecture-independent text files

A quick mtree(1) check between i386's and sgimips' /usr/share/ reveals 
checksum differences in the following files:

locale/ja_JP.ISO2022-JP/LC_CTYPE
locale/ja_JP.ISO2022-JP2/LC_CTYPE
locale/ja_JP.SJIS/LC_CTYPE
locale/ja_JP.ct/LC_CTYPE
locale/ja_JP.eucJP/LC_CTYPE
locale/ko_KR.eucKR/LC_CTYPE
locale/zh_CN.eucCN/LC_CTYPE
locale/zh_TW.Big5/LC_CTYPE
man/whatis.db
misc/vgrindefs.db
misc/termcap.db

I consider these minor because I a) don't use them or b) they look like 
like the probability to get 2 identical files is slim (while not being a 
sophisticated approach to look at it, I actually think it has to do with 
the way .db files are built). As to why the locales differ: no clue.

Then I checked the amiga build and noticed that i386 and sgimips are 
lacking the contents of keymaps/amiga/. Alpha build still isn't finished 
so I couldn't check that yet.

While it surely makes sense to leave out amiga keymaps on i386 or 
anything != amiga this would have prevented me from using the keymaps 
had I just gone ahead sharing the i386's /usr/share/ to all machines 
without actually double checking the contents. Right now I concluded I 
just take the amiga /usr/share/ (being a superset of the others) and 
share it to the rest.

Shouldn't /usr/share/, by its nature to be machine-independant and 
shareable, contain everything for every architecture? This may seem like 
a small issues but it bothers me nonetheless. I haven't dug into the 
build process too deep yet, either so I can't submit patches or 
anything. That's why I'm asking/pointing out first.

Thanks

Nino

PS: please cc: