Solaris and asun patches

The most current asun release is pre-asun2.1.0. Read here to use it. The release status of pre-asun2.1.0 is a bit murky, so you might want to use asun-2.0a18.2 instead, in which case, read on.

I want to use asun18.2 with Solaris 2.


Date: Wed, 01 Apr 1998 15:26:06 -0800
From: Michael M Han <han at windy dot ckm dot ucsf dot edu>
To: netatalk-admins@umich.edu
Subject: [netatalk-admins] howto: solaris2.6 + asun18.2

As promised, I'm posting a howto for Solaris 2.6 users who want to use
asun's patches. Note that this applies only until the next version of
asun's patches become available, at which time (hopefully) Solaris
installation will be a little easier. Until then, perhaps this could
be added to the relevant FAQs?

1) Retrieve asun's source, preferably

ftp://ftp.u.washington.edu/public/asun/netatalk-1.4b2+asun2.0a18.2.tar.gz

2) Retrieve the latest Umich netatalk beta from

ftp://terminator.rs.itd.umich.edu/pub/n-971027.tar.gz 

3) Unpack your sources trees
4) `make` netatalk-971027 and `make kinstall` (no changes should be
needed to the source)
5) Apply the setsockopt patch and the Solaris EAGAIN patch to the
netatalk-1.4b2+asun2.0a18.2 source (see below)
6) Add the required DEFS= -DNEW_STREAMS_MODULE in sys/solaris/Makefile

From that point it's a straightforward installation. Add whatever
options you need, comment out things you don't want/haven't got, and
install.

Patches:
I'm including patches that work using the `patch` that came out of the
box. If you have trouble applying the patches or such, just do it by
hand. Here are the required patches in context format, produced by
Solaris 2.6's diff. Watch out for line-wrapping...

<solaris.eagain.diff>
*** libatalk/asp/asp_getsess.c Wed Feb 18 11:35:16 1998
--- libatalk/asp/asp_getsess.c	Thu Mar 26 17:41:04 1998
***************
*** 135,141 ****
      atpb.atp_rreqdata = asp->cmdbuf;
      atpb.atp_rreqdlen = sizeof( asp->cmdbuf );
      while ( atp_rreq( asp->asp_atp, &atpb ) < 0 ) {
!       if ( errno == EINTR ) {
  	continue;
        }
        return( NULL );
--- 135,141 ----
      atpb.atp_rreqdata = asp->cmdbuf;
      atpb.atp_rreqdlen = sizeof( asp->cmdbuf );
      while ( atp_rreq( asp->asp_atp, &atpb ) < 0 ) {
!       if ( errno == EINTR || errno == EAGAIN ) {
  	continue;
        }
        return( NULL );



<setsockopt.diff>
*** etc/atalkd/main.c	Mon Dec  8 15:03:51 1997
--- etc/atalkd/main.c	Wed Apr  1 14:18:00 1998
***************
*** 1233,1239 ****
      /* open ports */
      i = 1; /* enable broadcasts */
  #if defined(__svr4__) && !defined(NEW_STREAMS_MODULE)
!     syslog(LOG_INFO, "setsockopt incompatible w/ Solaris STREAMS module.");
  #endif
      for ( ap = iface->i_ports; ap; ap = ap->ap_next ) {
  	if (( ap->ap_fd = socket( AF_APPLETALK, SOCK_DGRAM, 0 )) < 0 ) {
--- 1233,1239 ----
      /* open ports */
      i = 1; /* enable broadcasts */
  #if defined(__svr4__) && !defined(NEW_STREAMS_MODULE)
!     // syslog(LOG_INFO, "setsockopt incompatible w/ Solaris STREAMS module.");
  #endif
      for ( ap = iface->i_ports; ap; ap = ap->ap_next ) {
  	if (( ap->ap_fd = socket( AF_APPLETALK, SOCK_DGRAM, 0 )) < 0 ) {
***************
*** 1240,1246 ****
  	    syslog( LOG_ERR, "socket: %m" );
  	    atalkd_exit( 1 );
  	}
! #if !defined(__svr4__) || defined(NEW_STREAMS_MODULE)
  	setsockopt(ap->ap_fd, SOL_SOCKET, SO_BROADCAST, &i, sizeof(i));
  #endif
  
--- 1240,1246 ----
  	    syslog( LOG_ERR, "socket: %m" );
  	    atalkd_exit( 1 );
  	}
! #if !defined(__svr4__)
  	setsockopt(ap->ap_fd, SOL_SOCKET, SO_BROADCAST, &i, sizeof(i));
  #endif
  
_____
Michael Han (han at library dot ucsf dot edu)                     voice: (415) 502-7542
Interactive Learning Center Consultant                        (415) 476-4309
San Francisco, California 94143-0840                     fax: (415) 476-4653
"You don't like my rice?!?"


I want to use pre-asun2.1.0

That's easy enough. Simply download
ftp://ftp.u.washington.edu/public/asun/pre-asun2.1.0.tar.gz. Untar the source tree. From the source file at libatalk/adouble/ad_write.c remove line 9:

#include <sys/file.h>

Otherwise, just follow the instructions and enjoy!


Back