]> arthur.barton.de Git - netatalk.git/blobdiff - doc/DEVELOPER
Writing metadata xattr on directories with sticky bit set, FR#94
[netatalk.git] / doc / DEVELOPER
index 2cc708eb9cd3e21a655b24bd2c2f1e519bca3771..d0f8b5b58eb4dd51902d3d7d6d48ab1b7e6e933e 100644 (file)
@@ -1,42 +1,27 @@
 Information for Netatalk Developers
 ===================================
 
-For basic installation instructions, see the INSTALL file.
+For basic installation instructions, see http://netatalk.sourceforge.net .
 
 Netatalk is an implementation of "AFP over TCP".
-Netatalk also support the AppleTalk Protocol Suite for legacy Macs.
-The current release contains support for EtherTalk Phase I and II, 
-DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, AFP and DSI.
-The complete stack looks like this on a BSD-derived system:
-
-    AFP                          AFP
-     |                            |
-    ASP    PAP                   DSI
-      \   /                       |
-       ATP RTMP NBP ZIP AEP       |
-        |    |   |   |   |        |
-   -+---------------------------------------------------+- (kernel boundary)
-    |                    Socket                         |
-    +-----------------------+------------+--------------+
-    |                       |     TCP    |    UDP       |
-    |          DDP          +------------+--------------+
-    |                       |           IP              |
-    +-----------------------+---------------------------+
-    |                Network-Interface                  |
-    +---------------------------------------------------+
-
 DSI is a session layer used to carry AFP over TCP.
-DDP is in the kernel.  "atalkd" implements RTMP, NBP, ZIP, and AEP.  It
-is the AppleTalk equivalent of Unix "routed".  There is also a
-client-stub library for NBP.  ATP and ASP are implemented as
-libraries.  "papd" allows Macs to spool to "lpd", and "pap" allows Unix
-machines to print to AppleTalk connected printers.  "psf" is a
-PostScript printer filter for "lpd", designed to use "pap".  "psorder"
-is a PostScript reverser, called by "psf" to reverse pages printed to
-face-up stacking printers.  "afpd" provides Macs with an interface to
-the Unix file system.  Refer to the appropriate man pages for
-operational information.
-
+The complete stack looks like this:
+
+          AFP
+           |
+          DSI
+           |
+           | (port:548)
+           |
+   -+---------------------------+- (kernel boundary)
+    |         Socket            |
+    +------------+--------------+
+    |     TCP    |    UDP       |
+    +------------+--------------+
+    |       IP v4 or v6         |
+    +---------------------------+
+    |     Network-Interface     |
+    +---------------------------+
 
 Compilation
 ===========
@@ -88,9 +73,20 @@ Automake is a tool that generates  'Makefile.in' files.
 
 Documentation: http://www.gnu.org/software/automake/
 
+Required
+========
+5. Berkeley DB
+Berkeley DB is a programmatic toolkit that provides fast, reliable,
+scalable, and mission-critical database support to software
+developers. BDB can downloaded from
+http://www.oracle.com/database/berkeley-db/index.html
+Netatalk's CNID database uses the library and header files from BDB.
+Currently, Netatalk supports BDB 4.6 and later.
+
+
 Optional
 ========
-5. OpenSSL and/or Libgcrypt
+6. OpenSSL and/or Libgcrypt
 The OpenSSL Project is a collaborative effort to develop a robust,
 commercial-grade, full-featured, and Open Source toolkit implementing
 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
@@ -98,7 +94,7 @@ v1) protocols as well as a full-strength general purpose cryptography
 library.
 This is required to enable DHX login support.
 
-Get everything at http://www.openssl.org/ 
+Get everything at http://www.openssl.org/
 
 The Libgcrypt is a general purpose cryptographic library based on
 the code from GnuPG.
@@ -106,7 +102,7 @@ This is required to enable DHX2 login support.
 
 Get everything at http://directory.fsf.org/project/libgcrypt/
 
-6. TCP Wrappers 
+7. TCP Wrappers
 Wietse Venema's network logger, also known as TCPD or LOG_TCP. These
 programs log the client host name of incoming telnet, ftp, rsh,
 rlogin, finger etc. requests. Security options are: access control per
@@ -117,7 +113,7 @@ Netatalk uses TCP Wrappers to authorize host access when using
 afpovertcp. It should be noted that if DDP is in use, the connection
 will still be allowed as TCP Wrappers do not impact DDP connections.
 
-7. PAM (Pluggable Authentication Modules) 
+8. PAM (Pluggable Authentication Modules)
 PAM provides a flexible mechanism for authenticating
 users. PAM was invented by SUN Microsystems.
 
