NetBSD Problem Report #44216

From www@NetBSD.org  Fri Dec 10 17:58:17 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id BD5F363B886
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 10 Dec 2010 17:58:16 +0000 (UTC)
Message-Id: <20101210175816.9575E63B87A@www.NetBSD.org>
Date: Fri, 10 Dec 2010 17:58:16 +0000 (UTC)
From: bda@mirrorshades.net
Reply-To: bda@mirrorshades.net
To: gnats-bugs@NetBSD.org
Subject: mail/postfix requires NIS which does not exist on Solaris builds over b130
X-Send-Pr-Version: www-1.0

>Number:         44216
>Category:       pkg
>Synopsis:       mail/postfix requires NIS which does not exist on Solaris builds over b130
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    solaris-pkg-people
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 10 18:00:00 +0000 2010
>Closed-Date:    
>Last-Modified:  Sat Mar 17 12:46:16 +0000 2012
>Originator:     Bryan Horstmann-Allen
>Release:        pkgsrc 2010-q3
>Organization:
n/a
>Environment:
SunOS siege 5.11 snv_151a i86pc i386 i86pc
>Description:
NIS was removed as of Solaris/ONNV b130.

This affects any ONNV distribution, including OpenSolaris, OpenIndiana, Nexenta, and Solaris 11 Express.
>How-To-Repeat:
Build postfix on new Solaris.
>Fix:
--- src/util/sys_defs.h.orig    Sat Nov 14 18:32:37 2009
+++ src/util/sys_defs.h Sun Aug 15 02:43:59 2010
@@ -29,8 +29,8 @@
     || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
     || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
     || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \
-    || defined(NETBSD4) \
-    || defined(EKKOBSD1)
+    || defined(NETBSD4) || defined(NETBSD5) \
+    || defined(EKKOBSD1) || defined(DRAGONFLY)
 #define SUPPORTED
 #include <sys/types.h>
 #include <sys/param.h>
@@ -43,7 +43,9 @@
 #define DEF_MAILBOX_LOCK "flock, dotlock"
 #define HAS_SUN_LEN
 #define HAS_FSYNC
+#ifndef HAS_DB
 #define HAS_DB
+#endif
 #define HAS_SA_LEN
 #define DEF_DB_TYPE    "hash"
 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
@@ -111,7 +113,8 @@
 #define HAS_DUPLEX_PIPE                        /* 4.1 breaks with kqueue(2) */
 #endif

-#if __FreeBSD_version >= 800107                /* safe; don't believe the experts */
+#if (__FreeBSD_version >= 702104 && __FreeBSD_version <= 800000) \
+    || __FreeBSD_version >= 800100
 #define HAS_CLOSEFROM
 #endif

@@ -163,9 +166,19 @@
 #define HAS_FUTIMES
 #endif

+#if defined(__DragonFly__)
+#define HAS_DEV_URANDOM
+#define HAS_ISSETUGID
+#define HAS_FUTIMES
+#define SOCKADDR_SIZE  socklen_t
+#define SOCKOPT_SIZE   socklen_t
+#define HAS_DUPLEX_PIPE
+#endif
+
 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105000000) \
     || (defined(__FreeBSD__) && __FreeBSD__ >= 4) \
     || (defined(OpenBSD) && OpenBSD >= 200003) \
+    || defined(__DragonFly__) \
     || defined(USAGI_LIBINET6)
 #ifndef NO_IPV6
 # define HAS_IPV6
@@ -174,7 +187,8 @@

 #if (defined(__FreeBSD_version) && __FreeBSD_version >= 300000) \
     || (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 103000000) \
-    || (defined(OpenBSD) && OpenBSD >= 199700) /* OpenBSD 2.0?? */
+    || (defined(OpenBSD) && OpenBSD >= 199700) /* OpenBSD 2.0?? */ \
+    || defined(__DragonFly__)
 # define USE_SYSV_POLL
 #endif

@@ -181,7 +195,8 @@
 #ifndef NO_KQUEUE
 # if (defined(__FreeBSD_version) && __FreeBSD_version >= 410000) \
     || (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200000000) \
-    || (defined(OpenBSD) && OpenBSD >= 200105) /* OpenBSD 2.9 */
+    || (defined(OpenBSD) && OpenBSD >= 200105) /* OpenBSD 2.9 */ \
+    || defined(__DragonFly__)
 #  define EVENTS_STYLE EVENTS_STYLE_KQUEUE
 # endif
 #endif
@@ -400,8 +415,8 @@
 #define HAS_DBM
 #define DEF_DB_TYPE    "dbm"
 #define ALIAS_DB_MAP   "dbm:/etc/mail/aliases"
-#define HAS_NIS
-#define HAS_NISPLUS
+/* #define HAS_NIS 
+#define HAS_NISPLUS */
 #define USE_SYS_SOCKIO_H               /* Solaris 2.5, changed sys/ioctl.h */
 #define GETTIMEOFDAY(t)        gettimeofday(t)
 #define ROOT_PATH      "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Sat, 11 Dec 2010 12:55:22 +0000
Responsible-Changed-Why:
A Solaris issue.


