Subject: [netatalk-admins] netatalk on OS X

From: Lewis Pennock <[email-masked]>
Date: Fri, 20 Aug 99 12:50:52 -0500

For anyone curious, Ryan Thomas has successfully compiled netatalk on OS 
X.  Just a note, it replaces apple's implementation of AppleTalk on OS X 
so you can't use netboot, but you can now share files on UFS drives via 
atalk which you can't do with the Apple version of AppleTalk (it only 
shares HFS volumes).

-Lewis

---begin post to OS X list----

Sorry for the cross-post.  This thread showed up on both lists; I think 
this post is relevant to both lists; and I imagine the subscriber lists 
are 
relatively exclusive of one another.

I got netatalk to compile and work on osx.  Wish I had seen 
<src>/sys/osx/Makefile earlier.  With all of the posts to macosx and 
netatalk lists about compiling netatalk on mosx, I don't understand why 
no 
one referred to it earlier.  (?)

For the benefit of the list here are the first few lines from 
<src>/sys/osx/Makefile:
# stuff for os x server. This needs some include files from the darwin
# source to work properly. namely, it needs /usr/include/at,
# /usr/include/h, and
# /System/Library/Frameworks/LibcAT/Headers/at_proto.h. The first two are
# found in the kernel sources while the last one is found in LibcAT.

My interpretation:
# To compile on OS X Server, you need to acquire headers from darwin:
#   http://www.publicsource.apple.com/projects/darwin/projects.html
# Download and unpack kernel and LibcAT tarballs.
# From kernel, copy all netat/h headers (bsd/netat/h/*.h) to 
/usr/include/h
# From kernel, copy all netat/at headers (bsd/netat/at/*.h) to 
/usr/include/at
# From LibcAT, copy at_proto.h to 
/System/Library/Frameworks/LibcAT/Headers/

Disable Apple's AppleFileServer and related webadmin processes 
(/etc/startup/1600...), copy over default .conf and AppleVolume files to 
ETCDIR and enter afpovertcp service into netinfo:

  [irving:~] rthomas% niutil -read . /services/afpovertcp
  name: afpovertcp
  port: 548
  protocol: tcp,udp

Then, to test afpd, execute /<your install path>/afpd -d.

Mine was choking on the test for DHX auth -- I had to modify the 
AppleVolumes.default file to remove DHX from default list of uams.

Voila, access your home dir from your Mac (via AFP/IP).

There's no chooser listing, and it's passing passwords in the clear -- 
but 
it's compiled and working.  Now on to DHX!

Other things I learned that might help others, especially those like me 
who 
are new to unix and netatalk:
* kill -HUP afpd hoses afpd; but it seems AppleVolumes.* can be changed 
without killing afpd.
* issuing "tail /var/log/system.log" a lot causes system to crash 
regularly 
(syslogd bug?) -- yes, on macos-x-server 1.0.2.  Minimize the need for 
this 
by using -d switch for initial testing.
* I don't know why this is, but volumes configured in 
AppleVolumes.default 
(e.g., "/home/httpdocs Web") seem to cause afpd to break if you test 
immediately after modifying the AppleVolumes.default file, giving a 
misleading error message (don't remember what exactly) when you log 
in.  But if you give it a minute, a correctly config'ed volume should 
show up.

-Ryan

At 03:26 PM 8/9/99 -0700, you wrote:
>    A) Am I right in assuming that if all I need is AFP for sharing a UFS
>    filesystem, I don't need atalkd, just afpd?
>
>yep.
>
>    B) I just tried compiling netatalk (Adrian's most recent snapshot) on OS X
>    to see what headers it was lacking (as Adrian indicated, quote below) and
>    got this:
>
>get the missing headers from the darwin source. i think you need the
>libcAT and kernel bits.
>
>-a

--
Lewis Pennock
[email-masked]
http://www.lewis.net

---

From: a sun <[email-masked]>
Date: Fri, 20 Aug 1999 12:17:45 -0700 (PDT)

given that i did the port, i figure i also count as successfully
compiling netatalk on os x serve. it requires some header files from
darwin, but that's about all.

note: it does not replace apple's appletalk implementation. it
actually uses it for ddp connections. i also never bothered to
abstract the necessary bits to make atalkd run, so you need to use
apple's appletalk daemon for that. 

-a

---

From: Ryan Thomas <[email-masked]>
Date: Thu, 26 Aug 1999 10:01:43 -0500

Adrian, please help me understand what you mean by "it actually uses it for 
ddp connections".  Do you mean that I should be able to see my OS X Server 
in the chooser when running netatalk?  I can't, and the "appletalk" process 
is running...but not the "AppleFileServer" daemon(s) (I assumed it would 
conflict with netatalk).

Can I get my OS X server w/ netatalk to show up in the chooser?  If so, 
what am I missing?  See my document at 
http://irving.ed.uiuc.edu/~rthomas/netatalk-install.html.

-Ryan

---

From: Ryan Thomas <[email-masked]>
Date: Thu, 26 Aug 1999 17:48:44 -0500

All the log says is...

Can't register irving:AFPServer@*
ASIP start on 128.174.90.254:548(0) (1.4b2+asun2.1.4)

To start afpd, I copied /etc/startup/1600_AppleShare, calling it 
1610_netatalk-afpd, and in it, instead of calling webadminctl, I call 
/usr/local/sbin/afpd ...and chmod -x the 1600 script.

BTW...I've got DHX working.  :)

-Ryan

At 10:15 AM 8/26/99 -0700, you wrote:
>check your system logs. that will tell you what's happening when afpd
>tries to register itself. also, you need to modify the rc script so
>that it will work properly with os x server. basically, all you need
>to do is make sure that atalkd isn't started.
>
>-a

---

From: <[email-masked]>
Date: Thu, 26 Aug 1999 10:15:45 -0700

-a