@@ -129,14 +125,6 @@ You can get the Linux PAM documentation and sources from
 http://www.kernel.org/pub/linux/libs/pam/
 Netatalk also supports other standard PAM implementations such as OpenPAM.
 
-8. Berkeley DB
-Berkeley DB is a programmatic toolkit that provides fast, reliable,
-scalable, and mission-critical database support to software
-developers. BDB can downloaded from
-http://www.oracle.com/database/berkeley-db/index.html
-Netatalk's CNID database uses the library and header files from BDB.
-Currently, Netatalk supports BDB 4.6 and later.
-
 Error checking and logging
 ==========================
 We wan't rigid error checking and concise log messages. This often leads
@@ -212,11 +200,11 @@ The ini parser is taken from <http://ndevilla.free.fr/iniparser/>.
 It has been slightly modified:
 - case-sensitive
 - "include" directive added
-- iniparser_getstrdup() to complemnt iniparser_getstring(), it return allocated strings
-  which the caller must free as necessary
-- the API has been modifed such that all iniparser_get* funcs take a section and a parameter
-  as sepereta args instead of one string of the form "section:parameter" in the original
-  library
+- atalk_iniparser_getstrdup() to complemnt atalk_iniparser_getstring(), it return allocated
+  strings which the caller must free as necessary
+- the API has been modifed such that all atalk_iniparser_get* funcs take a section and
+  a parameter as sepereta args instead of one string of the form "section:parameter"
+  in the original library
 
 CNID Database Daemons
 =====================
@@ -228,15 +216,15 @@ There is one cnid_dbd daemon per netatalk volume. The underlying database
 structure is based on Berkeley DB and the database format is the same
 as in the cdb CNID backend, so this can be used as a drop-in replacement.
 
-Advantages: 
+Advantages:
 
 - No locking issues or leftover locks due to crashed afpd daemons any
   more. Since there is only one thread of control accessing the
   database, no locking is needed and changes appear atomic.
 
 - Berkeley DB transactions are difficult to get right with several
-  processes attempting to access the CNID database simultanously. This 
-  is much easier with a single process and the database can be made nearly 
+  processes attempting to access the CNID database simultanously. This
+  is much easier with a single process and the database can be made nearly
   crashproof this way (at a performance cost).
 
 - No problems with user permissions and access to underlying database
@@ -269,7 +257,7 @@ Disadvantages:
   Kernel 2.4.18 using unix domain sockets. The requests are "empty"
   (no database lookups/changes), so this is just the IPC
   overhead.
-  
+
   I have not measured the effects of the advantages of simultanous
   database access.
 
@@ -300,3 +288,54 @@ filenames for the usock_file parameter.
 
 - There is no protection against a malicious user connecting to the
 cnid_dbd socket and changing the database.
+
+Documentation
+=============
+Netatalk documentation is in Docbook XML format. In order to build manpages
+and the html documentation from the Docbook docs you need the following:
+
+1. Install `xsltproc`
+
+2. Get the latest Docbook XSL stylesheet distribution from:
+   https://sourceforge.net/project/showfiles.php?group_id=21935
+   Tested docbook-xsl stylesheet version is 1.75.2.
+
+3. Fix indexterm bug in xsl stylesheet:
+   inside the xsl stylesheet distribution in manpages/inline.xsl remove these lines:
+
+        <!-- * indexterm instances produce groff comments like this: -->
+        <!-- * .\" primary: secondary: tertiary -->
+        <xsl:template match="indexterm">
+          <xsl:text>.\" </xsl:text>
+          <xsl:apply-templates/>
+          <xsl:text>&#10;</xsl:text>
+        </xsl:template>
+
+        <xsl:template match="primary">
+          <xsl:value-of select="normalize-space(.)"/>
+        </xsl:template>
+
+        <xsl:template match="secondary|tertiary">
+          <xsl:text>: </xsl:text>
+          <xsl:value-of select="normalize-space(.)"/>
+        </xsl:template>
+
+4. Add the following argument to configure
+   --with-docbook=PATH_TO_XML_STYLESHEET_DIR
+
+5. The manpages and html documentation are now automatically built when running `make html`.
+
+Editing Docbook Sources
+-----------------------
+Free WYSIWYG editor with only one minor drawback is XMLEditor from XMLmind:
+http://www.xmlmind.com/xmleditor/persoedition.html
+
+Drawback: in order to be able to edit any of the  nested xml files, you have to
+"promote" them to valid Docbook files by referencing the Docbook DTD, insert as line 2+3:
+       
+       <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+       "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+These changes will however prevent XMLeditor from opening the master xml file
+manual.xml. Before further processing can be done these changes then have to be
+reverted for any changed file.