From: Tim Zingelman <zingelman@gmail.com>
To: gnats-bugs@netbsd.org
Cc: solaris-pkg-people@netbsd.org, pkg-manager@netbsd.org, 
	pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org, hauke@netbsd.org, 
	bda@mirrorshades.net
Subject: Re: pkg/44216 (mail/postfix requires NIS which does not exist on
 Solaris builds over b130)
Date: Sat, 11 Dec 2010 10:21:56 -0600

 > Synopsis: mail/postfix requires NIS which does not exist on Solaris builds over b130

 Just to be clear... the only part of the included patch that is new is
 the final segment, right:

  @@ -400,8 +415,8 @@
   #define HAS_DBM
   #define DEF_DB_TYPE    "dbm"
   #define ALIAS_DB_MAP   "dbm:/etc/mail/aliases"
  -#define HAS_NIS
  -#define HAS_NISPLUS
  +/* #define HAS_NIS
  +#define HAS_NISPLUS */
   #define USE_SYS_SOCKIO_H               /* Solaris 2.5, changed sys/ioctl.h */
   #define GETTIMEOFDAY(t)        gettimeofday(t)
   #define ROOT_PATH      "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"

 The rest is the pre-existing patch-ag file.

 It seems to me that this fix should be wrapped in a version check of
 some sort, since builds <= b130 have NIS, right?

 I work with 'closed' Solaris 10, so I'm fuzzy on what variable one
 might look at to determine a Solaris/ONNV build number.

 Any ideas?  Thanks,  - Tim

From: Bryan Horstmann-Allen <bdha@mirrorshades.net>
To: Tim Zingelman <zingelman@gmail.com>
Cc: gnats-bugs@netbsd.org, solaris-pkg-people@netbsd.org,
	pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org,
	gnats-admin@netbsd.org, hauke@netbsd.org, bda@mirrorshades.net
Subject: Re: pkg/44216 (mail/postfix requires NIS which does not exist on
	Solaris builds over b130)
Date: Sat, 11 Dec 2010 11:50:08 -0500

 +------------------------------------------------------------------------------
 | On 2010-12-11 10:21:56, Tim Zingelman wrote:
 | 
 | It seems to me that this fix should be wrapped in a version check of
 | some sort, since builds <= b130 have NIS, right?

 Yes, sorry. Really it's an upstream issue. Postfix should have a def check for
 Solaris 11 now that it's been confirmed.

 | I work with 'closed' Solaris 10, so I'm fuzzy on what variable one
 | might look at to determine a Solaris/ONNV build number.

 If you're on Solaris 10, NIS is not going away. If uname -v returns snv_130 or
 higher the patch should be applied.

 Some builds have letters after the number, e.g., snv_151a is Solaris 11
 Express.

 Other distros have changed their nomenclature. e.g, OpenIndiana is oi_147
 currently.

 It would probably be better to somehow test for the existence of NIS rather
 than relying on build names. :\
 -- 
 bdha
 cyberpunk is dead. long live cyberpunk.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/44216 (mail/postfix requires NIS which does not exist on
 Solaris builds over b130)
Date: Wed, 29 Dec 2010 01:29:55 +0000

 On Sat, Dec 11, 2010 at 06:10:06PM +0000, Bryan Horstmann-Allen wrote:
  >  It would probably be better to somehow test for the existence of NIS rather
  >  than relying on build names. :\

 Would it work to check for the existence of a e.g. ypwhich executable?

 -- 
 David A. Holland
 dholland@netbsd.org

From: Bryan Horstmann-Allen <bdha@mirrorshades.net>
To: gnats-bugs@NetBSD.org
Cc: solaris-pkg-people@NetBSD.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org, bda@mirrorshades.net
Subject: Re: pkg/44216 (mail/postfix requires NIS which does not exist on
	Solaris builds over b130)
Date: Tue, 28 Dec 2010 21:20:33 -0500

 +------------------------------------------------------------------------------
 | On 2010-12-29 01:30:06, David Holland wrote:
 | 
 |  On Sat, Dec 11, 2010 at 06:10:06PM +0000, Bryan Horstmann-Allen wrote:
 |   >  It would probably be better to somehow test for the existence of NIS rather
 |   >  than relying on build names. :\
 |  
 |  Would it work to check for the existence of a e.g. ypwhich executable?

 Unfortunately not:

 # uname -a
 SunOS siege 5.11 snv_151a i86pc i386 i86pc
 # which ypwhich
 /bin/ypwhich
 -- 
 bdha
 cyberpunk is dead. long live cyberpunk.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/44216 (mail/postfix requires NIS which does not exist on
 Solaris builds over b130)
