Subject: Re: sendmail install stage is broken
To: None <tech-pkg@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-pkg
Date: 11/28/2005 03:52:53
In article <438A7E47.7020607@berklee.edu>,
Louis Guillaume  <lguillaume@berklee.edu> wrote:
>-=-=-=-=-=-
>
>John Klos wrote:
>> Hi,
>> 
>> On netbsd-2-1-RC5 on macppc, I'm seeing sendmail go through the motions 
>> of installing, but then I see these problems:
>> 
>.......
>> Of course, then, we don't have a working sendmail even though the 
>> package is registered.
>> 
>> John
>
>
>I was seeing the same on netbsd-2 (updated this week), i386. To get 
>around this I commented out the __NetBSD_Version__ checks that to 
>determine if statvfs or closefrom are there. It built ok.
>
>After further looking around, I came up with the patch below, which 
>probably will work (untested).
>
>What I noticed, is that there is no statvfs on a netbsd-2 system. Nor is 
>there closefrom.
>
>It looks these are in -current and netbsd-3 but not in any other branches.
>
>So this isn't true...
>
>#  if defined(__NetBSD__) && defined(__NetBSD_Version__) && 
>__NetBSD_Version__ >= 200060000
>#   define HASCLOSEFROM 1       /* closefrom(3) added in 2.0F */
>#  endif
>
>... and this is wrong...
>
>#  if defined(__NetBSD__) && defined(__NetBSD_Version__) && 
>__NetBSD_Version__ >= 200040000
>#   undef SFS_TYPE
>#   define SFS_TYPE     SFS_STATVFS
>#  else
>#   define SFS_TYPE     SFS_MOUNT       /* use <sys/mount.h> statfs() 
>impl */
>#  endif
>
>... unless someone pulls up statvfs and closefrom to netbsd-2 branches.
>
>How come they didn't come into netbsd-2 when it was branched?
>Didn't that branch happen after 2.0F?
>
>Louis
>
>
>--- conf.h.postpatch.orig       2005-11-27 22:02:01.000000000 -0500
>+++ conf.h      2005-11-27 22:33:18.000000000 -0500
>@@ -903,7 +903,7 @@
>  #  ifndef LA_TYPE
>  #   define LA_TYPE     LA_SUBR
>  #  endif /* ! LA_TYPE */
>-#  if defined(__NetBSD__) && defined(__NetBSD_Version__) && 
>__NetBSD_Version__ >= 200040000
>+#  if defined(__NetBSD__)  && defined(__NetBSD_Version__) && 
>__NetBSD_Version__ >= 300000000
>  #   undef SFS_TYPE
>  #   define SFS_TYPE    SFS_STATVFS
>  #  else
>@@ -919,7 +919,7 @@
>  #  if defined(__NetBSD__) && defined(__NetBSD_Version__) && 
>__NetBSD_Version__ >= 104170000
>  #   define HASSETUSERCONTEXT   1       /* BSDI-style login classes */
>  #  endif
>-#  if defined(__NetBSD__) && defined(__NetBSD_Version__) && 
>__NetBSD_Version__ >= 200060000
>+#  if defined(__NetBSD__) && defined(__NetBSD_Version__) && 
>__NetBSD_Version__ >= 300000000
>  #   define HASCLOSEFROM        1       /* closefrom(3) added in 2.0F */
>  #  endif
>  #  if defined(__NetBSD__)

2.1 > 2.0F so it breaks. It is better not to depend on __NetBSD_Version__
but to use autoconf.

christos