User Tools

Site Tools


NetBSD Code Patch System

In order to be able to neatly track NetBSD sources, and easily import and patch more, there is a system to retrieve NetBSD sources using cvs, and automatically generate patch files from the current Minix code with respect to the current NetBSD code.

Imported NetBSD code

  • The list of imported NetBSD sub-hierarchies is in releasetools/nbsd_ports. Each line is an imported hierarchy, where the first column is the timestamp in UTC and the second column is the location in the Minix source tree. The (optional) third column is the NetBSD CVS location (if different than the Minix location).
  • The CVS revision of the NetBSD code currently imported in Minix is set in nbsd.config.

Hierarchy Maintenance

Install the cvs package.

pkgin in cvs

After running the following command, the original NetBSD sources will be stored, for reference, in src/nbsdsrc.

cd /usr/src/releasetools && make nbsd_fetch

Using nbsd.config, this fetches the right revision of the imported hierarchies.

To update each hierarchy's patch file (minix-port.patch):

make nbsd_diff

Remaining Issues

  • Implement issetugid.c
  • Can't build image with clang
  • syslog doesn't seem to work (connects to unix domain socket)
  • Make off_t, time_t, mode_t match NetBSD's types
  • Clean up other warnings
  • The sys/bswap.h header indirectly includes sys/endian.h, which implicitly declares the bswap{16,32,64} functions; sys/bswap.h later declares them as well, resulting in a compilation error
  • Phase out MINIX sed
  • zoneinfo build problem with gcc/clang
  • signal number conflicts
  • test set build failures
  • <unistd.h> feature-test macros vary on the level of POSIX conformance (_POSIX*_VERSION), functionnality of chown (_POSIX_CHOWN_RESTRICTED), path too long signalling (_POSIX_NO_TRUNC), support of job control (_POSIX_JOB_CONTROL), perhaps tty disabling (_POSIX_VDISABLE, cannot figure it out), and a host of post-1993 POSIX features, not all of them implemented in the MINIX system; I guess src/nbsd_include/sys/unistd.h is unchanged from NetBSD
  • not-stubbed uuid_xxx(3) functions (need uuidgen).
  • widely distributed ~/.ashrc uses non-standard construction if [ “$-” : '.*i.*' which takes advantage of expr and test/[ being the same with MINIX port of ash(1), not so with NetBSD
  • MSG_DONTWAIT is missing

Resolved Issues, with future follow-up

  • dns lookups need resolv.conf; fine, we need a resolv.conf then; when everyone uses it, we can phase out nonamed
  • Password format
releases/3.2.1/developersguide/usingnetbsdcode.txt · Last modified: 2014/11/13 16:55 by lionelsambuc