Date: Wed, 29 Dec 2010 02:29:41 +0000

 On Wed, Dec 29, 2010 at 02:25:02AM +0000, Bryan Horstmann-Allen wrote:
  >  |  Would it work to check for the existence of a e.g. ypwhich executable?
  >  
  >  Unfortunately not:
  >  
  >  # uname -a
  >  SunOS siege 5.11 snv_151a i86pc i386 i86pc
  >  # which ypwhich
  >  /bin/ypwhich

 hurray for solaris! :(

 (So it doesn't have NIS but does have the NIS programs? Does it have
 the header files in /usr/include? Are there any yp* or _yp* symbols
 in/not in libc that we could check for in a configure test?)

 -- 
 David A. Holland
 dholland@netbsd.org

From: Bryan Horstmann-Allen <bdha@mirrorshades.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/44216 (mail/postfix requires NIS which does not exist on
	Solaris builds over b130)
Date: Tue, 28 Dec 2010 22:25:15 -0500

 +------------------------------------------------------------------------------
 | On 2010-12-29 02:30:04, David Holland wrote:
 | 
 |  hurray for solaris! :(
 |  
 |  (So it doesn't have NIS but does have the NIS programs? Does it have
 |  the header files in /usr/include? Are there any yp* or _yp* symbols
 |  in/not in libc that we could check for in a configure test?)

 Sorry, I think I managed to confuse everyone (including myself[1]).

 NIS+ was pulled, not NIS. So the NIS client utils, the libc symbols for NIS,
 etc, may still exist.

   http://www.mail-archive.com/on-discuss@mail.opensolaris.org/msg01417.html

 Perhaps the simplest thing would be to add the patch as an option? Unless
 +nisplus, then comment out HAS_NISPLUS in src/util/sys_def.h? Postfix/NIS+
 installs are likely pretty rare on the ground.

 I've tested this on s11e, and it appears to work. If anyone would like a build
 zone to test with, please ping me (bdha) on freenode.

 [1] Commenting out HAS_NIS also seems to work; I did not remove HAS_NISPLUS in
 my previous build, so however the defs work, it seems to .. work.
 -- 
 bdha
 cyberpunk is dead. long live cyberpunk.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/44216 (mail/postfix requires NIS which does not exist on
 Solaris builds over b130)
Date: Wed, 9 Feb 2011 05:45:54 +0000

 On Wed, Dec 29, 2010 at 03:25:02AM +0000, Bryan Horstmann-Allen wrote:
  >  |  (So it doesn't have NIS but does have the NIS programs? Does it have
  >  |  the header files in /usr/include? Are there any yp* or _yp* symbols
  >  |  in/not in libc that we could check for in a configure test?)
  >  
  >  Sorry, I think I managed to confuse everyone (including myself[1]).
  >  
  >  NIS+ was pulled, not NIS. So the NIS client utils, the libc
  >  symbols for NIS, etc, may still exist.

 Ah, that makes more sense.

  >  Perhaps the simplest thing would be to add the patch as an option? Unless
  >  +nisplus, then comment out HAS_NISPLUS in src/util/sys_def.h? Postfix/NIS+
  >  installs are likely pretty rare on the ground.

 That turns out to be kind of a pain to do with an option. I dunno. The
 HAS_NISPLUS you commented out is Solaris-specific, so maybe just
 taking it out entirely is the best approach. Then again, as NIS+ is
 itself pretty much Solaris-specific doing that will break anyone who
 has such a setup with an older version... 

 I wish there were a clear way to probe this.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Filip Hajny" <filip@joyent.com>
To: <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/44216
Date: Wed, 4 Jan 2012 15:20:59 +0100

 This *does* work, as confirmed on Nevada (snv_89) vs. SmartOS (Illumos snv_=
 147+). While I hate putting an absolute path there like this, nis_cache.h i=
 s one of the files taken away as part of the NIS+ cleanup in Nevada. Would =
 this be OK to commit?

 +.if ${OPSYS} =3D=3D "SunOS" && !exists(/usr/include/rpcsvc/nis_cache.h)
 +SUBST_CLASSES+=3D                nis
 +SUBST_FILES.nis=3D       src/util/sys_defs.h
 +SUBST_MESSAGE.nis=3D     Working around dropped support for NIS+ on SunOS
 +SUBST_STAGE.nis=3D       post-patch
 +SUBST_SED.nis=3D         -e 's,\#define HAS_NISPLUS,\#undef HAS_NISPLUS,g'
 +.endif

 Upstream seems to recognize OpenSolaris (and other spin-offs) as new/unsupp=
 orted platforms and expects full-blown porting as the official fix for this=
  problem.

 --
 Filip Hajny
 Joyent Inc.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/44216
Date: Sun, 22 Jan 2012 18:00:39 +0000

 On Wed, Jan 04, 2012 at 02:40:06PM +0000, Filip Hajny wrote:
  > This *does* work, as confirmed on Nevada (snv_89) vs. SmartOS
  > (Illumos snv_= 147+). While I hate putting an absolute path there
  > like this, nis_cache.h i= s one of the files taken away as part of
  > the NIS+ cleanup in Nevada. Would = this be OK to commit?

 Looks fine to me.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Filip Hajny" <filip@joyent.com>
To: <gnats-bugs@NetBSD.org>
Cc: <bda@mirrorshades.net>
Subject: Re: pkg/44216
Date: Fri, 9 Mar 2012 16:08:21 +0100

 I committed the fix today. Confirmed working on SmartOS vs. snv_89.

 -F

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 17 Mar 2012 12:46:16 +0000
State-Changed-Why:
Let's make sure it also works for the submitter.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.