]> arthur.barton.de Git - netatalk.git/blob - doc/README.platforms
test for the whole loopback subbnet not only 127.0.0.1
[netatalk.git] / doc / README.platforms
1 This is a README for the major platforms where Netatalk is in use. 
2
3 Platforms Covered:
4 A.   Linux
5 B.   Tru64
6 C.   Solaris
7 D.I  OpenBSD
8 D.II Other BSDs
9 E.   SunOS
10 F.   Generic
11
12 ----------------------------------------------------------------
13
14 A. Linux
15
16 We no longer include linux kernel code with netatalk, since Linux now
17 includes AppleTalk support.
18
19 1.  MAKE CONFIG.  Configure your kernel with "make config".  Answer yes
20     to "AppleTalk DDP" support.
21
22 2.  INSTALL KERNEL.  Make and install your kernel.  Be sure to update
23     your boot blocks!
24
25 3.  Linux 2.2.x provides the sendfile() call. This reduces overhead
26     when sending/copying files. This option will be autoconfigured on
27     compile. NOTE: you might run into problems if you have this option
28     compiled in and you switch to a machine running an os < 2.2.x.
29
30
31 Netatalk supplies two different types of Appletalk servers and both
32 can run at the same time. Classic Appletalk requires afpd and
33 atalkd. Appletalk over IP only requires afpd.
34
35 Classic Appletalk on GNU/Linux requires that CONFIG_ATALK is compiled
36 into the kernel or as a kernel module. To check to see if the kernel
37 has Appletalk installed:
38
39 $> dmesg | grep Apple
40 This just parses the boot messages for any line containing
41 'Apple'.
42
43 To see all the  loaded modules (as root):
44 $> lsmod
45
46 If you don't find it, you may have to compile a kernel and turn on
47 Appletalk in Networking options -> Appletalk DDP. You have an option
48 to install as a module or directly into the kernel.
49
50 Some default distribution kernels have already compiled Appletalk DDP
51 as a module, you may have to edit your /etc/modules.conf to include:
52 "alias net-pf-5 appletalk ".
53
54 Note: check your distribution documentation about editing
55 /etc/modules.conf.
56
57 For more complete information about the Linux kernel see the
58 Kernel-HOWTO:
59 http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html
60
61 A note for RedHat users: You may need to install the glibc-devel
62 package to be able to compile Netatalk correctly.
63
64 ----------------------------------------------------------------
65
66 B. TRU64
67
68 This is the Tru64 README file for netatalk.
69
70 1.  Unfortunately, AppleTalk is not available for Digital Unix or Tru64.
71     The reason for this is the kernel patches which Netatalk requires
72     cannot be ported to Tru64. If anyone has the kernel source of Tru64
73     they are welcomed to port the AppleTalk modules themselves.
74
75     As a result, only AppleShare over IP (ASIP) works with Tru64. That
76     is, the program afpd. papd and atalkd compile, but doesn't really
77     work. Anything that requires AppleTalk doesn't work.
78
79 2.  Netatalk compiles on Tru64 V4.0D or higher using either the built-in
80     DEC C compiler or GCC V2.95.3. Also, either the Tru64 make command or
81     GNU make can be used. Netatalk supports Tru64's Security Integration
82     Architecture (SIA) and runs on machines configured for Base (BSD) or
83     Enhanced (OSFC2) Security without recompilation.
84
85 3.  A peculiar bug in Netatalk has been noticed on a single Tru64
86     machine. However, because other Tru64 machines have not affected, a
87     patch will not be forthcoming until the circumstances where the bug
88     hits is isolated and a more elegant and appropriate patch can be
89     found. In the meantime, there is a description of the bug below. Any
90     users affected can attempt the workarounds provided. The user is
91     urged to report this to the mailing list so that this bug can be
92     isolated and removed.
93
94     HAVE_GCC_MEMCPY_BUG
95     Description -
96        It appears that memcpy() under Tru64 can fail under some
97     circumstances. This maybe due to the fact that Netatalk is compiled
98     with gcc, but since only gcc can compile Netatalk, this is a mute
99     point.
100
101     Symptoms -
102        The symptoms of this bug is that a 18432 byte file uploaded to
103     the server would upload correctly, but a 18433 byte file would
104     result in a sparse file many megabytes big (16MB+). However, due to
105     the low-level nature of memcpy(), there is no reason why other
106     symptoms could not occur.
107
108     Workarounds -
109        There are two known workarounds at this stage.
110     - The first is to #define the macro HAVE_GCC_MEMCPY_BUG. This forces
111     netatalk to use bcopy() in a few (but not all) cases within the code
112     and is enough to stop the bug from occurring. This is the easiest
113     workaround and would merely alter the standard compilation steps to
114
115     CFLAGS="-DHAVE_GCC_MEMCPY_BUG" ./configure [...]
116     make
117     make install
118
119     - The second workaround is to manually remove the optimisation flag
120     "-O2" from within configure and/or configure.in. Although, this
121     isn't the preferred workaround, it shows that the compiler is
122     (at least) partially at fault.
123
124 ----------------------------------------------------------------
125
126 C. SOLARIS
127
128 1.  SELECT COMPILER.  This distribution is configured to build with
129     gcc.  It should also work with cc. At the present time only cc
130     v5.0 and gcc 3.1 and above can build the 64-bit kernel module.
131
132 2.  INSTALL DRIVER.  Since the STREAMS ddp driver must be installed as
133     root, we've separated that portion of the build.  Go to the 
134     sys/solaris directory and type
135
136         make kinstall
137
138     to install the driver.  This copies the driver and its config file
139     into /usr/kernel/drv and /usr/kernel/strmod, runs "add_drv ddp" to
140     make the kernel aware of the new driver.
141     If you see something like
142       devfsadm: driver failed to attach: ddp
143       Warning: Driver (ddp) successfully added to system but failed to attach
144     then try a different compiler.
145
146 3.  ATALKD.CONF.  Under Solaris, you must create atalkd.conf, since
147     Solaris provides no method for determining the names of the
148     available interfaces.  It is sufficent to name the available
149     interfaces in atalkd.conf, one per line.  E.g.
150
151         le0
152
153     on a line by itself on many Suns. hme0 on Ultras.  See atalkd(8).
154
155 4.  PRINTING.  Netatalk can use any postscript printer that has been set
156     up for use by Solaris. If you haven't already set up a printer,
157     type admintool then select Browse --> Printers, and then Edit --> Add
158     and fill in the form for either a local or remote printer. If adding
159     a local printer, set the Printer Type to PostScript. Then find a
160     postscript file and test your printer from the command line. For
161     example if you created a printer called "fred" your print command
162     would be something like:  lp -d fred some_file.ps
163
164     Once you have a printer that works under Solaris, you need to create
165     a papd.conf file. For example
166
167       MacLaserjet:\
168           :pr=|/usr/bin/lp -d fred:\
169           :op=nobody:\
170           :pd=/usr/local/etc/HPLJ_4M.PPD:
171
172     See doc/CONFIGURE for more information on papd.conf.
173     Once you have this set up, and assuming netatalk starts up after
174       /etc/rc2.d/S79atalk start
175     you should be able to see the printer from the Macintosh Chooser.
176
177 ----------------------------------------------------------------
178
179 D.I OpenBSD
180
181 1.  KERNEL SUPPORT. Note that kernel support for netatalk appears in
182     OpenBSD 2.2,  or openbsd-current dated after Aug 1, 1997. But the
183     'comment out' character must be removed and the kernel must be
184     recompiled.
185
186     The kernel file that needs to be edited is usually located in:
187     /usr/src/sys/conf
188
189     Remove the first comment (#) from this line:
190     # option          NETATALK        # AppleTalk
191
192     Generally this is the GENERIC kernal. If you decide to rename 
193     the kernel, don't forget to go to 
194     /usr/src/sys/arch/<your arch>/conf/NEWNAME, and change the 
195     ../../../conf/GENERIC line to your NEWNAME. See 
196     http://www.openbsd.org/faq/faq5.html for more information on 
197     compiling a new kernel.
198
199 2.  STARTING NETATALK. The rc scripts that come with openbsd to
200     start netatalk are specific to an older version of netatalk.
201     So, if you use the initscript provided in a current netatalk's
202     distrib/initscripts directory, you must either add the lines
203     from rc.atalk.bsd by hand into /etc/rc.local (or wherever you
204     want to launch the daemons from) or modify your /etc/rc.local
205     file to read: 
206
207     (currently says)
208
209     # Netatalk stuff
210     if [ -f /etc/netatalk/rc.atalk ]; then
211             . /etc/netatlk/rc.atalk
212     fi
213
214     (change to) 
215
216     # Netatalk stuff
217     if [ -f /etc/rc.atalk ]; then
218             . /etc/rc.atalk
219     fi
220
221     and copy netatalk/distrib/initscripts/rc.atalk.bsd to /etc/rc.atalk.
222
223 D.II Other BSDs
224
225 1.  KERNEL SUPPORT. Note that kernel support for netatalk appears in
226     FreeBSD 2.2-current dated after 12 September 1996.
227
228     Add the line
229
230         options NETATALK
231
232     to the config file for your kernel.  Rebuild and install your
233     kernel.  Reboot.
234
235 ----------------------------------------------------------------
236
237 E. SunOS
238
239 1.  KERNEL MODULE. This version of netatalk requires that your kernel
240     be configured with
241
242         options VDDRV
243
244     The loadable kernel module is made and installed during the normal
245     make and make install.  NOTE:  Unloading the kernel module may not
246     work correctly and may cause your kernel to panic, hang, or do
247     other nasty things.
248
249 ----------------------------------------------------------------
250
251 F. Generic
252
253 (It's unknown how applicable this is compared to the current codebase)
254
255     The generic system profile is for use on systems that don't have native
256     appletalk support. For those systems, it should still be possible to get
257     the AFP/tcp portion of netatalk to still work.
258     
259     To do that, you will need the following information:
260
261         1) Endian order: If your machine does not specify the
262            byte-order in netinet/in.h, you may need to modify
263            netatalk/endian.h.
264
265         2) Integer sizes: If your machine does not define intX_t and
266            u_intX_t, you will need to define them in
267            netatalk/endian.h. To ease matters, you can specify
268            _ISOC9X_SOURCE if you have inttypes.h, HAVE_64BIT_LONGS for
269            64 bit machines, or HAVE_32BIT_LONGS for 32 bit
270            machines. NOTE: you should only use HAVE_32/64BIT_LONGS on
271            machines that don't have a header file somewhere with the
272            integer sizes. If you have a file with all the relevant
273            bits, modify netatalk/endian.h to include it.
274
275         3) Quota/statfs information: You may be able to get away with
276            either BSD4_4 or __svr4__, but that's unlikely if your os
277            is some bizarre hybrid. If you don't have quota support,
278            just specify NO_QUOTA_SUPPORT. In addition, if you'll need
279            to specify the include file that gets statfs() (usually
280            either USE_VFS_H or USE_STATFS_H although BSD4_4 and
281            __svr4__ bring in a set of include files for that). Look at
282            etc/afpd/quota.c, unix.c, and unix.h for more information.
283            Finally, if you have a really old version of rquota, you
284            can define USE_OLD_RQUOTA as well.
285
286         4) path information for lock/spool/printer files. you'll need
287            to specify -D_PATH_LOCKDIR if include/atalk/paths.h doesn't
288            have the correct paths specified for printer info and lock
289            files. 
290
291     Beyond that, you should make sure that your operating system looks and
292     smells like a Un*x POSIXy operating system. The only operating systems
293     that netatalk supports that don't quite fit that description are
294     sunos 4 and ultrix. If your operating system is peculiar, you may need
295     to add in compatibility routines (libatalk/compat,
296     include/atalk/compat.h) to make it look more like the others. 
297     
298     If you would like native AppleTalk support, you will need kernel support 
299     for your operating system. Look at the Solaris STREAMS module if your
300     operating system supports that framework. Otherwise, look at the ddp
301     code in FreeBSD, NetBSD, or OpenBSD if your operating system is BSDish
302     in nature. If your operating system looks different than these two
303     cases, you'll have to roll your own implementation.