--- netatalk-2.0.4~beta2.orig/debian/copyright +++ netatalk-2.0.4~beta2/debian/copyright @@ -0,0 +1,401 @@ +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=420 +Upstream-Name: Netatalk +Upstream-Maintainer: netatalk-devel@lists.sourceforge.net + http://lists.sourceforge.net/lists/listinfo/netatalk-devel +Upstream source: http://netatalk.sourceforge.net/ + +Files: * +Copyright: 1990-1997, Regents of The University of Michigan + 1997-2000, Adrian Sun +License: other-Netatalk + +Files: Makefile.in +Copyright: 1994-2005 Free Software Foundation, Inc. +License: GAP + This Makefile.in is free software; the Free Software Foundation + gives unlimited permission to copy and/or distribute it, + with or without modifications, as long as this notice is preserved. + +Files: bin/cnid/* + libatalk/cnid/dbd/* +Copyright: 2003, Joerg Lenneis +License: GPL-2 + +Files: libatalk/unicode/* +Copyright: 2001, Andrew Tridgell + 2002-2003, Jelmer Vernooij +License: GPL-2+ + +Files: libatalk/unicode/charsets/*.h + libatalk/util/strcasestr.c +Copyright: 1994, 1996-1997, 1999-2001, Free Software Foundation, Inc +License: LGPL-2+ + +Files: bin/afile/* +Copyright: 2001, Sebastian Rittau +License: ModifiedBSD + +Files: etc/afpd/afprun.c + include/atalk/tdb.h + libatalk/unicode/byteorder.h + libatalk/util/fault.c + libatalk/util/strlcpy.c +Copyright: 1992-1999, Andrew Tridgell +License: GPL-2+ + +Files: include/atalk/cnid.h + libatalk/cnid/cnid.c + libatalk/cnid/cnid_init.c +Copyright: 2003, Rafal Lewczuk + 2003, the Netatalk Team +License: other-GPL2 + +Files: etc/papd/lp.c + etc/papd/printcap.c +Copyright: 1983, Regents of the University of California + 1990,1994, Regents of The University of Michigan +License: BSD + +Files: ./aclocal.m4 + macros/libtool.m4 + macros/lt* +Copyright: 1996-2008, Free Software Foundation, Inc +License: GAP + This file is free software; the Free Software Foundation + gives unlimited permission to copy and/or distribute it, + with or without modifications, as long as this notice is preserved. + +Files: ./configure +Copyright: 1992-1996, 1998-2006, Free Software Foundation, Inc +License: GAP + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + +Files: ./compile + ./config.guess + ./config.sub + ./depcomp + ./ltmain.sh + ./missing +Copyright: 1992-2008, Free Software Foundation, Inc +License: GPL-2+ | other-Autoconf + As a special exception to the GNU General Public License, if you + distribute this file as part of a program that contains a + configuration script generated by Autoconf, you may include it under + the same distribution terms that you use for the rest of that program. + +Files: contrib/shell_utils/cleanappledouble.* +Copyright: 2001, Heath Kehoe +License: GPL-2+ + +Files: libatalk/compat/mktemp.c + libatalk/compat/strcasecmp.c +Copyright: 1987, Regents of the University of California +License: other-Netatalk + +Files: contrib/a2boot/* + contrib/timelord/* +Copyright: 1990, The University of Melbourne + 1990,1992, Regents of The University of Michigan +License: other-Timelord + +Files: libatalk/compat/strstr.c +Copyright: 1990, The Regents of the University of California +License: BSD + +Files: libatalk/adouble/ad_sendfile.c +Copyright: 1999, Adrian Sun + 2002, Jeremy Allison +License: other-Netatalk+GPL-2+ + +Files: etc/papd/print_cups.c +Copyright: 1999-2003, Michael R Sweet + 2004, Bjoern Fernhomberg +License: GPL-2+ + +Files: libatalk/tdb/spinlock.c +Copyright: 2001, Anton Blanchard +License: GPL-2+ + +Files: bin/uniconv/iso8859_1_adapted.c + bin/uniconv/uniconv.c + libatalk/util/volinfo.c +Copyright: 2002-2004, Bjoern Fernhomberg +License: GPL-2+ + +Files: libatalk/tdb/tdb.c +Copyright: 1999-2000, Andrew Tridgell + 2000, Luke Kenneth Casson Leighton + 2000, Paul `Rusty' Russell + 2000-2003, Jeremy Allison +License: GPL-2+ + +Files: libatalk/unicode/charcnv.c +Copyright: 2001, Andrew Tridgell + 2001, Igor Vergeichik + 2001, Simo Sorce + 2003, Martin Pool +License: GPL-2+ + +Files: libatalk/unicode/charsets/mac_greek.c +Copyright: 2001, Andrew Tridgell + 2002-2003, Jelmer Vernooij + 2006, Panos Christeas +License: GPL-2+ + +Files: ./install-sh +Copyright: 1994, X Consortium +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- + TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + . + Except as contained in this notice, the name of the X Consortium shall not + be used in advertising or otherwise to promote the sale, use or other deal- + ings in this Software without prior written authorization from the X Consor- + tium. + +Files: etc/afpd/nfsquota.c +Copyright: 1980, 1990, 1993, The Regents of the University of California +License: UNKNOWN + +Files: libatalk/compat/getusershell.c + libatalk/compat/rquota_xdr.c +Copyright: 1980,1985,1990, Regents of the University of California +License: other-Netatalk + +Files: sys/netatalk/phase2.h +Copyright: 1988, Regents of the University of California + 1990-1991, Regents of The University of Michigan +License: other-Netatalk + +Files: etc/uams/uams_krb4/send_to_kdc.c +Copyright: 1987-1988, the Massachusetts Institute of Technology + 1990,1994, Regents of The University of Michigan +License: other-Netatalk + +Files: distrib/initscripts/rc.atalk.suse.tmpl +Copyright: 1996-2001, SuSE GmbH Nuernberg, Germany. +License: UNKNOWN + +Files: etc/afpd/mangle.c +Copyright: 2002. Joe Marcus Clarke +License: other-Netatalk + +Files: etc/uams/uams_gss.c +Copyright: 1990,1993, Regents of The University of Michigan + 1999, Adrian Sun + 2003, The Reed Institute + 2004, Bjoern Fernhomberg +License: other-Netatalk + +Files: libatalk/compat/snprintf.c +Copyright: 1994-2000, Patrick Powell, San Diego, CA +License: other-snprintf + You may use, copy, distribute, or otherwise incorporate this software + and documentation into any product or other item, provided that + the copyright in the documentation and source code as well as the + source code generated constant strings in the object, executable + or other code remain in place and are present in executable modules + or objects. + . + You may modify this code as appropriate to your usage; however the + modified version must be identified by changing the various source + and object code identification strings as is appropriately noted + in the source code. + +Files: debian/* +Copyright: 1995-1997, Klee Dienes + 1998-1999, Joel Klecker + 1999-2000, David Huggins-Daines + 2001-2006, Sebastian Rittau + 2004-2009, Jonas Smedegaard +License: GPL-2+ + +Files: debian/cdbs/* +Copyright: 2004-2008, Jonas Smedegaard +License: GPL-2+ + +License: GPL-2 + On Debian systems, the complete text of the GNU General Public License + (GPL) version 2 can be found at "/usr/share/common-licenses/GPL-2". + +License: GPL-2+ + On Debian systems, the complete text of the GNU General Public License + (GPL) version 2 can be found at "/usr/share/common-licenses/GPL-2". + +License: LGPL-2+ + On Debian systems, the complete text of the GNU Library General Public + License (LGPL) version 2.1 can be found at + "/usr/share/common-licenses/LGPL-2.1". + + +License: other-Netatalk + Copyright (c) 1990,1996 Regents of The University of Michigan. + All Rights Reserved. + . + Permission to use, copy, modify, and distribute this software and + its documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appears in all copies and + that both that copyright notice and this permission notice appear + in supporting documentation, and that the name of The University + of Michigan not be used in advertising or publicity pertaining to + distribution of the software without specific, written prior + permission. This software is supplied as is without expressed or + implied warranties of any kind. + . + This product includes software developed by the University of + California, Berkeley and its contributors. + . + Solaris code is encumbered by the following: + Copyright (C) 1996 by Sun Microsystems Computer Co. + . + Permission to use, copy, modify, and distribute this software and + its documentation for any purpose and without fee is hereby + granted, provided that the above copyright notice appear in all + copies and that both that copyright notice and this permission + notice appear in supporting documentation. This software is + provided "as is" without express or implied warranty. + . + Modifications for Appleshare IP and other files copyrighted by Adrian + Sun are under the following copyright: + . + Copyright (c) 1997,1998,1999,2000 Adrian Sun (asun@cobalt.com) + All Rights Reserved. + . + Permission to use, copy, modify, and distribute this software and + its documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appears in all copies and + that both that copyright notice and this permission notice appear + in supporting documentation. This software is supplied as is + without expressed or implied warranties of any kind. + . + Research Systems Unix Group + The University of Michigan + c/o Wesley Craig + 535 W. William Street + Ann Arbor, Michigan + +1-313-764-2278 + netatalk@umich.edu + +License: other-Netatalk+GPL-2+ + Copyright (c) 1990,1996 Regents of The University of Michigan. + All Rights Reserved. + . + Permission to use, copy, modify, and distribute this software and + its documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appears in all copies and + that both that copyright notice and this permission notice appear + in supporting documentation, and that the name of The University + of Michigan not be used in advertising or publicity pertaining to + distribution of the software without specific, written prior + permission. This software is supplied as is without expressed or + implied warranties of any kind. + . + This product includes software developed by the University of + California, Berkeley and its contributors. + . + Solaris code is encumbered by the following: + Copyright (C) 1996 by Sun Microsystems Computer Co. + . + Permission to use, copy, modify, and distribute this software and + its documentation for any purpose and without fee is hereby + granted, provided that the above copyright notice appear in all + copies and that both that copyright notice and this permission + notice appear in supporting documentation. This software is + provided "as is" without express or implied warranty. + . + Modifications for Appleshare IP and other files copyrighted by Adrian + Sun are under the following copyright: + . + Copyright (c) 1997,1998,1999,2000 Adrian Sun (asun@cobalt.com) + All Rights Reserved. + . + Permission to use, copy, modify, and distribute this software and + its documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appears in all copies and + that both that copyright notice and this permission notice appear + in supporting documentation. This software is supplied as is + without expressed or implied warranties of any kind. + . + Research Systems Unix Group + The University of Michigan + c/o Wesley Craig + 535 W. William Street + Ann Arbor, Michigan + +1-313-764-2278 + netatalk@umich.edu + . + * sendfile chainsaw from samba. + Unix SMB/Netbios implementation. + Version 2.2.x / 3.0.x + sendfile implementations. + Copyright (C) Jeremy Allison 2002. + . + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + . + On Debian systems, the complete text of the GNU General Public License + (GPL) version 2 can be found at "/usr/share/common-licenses/GPL-2". + +License: other-Timelord + Permission to use, copy, modify, and distribute this software and + its documentation for any purpose and without fee is hereby granted, + provided that the above copyright notice appears in all copies and + that both that copyright notice and this permission notice appear + in supporting documentation, and that the name of The University + of Michigan not be used in advertising or publicity pertaining to + distribution of the software without specific, written prior + permission. This software is supplied as is without expressed or + implied warranties of any kind. + . + Research Systems Unix Group + The University of Michigan + c/o Wesley Craig + 535 W. William Street + Ann Arbor, Michigan + +1 313 764 2278 + netatalk@umich.edu + . + The "timelord protocol" was reverse engineered from Timelord, + distributed with CAP, Copyright (c) 1990, The University of + Melbourne. The following copyright, supplied by The University + of Melbourne, may apply to this code: + . + This version of timelord.c is based on code distributed + by the University of Melbourne as part of the CAP package. + . + The tardis/Timelord package for Macintosh/CAP is + Copyright (c) 1990, The University of Melbourne. + +License: other-GPL2 + This program is free software; you can redistribute and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation version 2 of the License or later + version if explicitly stated by any of above copyright holders. + . + On Debian systems, the complete text of the GNU General Public License + (GPL) version 2 can be found at "/usr/share/common-licenses/GPL-2". --- netatalk-2.0.4~beta2.orig/debian/rules +++ netatalk-2.0.4~beta2/debian/rules @@ -0,0 +1,140 @@ +#!/usr/bin/make -f + +# NB! Local CDBS tweaks in use. More info in README.cdbs-tweaks +ifneq (,$(DEB_MAINTAINER_MODE)) + # Enable stuff not policy compliant (eg. unsuitable for build daemons) + DEB_COPYRIGHT_CHECK_STRICT = yes + DEB_AUTO_UPDATE_DEBIAN_CONTROL = yes +endif +#DEB_AUTO_UPDATE_ACLOCAL = 1.10 +#DEB_AUTO_UPDATE_AUTOMAKE = 1.10 +#DEB_AUTO_UPDATE_AUTOHEADER = 2.50 +#DEB_AUTO_UPDATE_AUTOCONF = 2.50 +#DEB_AUTO_UPDATE_LIBTOOL = post +include debian/cdbs/1/rules/upstream-tarball.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk +include debian/cdbs/1/rules/buildinfo.mk +include debian/cdbs/1/rules/copyright-check.mk + +DEB_UPSTREAM_URL = http://downloads.sourceforge.net/netatalk +DEB_UPSTREAM_TARBALL_VERSION_MANGLE = s/~(beta)/\1/ +DEB_UPSTREAM_TARBALL_MD5 = c1a1266a78179e758a51748f4ead1c3d + +autotools-files = Makefile.in aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing mkinstalldirs + +DEB_UPDATE_RCD_PARAMS := defaults 50 + +DEB_CONFIGURE_EXTRA_FLAGS := \ + --with-shadow --enable-fhs \ + --with-tcp-wrappers --with-mangling \ + --enable-timelord --enable-overwrite \ + --with-pkgconfdir=/etc/netatalk \ + --with-nls-dir=/usr/share/netatalk/nls \ + --disable-logger \ + --enable-krb4-uam --enable-krbV-uam \ + --with-cnid-dbd-txn \ + --with-libgcrypt-dir \ + --with-cracklib=/var/cache/cracklib/cracklib_dict \ + --enable-debian + +# libxfs currently broken: redefines several __swabXXX in xfs/swab.h +DEB_CONFIGURE_EXTRA_FLAGS += --without-xfs + +DEB_INSTALL_EXAMPLES_netatalk = debian/examples/* + +openssl_build_depends = libssl-dev + +# Zeroconf is cool, but not yet stable, so disabled by default +# Always disable SLP, as it was never really used by Apple +ifneq (,$(findstring zeroconf,$(DEB_BUILD_OPTIONS))) +DEB_CONFIGURE_EXTRA_FLAGS += --disable-slp --enable-zeroconf +else +DEB_CONFIGURE_EXTRA_FLAGS += --disable-slp --disable-zeroconf +endif + +# libgcrypt is GPL-compatible, but openssl supports randnum auth +ifneq (,$(findstring openssl,$(DEB_BUILD_OPTIONS))) +DEB_CONFIGURE_EXTRA_FLAGS += --with-openssl-dir --enable-pgp-uam +uamlist = uams_dhx2.so,uams_clrtxt.so,uams_dhx.so,uams_randnum.so +else +DEB_CONFIGURE_EXTRA_FLAGS += --without-openssl-dir +uamlist = uams_dhx2.so,uams_clrtxt.so +endif + +# Cheat autotools (as CDBS lack support for autotools options) +post-patches:: + touch AUTHORS ChangeLog INSTALL + cp -al macros m4 +clean:: + rm -f AUTHORS ChangeLog INSTALL + rm -rf m4 + +# Refuse GPL build with openssl build-dependencies included +post-patches:: + $(if $(findstring openssl,$(DEB_BUILD_OPTIONS)),,$(if $(shell egrep -i '^Build-Depends.*$(openssl_build_depends)' debian/control),$(error OpenSSL build-dependencies found in GPL build!))) + +# Re-install initscript with debhelper to add pre- and postinst routines +install/netatalk:: + mv debian/netatalk/etc/init.d/netatalk debian/netatalk.init + +clean:: + rm -f debian/netatalk.init + +# Move master config file (Debian Policy 9.3.2) +binary-post-install/netatalk:: + mv debian/netatalk/etc/netatalk/netatalk.conf debian/netatalk/etc/default/netatalk + +# Rename manpages because of namespace conflicts +binary-post-install/netatalk:: + mv debian/netatalk/usr/share/man/man1/uniconv.1 debian/netatalk/usr/share/man/man1/netatalk-uniconv.1 + mv debian/netatalk/usr/share/man/man1/afile.1 debian/netatalk/usr/share/man/man1/apple_file.1 + mv debian/netatalk/usr/share/man/man1/achfile.1 debian/netatalk/usr/share/man/man1/apple_chfile.1 + +# Adjust PAM modules and UAMs loaded by default, depending on ssl support +binary-post-install/netatalk:: + perl -i -pe 's/^#AFPD_UAMLIST=.*/#AFPD_UAMLIST="-U $(uamlist)"/' debian/netatalk/etc/default/netatalk + perl -i -pe 's/^AFPD_UAMLIST=.*/AFPD_UAMLIST="-U $(uamlist)"/' debian/netatalk/etc/init.d/netatalk + +# Remove unnecessary files +binary-post-install/netatalk:: + rm debian/netatalk/usr/bin/netatalk-config + rm debian/netatalk/usr/bin/timeout + rm debian/netatalk/usr/lib/libatalk.* + rm debian/netatalk/usr/share/man/man1/timeout.1 + rm debian/netatalk/usr/share/man/man1/afppasswd.1 + rm -r debian/netatalk/usr/include + rm -r debian/netatalk/usr/share/aclocal + rm -r debian/netatalk/var + +# Create patch to get in sync with upstream CVS +get-orig-vcs: patchfile = 000_cvs_$(shell date '+%Y%m%d').patch +get-orig-vcs: get-orig-source + f="$(DEB_UPSTREAM_WORKDIR)/$(patchfile)"; \ + [ ! -e "$$f" ] || ( echo "ERROR: File \"$$f\" already exist!"; exit 1 ) + d="$(DEB_UPSTREAM_WORKDIR)/vcstemp"; \ + mkdir "$$d" || ( echo "ERROR: Directory \"$$d\" already exist!"; exit 1 ) + tar -zx -C "$(DEB_UPSTREAM_WORKDIR)/vcstemp" \ + < "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" + d="$(DEB_UPSTREAM_WORKDIR)/vcstemp/netatalk.orig"; \ + [ -e "$$d" ] || mv "$(DEB_UPSTREAM_WORKDIR)/vcstemp"/* "$$d" + cd "$(DEB_UPSTREAM_WORKDIR)/vcstemp" \ + && cvs -d:pserver:anonymous@netatalk.cvs.sourceforge.net:/cvsroot/netatalk co -r branch-netatalk-2-0 -P netatalk \ + && diff -ruN $(autotools-files:%=-x %) -x doc -x CVS -x .cvsignore netatalk.orig netatalk \ + > "../$(patchfile)" \ + || [ $$? -lt 2 ] # generating a diff is not (at all) fatal + rm -rf "$(DEB_UPSTREAM_WORKDIR)/vcstemp" + +# Needed for by upstream build process +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libdb4.2-dev, libwrap0-dev, libpam0g-dev, libavahi-client-dev (>= 0.6), libcupsys2-dev, libkrb5-dev, libltdl3-dev +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libgcrypt11-dev | libgcrypt-dev, cracklib-dev +ifneq (,$(findstring openssl,$(DEB_BUILD_OPTIONS))) +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), $(openssl_build_depends) +endif + +# Needed for our packaging routines +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), d-shlibs (>> 0.19) + +# Resolve, cleanup and apply CDBS-declared dependencies +include debian/cdbs/1/rules/package-relations.mk --- netatalk-2.0.4~beta2.orig/debian/changelog +++ netatalk-2.0.4~beta2/debian/changelog @@ -0,0 +1,1381 @@ +netatalk (2.0.4~beta2-4.1ubuntu1) jaunty; urgency=low + + * Merge from Debian unstable. Remaining Ubuntu changes: LP: #318665 + - Changed dependency from libdb-dev to libdb4.6-dev to correct + FTBFS due to an issue caused by mismatches on installed binaries + and development headers (db4.7 is installed under a different soname + which breaks a check in netatalk) (LP: #262991) + - debian/control: + + Replace libltdl3-dev with libltdl7-dev. + + Recommend db4.6-util instead of db4.2-util as we build netatalk with + db4.6. + + -- Bhavani Shankar Mon, 02 Feb 2009 19:59:05 +0530 + +netatalk (2.0.4~beta2-4.1) unstable; urgency=high + + * Non-maintainer upload by the Security Team. + * Fix incomplete upstream patch for CVE-2008-5718 by + escaping every problematic character and not only those which + enables an attacker to execute arbitrary code + (213_CVE-2008-5718.patch; Closes: #510585). + + -- Nico Golde Thu, 29 Jan 2009 11:32:54 +0100 + +netatalk (2.0.4~beta2-4) unstable; urgency=high + + * Rebuild for unstable branch. + + -- Jonas Smedegaard Wed, 21 Jan 2009 18:20:47 +0100 + +netatalk (2.0.4~beta2-3) UNRELEASED; urgency=high + + * Update debian/copyrights: + + Merge entries with same owners and license (only differing years) + + Consistently list years before owner + + Sort owners + + Explicitly include GAP licenses (wording vary slightly) + + Fix GPL-2+ licensed files wrongly registered as GAP + * Keep urgency=high as 2.0.4~beta2-2 changes are still pending. + + -- Jonas Smedegaard Wed, 21 Jan 2009 18:08:44 +0100 + +netatalk (2.0.4~beta2-2) unstable; urgency=high + + * Always use gcrypt. Simplify optional openssl support. + * Readd and update OpenSSL section to README.Debian, and improve NEWS + entry to clarify that Randnum UAM is no longer provided by default. + * Add patches 001-005 (but avoid applying some of them) to sync with + upstream development, fixing the following issues: + + remove bogus default ppd _PATH_PAPDPPDFILE + + remove signed/unsigned gcc warning + + better handling of bogus ppd files + + Remove ucb includes from Netatalk (i.e. drop SunOS 4.x support) + + Fix off-by-one error in PPD file processing + + Fix dhx2 logincont packet size + * Update copyright hints (no new owners or licenses). + * Explicitly build-depend on libdb4.2-dev (not libdb-dev). + * Mention MacOS X 10.5.x group ACL workaround in README.Debian. + Closes: bug#458174, thanks to Tim Miller Dyck. + * Set urgency=high due to possible security implications in above, and + due to accidentally linking against BerkeleyDB 4.6 in prior release. + + -- Jonas Smedegaard Wed, 21 Jan 2009 11:50:30 +0100 + +netatalk (2.0.4~beta2-1) unstable; urgency=high + + * New upstream prerelease: + + Quote chars in papd popen variables expansion (and other fixes to + papd). Fixes remote execution security hole CVE-2008-5718. Closes: + bug#510585. + * Mangle upstream tarball beta version. + * Drop patches 000 and 001 contained upstream now. + * Unfuzz patches 107, 109, 205 and 212. + * Unfuzz and enable patches 204a, 207a, 208, 209 and 211. + * Build new DHX2 UAM: + + Build-depend on libgcrypt11-dev + + Configure with --with-libgcrypt + + Drop SSL note from README.Debian + + Add NEWS entry regarding new and recommended DHX2 UAM + * Disable CDBS autotools reconfiguration. + * Update cdbs snippets: + + Move dependency cleanup to new local snippet package-relations.mk. + + Update copyright-check output to more closely match proposed new + copyright file format. + + Several minor improvements to upstream-tarball.mk. + + Compact simple licenses (those without ' or later') in + copyright-check.mk + + Fix use underscore (not dash) in internal variable + + Ignore only debian changelog and copyright-related files by + default in copyright-check.mk + + Correct and update copyright hints of the snippets themselves + + Update README.cdbs-tweaks. + * Add DEB_MAINTAINER_MODE in debian/rules (thanks to Romain Beauxis). + * Stop installing README.ids no longer provided upstream. + * Rewrite debian/copyright using new new format specification, and + update copyright hints. + * Semi-auto-update debian/control to update dependencies: + DEB_MAINTAINER_MODE=1 fakeroot debian/rules clean + * Set urgency=high due to security fix. + + -- Jonas Smedegaard Fri, 09 Jan 2009 05:52:18 +0100 + +netatalk (2.0.3-11ubuntu1) intrepid; urgency=low + + [ Michael Casadevall ] + * Changed dependency from libdb-dev to libdb4.6-dev to correct + FTBFS due to an issue caused by mismatches on installed binaries + and development headers (db4.7 is installed under a different soname + which breaks a check in netatalk) (LP: #262991) + + [ Michael Bienia ] + * debian/control: + + Replace libltdl3-dev with libltdl7-dev. + + Recommend db4.6-util instead of db4.2-util as we build netatalk with + db4.6. + + -- Michael Bienia Sat, 30 Aug 2008 17:16:21 +0200 + +netatalk (2.0.3-11) unstable; urgency=medium + + * Add patch 001 from upstream CVS to fix LFS test for cross + compilation. + * Update cdbs tweaks: + + Relax copyright-check.mk to only warn about its discoveries. + Closes: bug#487061, thanks to Lucas Nussbaum. + + Correct abbreviation of BSD licenses in copyright-check.mk. + + Update dependency cleanup to strip cdbs 0.4.27 (not 0.4.27-1). + * Update debian/copyright-hints. + * Raise urgency to medium due to FTBFS bugfix. + + -- Jonas Smedegaard Sun, 29 jun 2008 13:57:28 +0200 + +netatalk (2.0.3-10) unstable; urgency=low + + * Update cdbs tweaks: + + Strip any non-printable characters in copyright-check.mk. Update + copyright-hints. This (and earlier updates) closes: bug#477967. + * Bump debhelper compatibility level to 6 (was 4). + * Semi-auto-update debian/control to update build-dependencies: + DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean + + -- Jonas Smedegaard Sun, 27 Apr 2008 13:35:04 +0200 + +netatalk (2.0.3-9) unstable; urgency=low + + * Update zeroconf patch (found in Gentoo bug#133575): + + Enable zeroconf only if srvloc is not enabled. + + Use Avahis threaded poll implementation only for Avahi >= 0.6.4, + and fallback to handling it internally. + * Add patch 113 to add LSB dependency info to sysV script, and leave + shutdown process to core sendsigs routine. Closes: bug#459442. + * Add patch 114 to fix macusers ps parsing bug. Closes: bug#462186. + * Disable zeroconf support (enable by rebuilding with + DEB_BUILD_OPTIONS=zeroconf). Closes: bug#462082, #463544. + * Packaging moved to collab-maint Git at Alioth. Update VCS-* hints. + * Update local cdbs snippets: + + Major improvements to copyright-check, including new versioned + build-dependency on devscripts. Update debian/copyright_hints. + + Drop wget options broken with recent versions of wget in + update-tarball.mk. + + Update debian/README.cdbs-tweaks. + * Semi-auto-update debian/control to apply changes contained in the above: + DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean + + -- Jonas Smedegaard Fri, 04 Apr 2008 23:08:59 +0200 + +netatalk (2.0.3-8) unstable; urgency=medium + + * Add patch 001 to sync with upstream CVS as of today. + * Add rule to generate CVS snapshot patch. + * Reduce patch 110 and unfuzz other patches to adapt to CVS snapshot. + * Add patch 111 extending autotools macro resolving BerkeleyDB libs to + check newest versions first, and check versions 4.5 and 4.6 too. + * Explicitly disable SLP support and build-conflict against libavahi- + compat-libdnssd-dev to not clash with AVAHI-based Zeroconf support. + Closes: bug#459395, thanks to Gregory Oschwald. + * Add patch 112 to fix assertion in zeroconf patch. Closes: + bug#457246, thanks to Omar Siam. + * Set urgency=medium as lack of the above zeroconf fix silently broke + netatalk completely in some situations. + * Update cdbs tweaks: + + Support zip in upstream-tarball.mk + + Use ~ as repackaging delimiter in upstream-tarball.mk to make room + for point releases and cleaned up rerelease + + Rename top srcdir in repackaged tarball to $pkg-$ver.orig to + comply with Developers Reference 6.7.8.2. + + Support mangling upstream version string in upstream-tarball.mk + + Drop buildcore.mk override (set DEB_AUTO_UPDATE_DEBIAN_CONTROL + manually when needed instead) + (none of the above affect this package currently) + + Add (and use) new variables DEB_COPYRIGHT_CHECK_IGNORE and + DEB_COPYRIGHT_CHECK_IGNORE_REGEX to copyright-check.mk. + * Fix safety check in debian/rules for compiling official packages + with SSL support. + * Update section in README.Debian on recompiling with SSL support. + + -- Jonas Smedegaard Fri, 01 Feb 2008 02:44:53 +0100 + +netatalk (2.0.3-7) unstable; urgency=low + + * Friendly package maintainer takeover, with the consent of the + previous maintainer. Thanks a lot for your excellent work with both + packaging and upstream development, Sebastian Rittau! + * Enable BDB transaction protection. Closes: bug#435210, thanks to + Craig Ringer. + * Fix bogus trailing space in logcheck rule. Closes: bug#381839, + thanks to Bernhard Sadlowski. + * Fix building with DEB_BUILD_OPTIONS=ssl by moving ssl_build_depends + inclusion below other build-dependencies declared in debian/rules. + * Add Vcs-Svn and Vcs-Browser fields to debian/control. + * Move Homepage to own field (from pseudo-field in long description). + * Update CDBS tweaks: + + update-tarball needs cdbs 0.4.39 or newer (only relevant for + backports). + + Fix typo in update-tarball regarding gzip-recompressing tarballs. + + Use uppercase variables in copyright-check. + * Update build-dependency cosmetics in debian/rules, and semi-auto- + update debian/control: + DEB_BUILD_OPTIONS=cdbs-autoupdate fakeroot debian/rules pre-build + * Support Zeroconf (instead of SLP: + + Add patches 107 and 108 to support zeroconf, found at + http://aur.archlinux.org/packages/netatalk/netatalk/ . + + Enable zeroconf, and build-depend on recent version of libavahi-client-dev. + + Drop SLP support, and drop build-depending on libslp-dev and recommending + slpd. + + Unfuzz zeroconf patches. + * Generate autotools at build time (zeroconf patches change autobuilt files). + + Disable patches to autobuilt files. + + Adjust patch 210 to not indent comment hashes, thanks to automake 1.10. + + Duplicate macros directory as m4, and touch AUTHORS, ChangeLog and INSTALL + (as workaround for cdbs lacking support for passing options to autotools). + + Suppress copyright-checking autobuilt files. + + Build-depend on libltdl3-dev (seems to grow a dependency on that once the + source has been rebuilt once). + * Build-depend on libkrb5-dev (not heimdal-dev). Closes: bug#441520. + * Add patch 109 to support explicitly avoiding XFS quota support. Patch found at + http://aur.archlinux.org/packages/netatalk/netatalk/ . Use it - code is + broken currently (complains about redefining __swabXXX in xfs/swab.h). + * Only enable PGP UAM when SSL is enabled (didn't fail but was confusing). + * Update BerkeleyDB linkage: + + Add patch 110 to fix linking against newer versions of BerkeleyDB, found at + http://aur.archlinux.org/packages/netatalk/netatalk/ . + + Extend patch 110 to avoid deprecated DB_VERB_CHKPOINT. + + build-depend on libdb-dev (not libdb4.2-dev). + + -- Jonas Smedegaard Thu, 06 Dec 2007 01:42:44 +0100 + +netatalk (2.0.3-6) unstable; urgency=low + + * Update CDBS tweaks: + + Replace auto-update.mk with overloading buildcore.mk. + + Add debian/README.cdbs-tweaks and advertise it in debian/rules. + + Fix applying buildinfo only once. + + Fix race condition: check copyright strings in pre-build target + (not clean target). + + Add upstream-tarball.mk to implement get-orig-source target. + * Declare (and cleanup) build-dependencies in debian/rules. + * Semi-auto-update debian/control: + DEB_BUILD_OPTIONS=cdbs-autoupdate fakeroot debian/rules pre-build + * Add patch 212 to disable cnid_metad by default. This was the only + major change in -5 initscript and thus hopefully closes: bug#384276. + + -- Jonas Smedegaard Sun, 12 Aug 2007 22:59:12 +0200 + +netatalk (2.0.3-5) unstable; urgency=low + + * Change back to unversioned build-dependency on heimdal-dev again + (it was only a temporary need, and prevented backporting to sarge). + * Add patches to fix a few missed sed replacements: + + 101_fix_manpage_sed_replacements.patch + + 208_fix_manpage_sed_replacements_for_automade_file.patch + * Add patches to make upstream sysv init-file behave sanely: + + 102_rename_initscript.patch + + 103_initscript_background_off_by_default.patch + + 104_initscript_load_module_only_if_intended.patch + + 105_initscript_config_in_etc-default.patch + + 106_papd_needs_atalk_and_fix_bashism.patch + + 209_rename_initscript_for_automade_file.patch + + 210_avoid_update-rc-d.patch + + 211_avoid_update-rc-d_for_automade_file.patch + * Add debian/patches/README explaining the patch numbering scheme. + * Enable the use of upstream Debian-compliant init-file: + + SysV daemons honours locale defaults. + + SysV script handles new cnid daemon. + * Have debhelper reinstall init-file, adding maintainer script hooks. + * Rename NEWS.Debian to NEWS in source to get recognized by debhelper + (yes, seems odd, but that's how it works). + * Recommend procps, needed by macusers. + * Fix default UAM list (upstream assumes openssl is compiled in). + * Improve use of cdbs: + + Add local snippet copyright-check.mk: Scan source for (c) changes. + + Add local snippet auto-update.mk: auto-update build-dependencies. + (enabled only when environment includes DEB_BUILD_OPTIONS=update). + + Add local snippet buildinfo.mk: Include env info with binary pkgs + + (instead of invoking buildinfo directly within debian/rules). + + Switch to using patchsys-quilt (instead of simple-patchsys). + * Add comments documenting the various parts of debian/rules, and + avoid indentation, to not show them during build. + * Fix my entry as package uploader. + * Add netatalk_update.sh (found on upstream wiki) as example script. + * Support autobuilding of ssl-enabled packages when DEB_BUILD_OPTIONS + contains "ssl": + + Include ssl-related build-dependencies with cdbs auto-update (when + environment contains DEB_BUILD_OPTIONS=update,ssl or similar). + + Extend default UAM list handling to toggle SSL-enabled UAMs. + + Safety-check: Refuse to build if build-depending on "libssl" but + without "ssl" included in DEB_BUILD_OPTIONS (if auto-updated to + use ssl but later incosistently built without it enabled). + * Update note in README.Debian about unofficial ssl-enabled packages + to refer to new netatalk-only repository: + deb http://debian.jones.dk/ $DIST/netatalk main + * Bump up standards-version to 3.7.2 (no changes needed). + * Drop no longer relevant (pre-potato) dependencies: + - Depended on libpam-runtime (>= 0.76-14). + - Conflicted with libatalk1 and netatalk-dev. + - Replaced libatalk1. + + -- Jonas Smedegaard Sun, 13 Aug 2006 04:22:26 +0200 + +netatalk (2.0.3-4) unstable; urgency=low + + * Start cnid_metad when requested by user. (Patch stolen from Ubuntu.) + + debian/netatalk.init: Run cnid_metad. + + Closes: #308828 "cnid_metad doesn't run on startup" + * debian/control: Bump heimdal-dev dependency to >= 0.7.1-3 to prevent + build problems on mips/-el. + + -- Sebastian Rittau Sat, 14 Jan 2006 09:26:43 +0100 + +netatalk (2.0.3-3) unstable; urgency=low + + * debian/netatalk.dirs: Add var/spool/netatalk. + + Partly addresses bug #336495. + * debian/control: Build-depend on heimdal-dev >= 0.7.0. + * Fixed namespace conflict with bigloo by renaming afile and achfile. + + Closes: #132054 "Should not conflict with bigloo" + + Closes: #145482 "netatalk conflicts with bigloo" + + debian/patches/207_afile_namespace_conflict.diff: Rename afile to + apple_file and achfile to apple_chfile. + + debian/rules: Manually rename afile.1 to apple_file.1 and achfile.1 to + apple_chfile.1. + + debian/control: Removed conflict with bigloo. + * debian/patches/203_amd64_fixes.diff: Removed, obsolete. + + -- Sebastian Rittau Thu, 29 Dec 2005 19:45:54 +0100 + +netatalk (2.0.3-2) unstable; urgency=low + + * Fixed namespace conflict with yudit by renaming uniconv to + netatalk-uniconv. (Closes: #306385, #306279) + + debian/patches/204_uniconv_namespace_conflict.diff: Rename uniconv + to netatalk-uniconv. Adapt the man page accordingly. + + debian/rules: Manually rename uniconv.1 to netatalk-uniconv.1. + + debian/control: Removed conflict with yudit. + + -- Sebastian Rittau Wed, 13 Jul 2005 16:10:59 +0200 + +netatalk (2.0.3-1) unstable; urgency=low + + * New upstream version. + + -- Sebastian Rittau Sun, 26 Jun 2005 06:09:33 +0200 + +netatalk (2.0.2-5) unstable; urgency=low + + * Recompile against unstable libc6 and CUPS. (Closes: #312963) + * Policy version 3.6.2. (No changes required.) + + -- Sebastian Rittau Sun, 26 Jun 2005 05:53:52 +0200 + +netatalk (2.0.2-4) unstable; urgency=low + + * debian/README.Debian: Fixed typos, removed my homepage as alternate + download location for SSL enabled packages for now. + * Added conflict with yudit. Partly addresses bugs #306279 and #306385. + + -- Sebastian Rittau Tue, 7 Jun 2005 12:54:23 +0200 + +netatalk (2.0.2-3) unstable; urgency=low + + * Fixed build problem on amd64. + + debian/patches/203_amd64_fixes.diff: New patch (thanks, Andreas + Jochens). + + Closes: #300354 "FTBFS (amd64/gcc-4.0): static declaration of 'ucreator' + follows non-static declaration" + + -- Sebastian Rittau Sat, 19 Mar 2005 12:54:12 +0100 + +netatalk (2.0.2-2) unstable; urgency=low + + * debian/control: Added homepage URL to the long description. + * debian/control: Added missing build dependency on heimdal-dev. + + Closes: #300106 "FTBFS: missing build-depends?" + + -- Sebastian Rittau Thu, 17 Mar 2005 23:35:56 +0100 + +netatalk (2.0.2-1) unstable; urgency=low + + * New upstream version. + + debian/patches/100_psf_path.diff: Removed, integrated upstream. + + debian/patches/200_netatalk_conf_defaults.diff: Updated. + + debian/patches/202_psf_8_paths.diff: Updated. + + debian/patches/203_add_netatalk_printer_paths.diff: Removed. + + debian/patches/205_applevolumes_default_homedir.diff: Updated. + + debian/netatalk.examples: Removed. + + debian/netatalk.install: Removed obsolete stuff. + + Closes: #277176 "Please package version 2.0" + * Removed useless netatalk-dev package. + + debian/control: Removed the netatalk-dev package. Make netatalk conflict + with netatalk-dev. + + debian/rules: Don't call d-devlibdeps. Installation directory is now + debian/netatalk instead of debian/tmp. Remove unneeded files from the + installation directory. + + debian/netatalk.install: Removed. + + debian/netatalk-dev.docs: Removed. + + debian/netatalk-dev.install: Removed. + * debian/control: Fix recommends on db4.2-util. + + Closes: #288318 "Recommends non-existent package db4.2-utils" + * New features: CUPS support, PGP and Kerberos UAMs. + + debian/control: Added libcupsys2-dev and heimdal-dev to the build + dependencies. + + debian/rules: Added --enable-pgp-uam, --enablekrb4-uam and + --enable-krbV-uam configure flags. + * Documentation update: + + debian/netatalk.docs: Removed doc/CONFIGURE, added doc/README.ids. + + debian/netatalk-dev.docs: Added doc/README.logger. + + -- Sebastian Rittau Wed, 16 Mar 2005 00:52:28 +0100 + +netatalk (1.6.4a-1) unstable; urgency=high + + * New upstream release. Security fix: insecure tempfile handling + (CAN-2004-0974). Closes: bug#278396 (thanks to Joey Hess + ). + * Recommend db4.2-utils and add new patch 206 adapting hardcoded paths + in cnid_maint to Debian location of helper binaries. Closes: + Bug#239347 (thanks to Rory Campbell-Lange + ). + * Improve init script: + + Timelord requires Appletalk, so load only when ATALKD_ON=yes. + + Use && instead of test -a (it is apparently not POSIX compliant). + * Cleaned up debian/copyright: + + Mention "GNU systems" (instead of only GNU/Linux). + + Drop info contained in changelog. + + Refer only to upstream source. Closes: Bug#260703 (thanks to Adam + Glasgall ). + + Use simpler upstream source URL: http://netatalk.sourceforge.net/. + * Improve README.Debian section on SSL being disabled: + + Rephrase to describe only _current_ state (NEWS.Debian is the + place for _change_ of state). + + Rephrase to clarify the FSF and Debian as _interpreting_ the + conflict between licenses (could be seen as FSF and Debian being + the authors of OpenSSL license). + + Clarify the FSF abbreviation. + + Describe how to rebuild locally with SSL support. + + Add another possible source of SSL-enabled packages, and clarify + that both sources are only unofficial _suggestions_. Closes (also) + bug#260703 (thanks to Adam Glasgall ). + * Set urgency=high to get this bugfix release into sarge ASAP. + + -- Jonas Smedegaard Sun, 31 Oct 2004 20:50:17 +0100 + +netatalk (1.6.4-2) unstable; urgency=low + + * The following changes from Jonas (thanks!): + + Tighten netatalk-dev dependency on exact same version of netatalk. + + Bump up dependency on libpam-runtime to 0.76-14 (reflecting a recent + update to Debian-PAM-MiniPolicy). + + Drop patch no longer needed: 204_netatalk_pamd_enable_password.diff. + + Enable SRVLOC support, recommend slpd and build-depend on + libslp-dev. + + Use (and build-depend on) d-devlibdeps. + + Use (and build-depend on) dh-buildinfo. + + Move around logcheck files to be recognized by dh_installlogcheck, + and tighten build-dependencies of debhelper and cdbs. + + Remove cracklib-related (build-)dependencies (they are only used + when compiled with ssl support). + + Support enabling ssl-related options simply by setting + "DEB_BUILD_OPTIONS=ssl" at build time. + - Include cracklib-support to PAM config on ssl build. + - Only enable DHX plugin on ssl build. + + Add TODO with notes on things to (re)add when (if ever?) ssl support + is enabled again by default. + * Use Berkeley DB 4.2. + + debian/control: Changed build-dependencies accordingly. + + debian/NEWS.Debian: Updated. + + debian/README.Debian: Updated. + + -- Sebastian Rittau Mon, 19 Jan 2004 12:43:49 +0100 + +netatalk (1.6.4-1) unstable; urgency=medium + + * New upstream release. + + debian/patches/100_psf_path.diff: Updated. + * debian/control: Build-Depend on libdb4.1-dev. [Suggested by Jonas + Smedegaard] + * Describe problems with upgrading from older BDB using versions of + Netatalk to newer versions. [Problem tracked down by Jonas] + + debian/README.Debian: Added note about upgrading issues with libdb. + + debian/NEWS.Debian: Added another note and refer to README.Debian. + + -- Sebastian Rittau Sun, 7 Dec 2003 15:30:18 +0100 + +netatalk (1.6.3-4) unstable; urgency=low + + * debian/logcheck/ignore.d.server: Patch by David Sewell to suppress + rtmp_replace and rtmp_free to be displayed by logcheck. + + Closes: #193304 "Suggested addition to logcheck ignore file for netatalk" + * debian/control: Standards-Version 3.6.1 (no changes required) + * Use common PAM files: + + debian/control: Depend on libpam-runtime (>= 0.76-13.1). + + debian/netatalk.install: Don't install upstream's PAM file. + + debian/netatalk.pam: Custom PAM file. + + debian/rules: Install debian/netatalk.pam into debian/netatalk/etc/pam.d. + + -- Sebastian Rittau Sat, 23 Aug 2003 14:40:08 +0200 + +netatalk (1.6.3-3) unstable; urgency=low + + * Fix upload. + * debian/rules: Set variables after including makefile fragment. + (Closes: #198244) + * debian/rules: Put source package in section net. + + -- Sebastian Rittau Sun, 22 Jun 2003 23:22:22 +0200 + +netatalk (1.6.3-2) unstable; urgency=low + + * Not a Debian native package anymore. (Bug introduced into 1.6.3-1.) + + -- Sebastian Rittau Fri, 20 Jun 2003 13:39:21 +0200 + +netatalk (1.6.3-1) unstable; urgency=low + + * New upstream release. + + debian/patches/000_netatalk_conf_typo.diff: Removed. + + debian/patches/007_include_fixes.diff: Removed. + * Remove adv1tov2 since it's obsolete: + + debian/netatalk.install: Removed debian/tmp/usr/bin/adv1tov2. + + debian/netatalk.ignore: Added usr/bin/adv1tov2. + * New patch naming scheme: + + 0xx: Bug fixes the need to go upstream. + + 1xx: Feature addition/changes that should go upstream. + + 2xx: Debian-specific patches. + * debian/rules: Add --disable-logger to the configure options. Suggestion + by Thomas Kaiser. + + -- Sebastian Rittau Thu, 19 Jun 2003 20:33:32 +0200 + +netatalk (1.6.2-3) unstable; urgency=low + + * debian/rules: Correct path to NLS directory. + * debian/rules: Set DEB_UPDATE_RCD_PARAMS. + * debian/control: Build-Depend on cdbs >= 0.4.0.1 to ensure the availability + of DEB_UPDATE_RCD_PARAMS. + * debian/control: Suggest tetex-bin instead of tetex-base. + * debian/patches/008_psf_path.diff: Place psf etc. in libexecdir instead + of sbindir. + * debian/netatalk.install: Filters are now in debian/tmp/usr/lib/netatalk + instead of debian/tmp/usr/sbin. + + -- Sebastian Rittau Sun, 8 Jun 2003 16:46:42 +0200 + +netatalk (1.6.2-2) unstable; urgency=low + + * debian/netatalk.init: Don't redirect messages on force-reload. + + Closes: #151050 "bad messages for restart" + * debian/README.Debian: Document OpenSSL issues. + * debian/control: Conforms to Debian policy 3.5.10. + * debian/control: Build-Depend on libdb4.0-dev instead of libdb3-dev. + * debian/control: Package netatalk depends on libdb4.0-util. (Pointed out + by Nigel Pegram.) + * Use CDBS: + + debian/rules: Use cdbs. + + debian/control: Build-Depend on cdbs and debhelper >= 4.1.0. + + debian/patches/001_netatalk_conf_defaults.diff + + debian/patches/002_etc2ps_paths.diff + + debian/patches/003_psf_8_paths.diff + + debian/patches/004_add_netatalk_printer_paths.diff + + debian/patches/005_netatalk_pamd_enable_password.diff + + debian/patches/006_applevolumes_default_homedir.diff + * debian/patches/000_netatalk_conf_typo.diff: Fixed typo in comment. + + Closes: #151051 "typo" + * debian/patches/007_include_fixes.diff: Correct include paths. + + -- Sebastian Rittau Fri, 6 Jun 2003 18:43:54 +0200 + +netatalk (1.6.2-1) unstable; urgency=low + + * New upstream version. + * Put Debhelper compatibility level into debian/compat, use level 4. + * Added dependencies on ${shlibs:Depends} and ${misc:Depends}. + * Conforms to Debian policy 3.5.9. + * Put netatalk in main. + * Don't link against libssl for now. Also, don't install afppasswd and + manual page. + + -- Sebastian Rittau Sun, 4 May 2003 00:24:25 +0200 + +netatalk (1.6.1-1) unstable; urgency=low + + * New upstream version. + * Corrected the download location in debian/copyright. + * Removed links to undocumented(7). + * Put filters in /usr/sbin (as per the upstream package) instead of + /usr/lib/atalk. Should probably be changed upstream to be LIBEXECDIR + instead of SBINDIR. + * Removed some Debian patches, incorporated upstream. + + -- Sebastian Rittau Sun, 23 Feb 2003 03:59:19 +0100 + +netatalk (1.6.0-5) unstable; urgency=low + + * Fixes a build problem on HPPA. (Closes: #178693) + + -- Sebastian Rittau Tue, 28 Jan 2003 15:58:16 +0100 + +netatalk (1.6.0-4) unstable; urgency=low + + * Reupload to non-US. + * Added Jonas Smedegaard to the uploaders field. + + -- Sebastian Rittau Mon, 30 Dec 2002 10:49:02 +0100 + +netatalk (1.6.0-3) unstable; urgency=low + + * Enable long file name support. + * Patches by Jonas Smedegaard: + + Improved logcheck files + + Remove deprecated logcheck symlinks + + Macusers: strip GECOS field (committed upstream as well) + + Macusers: recognize unresolved IP numbers (ditto) + + Remove --list-missing option on dh_install for now + + -- Sebastian Rittau Sun, 8 Dec 2002 17:40:44 +0100 + +netatalk (1.6.0-2) unstable; urgency=low + + * Use dh_install instead of dh_movefiles. Bump build-dependency on debhelper + to >= 4.0.0. + * Distribute /usr/bin/cnid_maint in package netatalk. + * Distribute /usr/include/atalk/{boolean,logger}.h in package + netatalk-dev. + + -- Sebastian Rittau Sun, 1 Dec 2002 02:04:07 +0100 + +netatalk (1.6.0-1) unstable; urgency=low + + * New upstream version. + * Removed --with-did=cnid configure option, since it's now default. + * pap.8 no longer exists. + * CHANGES document no longer exists. + * Complies with policy version 3.5.8. + * Changed dependency on timeout to a suggests, since the printing + script ensures the existance of timeout before using it. + * Recommend rc instead of just suggesting it, since it's needed by + acleandir.rc. + * Fixed the init.d script to allow host names with spaces. (Pointed out + and solution provided by Thomas Kaiser.) + * Fixed download location in copyright file. + + -- Sebastian Rittau Sun, 1 Dec 2002 01:25:52 +0100 + +netatalk (1.5.5-1) unstable; urgency=low + + * New upstream version. + * Compile with debug symbols by default, support for noopt in + DEB_BUILD_OPTIONS. + * Complies with policy version 3.5.7. + * Add a note to README.Debian about problems with MacOS X and DDP and + how to resolve them. Thanks to Nigel Pegram for pointing this out. + * Removed espy's e-mail address, since I doubt that e-mail will still + reach him. Instead, added his IRC nick to his name. + + -- Sebastian Rittau Tue, 24 Sep 2002 23:54:51 +0200 + +netatalk (1.5.4.1-2) unstable; urgency=medium + + * Use CNID as DID scheme. This may prevent data loss. + + -- Sebastian Rittau Fri, 16 Aug 2002 11:15:36 +0200 + +netatalk (1.5.4.1-1) unstable; urgency=low + + * New upstream version. + + -- Sebastian Rittau Tue, 30 Jul 2002 23:08:26 +0200 + +netatalk (1.5.3.1-1) unstable; urgency=low + + * New upstream version. + * Put afpd NLS file into /usr/share/nls/netatalk. (Rationale: They are + generated binary files and not really meant for changing anyways - a + mapping is a mapping is a mapping.) + * debian/netatalk.docs: removed file BUGS. + + -- Sebastian Rittau Tue, 9 Apr 2002 00:08:12 +0200 + +netatalk (1.5.2-1) unstable; urgency=low + + * New upstream version. + * Install acleandir.rc and link to undocumented(7). + * Suggest rc (for acleandir.rc). + * Added package specific paragraphs to Netatalk's package descriptions. + (Closes: #135523) + * Added --with-nlsdir (and --with-pkgconfdir) configure option. + * Added /usr/bin/afppasswd and correspoding man page. (Closes: #137963) + + -- Sebastian Rittau Tue, 12 Mar 2002 09:34:21 +0100 + +netatalk (1.5.1.1-4) unstable; urgency=low + + * Use uams_dhx.so and uams_randnom.so. This will enable SSL support by + default. + * Fixed wrong line breaks in AppleVolumes.system. Pointed out by Jonas. + + -- Sebastian Rittau Sat, 9 Feb 2002 15:47:21 +0100 + +netatalk (1.5.1.1-3) unstable; urgency=low + + * Offically re-enabled OpenSSL support. Rationale: In the OpenSSL FAQ[1] + it says: + + 2. Can I use OpenSSL with GPL software? + + On many systems including the major Linux and BSD distributions, yes (the + GPL does not place restrictions on using libraries that are part of the + normal operating system distribution). + + Also, Debian does not infringe on the copyright of the Netatalk team, + since we (the Netatalk team) clearly intend Netatalk to be linked + against OpenSSL. (OpenSSL support is on by default.) + + OpenSSL support was on by accident since a few version back anyways. + Now removed the part about enabling OpenSSL support from README.Debian + and added appropriate build dependencies. + + [1] http://www.openssl.org/support/faq.html + + -- Sebastian Rittau Tue, 5 Feb 2002 01:04:02 +0100 + +netatalk (1.5.1.1-2) unstable; urgency=low + + * Added conflict with bigloo for now. This partly addresses bug + #132041. (Both, netatalk and bigloo contain a binary with the name + afile.) We need to fix this properly by ending the ugly name space + pollution of afile. + + -- Sebastian Rittau Sun, 3 Feb 2002 13:35:20 +0100 + +netatalk (1.5.1.1-1) unstable; urgency=low + + * New upstream version. + * Added -q flag to grep call in init file to suppress spurious output. + (Suggestion by Aubin Paul.) + * The init script is now able to start AppleTalk daemons in the background. + (See /etc/default/netatalk.) This was a much-requested feature and we + can also remove the patches to netatalk.conf and its man page. And - + most importantly - it fixes a four-figure and a "wontfix" wishlist bug! + (Closes: #7683, #95942) + + -- Sebastian Rittau Wed, 23 Jan 2002 01:08:39 +0100 + +netatalk (1.5.0-1) unstable; urgency=low + + * New upstream version "New Year's Eve Release". Final 1.5.0 version. + * Removed the PowerPC segfault patch as it was included upstream. + * Distribute new file NEWS. + + -- Sebastian Rittau Sun, 30 Dec 2001 03:00:25 +0100 + +netatalk (1.5rc2-1) unstable; urgency=medium + + * New upstream version. + * Patches from Jonas: + + 004_logcheck_zip_gnireply_anything + Logcheck fix. + + 005_visible_home_dir_in_config_(again!_and_with_comments_this_time...) + Make home directory visible again. This issue is still not resolved + upstream. I will bring it up on the netatalk-devel mailing list and + hope that Jonas' patch can go upstream. + + 014_--sysconfdir_is_included_with_--enable-fhs + Remove --sysconfdir from ./configure flags. + * Fix segfault at startup on PowerPC. Thanks to David D. Kilzer for the + analysis and fix. (Closes: #123951) + + -- Sebastian Rittau Sat, 29 Dec 2001 03:48:41 +0100 + +netatalk (1.5rc1-1) unstable; urgency=medium + + * New upstream version. Some Debian patches were integrated upstream. + * Correct included docs, since all platform specific docs were merged. + * Upstream does now have manpages for apple_cp(1), apple_mv(1), and + apple_rm(1), written by Lance Levsen . + Removed the links to undocumented(7). + * Don't supply --with-did=last anymore, since this is now the default. + * Removed code to work around an upstream packaging problem. This is fixed + with the new release. + + -- Sebastian Rittau Sat, 15 Dec 2001 14:23:56 +0100 + +netatalk (1.5pre8-6) unstable; urgency=low + + * More patches by Jonas Smedegaard + + 001_make_sure_replaced_files_are_executable + + 002_randnum.so_is_only_for_encryption-enabled_builds + Removed uams_randnum.so from config files. + + 003_bring_init_and_conf_in_sync_and_support_zone + Set AFPD_MAX_CLIENTS to 50 in netatalk.init, too. + New variable: ATALK_ZONE for configuration. + + 012_logcheck_corrections + * Also "fixed" uams_dhx_pam.so. (Closes: #120360) + * Removed the USE_SSL variable from debian/rules. Instead, document the + use of --with-ssl-dir in README.Debian. + + -- Sebastian Rittau Sun, 2 Dec 2001 06:50:21 +0100 + +netatalk (1.5pre8-5) unstable; urgency=low + + * Appletalk -> AppleTalk in package short descriptions. Thanks to Matt + Zimmerman and his spell checking effort for pointing this out. + * Really install README.Debian this time. + * Removed afppasswd and afppasswd(1) from Debian distribution, since + they are of no use when SSL support is not compiled in. + + -- Sebastian Rittau Sun, 18 Nov 2001 15:13:53 +0100 + +netatalk (1.5pre8-4) unstable; urgency=low + + * Fixed uams_pam.so. (Closes: #118889) + * Explain why we don't link against OpenSSL in README.Debian. + * Modified debian/rules so that setting a variable called USE_SSL to + "yes" enables SSL support. This should ease the local compilation of + SSL-enabled netatalk packages. + + -- Sebastian Rittau Sat, 10 Nov 2001 19:05:12 +0100 + +netatalk (1.5pre8-3) unstable; urgency=low + + * Corrected upstream version number (pre8 instead of pre7). This corrects + afpd -v and similar commands. + * Raised default number of allowed afpd clients. Suggestion by Jonas + Smedegaard. + * Small logcheck fix by Jonas. + * Removed ATALK_BACKGROUND description from netatalk.conf(5). + * Removed obsolete --with-config-dir configure option. + + -- Sebastian Rittau Sat, 27 Oct 2001 15:36:30 +0200 + +netatalk (1.5pre8-2) unstable; urgency=low + + * Work around the fact that upstream includes sym-links to mkinstalldirs and + missing instead of verbatim copies. We do that by including our own copies + in debian and copy them before running the build. (Closes: #114915) + + -- Sebastian Rittau Wed, 10 Oct 2001 14:03:34 +0200 + +netatalk (1.5pre8-1) unstable; urgency=low + + * New upstream version, containing most Debian patches. + * Added a patch to configure.in that fixes PAM detection and compilation. + + -- Sebastian Rittau Sun, 7 Oct 2001 12:46:15 +0200 + +netatalk (1.5pre7-5) unstable; urgency=low + + * More patches by Jonas Smedegaard : + + 001_logcheck_fix_typo_and_optimize... + Logcheck fixes and improvements. (Closes: #114448) + + 005_visible_home_dir_in_config_(again!) + Name user home directories "Home Directory" by default to make them + appear in the MacOS chooser. (Patch had already been applied in + 1.5pre7-2, but had been lost since.) + + Jonas made more patches, which I haven't applied yet, but either + committed upstream or sent upstream for discussion. + + -- Sebastian Rittau Thu, 4 Oct 2001 22:31:50 +0200 + +netatalk (1.5pre7-4) unstable; urgency=low + + * Fixed Build-Dependencies. (pam-cracklib -> cracklib2-dev) (Closes: #113356) + * Restored symlinks in /usr/lib/atalk/filters and other directories. + (Closes: #113746) + * Patches by Jonas Smedegaard : + + 002_correctly_calculate_perl_depends + + 003_remove_cap_line_from_logcheck + Small logcheck change. + + 004_add_misc_logcheck_lines + Another logcheck change. + + 011_strip_pam_paths + Not applied, but patched config/netatalk.pamd to strip /lib/security + from its path. + + -- Sebastian Rittau Mon, 1 Oct 2001 08:30:17 +0200 + +netatalk (1.5pre7-3) unstable; urgency=low + + * Fixed a stupid typo I made in the new init script. + * Put add_netatalk_printer and netatalkshorternamelinks.pl in the + examples directory instead of /usr/bin. Suggestion from Jonas + Smedegaard. + + -- Sebastian Rittau Sun, 23 Sep 2001 19:08:43 +0200 + +netatalk (1.5pre7-2) unstable; urgency=low + + * Integrated a lot of patches by Jonas Smedegaard : + + 001_etc2ps paths + Correct paths in etc2ps and suggest tetex-base. + + 005_visible_home_dir_in_config + Name user home directories "Home Directory" by default to make them + appear in the MacOS chooser. + + 007_logcheck + Support for the logcheck log file checking package. + + 011_avoid_symlinks_and_force_using_autoconf_2.50 + Partly applied: Patch configure.in so that the use of autoconf 2.50 + is forced. (Debian autoconf hack workaround.) + + 012_netatalk.conf + Improved init script. Also, make use of netatalk.conf again. + I patched the patch so that netatalk.conf is placed in /etc/default. + + 015_recommend_lsof_(for_macusers)_and_suggest_quota + Recommend lsof and suggest quota. + + 021_enable_ssl_and_cracklib_and_correct_pam_paths + Partly applied: Enable cracklib support. + * Fixed paths in add_netatalk_printer. + * Removed lp2pap.sh since it's of no use on Debian systems. + * Removed test_parse_mtab and afpd-mtab.pl because we are not using + the mtab DID scheme. + * Comparison operator is '=', not '==' in the 'test' command. Fixed + my patch. + * Removed netatalk.conf.5 as well, since we don't install netatalk.conf + anymore. + * Removed superfluous file /etc/netatalk/netatalk.pamd. + * Moved all *.la and *.a files to netatalk-dev. Added appropriate + conflicts and replaces. + * debian/rules: Do not copy files to package build directories instead of + removing them afterwards. + + -- Sebastian Rittau Sun, 23 Sep 2001 14:04:06 +0200 + +netatalk (1.5pre7-1) unstable; urgency=medium + + * New upstream version. Most patches were applied upstream. + * This release uses libtool for UAM stuff. Also, the correct flag + for dynamic linking is supplied, so the problems with unresolved + symbols should be gone now. (Closes: #95399) + * Non-DSFG free code was removed. Copyright notice was changed accordingly. + * Use ./configure --sysconfdir instead of --with-config-dir. + * Upstream package does now install PAM file in the correct directory. + Removed rule, correcting this from Debian rules file. + * Added man pages for netatalk-config(1) and timelord(8). (Upstream + does now also include a man page for timeout(1), but since we're not + distributing it anymore, we don't care.) + * Some doc files were removed, others were added. + * Use debhelper compatibility level 3 and performed general packaging + cleanups at the same time. + * Standards-Version 3.5.6.0. No changes needed. + * Netatalk is now GPL'ed. Added a note stating that to copyright. + Also, we can't link against libssl anymore. Removed SSL stuff. + I had to patch configure.in to do that. + * Removed emacs stuff from changelog. + * Applied a patch to getiface.c for a problem that could lead to + segfaults. Thanks to Kai Henningsen + for actually being affected by this bug, and - more importantly - + finding the problem. (Closes: #109310) + + -- Sebastian Rittau Thu, 30 Aug 2001 02:02:17 +0200 + +netatalk (1.5pre6-7) unstable; urgency=low + + * Cleaned up CFLAGS handling in ./configure call. + * Updated config.{sub,guess} again, just to make sure ... + * Depend on the timeout package from tct. Also, don't distribute + /usr/bin/timeout and remove the timeout(1) link to undocumented(7). + Make preparations to remove the proper timeout(1) man page that will + get distributed with netatalk 1.5pre7. + + -- Sebastian Rittau Sun, 19 Aug 2001 18:05:55 +0200 + +netatalk (1.5pre6-6) unstable; urgency=medium + + * ./configure --with-did=last + This should fix errors with MacOS X. + * Fixed typo in add_netatalk_printer. (Closes: #104192) + * Removed /etc/netatalk/netatalk.conf, since it's not used by Debian's + init script. (Closes: #103539) + * Disabled pam_guest module by default. (Closes: #106637) + + -- Sebastian Rittau Sat, 28 Jul 2001 14:49:15 +0200 + +netatalk (1.5pre6-5) unstable; urgency=low + + * Removed --without-ssl option from ./configure invocation. Not + that it had any effect before. + * Updated config.{sub,guess} (manually for now). I will switch to + dh_autotools if and when this is available. (Closes: #102861) + + -- Sebastian Rittau Fri, 6 Jul 2001 00:46:18 +0200 + +netatalk (1.5pre6-4) unstable; urgency=low + + * Changed section of netatalk-dev to non-US, too. + * Make netatalk-dev depend on netatalk. + + -- Sebastian Rittau Tue, 19 Jun 2001 01:40:07 +0200 + +netatalk (1.5pre6-3) unstable; urgency=low + + * Thanks to my former sponsor Michael 'grisu' Bramer for his efforts. + * Changed maintainer address to . + * Moved to section non-US and link against libssl. Changed Build-Depends + accordingly. + * Link against libdb3 instead of libdb2. Changed Build-Depends + accordingly. + * Sources were not obtained from CVS, and are available by HTTP. + * Removed patch to contrib/Makefile.* to enable compilation of timelord. + Instead, use configure option --with-timelord. + * Added symlinks to megatron. Use patch from upstream CVS. (Closes: #95944) + * Clean up patch for etc/psf/Makefile.am. + * Added DEB_BUILD_OPTIONS handling. (Closes: #99705) + * Added links to undocumented(7) from binheader(1) and nadheader(1). + * Standards-Version: 3.5.5.0. + + -- Sebastian Rittau Sun, 17 Jun 2001 15:50:13 +0200 + +netatalk (1.5pre6-2) unstable; urgency=low + + * This version will hopefully clean up the version mess, I created. + * Conforms to standards-version 3.5.3.0 (no changes needed). + * Link cleanappledouble.pl(1) to undocumented(7). + * Removed all hand-crafted {pre,post}{inst,rm} files. + * Give files in /etc/netatalk/nls a mode of 0644, instead of 0755. Fixes + lintian warnings. + * Build-Depends on libdb2-dev do exist since -1. (Closes: #92774) + * Distribute missing pagecount.ps. (Closes: #95117) + * Compile timelord. + * Use --enable-fhs instead of --with-fhs. Should fix some paths. + * Compile with shadow support. (Closes: #95186) + * Use the pam_unix.so module instead of pam_pwdb.so in /etc/pam.d/netatalk. + + -- Sebastian Rittau Tue, 1 May 2001 03:38:57 +0200 + +netatalk (1.5pre6-1) unstable; urgency=low + + * New upstream release. + * Re-added changes made in 1.4b2+asun2.1.3-8. + * Added --prefix=/usr to ./configure options. + + -- Sebastian Rittau Fri, 13 Apr 2001 00:27:47 +0200 + +netatalk (1.5pre5-3) unstable; urgency=low + + * Re-added changes made in 1.4b2+asun2.1.3-8. + + -- Sebastian Rittau Fri, 6 Apr 2001 23:44:47 +0200 + +netatalk (1.5pre5-2) unstable; urgency=low + + * Added copyright of University of Newcastle upon Tyne to debian/copyright. + * Removed patches/uams_dhx_pam.c.patch as it was applied upstream. + * Some documentation files were moved into the doc subdirectory. + * Added more documentation files. + * Added some temporary build fixes. + + -- Sebastian Rittau Wed, 8 Mar 2001 00:03:30 +0100 + +netatalk (1.5pre5-1) unstable; urgency=low + + * New upstream version. + + -- Sebastian Rittau Fri, 23 Feb 2001 21:07:18 +0100 + +netatalk (1.5pre4-1) unstable; urgency=low + + * New upstream version. + * Some reorganisations to allow building directly from CVS. + * Debian packaging is now included in upstream CVS. + * Modified debian/copyright to include CVS instructions. + * Call ./configure with --with-fhs and removed --with-uams-path option. + * Removed patches/paths.h.patch as this is now supported by --with-fhs. + * Removed various build patches now included upstream. + * Use dh_installman from debhelper v3. Updated build dependencies + accordingly. + * Removed comment about Debian specific changes from debian/copyright. + * Build with libssl support. (Closes: #48871) + * Added libssl096-dev to Build-Depends. + * Ship FAQ in /usr/share/doc/netatalk + + -- Sebastian Rittau Thu, 22 Feb 2001 20:44:41 +0100 + +netatalk (1.5pre3-1) unstable; urgency=low + + * New upstream version from netatalk.sourceforge.net. + (Closes: #69232, #78781) + * Repackaged using debhelper. + * Conforms to policy version 3.5.1.0. + * Removed some Debian specific patches integrated upstream. + * Updated debian/copyright. + * Changed priority from optional to extra. + + -- Sebastian Rittau Thu, 22 Feb 2001 10:18:07 +0100 + +netatalk (1.4b2+asun2.1.3-8) unstable; urgency=low + + * Added libdb2-dev to build-depends. (Closes: #92774) + * Complies with Debian policy version 3.5.2.0. + * Added netatalk homepage and current maintainer to debian/copyright. + + -- Sebastian Rittau Tue, 3 Apr 2001 23:59:38 +0200 + +netatalk (1.4b2+asun2.1.3-7) unstable; urgency=low + + * New maintainer. (Closes: #82386) + * Fixed a build problem. + * Strip .note and .comment sections from /usr/lib/atalk/psa. + * Added debhelper as build-dependency. + * Complies with Debian policy version 3.2.1.0. + + -- Sebastian Rittau Sun, 21 Jan 2001 15:49:11 +0100 + +netatalk (1.4b2+asun2.1.3-6) unstable; urgency=low + + * The "looks like I picked the wrong week to quit sniffing glue" release. + * Update the maintainer name in the control file. + * Move psa and etc2ps to /usr/lib/atalk, as they are not user binaries + (this also shuts lintian up). + + -- David Huggins-Daines Fri, 14 Jan 2000 21:04:24 -0500 + +netatalk (1.4b2+asun2.1.3-5) unstable; urgency=low + + * New maintainer. + * Compensate for stupid new 'install -s' behaviour. (closes:Bug#51423) + * Fix psf(8) manpage. (closes:Bug#30839) + * Updated Standards-Version. + * Fixed symlinks to be relative, as per lintian's warnings. + * Added /usr/doc symlinks in the postinst/prerm. + + -- David Huggins-Daines Wed, 22 Dec 1999 20:24:26 -0500 + +netatalk (1.4b2+asun2.1.3-4) unstable; urgency=low + + * Fix init script to always kill papd even if ENABLE_PAP=no (closes:Bug#48783). + + -- Joel Klecker Sun, 31 Oct 1999 07:43:29 -0800 + +netatalk (1.4b2+asun2.1.3-3) unstable; urgency=low + + * Remove libatalk1 and libatalk1-dev (I think it is a mistake to "fork" a + shared version of a library in Debian, if the library is static upstream + then upstream isn't gonna be careful with the ABI). + * Create netatalk-dev. + * netatalk.init: Use $() instead of ``. + Use /bin/hostname explicitly. + s/daemons/Daemons/g. + Remove module fiddling (closes:Bug#44767,#43319). + * Remove "glibc 2.1 fix" it's no longer needed. + * Compile with sendfile support. + * Use /usr/share/doc. + * Cleanup bashisms in debian/rules. + + -- Joel Klecker Sat, 23 Oct 1999 20:59:24 -0700 + +netatalk (1.4b2+asun2.1.3-2) unstable; urgency=low + + * (netatalk): Make /etc/netatalk/afpd.conf a conffile (closes:Bug#37628). + + -- Joel Klecker Thu, 13 May 1999 10:54:37 -0700 + +netatalk (1.4b2+asun2.1.3-1) unstable; urgency=low + + * New upstream release (closes:Bug#33982). + * Correct paths in psf.8 (closes:Bug#30839). + * There is now a different way to control CRLF translation on a + per-volume basis upstream so I have removed the patch that + provides the -e option to afpd. + * (netatalk): Depend on libpam-modules. + * Put man pages in /usr/share/man. + + -- Joel Klecker Tue, 30 Mar 1999 12:17:36 -0800 + +netatalk (1.4b2+asun2.1.1-2) frozen unstable; urgency=low + + * Incorporated glibc 2.1 fixes from Christian Meder. + * Remove explicit add-log-mailing-address from debian/changelog. + + -- Joel Klecker Fri, 15 Jan 1999 07:28:11 -0800 + +netatalk (1.4b2+asun2.1.1-1.1) frozen unstable; urgency=low + + * non maintainer, sparc only upload + * fix #includes for glibc2.1 + + -- Christian Meder Mon, 4 Jan 1999 12:37:13 +0100 + +netatalk (1.4b2+asun2.1.1-1) frozen unstable; urgency=low + + * New upstream bugfix release. + * Recompile against libc6 2.0.7u-7 to get rid of versioned + libc6 dependency. + + -- Joel Klecker Thu, 3 Dec 1998 07:45:42 -0800 + +netatalk (1.4b2+asun2.1.0-5) frozen unstable; urgency=high + + * [libatalk/atp/atp_rsel.c] Minor change for libnatali compatibility + (closes:Bug#30092). + * Rebuild with libc6 2.0.7u-6 for i386. + + -- Joel Klecker Fri, 27 Nov 1998 22:58:11 -0800 + +netatalk (1.4b2+asun2.1.0-4) frozen unstable; urgency=low + + * binary-arch target now depends on pre-binary (closes:Bug#29508) + + -- Joel Klecker Tue, 17 Nov 1998 04:46:50 -0800 + +netatalk (1.4b2+asun2.1.0-3) frozen unstable; urgency=low + + * Now installs /usr/lib/atalk/pagecount.ps (closes:Bug#29323) + + -- Joel Klecker Thu, 12 Nov 1998 00:30:53 -0800 + +netatalk (1.4b2+asun2.1.0-2) frozen unstable; urgency=low + + * Should build from freshly unpacked source now (Bug#28810) + + -- Joel Klecker Sun, 1 Nov 1998 19:34:52 -0800 + +netatalk (1.4b2+asun2.1.0-1) unstable; urgency=low + + * New upstream release. + * Incorporate megatron patch from Rob Browning (Bug#25598). + * Don't install /usr/include/netatalk on glibc 2.1 architectures. + * Fix paths in /etc/pam.d/netatalk file. + + -- Joel Klecker Thu, 29 Oct 1998 23:54:13 -0800 + +netatalk (1.4b2+asun2.0a18.2-1) frozen unstable; urgency=low + + * New "upstream" release. + * This does add new features, however, it also fixes at + least one nasty bug (Bug#13973). + * Applied patch which adds a command-line option to disable + CR/LF translation (thanks to Davide Welton and Jon Nelson). + (Note to release manager: this patch is applied so this + package has the exact functionality of netatalk-asun) + * Renamed libatalk-dev to libatalk1-dev. + * Symlinked /usr/man/man1/nbpunrgstr.1.gz to /usr/man/man1/nbprgstr.1.gz + to keep lintian happy. + * Changed the "lock directory" to /var/run and the names of the "lock files" to .pid, + since what the source calls locks are really the same as the .pid files other daemons + put in /var/run. + * This package provides all the functionality of netatalk-asun, and + it will replace netatalk-asun in the distribution. + + -- Joel Klecker Tue, 12 May 1998 19:31:54 -0700 + +netatalk (1.4b2-5) frozen unstable; urgency=low + + * New Maintainer (I can finally close bugs + I fixed in previous releases ;). + * Changed library package names again. + * Upgraded to Debian Policy 2.4.0.0. + * Moved conffiles to /etc/netatalk. + * Fixes almost all lintian warnings/errors. + * Cleaned up changelog. + + -- Joel Klecker Sun, 22 Mar 1998 21:50:00 -0800 + +netatalk (1.4b2-4.5) unstable; urgency=low + + * Non-maintainer release (again :>) + * Made libatalk14g-dev conflict with libc5-dev to fix overlap + (Bug:#17848) + + -- Joel Klecker Thu, 5 Feb 1998 20:42:51 -0800 + +netatalk (1.4b2-4.4) unstable; urgency=low + + * Yet Another non-maintainer release. + * Added patch to fix "dancing icon" problems with Macs running Mac OS 8. + * Changed comment in /etc/AppleVolumes.default (Bug:#15279) + * Implemented variable for "server name" in init script + (as suggested in Bug:#12024) + * Added a kluge to /etc/init.d/netatalk to remove kernel appletalk + module (if there is one) at stop and reinsert it at start, this + is needed or else netatalk will not start once stopped (Bug:#12142,11349) + + -- Joel Klecker Fri, 30 Jan 1998 07:50:00 -0800 + +netatalk (1.4b2-4.3) unstable; urgency=low + + * Non-maintainer release. + * Fixed dependencies. + + -- Joel Klecker Thu, 8 Jan 1998 16:14:17 -0800 + +netatalk (1.4b2-4.2) unstable; urgency=low + + * Non-maintainer release. + * Changed library package names. + + -- Joel Klecker Wed, 7 Jan 1998 00:00:00 -0800 + +netatalk (1.4b2-4.1) unstable; urgency=low + + * Non-maintainer libc6 compile. + + -- Joel Klecker Tue, 6 Jan 1998 00:00:00 -0800 + +netatalk (1.4b2-4) unstable; urgency=low + + * Recompiled against newer PAM libraries. + * Added /etc/pam.d/samba. + + -- Klee Dienes Sat, 8 Mar 1997 01:17:09 -0500 + +netatalk (1.4b2-3) unstable; urgency=low + + * Added PAM support. + * Split into libatalk, libatalk-dev, and netatalk. + * Added patch from Randy Gobbel to allow case + translation to be specified at config-time rather than compile time. + Note that configuration files that make use of this feature may not + work with other releases of netatalk, and that this feature may be + removed in the future if UMich rejects the patch or implements it + differently. + * Startup messages now conform to 'Standard for Console Messages' (fixes + #5399). + * No longer creates new subdirectories (to appease dpkg-buildpackage). + + -- Klee Dienes Wed, 26 Feb 1997 21:02:02 -0500 + +netatalk (1.4b2-2) unstable; urgency=low + + * Resend_request made external for libnatali. + * Added shared libraries. + * Next revision will split into libatalk, libatalk-dev, and netatalk. + + -- Klee Dienes Fri, 24 Jan 1997 22:37:22 -0500 + +netatalk (1.4b2-1) unstable; urgency=low + + * Updated to upstream version 1.4b2. + * Added preliminary PAM support (currently disabled). + * Made /etc/init.d/netatalk a conffile. + * Changed /etc/init.d/netatalk to complete only once appletalk services + are running. Configurating an Appletalk interface can take many (> 15) + seconds, so the previous version would fork a process to configure the + interface and then start up the other Appletalk services. Although + possibly controversial, this change is necessary so that packages like + ppr can be ensured that netatalk will be started before they run + without undue complication. + + -- Klee Dienes Sat, 2 Nov 1996 19:42:04 -0700 + +netatalk (1.4b1-1) unstable; urgency=low + + * Updated to new upstream version. + * Updated to new packaging format. + + -- Klee Dienes Wed, 2 Oct 1996 10:18:14 -0700 + +netatalk (1.3.3-3); + + * Fixed location of include files. + + -- Klee Dienes Mon Jan 8 10:46:52 MST 1996 + +netatalk (1.3.3-2); + + * Fixed bug in postrm script. + + -- Klee Dienes Thu Dec 21 08:22:24 MST 1995 + +netatalk (1.3.3-1); + + * Initial Release. + + -- Klee Dienes Wed Dec 13 22:58:31 MST 1995 --- netatalk-2.0.4~beta2.orig/debian/netatalk.logcheck.ignore.server +++ netatalk-2.0.4~beta2/debian/netatalk.logcheck.ignore.server @@ -0,0 +1,28 @@ +afpd\[[0-9]+\]: ((dhx|cleartext|randnum/rand2num) )?login: [[:alnum:]]+$ +afpd\[[0-9]+\]: (afp_flushfork|afp_read|getforkparms): (ad_refresh|of_find): (No such file or directory|No such process|Permission denied)$ +afpd\[[0-9]+\]: dsi_stream_read\(0\): (No such file or directory|No such process|Permission denied)$ +afpd\[[0-9]+\]: (atp_rresp|afp_die: asp_shutdown): Connection timed out$ +afpd\[[0-9]+\]: (registering [[:alnum:]]+ \(uid [0-9]+\) on [\.0-9]+ as|removed) /[^[:space:]]+/net[\.0-9]+node[0-9]+$ +afpd\[[0-9]+\]: (server_child\[[0-9]+\] [0-9]+ )?(done|exited 1)$ +afpd\[[0-9]+\]: ASIP session:[0-9]+\([0-9]+\) from [\.:0-9]+\([0-9]+\)$ +afpd\[[0-9]+\]: CNID DB initialized using Sleepycat Software: Berkeley DB( [\.0-9]+: \([^\(]+\))?$ +afpd\[[0-9]+\]: Connection terminated$ +afpd\[[0-9]+\]: [\.[:alnum:]]+ read, [\.[:alnum:]]+ written$ +afpd\[[0-9]+\]: [_[:alnum:]]+(\(-?[0-9]+\))?: stat [^:]+: (No such file or directory|Permission denied)$ +afpd\[[0-9]+\]: afp_alarm: child timed out$ +atalkd\[[0-9]+\]: as_timer sendto: Network is unreachable $ +afpd\[[0-9]+\]: asp_alrm: [0-9]+ timed out$ +afpd\[[0-9]+\]: dsi_stream_(read\(-1\)|write): Connection reset by peer$ +afpd\[[0-9]+\]: dsi_stream_read\(0\): Success$ +afpd\[[0-9]+\]: error stat'ing /[^[:space:]]+/net[\.0-9]+node[0-9]+: No such file or directory$ +afpd\[[0-9]+\]: login [[:alnum:]]+ \(uid [0-9]+, gid [0-9]+\)( AFP2\.2)?$ +afpd\[[0-9]+\]: login noauth$ +afpd\[[0-9]+\]: logout [[:alnum:]]+$ +afpd\[[0-9]+\]: session from [\.:0-9]+ on [\.:0-9]+$ +afpd\[[0-9]+\]: uams_dhx_pam.c :PAM: PAM (Auth OK!|Success -- Success)$ +afpd\[[0-9]+\]: using codepage directory: /etc/netatalk/nls/maccode\.[\.a-z0-9-]+$ +atalkd\[[0-9]+\]: zip (ignoring gnireply|gnireply from [\.0-9]+ \([[:alnum:]]+ [[:alnum:]]+\))$ +atalkd\[[0-9]+\]: \[rtmp\.c:[0-9]+\]: I:ATalkDaemon: rtmp_replace [0-9]+-[0-9]+$ +atalkd\[[0-9]+\]: \[rtmp\.c:[0-9]+\]: I:ATalkDaemon: rtmp_free [0-9]+-[0-9]+$ +papd\[[0-9]+\]: child [0-9]+ done$ +papd\[[0-9]+\]: child [0-9]+ for "[^[:space:]]+" from [\.0-9]+$ --- netatalk-2.0.4~beta2.orig/debian/control.in +++ netatalk-2.0.4~beta2/debian/control.in @@ -0,0 +1,27 @@ +Source: netatalk +Section: net +Priority: extra +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Jonas Smedegaard +Build-Depends: @cdbs@ +Build-Conflicts: libavahi-compat-libdnssd-dev +Uploaders: Sebastian Rittau , Jonas Smedegaard +Vcs-Git: git://git.debian.org/git/collab-maint/netatalk.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/netatalk.git;a=summary +Standards-Version: 3.7.2 +Homepage: http://netatalk.sourceforge.net/ + +Package: netatalk +Section: net +Architecture: any +Depends: netbase, libpam-modules, ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends} +Recommends: lsof, rc, db4.2-util, procps, cracklib-runtime, libpam-cracklib +Suggests: tetex-bin, quota, timeout +Description: AppleTalk user binaries + Netatalk is an implementation of the AppleTalk Protocol Suite for + BSD-derived systems. The current release contains support for + EtherTalk Phase I and II, DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, and + AFP. + . + This package contains all daemon and utility programs as well as Netatalk's + static libraries. --- netatalk-2.0.4~beta2.orig/debian/netatalk.pam +++ netatalk-2.0.4~beta2/debian/netatalk.pam @@ -0,0 +1,11 @@ +#%PAM-1.0 + +@include common-auth +@include common-account + +# Override common password routine (doesn't use cracklib by default) +#@include common-password +password required pam_cracklib.so +password required pam_unix.so use_authtok + +@include common-session --- netatalk-2.0.4~beta2.orig/debian/netatalk.docs +++ netatalk-2.0.4~beta2/debian/netatalk.docs @@ -0,0 +1,6 @@ +CONTRIBUTORS +NEWS +TODO +doc/FAQ +doc/README.hidden-items +doc/README.platforms --- netatalk-2.0.4~beta2.orig/debian/netatalk.ignore +++ netatalk-2.0.4~beta2/debian/netatalk.ignore @@ -0,0 +1,8 @@ +usr/bin/add_netatalk_printer +usr/bin/adv1tov2 +usr/bin/afpd-mtab.pl +usr/bin/lp2pap.sh +usr/bin/netatalkshorternamelinks.pl +usr/bin/timeout +usr/include/netatalk/at.h +usr/share/man/man1/timeout.1 --- netatalk-2.0.4~beta2.orig/debian/compat +++ netatalk-2.0.4~beta2/debian/compat @@ -0,0 +1 @@ +6 --- netatalk-2.0.4~beta2.orig/debian/netatalk.dirs +++ netatalk-2.0.4~beta2/debian/netatalk.dirs @@ -0,0 +1,5 @@ +etc/default +etc/logcheck/ignore.d.server +etc/logcheck/ignore.d.workstation +etc/logcheck/violations.ignore.d +var/spool/netatalk --- netatalk-2.0.4~beta2.orig/debian/netatalk.logcheck.violations.ignore +++ netatalk-2.0.4~beta2/debian/netatalk.logcheck.violations.ignore @@ -0,0 +1,4 @@ +afpd\[[0-9]+\]: afp_die: asp_shutdown: Connection timed out$ +afpd\[[0-9]+\]: afp_getsrvrparms: stat /[^/]+/: Permission denied$ +afpd\[[0-9]+\]: (afp_flushfork|afp_read|getforkparms): (ad_refresh|of_find): Permission denied$ +afpd\[[0-9]+\]: dsi_stream_read\(0\): Permission denied$ --- netatalk-2.0.4~beta2.orig/debian/NEWS +++ netatalk-2.0.4~beta2/debian/NEWS @@ -0,0 +1,37 @@ +netatalk (2.0.4~beta2-1) unstable; urgency=low + + * Netatalk now supports encrypted authentication using new DHX2 AUM. + + Encrypted authentication is strongly recommended for all connections + and required by recent releases of MacOS X. Until now encryption was + possible only using randnum (which stored passwords in cleartext on + the server) or using the older DHX UAM (which was non-distributable + by Debian due to being considered incompatible with the GPL). + + DHX2 is now built by default but Randnum is not (it now needs + OpenSSL). + + To use new DHX2 AUM, make sure it is included in -uamlist option of + afpd.conf if that option is used (it is enabled by default). + + See /usr/share/doc/netatalk/README.Debian(.gz) for info on getting + netatalk with DHX and Randnum UAMs using OpenSSL. + + -- Jonas Smedegaard Wed, 07 Jan 2009 14:02:21 +0100 + +netatalk (1.6.3-5) unstable; urgency=low + + * This version of Netatalk switches to Berkeley DB 4.2. During the + development process of Debian 3.1 (sarge) earlier versions of BDB + (3.0 and 4.0) were used. As Netatalk does not automatically update + its database, you may experience problems like those described in + bug #200373: no files showing up in your folders. This problem + should not concern you if you are upgrading from Debian 3.0 (woody). + + If you have such problems, please refer to + + /usr/share/doc/netatalk/README.Debian + + for information on how to fix them. + + -- Sebastian Rittau Mon, 25 Aug 2003 17:44:29 +0200 --- netatalk-2.0.4~beta2.orig/debian/copyright_hints +++ netatalk-2.0.4~beta2/debian/copyright_hints @@ -0,0 +1,1025 @@ +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=XXX +Upstream-Name: Untrusted draft - double-check copyrights yourself! + +Files: CONTRIBUTORS + NEWS + README + TODO + VERSION + bin/Makefile.am + bin/adv1tov2/Makefile.am + bin/adv1tov2/adv1tov2.c + bin/aecho/Makefile.am + bin/afile/Makefile.am + bin/afile/acleandir.rc + bin/afppasswd/Makefile.am + bin/cnid/Makefile.am + bin/cnid/cnid_index.c + bin/cnid/cnid_maint.in + bin/getzones/Makefile.am + bin/megatron/Makefile.am + bin/megatron/asingle.c + bin/megatron/asingle.h + bin/megatron/hqx.c + bin/megatron/hqx.h + bin/megatron/macbin.c + bin/megatron/macbin.h + bin/megatron/megatron.c + bin/megatron/megatron.h + bin/megatron/nad.c + bin/megatron/nad.h + bin/megatron/updcrc.c + bin/nbp/Makefile.am + bin/pap/Makefile.am + bin/psorder/Makefile.am + bin/uniconv/Makefile.am + config.h.in + config/AppleVolumes.default.tmpl + config/AppleVolumes.system + config/Makefile.am + config/afpd.conf.tmpl + config/atalkd.conf + config/netatalk.conf + config/netatalk.pamd + config/papd.conf + configure.in + contrib/ICDumpSuffixMap + contrib/Makefile.am + contrib/a2boot/VERSION + contrib/macusers/Makefile.am + contrib/macusers/README.macusers + contrib/macusers/macusers.in + contrib/nu/Makefile.am + contrib/nu/nu.in + contrib/printing/Makefile.am + contrib/printing/timeout.c + contrib/shell_utils/Makefile.am + contrib/shell_utils/apple_cp + contrib/shell_utils/apple_cp.in + contrib/shell_utils/apple_mv + contrib/shell_utils/apple_mv.in + contrib/shell_utils/apple_rm + contrib/shell_utils/apple_rm.in + contrib/shell_utils/asip-status.pl + contrib/shell_utils/asip-status.pl.in + contrib/shell_utils/lp2pap.sh.tmpl + contrib/timelord/VERSION + debian/NEWS + debian/README.Debian + debian/README.cdbs-tweaks + debian/compat + debian/control + debian/control.in + debian/examples/netatalk_update.sh + debian/netatalk.dirs + debian/netatalk.docs + debian/netatalk.ignore + debian/netatalk.logcheck.ignore.server + debian/netatalk.logcheck.violations.ignore + debian/netatalk.pam + debian/patches/001_make_dist_was_missing_files.patch + debian/patches/002_avoid_bdb_if_unneeded.patch + debian/patches/005_add_CJK_encoding.patch + debian/patches/101_fix_manpage_sed_replacements.patch + debian/patches/102_rename_initscript.patch + debian/patches/103_initscript_background_off_by_default.patch + debian/patches/104_initscript_load_module_only_if_intended.patch + debian/patches/105_initscript_config_in_etc-default.patch + debian/patches/106_papd_needs_atalk_and_fix_bashism.patch + debian/patches/109_xfs_option.patch + debian/patches/111_db_macro.patch + debian/patches/112_fix_zeroconf_assertion.patch + debian/patches/113_LSB_sysv_dep_info.patch + debian/patches/114_fix_macusers_ps_parsing.patch + debian/patches/200_netatalk_conf_defaults.diff + debian/patches/201_etc2ps_paths.diff + debian/patches/202_psf_8_paths.diff + debian/patches/204_uniconv_namespace_conflict.diff + debian/patches/204a_uniconv_namespace_conflict_autobuilt.diff + debian/patches/205_applevolumes_default_homedir.diff + debian/patches/206_fix_cnid_maint_paths.diff + debian/patches/207_afile_namespace_conflict.diff + debian/patches/207a_afile_namespace_conflict_autobuilt.diff + debian/patches/208_fix_manpage_sed_replacements_for_automade_file.patch + debian/patches/209_rename_initscript_for_automade_file.patch + debian/patches/210_avoid_update-rc-d.patch + debian/patches/211_avoid_update-rc-d_for_automade_file.patch + debian/patches/212_disable_cnid_metad_by_default.patch + debian/patches/README + debian/patches/series + debian/rules + debian/watch + distrib/Makefile.am + distrib/config/Makefile.am + distrib/config/netatalk-config.in + distrib/initscripts/Makefile.am + distrib/initscripts/rc.afpd.netbsd.tmpl + distrib/initscripts/rc.atalk.bsd.tmpl + distrib/initscripts/rc.atalk.cobalt + distrib/initscripts/rc.atalk.debian.tmpl + distrib/initscripts/rc.atalk.gentoo.tmpl + distrib/initscripts/rc.atalk.redhat.tmpl + distrib/initscripts/rc.atalk.sysv.tmpl + distrib/initscripts/rc.atalk.tru64.tmpl + distrib/initscripts/rc.atalkd.netbsd.tmpl + distrib/initscripts/rc.cnid_metad.netbsd.tmpl + distrib/initscripts/rc.papd.netbsd.tmpl + distrib/initscripts/rc.timelord.netbsd.tmpl + distrib/m4/Makefile.am + distrib/m4/netatalk.m4 + doc/DEVELOPER + doc/FAQ + doc/Makefile.am + doc/README.hidden-items + doc/README.platforms + etc/Makefile.am + etc/afpd/Makefile.am + etc/afpd/afp_config.h + etc/afpd/desktop.c + etc/afpd/filedir.h + etc/afpd/mangle.h + etc/afpd/misc.h + etc/afpd/status.h + etc/afpd/uid.c + etc/afpd/uid.h + etc/afpd/unix.h + etc/atalkd/Makefile.am + etc/atalkd/main.h + etc/atalkd/route.h + etc/cnid_dbd/Makefile.am + etc/cnid_dbd/README + etc/papd/Makefile.am + etc/papd/lp.h + etc/papd/print_cups.h + etc/papd/printcap.h + etc/papd/session.h + etc/psf/Makefile.am + etc/psf/etc2ps.sh + etc/psf/pagecount.ps + etc/uams/Makefile.am + etc/uams/uams_krb4/Makefile.am + etc/uams/uams_krb4/lifetime.c + include/Makefile.am + include/atalk/Makefile.am + include/atalk/boolean.h + include/atalk/cnid_dbd_private.h + include/atalk/list.h + include/atalk/logger.h + include/atalk/paths.h + include/atalk/server_ipc.h + include/atalk/unicode.h + include/atalk/util.h + include/atalk/volinfo.h + libatalk/Makefile.am + libatalk/adouble/Makefile.am + libatalk/adouble/ad_attr.c + libatalk/adouble/ad_date.c + libatalk/adouble/ad_mmap.c + libatalk/adouble/ad_private.h + libatalk/asp/Makefile.am + libatalk/asp/asp_tickle.c + libatalk/atp/Makefile.am + libatalk/cnid/Makefile.am + libatalk/cnid/README + libatalk/cnid/cdb/Makefile.am + libatalk/cnid/cdb/README + libatalk/cnid/cdb/cnid_cdb.h + libatalk/cnid/cdb/cnid_cdb_close.c + libatalk/cnid/cdb/cnid_cdb_get.c + libatalk/cnid/cdb/cnid_cdb_lookup.c + libatalk/cnid/cdb/cnid_cdb_meta.h + libatalk/cnid/cdb/cnid_cdb_nextid.c + libatalk/cnid/cdb/cnid_cdb_private.h + libatalk/cnid/cdb/cnid_cdb_resolve.c + libatalk/cnid/cdb/cnid_cdb_update.c + libatalk/cnid/db3/Makefile.am + libatalk/cnid/db3/README + libatalk/cnid/db3/cnid_db3.h + libatalk/cnid/db3/cnid_db3_close.c + libatalk/cnid/db3/cnid_db3_get.c + libatalk/cnid/db3/cnid_db3_lookup.c + libatalk/cnid/db3/cnid_db3_meta.h + libatalk/cnid/db3/cnid_db3_nextid.c + libatalk/cnid/db3/cnid_db3_private.h + libatalk/cnid/db3/cnid_db3_resolve.c + libatalk/cnid/db3/cnid_db3_update.c + libatalk/cnid/dbd/Makefile.am + libatalk/cnid/hash/Makefile.am + libatalk/cnid/hash/README + libatalk/cnid/hash/cnid_hash.h + libatalk/cnid/hash/cnid_hash_close.c + libatalk/cnid/hash/cnid_hash_get.c + libatalk/cnid/hash/cnid_hash_lookup.c + libatalk/cnid/hash/cnid_hash_nextid.c + libatalk/cnid/hash/cnid_hash_resolve.c + libatalk/cnid/hash/cnid_hash_update.c + libatalk/cnid/last/Makefile.am + libatalk/cnid/last/README + libatalk/cnid/last/cnid_last.h + libatalk/cnid/mtab/Makefile.am + libatalk/cnid/mtab/README + libatalk/cnid/mtab/cnid_mtab.h + libatalk/cnid/tdb/Makefile.am + libatalk/cnid/tdb/README + libatalk/cnid/tdb/cnid_tdb.h + libatalk/cnid/tdb/cnid_tdb_close.c + libatalk/cnid/tdb/cnid_tdb_get.c + libatalk/cnid/tdb/cnid_tdb_lookup.c + libatalk/cnid/tdb/cnid_tdb_nextid.c + libatalk/cnid/tdb/cnid_tdb_resolve.c + libatalk/cnid/tdb/cnid_tdb_update.c + libatalk/compat/Makefile.am + libatalk/compat/inet_aton.c + libatalk/compat/strdup.c + libatalk/dsi/Makefile.am + libatalk/dsi/README + libatalk/dummy.c + libatalk/nbp/Makefile.am + libatalk/netddp/Makefile.am + libatalk/tdb/Makefile.am + libatalk/tdb/spinlock.h + libatalk/unicode/Makefile.am + libatalk/unicode/charsets/Makefile.am + libatalk/unicode/charsets/generic_mb.h + libatalk/unicode/precompose.h + libatalk/unicode/ucs2_casetable.h + libatalk/unicode/util_unistr.c + libatalk/util/Makefile.am + libatalk/util/atalk_addr.c + libatalk/util/bprint.c + libatalk/util/logger.c + libatalk/util/module.c + libatalk/util/server_ipc.c + libatalk/util/strdicasecmp.c + macros/Makefile.am + macros/afs-check.m4 + macros/cnid-backend.m4 + macros/config-checks.m4 + macros/cups.m4 + macros/db3-check.m4 + macros/grep-check.m4 + macros/gssapi-check.m4 + macros/iconv.m4 + macros/largefile-check.m4 + macros/libgcrypt.m4 + macros/pam-check.m4 + macros/perl-check.m4 + macros/ps-check.m4 + macros/quota-check.m4 + macros/snprintf-check.m4 + macros/srvloc.m4 + macros/ssl-check.m4 + macros/summary.m4 + macros/tcp-wrappers.m4 + macros/util.m4 + man/Makefile.am + man/man1/Makefile.am + man/man1/achfile.1 + man/man1/acleandir.1 + man/man1/aecho.1 + man/man1/afile.1 + man/man1/afppasswd.1 + man/man1/apple_cp.1.tmpl + man/man1/apple_mv.1.tmpl + man/man1/apple_rm.1.tmpl + man/man1/asip-status.pl.1.tmpl + man/man1/cnid_index.1 + man/man1/getzones.1 + man/man1/hqx2bin.1 + man/man1/macbinary.1 + man/man1/megatron.1 + man/man1/nbp.1 + man/man1/nbplkup.1 + man/man1/nbprgstr.1 + man/man1/nbpunrgstr.1 + man/man1/pap.1 + man/man1/papstatus.1 + man/man1/psorder.1 + man/man1/single2bin.1 + man/man1/timeout.1 + man/man1/unbin.1 + man/man1/unhex.1 + man/man1/uniconv.1.tmpl + man/man1/unsingle.1 + man/man3/Makefile.am + man/man3/atalk_aton.3 + man/man3/nbp_name.3 + man/man4/Makefile.am + man/man4/atalk.4 + man/man5/AppleVolumes.default.5.tmpl + man/man5/Makefile.am + man/man5/afpd.conf.5.tmpl + man/man5/atalkd.conf.5.tmpl + man/man5/netatalk.conf.5.tmpl + man/man5/papd.conf.5.tmpl + man/man8/Makefile.am + man/man8/afpd.8.tmpl + man/man8/atalkd.8.tmpl + man/man8/cnid_dbd.8.tmpl + man/man8/cnid_metad.8.tmpl + man/man8/papd.8.tmpl + man/man8/papstatus.8.tmpl + man/man8/psf.8.tmpl + man/man8/timelord.8 + services.atalk + sys/Makefile.am + sys/generic/Makefile.am + sys/generic/sys/Makefile.am + sys/generic/sys/cdefs.h + sys/netatalk/CVS/Entries + sys/netatalk/CVS/Repository + sys/netatalk/CVS/Root + sys/netatalk/CVS/Tag + sys/netatalk/Makefile.am + sys/netbsd/Makefile.am + sys/netbsd/netatalk/Makefile.am + sys/netbsd/netatalk/endian.h + sys/solaris/CVS/Entries + sys/solaris/CVS/Repository + sys/solaris/CVS/Root + sys/solaris/CVS/Tag + sys/solaris/Makefile.in + sys/solaris/aarp.c + sys/solaris/ddp.c + sys/solaris/ddp.conf + sys/solaris/dlpi.c + sys/solaris/if.c + sys/solaris/if.h + sys/solaris/ioc.c + sys/solaris/ioc.h + sys/solaris/linkage.c + sys/solaris/rt.c + sys/solaris/rt.h + sys/solaris/sock.c + sys/solaris/sock.h + sys/solaris/tpi.c + sys/sunos/Makefile.am + sys/sunos/Makefile.kernel + sys/sunos/at_sun.c + sys/ultrix/Makefile.am + sys/ultrix/Makefile.kernel + sys/ultrix/kpatch-4.1 + sys/ultrix/kpatch-4.2 +Copyright: *No copyright* +License: UNKNOWN + +Files: Makefile.in + bin/Makefile.in + bin/adv1tov2/Makefile.in + bin/aecho/Makefile.in + bin/afile/Makefile.in + bin/afppasswd/Makefile.in + bin/cnid/Makefile.in + bin/getzones/Makefile.in + bin/megatron/Makefile.in + bin/nbp/Makefile.in + bin/pap/Makefile.in + bin/psorder/Makefile.in + bin/uniconv/Makefile.in + config/Makefile.in + contrib/Makefile.in + contrib/a2boot/Makefile.in + contrib/macusers/Makefile.in + contrib/nu/Makefile.in + contrib/printing/Makefile.in + contrib/shell_utils/Makefile.in + contrib/timelord/Makefile.in + distrib/Makefile.in + distrib/config/Makefile.in + distrib/initscripts/Makefile.in + distrib/m4/Makefile.in + doc/Makefile.in + etc/Makefile.in + etc/afpd/Makefile.in + etc/atalkd/Makefile.in + etc/cnid_dbd/Makefile.in + etc/papd/Makefile.in + etc/psf/Makefile.in + etc/uams/Makefile.in + etc/uams/uams_krb4/Makefile.in + include/Makefile.in + include/atalk/Makefile.in + libatalk/Makefile.in + libatalk/adouble/Makefile.in + libatalk/asp/Makefile.in + libatalk/atp/Makefile.in + libatalk/cnid/Makefile.in + libatalk/cnid/cdb/Makefile.in + libatalk/cnid/db3/Makefile.in + libatalk/cnid/dbd/Makefile.in + libatalk/cnid/hash/Makefile.in + libatalk/cnid/last/Makefile.in + libatalk/cnid/mtab/Makefile.in + libatalk/cnid/tdb/Makefile.in + libatalk/compat/Makefile.in + libatalk/dsi/Makefile.in + libatalk/nbp/Makefile.in + libatalk/netddp/Makefile.in + libatalk/tdb/Makefile.in + libatalk/unicode/Makefile.in + libatalk/unicode/charsets/Makefile.in + libatalk/util/Makefile.in + macros/Makefile.in + man/Makefile.in + man/man1/Makefile.in + man/man3/Makefile.in + man/man4/Makefile.in + man/man5/Makefile.in + man/man8/Makefile.in + sys/Makefile.in + sys/generic/Makefile.in + sys/generic/sys/Makefile.in + sys/netatalk/Makefile.in + sys/netbsd/Makefile.in + sys/netbsd/netatalk/Makefile.in + sys/sunos/Makefile.in + sys/ultrix/Makefile.in +Copyright: 1994-2002 +License: UNKNOWN (GENERATED FILE) + +Files: bin/aecho/aecho.c + bin/nbp/nbplkup.c + bin/nbp/nbpunrgstr.c + bin/pap/papstatus.c + bin/psorder/pa.c + bin/psorder/pa.h + bin/psorder/psorder.c + bin/psorder/psorder.h + debian/patches/004_fix_solaris10_compilation.patch + etc/afpd/desktop.h + etc/afpd/directory.h + etc/afpd/file.h + etc/afpd/switch.c + etc/afpd/switch.h + etc/papd/comment.h + etc/papd/file.h + include/atalk/adouble.h + include/atalk/aep.h + include/atalk/afp.h + include/atalk/asp.h + include/atalk/atp.h + include/atalk/ddp.h + include/atalk/nbp.h + include/atalk/pap.h + include/atalk/rtmp.h + include/atalk/zip.h + libatalk/adouble/ad_flush.c + libatalk/adouble/ad_read.c + libatalk/asp/asp_child.h + libatalk/asp/asp_close.c + libatalk/asp/asp_cmdreply.c + libatalk/asp/asp_getreq.c + libatalk/asp/asp_init.c + libatalk/asp/asp_write.c + libatalk/atp/atp_bufs.c + libatalk/atp/atp_internals.h + libatalk/atp/atp_open.c + libatalk/atp/atp_packet.c + libatalk/atp/atp_rreq.c + libatalk/atp/atp_rresp.c + libatalk/atp/atp_sreq.c + libatalk/atp/atp_sresp.c + libatalk/nbp/nbp_conf.h + sys/netatalk/aarp.c + sys/netatalk/aarp.h + sys/netatalk/at.h + sys/netatalk/at_control.c + sys/netatalk/at_proto.c + sys/netatalk/at_var.h + sys/netatalk/ddp.h + sys/netatalk/ddp_output.c + sys/netatalk/endian.h + sys/ultrix/at_ultrix.c +Copyright: 1990-1991, Regents of The University of Michigan +License: UNKNOWN + +Files: bin/nbp/nbprgstr.c + debian/patches/003_fix_afp3_dir_error.patch + etc/afpd/afs.c + etc/afpd/appl.c + etc/afpd/auth.c + etc/afpd/auth.h + etc/afpd/directory.c + etc/afpd/enumerate.c + etc/afpd/file.c + etc/afpd/filedir.c + etc/afpd/fork.c + etc/afpd/fork.h + etc/afpd/globals.h + etc/afpd/main.c + etc/afpd/quota.c + etc/afpd/status.c + etc/afpd/unix.c + etc/afpd/volume.c + etc/atalkd/aep.c + etc/atalkd/config.c + etc/atalkd/gate.h + etc/atalkd/main.c + etc/atalkd/multicast.c + etc/atalkd/nbp.c + etc/atalkd/nbp.h + etc/atalkd/rtmp.c + etc/atalkd/rtmp.h + etc/atalkd/zip.c + etc/atalkd/zip.h + etc/papd/auth.c + etc/uams/uams_krb4/uams_krb4.c + libatalk/nbp/nbp_rgstr.c +Copyright: 1990,1993, Regents of The University of Michigan +License: UNKNOWN + +Files: bin/cnid/cnid2_create.in + etc/cnid_dbd/cnid_metad.c + etc/cnid_dbd/comm.c + etc/cnid_dbd/comm.h + etc/cnid_dbd/db_param.c + etc/cnid_dbd/db_param.h + etc/cnid_dbd/dbd.h + etc/cnid_dbd/dbd_add.c + etc/cnid_dbd/dbd_dbcheck.c + etc/cnid_dbd/dbd_delete.c + etc/cnid_dbd/dbd_get.c + etc/cnid_dbd/dbd_getstamp.c + etc/cnid_dbd/dbd_lookup.c + etc/cnid_dbd/dbd_resolve.c + etc/cnid_dbd/dbd_update.c + etc/cnid_dbd/dbif.c + etc/cnid_dbd/dbif.h + etc/cnid_dbd/main.c + etc/cnid_dbd/pack.c + etc/cnid_dbd/pack.h + etc/cnid_dbd/usockfd.c + etc/cnid_dbd/usockfd.h + libatalk/cnid/dbd/cnid_dbd.c + libatalk/cnid/dbd/cnid_dbd.h +Copyright: Joerg Lenneis 2003 +License: UNKNOWN + +Files: etc/afpd/afp_config.c + etc/afpd/messages.c + include/atalk/dsi.h + include/atalk/server_child.h + libatalk/adouble/ad_size.c + libatalk/asp/asp_attn.c + libatalk/dsi/dsi_attn.c + libatalk/dsi/dsi_close.c + libatalk/dsi/dsi_cmdreply.c + libatalk/dsi/dsi_getsess.c + libatalk/dsi/dsi_getstat.c + libatalk/dsi/dsi_init.c + libatalk/dsi/dsi_opensess.c + libatalk/dsi/dsi_private.h + libatalk/dsi/dsi_read.c + libatalk/dsi/dsi_tickle.c + libatalk/dsi/dsi_write.c + libatalk/util/server_child.c +Copyright: 1997, Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: libatalk/cnid/cdb/cnid_cdb_add.c + libatalk/cnid/cdb/cnid_cdb_delete.c + libatalk/cnid/cdb/cnid_cdb_meta.c + libatalk/cnid/cdb/cnid_cdb_open.c + libatalk/cnid/db3/cnid_db3_add.c + libatalk/cnid/db3/cnid_db3_delete.c + libatalk/cnid/db3/cnid_db3_meta.c + libatalk/cnid/db3/cnid_db3_open.c + libatalk/cnid/hash/cnid_hash_add.c + libatalk/cnid/hash/cnid_hash_delete.c + libatalk/cnid/hash/cnid_hash_open.c + libatalk/cnid/last/cnid_last.c + libatalk/cnid/mtab/cnid_mtab.c + libatalk/cnid/tdb/cnid_tdb_add.c + libatalk/cnid/tdb/cnid_tdb_delete.c + libatalk/cnid/tdb/cnid_tdb_open.c +Copyright: 1999. Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: bin/pap/pap.c + etc/afpd/gettok.c + etc/afpd/icon.h + etc/afpd/volume.h + etc/papd/comment.c + etc/papd/file.c + etc/papd/headers.c + etc/papd/magics.c + etc/papd/queries.c + etc/papd/session.c + etc/uams/uams_krb4/kuam.c + sys/netatalk/ddp_input.c + sys/netatalk/ddp_usrreq.c + sys/netatalk/ddp_var.h +Copyright: 1990,1994, Regents of The University of Michigan +License: UNKNOWN + +Files: libatalk/unicode/charsets/generic_mb.c + libatalk/unicode/charsets/mac_centraleurope.c + libatalk/unicode/charsets/mac_cyrillic.c + libatalk/unicode/charsets/mac_hebrew.c + libatalk/unicode/charsets/mac_roman.c + libatalk/unicode/charsets/mac_turkish.c + libatalk/unicode/iconv.c + libatalk/unicode/utf8.c +Copyright: Andrew Tridgell 2001, + Jelmer Vernooij 2002-2003 +License: GPL-2+ + +Files: etc/uams/uams_dhx2_pam.c + etc/uams/uams_dhx2_passwd.c + etc/uams/uams_dhx_pam.c + etc/uams/uams_dhx_passwd.c + etc/uams/uams_pam.c + etc/uams/uams_passwd.c + etc/uams/uams_pgp.c + etc/uams/uams_randnum.c +Copyright: 1990,1993, Regents of The University of Michigan + 1999, Adrian Sun (asun@u.washington.edu) +License: UNKNOWN + +Files: etc/atalkd/multicast.h + libatalk/atp/atp_close.c + libatalk/atp/atp_rsel.c + libatalk/nbp/nbp_lkup.c + libatalk/nbp/nbp_unrgstr.c + libatalk/nbp/nbp_util.c +Copyright: 1990,1997, Regents of The University of Michigan +License: UNKNOWN + +Files: etc/afpd/uam.c + etc/afpd/uam_auth.h + etc/papd/uam.c + etc/papd/uam_auth.h + include/atalk/netddp.h + include/atalk/uam.h +Copyright: 1999, Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: libatalk/unicode/charsets/mac_centraleurope.h + libatalk/unicode/charsets/mac_cyrillic.h + libatalk/unicode/charsets/mac_greek.h + libatalk/unicode/charsets/mac_hebrew.h + libatalk/unicode/charsets/mac_turkish.h +Copyright: 1999-2001, Free Software Foundation, Inc +License: LGPL-2+ + +Files: etc/papd/main.c + etc/papd/printer.h + etc/psf/psa.c + etc/psf/psf.c + libatalk/adouble/ad_write.c +Copyright: 1990,1995, Regents of The University of Michigan +License: UNKNOWN + +Files: bin/afile/achfile.c + bin/afile/afile.c + bin/afile/common.c + bin/afile/common.h +Copyright: 2001, Sebastian Rittau +License: BSD (3 clause) + +Files: etc/afpd/afprun.c + libatalk/unicode/byteorder.h + libatalk/util/fault.c + libatalk/util/strlcpy.c +Copyright: Andrew Tridgell 1992-1998 +License: GPL-2+ + +Files: etc/atalkd/atserv.h + etc/atalkd/interface.h + etc/atalkd/list.h +Copyright: 1990,1992, Regents of The University of Michigan +License: UNKNOWN + +Files: etc/afpd/afp_asp.c + etc/afpd/afp_options.c + libatalk/util/server_lock.c +Copyright: 1990,1993, Regents of The University of Michigan + 1997, Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: etc/papd/ppd.c + etc/papd/ppd.h + etc/papd/showppd.c +Copyright: 1995, Regents of The University of Michigan +License: UNKNOWN + +Files: etc/afpd/ofork.c + include/atalk/compat.h + libatalk/asp/asp_shutdown.c +Copyright: 1996, Regents of The University of Michigan +License: UNKNOWN + +Files: libatalk/netddp/netddp_open.c + libatalk/netddp/netddp_recvfrom.c + libatalk/netddp/netddp_sendto.c +Copyright: 1999, Adrian Sun (asun@zoology.washington.edu) + 1990-1991, Regents of The University of Michigan +License: UNKNOWN + +Files: include/atalk/cnid.h + libatalk/cnid/cnid.c + libatalk/cnid/cnid_init.c +Copyright: 2003, Rafal Lewczuk + 2003, the Netatalk Team + holders +License: UNKNOWN + +Files: etc/papd/lp.c + etc/papd/printcap.c +Copyright: 1983, Regents of the University of California + 1990,1994, Regents of The University of Michigan +License: BSD (4 clause) + +Files: compile + depcomp +Copyright: 1999-2000, 2003-2005, Free Software Foundation, Inc +License: GPL (GENERATED FILE) + +Files: contrib/shell_utils/cleanappledouble.pl + contrib/shell_utils/cleanappledouble.pl.in +Copyright: 2001, Heath Kehoe +License: GPL-2+ + +Files: contrib/shell_utils/afpd-mtab.pl + contrib/shell_utils/afpd-mtab.pl.in +Copyright: *No copyright* +License: UNKNOWN (GENERATED FILE) + +Files: libatalk/compat/mktemp.c + libatalk/compat/strcasecmp.c +Copyright: 1987, Regents of the University of California +License: UNKNOWN + +Files: contrib/a2boot/a2boot.c + contrib/timelord/timelord.c +Copyright: 1990, The University of Melbourne + 1990,1992, Regents of The University of Michigan + 1990, The University of +License: UNKNOWN + +Files: contrib/a2boot/COPYRIGHT + contrib/timelord/COPYRIGHT +Copyright: 1990,1994, Regents of The University of Michigan + 1990, The University of Melbourne + 1990, The University of +License: UNKNOWN + +Files: etc/atalkd/route.c + libatalk/asp/asp_getsess.c +Copyright: 1990,1996, Regents of The University of Michigan +License: UNKNOWN + +Files: macros/ltsugar.m4 + macros/lt~obsolete.m4 +Copyright: 2004-2005, 2007, Free Software Foundation, Inc +License: UNKNOWN + +Files: contrib/a2boot/Makefile.am + debian/patches/107_afpd-zeroconf.patch +Copyright: VERSION +License: UNKNOWN + +Files: libatalk/compat/strstr.c +Copyright: 1990, The Regents of the University of California +License: BSD (4 clause) + +Files: missing +Copyright: 1996-1997, 1999-2000, 2002-2005 +License: GPL (GENERATED FILE) + +Files: debian/cdbs/1/rules/buildinfo.mk +Copyright: 2004-2007, Jonas Smedegaard +License: GPL + +Files: debian/cdbs/1/rules/upstream-tarball.mk +Copyright: 2007-2008, Jonas Smedegaard +License: GPL + +Files: debian/cdbs/1/rules/package-relations.mk +Copyright: 2008, Jonas Smedegaard +License: GPL + +Files: debian/cdbs/1/rules/copyright-check.mk +Copyright: \s*(\S.*?)\s*\ +License: GPL + +Files: config.guess +Copyright: 1992-1999, + 1992-2001 +License: GPL-2+ (GENERATED FILE) + +Files: config.sub +Copyright: 1992-1999 +License: GPL-2+ (GENERATED FILE) + +Files: libatalk/unicode/charsets/mac_roman.h +Copyright: *No copyright* +License: GPL-2+ + +Files: macros/libtool.m4 +Copyright: 1996-2001, 2003-2005 +License: GPL-2+ + +Files: ltmain.sh +Copyright: 1996-2001, 2003-2007, 2008 Free Software Foundation, Inc +License: GPL-2+ + +Files: libatalk/adouble/ad_sendfile.c +Copyright: 1999, Adrian Sun (asun@zoology.washington.edu) + Jeremy Allison 2002 +License: GPL-2+ + +Files: etc/papd/print_cups.c +Copyright: 1999-2003, by Michael R Sweet + 2004, Bjoern Fernhomberg +License: GPL-2+ + +Files: include/atalk/tdb.h +Copyright: Andrew Tridgell 1999 +License: GPL-2+ + +Files: libatalk/tdb/spinlock.c +Copyright: Anton Blanchard 2001 +License: GPL-2+ + +Files: bin/uniconv/iso8859_1_adapted.c +Copyright: Bjoern Fernhomberg 2002-2003 +License: GPL-2+ + +Files: bin/uniconv/uniconv.c +Copyright: Bjoern Fernhomberg 2004 +License: GPL-2+ + +Files: libatalk/util/volinfo.c +Copyright: Bjoern Fernhomberg, 2004 +License: GPL-2+ + +Files: libatalk/tdb/tdb.c +Copyright: Luke Kenneth Casson Leighton 2000, + Jeremy Allison 2000-2003, + Paul `Rusty' Russell 2000, + Andrew Tridgell 1999-2000 +License: GPL-2+ + +Files: libatalk/unicode/charcnv.c +Copyright: Martin Pool 2003, + Andrew Tridgell 2001, + Igor Vergeichik 2001, + Simo Sorce 2001 +License: GPL-2+ + +Files: libatalk/unicode/charsets/mac_greek.c +Copyright: Panos Christeas 2006, + Andrew Tridgell 2001, + Jelmer Vernooij 2002-2003 +License: GPL-2+ + +Files: libatalk/util/strcasestr.c +Copyright: 1994, 1996-1997, Free Software Foundation, Inc +License: LGPL-2+ + +Files: install-sh +Copyright: 1994, X Consortium +License: MIT/X11 (BSD like) + +Files: configure +Copyright: 1992-1996, 1998-2001 +License: UNKNOWN (GENERATED FILE) + +Files: etc/afpd/nfsquota.c +Copyright: 1980, 1990, 1993 +License: UNKNOWN + +Files: libatalk/compat/rquota_xdr.c +Copyright: 1980, 1990, Regents of the University of California. All +License: UNKNOWN + +Files: libatalk/compat/getusershell.c +Copyright: 1985, Regents of the University of California +License: UNKNOWN + +Files: sys/netatalk/phase2.h +Copyright: 1988, Regents of the University of California + 1990-1991, Regents of The University of Michigan +License: UNKNOWN + +Files: COPYING +Copyright: 1989, 1991, Free Software Foundation, Inc + the software, and +License: UNKNOWN + +Files: etc/afpd/catsearch.c +Copyright: 1990, 1993, Regents of The University of Michigan +License: UNKNOWN + +Files: etc/afpd/afp_dsi.c +Copyright: 1990,1993, Regents of The University of Michigan + 1999, Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: libatalk/util/getiface.c +Copyright: 1990,1993, Regents of The University of Michigan + 1999-2000, Adrian Sun +License: UNKNOWN + +Files: etc/uams/uams_krb4/send_to_kdc.c +Copyright: 1990,1994, Regents of The University of Michigan + 1987-1988, by the Massachusetts Institute of Technology +License: UNKNOWN + +Files: debian/patches/006_CVS_sync_20090121.patch +Copyright: 1990,1994, Regents of The University of Michigan + 1990,1993, Regents of The University of Michigan +License: UNKNOWN + +Files: distrib/initscripts/rc.atalk.suse.tmpl +Copyright: 1996-2001, SuSE GmbH Nuernberg, Germany. All rights reserved +License: UNKNOWN + +Files: libatalk/dsi/dsi_tcp.c +Copyright: 1997-1998, Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: COPYRIGHT +Copyright: 1997-2000, Adrian Sun (asun@cobalt.com) + 1996, by Sun Microsystems Computer Co + 1990,1996, Regents of The University of Michigan +License: UNKNOWN + +Files: libatalk/dsi/dsi_stream.c +Copyright: 1998, Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: libatalk/adouble/ad_open.c +Copyright: 1999, Adrian Sun (asun@u.washington.edu) + 1990-1991, Regents of The University of Michigan +License: UNKNOWN + +Files: bin/afppasswd/afppasswd.c +Copyright: 1999, Adrian Sun (asun@u.washington.edu) +License: UNKNOWN + +Files: aclocal.m4 +Copyright: 1999-2008, Free Software Foundation, Inc + 1996-2004 +License: UNKNOWN + +Files: etc/uams/uams_guest.c +Copyright: 2001, (see COPYING) +License: UNKNOWN + +Files: etc/afpd/afp_util.c +Copyright: 2002, netatalk + 1990,1993, Regents of The University of Michigan + 1999, Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: etc/afpd/mangle.c +Copyright: 2002. Joe Marcus Clarke (marcus@marcuscom.com) +License: UNKNOWN + +Files: etc/uams/uams_gss.c +Copyright: 2003, The Reed Institute + 1990,1993, Regents of The University of Michigan + 1999, Adrian Sun (asun@u.washington.edu) + 2004, Bjoern Fernhomberg +License: UNKNOWN + +Files: macros/ltversion.m4 +Copyright: 2004, Free Software Foundation, Inc +License: UNKNOWN + +Files: macros/ltoptions.m4 +Copyright: 2004-2005, 2007-2008, Free Software Foundation, Inc +License: UNKNOWN + +Files: Makefile.am +Copyright: COPYING NEWS\ +License: UNKNOWN + +Files: contrib/timelord/Makefile.am +Copyright: README VERSION +License: UNKNOWN + +Files: man/man1/netatalk-config.1 +Copyright: \(co 1998, Owen Taylor +License: UNKNOWN + +Files: libatalk/adouble/ad_lock.c +Copyright: for more information + 1998-1999, Adrian Sun (asun@zoology.washington.edu) +License: UNKNOWN + +Files: libatalk/compat/snprintf.c +Copyright: in the documentation and source code as well as the + 1994-2000, Patrick Powell, San Diego, CA +License: UNKNOWN + +Files: contrib/timelord/README +Copyright: is *not* the same as netatalk's +License: UNKNOWN + +Files: bin/getzones/getzones.c +Copyright: { +License: UNKNOWN + --- netatalk-2.0.4~beta2.orig/debian/control +++ netatalk-2.0.4~beta2/debian/control @@ -0,0 +1,27 @@ +Source: netatalk +Section: net +Priority: extra +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Jonas Smedegaard +Build-Depends: cdbs (>= 0.4.39), autotools-dev, debhelper (>= 5.0.44), quilt, patchutils (>= 0.2.25), dh-buildinfo, devscripts (>= 2.10.7), libdb4.6-dev, libwrap0-dev, libpam0g-dev, libavahi-client-dev (>= 0.6), libcupsys2-dev, libkrb5-dev, libltdl7-dev, libgcrypt11-dev | libgcrypt-dev, cracklib-dev, d-shlibs (>> 0.19) +Build-Conflicts: libavahi-compat-libdnssd-dev +Uploaders: Sebastian Rittau , Jonas Smedegaard +Vcs-Git: git://git.debian.org/git/collab-maint/netatalk.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/netatalk.git;a=summary +Standards-Version: 3.7.2 +Homepage: http://netatalk.sourceforge.net/ + +Package: netatalk +Section: net +Architecture: any +Depends: netbase, libpam-modules, ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends} +Recommends: lsof, rc, db4.6-util, procps, cracklib-runtime, libpam-cracklib +Suggests: tetex-bin, quota, timeout +Description: AppleTalk user binaries + Netatalk is an implementation of the AppleTalk Protocol Suite for + BSD-derived systems. The current release contains support for + EtherTalk Phase I and II, DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, and + AFP. + . + This package contains all daemon and utility programs as well as Netatalk's + static libraries. --- netatalk-2.0.4~beta2.orig/debian/watch +++ netatalk-2.0.4~beta2/debian/watch @@ -0,0 +1,5 @@ +# Run the "uscan" command to check for upstream updates and more. +version=3 +# use qa.debian.org redirector; see man uscan +opts=uversionmangle=s/(beta)/~$1/ \ + http://sf.net/netatalk/netatalk-(\d.*)\.tar\.gz debian --- netatalk-2.0.4~beta2.orig/debian/README.cdbs-tweaks +++ netatalk-2.0.4~beta2/debian/README.cdbs-tweaks @@ -0,0 +1,128 @@ +CDBS tweak +========== + +CDBS is great. In some corner cases, however, some parts of CDBS +sometimes needs a few tweaks to work optimally. + +This is a collection of such tweaks. The goal is for these tweaks to be +absorbed into upstream CDBS. We just haven't found time yet to discuss +them at the CDBS developers' mailinglist. And possible we do not all +agree that the tweaks are so great - therefore this "staging area". + +If you found this file below debian/ subdir in a source package, most +probably only a subset of the below mentioned tweaks are relevant and +have been shipped with the package. The repository of all these tweaks +is here: svn://svn.debian.org/build-common/people/js/overlay/ + +Web access: http://svn.debian.org/wsvn/build-common/people/js/overlay/ + + + +New buildinfo rule +------------------ + +See package description for "buildinfo" for more info. + + + +Improved support for multiple compilations +------------------------------------------ + +Create and clean builddir _after_ resolving per-package DEB_BUILDDIR. + +Honour per-package DEB_BUILDDIR in makefile and autotools classes. + +Support multiple build flavors in makefile and autotools classes. + + + +Various improvements to python-distutils class +---------------------------------------------- + +Use full path to Python interpreter (Python Policy section 1.3.2). + +Add CDBS_BUILD_DEPENDS to old policy method. + +Fix CDBS_BUILD_DEPENDS in new policy methods to only depend on debhelper +when actually used. + +Fix DEB_PYTHON_SIMPLE_PACKAGES sometimes installed twice (and only one +of them honouring DEB_PYTHON_COMPILE_VERSION). + +Unify install path using new DEB_PYTHON_DESTDIR. + +Quote install path. + + + +New python-autotools class +-------------------------- + +Handle autotools-based Python packaging. + + + +New python-sugar class +---------------------- + +Handle packaging of Sugar activities. + + + +New perl-build class +-------------------- + +Handle Perl modules using Module::Build. + + + +New copyright-check rule +------------------------ + +Refuse to build if the source is found to contain different copyright +info than earlier builds. + + + +New kernelpatches rule +---------------------- + +Small wrapper around dh-kpatches, taking care of build-dependencies too. + + + +New package-relations rule +-------------------------- + +Improved build-dependency handling (merging multiple dependencies on +same packages), and add dependency handling for binary packages (to ease +maintaining identical build-dependencies and dependencies for eg. Perl +modules meeding runtime stuff for buildtime tests). + + + +New routines for handling upstream tarball +------------------------------------------ + +Rules and variables to help downloading, validating and repackaging +upstream tarball. + +Implements the rules print-version and get-orig-source commonly used +for group-maintained packages with Debian-specific patches maintained in +SVN or some other VCS, and automated fetching virgin upstream tarball +(possibly massaged after download e.g. to strip non-DFSG material). + + + +Support for custom BTS info +--------------------------- + +Include BTS control info found in debian/*.bts files, or alternatively +redirect bug reports to the email address defined in DEB_BTS_EMAIL. + + + +New dict class +-------------- + +Rules for packaging ispell, aspell, myspell and wordlist dictionaries. --- netatalk-2.0.4~beta2.orig/debian/README.Debian +++ netatalk-2.0.4~beta2/debian/README.Debian @@ -0,0 +1,88 @@ +This is the pre-packaged Debian version of the Netatalk protocol suite. +To find out more about netatalk, visit http://netatalk.sourceforge.net/ + +This package was originally put together by Klee Dienes and +was later maintained by late Joel 'espy' Klecker and David Huggins-Daines +. It was repackaged by its current maintainer Sebastian Rittau +. + + +Notes about OpenSSL +=================== + +OpenSSL support is currently disabled, because of licensing issues: The Free +Software Foundation and Debian consider the GNU General Public License (GPL) +under which Netatalk is licensed to be incompatible with the OpenSSL license. + +Thanks to gcrypt support (introduced in netatalk 2.0.4beta2) the DHX2 UAM +provides encrypted access for MacOS X 10.4 and newer, but older releases of +MacOS X and MacOS Classic can only connect unencrypted as both of the UAMs DHX +and Randnum requires OpenSSL support. + +You can get and recompile the source package locally using the following +commands (replace XXX with the actual version of the package): + + apt-get source netatalk + cd netatalk-XXX + DEB_MAINTAINER_MODE=1 DEB_BUILD_OPTIONS=openssl debuild + cd .. + aptitude install netatalk-XXX.deb + +Alternatively you can use an unofficial(!) precompiled binary package: + +deb http://debian.jones.dk/ $DIST netatalk + + +MacOS X Specific Notes +====================== + +MacOS X 10.5.x handles group access differently than earlier releases. +It might work to add "perm:0770 option:upriv" to each share line in +/etc/netatalk/AppleVolumes.default (note the use of "option" without +trailing "s"). + +There were problems reported with MacOS X clients and DDP connection. +The symptom of is the lack of the server name in the chooser of MacOS X +clients. To work around this problem, you have to insert the server's +hostname and IP addresses into the file /etc/hosts. Supposing the server +is called foo.bar.com and the IP addresses are 192.168.1.1 and 192.168.55.23 +this will look like this: + +192.168.1.1 foo.bar.com foo +102.168.55.23 foo.bar.com foo + + +Upgrading Problems +================== + +This version of Netatalk switches to Berkeley DB 4.2. During the development +process of Debian 3.1 (sarge) earlier versions of BDB (3.0 and 4.0) were used. +As Netatalk does not automatically update its database, you may experience +problems like those described in bug #200373: no files showing up in your +folders. This problem should not concern you if you are upgrading from Debian +3.0 (woody). + +If you have such problems, you may try to upgrade the database manually by +running the following commands (please set APPLE_DIR to the path to your +shared files): + + For upgrading from Netatalk 1.6.2-1 or below (you need the packages + libdb3-util and db4.1-util installed): + + for db in `find $APPLE_DIR -name ".AppleDB/*.db"`; do \ + db3_dump -f $db.data $db; \ + mv $db $db.old; \ + db4.0_load -f $db.data $db; \ + done + + For upgrading from Netatalk 1.6.2-2 or up (you need the packages + libdb4.0-util and db4.1-util installed): + + for db in `find $APPLE_DIR -name ".AppleDB/*.db"`; do \ + db3_dump -f $db.data $db; \ + mv $db $db.old; \ + db4.0_load -f $db.data $db; \ + done + +If this does not work, you can just delete the database files, but please note +that this will destroy all stored meta information about these files! --- netatalk-2.0.4~beta2.orig/debian/examples/netatalk_update.sh +++ netatalk-2.0.4~beta2/debian/examples/netatalk_update.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# This script was found here: +# http://netatalk.sourceforge.net/wiki/index.php/DebianUpgradeto2 + +DIR="$1" +NEWDIR="${DIR}/.AppleDB" + +# Name binaries +DBDUMPORIG=/usr/bin/db4.1_dump +DBDUMPNEW=/usr/bin/db4.2_dump +DBLOADNEW=/usr/bin/db4.2_load +CNIDCREATOR=/usr/bin/cnid2_create + +( [ -d "${DIR}" ] || [ -d "${NEWDIR}" ] ) || { + echo 'Directory not supplied or does not exist. Aborting' + exit 1 +} + +([ -x ${DBDUMPORIG} ] && [ -x ${DBDUMPNEW} ] && [ -x ${DBLOADNEW} ] && [ -x ${CNIDCREATOR} ]) || { + echo 'Could not find database binaries. Aborting' + exit 1 +} + +echo "About to process \"${DIR}\"" +echo -n "Press ^C to abort " + +for ii in [ 0..6 ]; do + echo -n "." + sleep 1 +done +echo "." + +echo "Changing to \"${NEWDIR}\" directory ..." +cd "${NEWDIR}" + +echo -n "Current directory " +pwd + +sleep 2 +echo "------------------------------------------------------------------" + +echo "Dumping cnid.db ..." +${DBDUMPORIG} -f cnid.dump cnid.db + +echo "Dumping didname.db ..." +${DBDUMPORIG} -f didname.dump didname.db + +echo "Making new cnid2 database ..." +${CNIDCREATOR} ../ + +echo "Deleting old log and info files ..." +rm -f __db.* log.* + +echo "Zipping original cnid.db and cnid.dump files." +echo "(This avoids uniconv failing on finding a version 1 cnid database)" +gzip cnid.db +gzip cnid.dump + +echo + +echo "Loading new cnid2 database ..." +${DBLOADNEW} -f cnid2.dump cnid2.db + +echo +echo "------------------------------------------------------------------" +echo "Done." +echo + +echo "Please now check the permissions of the cnid2.db file." +echo "The cnid2.db must have the same uid:gid as the volume owner." + +exit 0 --- netatalk-2.0.4~beta2.orig/debian/cdbs/1/rules/copyright-check.mk +++ netatalk-2.0.4~beta2/debian/cdbs/1/rules/copyright-check.mk @@ -0,0 +1,113 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2005-2008 Jonas Smedegaard +# Description: Check for changes to copyright notices in source +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_copyright_check +_cdbs_rules_copyright_check := 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), devscripts (>= 2.10.7) + +# Set to yes to fail on changed/new hints are found +#DEB_COPYRIGHT_CHECK_STRICT := yes + +# Single regular expression for files to include or ignore +DEB_COPYRIGHT_CHECK_REGEX = .* +#DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\..*)?)$ +DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^debian/(changelog|copyright(|_hints|_newhints))$ + +pre-build:: debian/stamp-copyright-check + +debian/stamp-copyright-check: + @echo 'Scanning upstream source for new/changed copyright notices...' + @echo licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + "| some-output-filtering..." + +# Perl in shell in make requires extra care: +# * Single-quoting ('...') protects against shell expansion +# * Double-dollar ($$) expands to plain dollar ($) in make + @licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + | LC_ALL=C perl -e \ + 'print "Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=XXX\n";'\ + 'print "Upstream-Name: Untrusted draft - double-check copyrights yourself!\n\n";'\ + '$$n=0; while (<>) {'\ + ' s/[^[:print:]]//g;'\ + ' if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\ + ' $$files[$$n]{name}=$$1;'\ + ' $$files[$$n]{license}=$$2;'\ + ' };'\ + ' if (/^\s*\[Copyright:\s*(\S.*?)\s*\]/) {'\ + ' $$files[$$n]{copyright}=$$1;'\ + ' };'\ + ' /^$$/ and $$n++;'\ + '};'\ + 'foreach $$file (@files) {'\ + ' $$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\ + ' $$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\ + ' $$file->{license} =~ s/\s+\(v([^)]+)\)/-$$1/;'\ + ' $$file->{license} =~ s/\s*(\*No copyright\*)\s*// and $$file->{copyright} = $$1;'\ + ' $$file->{license} =~ s/^\s*(GENERATED FILE)/UNKNOWN ($$1)/;'\ + ' $$file->{license} =~ s/\s+(GENERATED FILE)/ ($$1)/;'\ + ' $$file->{copyright} =~ s/(?<=(\b\d{4}))(?{$$y=$$^N})\s*[,-]\s*((??{$$y+1}))\b/-$$2/g;'\ + ' $$file->{copyright} =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;'\ + ' $$file->{copyright} =~ s/\b(\d{4})\s+([\S^\d])/$$1, $$2/g;'\ + ' $$file->{copyright} =~ s/^\W*\s+\/\s+//g;'\ + ' $$file->{copyright} =~ s/\s+\/\s+\W*$$//;'\ + ' $$file->{copyright} =~ s/\s+\/\s+/\n\t/g;'\ + ' $$pattern = "$$file->{license} [$$file->{copyright}]";'\ + ' push @{ $$patternfiles{"$$pattern"} }, $$file->{name};'\ + '};'\ + 'foreach $$pattern ( sort {'\ + ' @{$$patternfiles{$$b}} <=> @{$$patternfiles{$$a}}'\ + ' ||'\ + ' $$a cmp $$b'\ + ' } keys %patternfiles ) {'\ + ' ($$license, $$copyright) = $$pattern =~ /(.*) \[(.*)\]/s;'\ + ' print "Files: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\ + ' print "Copyright: $$copyright\n";'\ + ' print "License: $$license\n\n";'\ + '};'\ + > debian/copyright_newhints + @patterncount="`cat debian/copyright_newhints | sed 's/^[^:]*://' | LANG=C sort -u | grep . -c -`"; \ + echo "Found $$patterncount different copyright and licensing combinations." + @if [ ! -f debian/copyright_hints ]; then touch debian/copyright_hints; fi + @newstrings=`diff -u debian/copyright_hints debian/copyright_newhints | sed '1,2d' | egrep '^\+' - | sed 's/^\+//'`; \ + if [ -n "$$newstrings" ]; then \ + echo "$(if $(DEB_COPYRIGHT_CHECK_STRICT),ERROR,WARNING): The following new or changed copyright notices discovered:"; \ + echo; \ + echo "$$newstrings"; \ + echo; \ + echo "To fix the situation please do the following:"; \ + echo " 1) Investigate the above changes and update debian/copyright as needed"; \ + echo " 2) Replace debian/copyright_hints with debian/copyright_newhints"; \ + $(if $(DEB_COPYRIGHT_CHECK_STRICT),exit 1,:); \ + else \ + echo 'No new copyright notices found - assuming no news is good news...'; \ + rm -f debian/copyright_newhints; \ + fi + touch $@ + +clean:: + rm -f debian/stamp-copyright-check + +endif --- netatalk-2.0.4~beta2.orig/debian/cdbs/1/rules/package-relations.mk +++ netatalk-2.0.4~beta2/debian/cdbs/1/rules/package-relations.mk @@ -0,0 +1,50 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2008 Jonas Smedegaard +# Description: Resolve, cleanup and apply package relationships +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_package_relations +_cdbs_rules_package_relations = 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +# Merge build-dependencies on same packages +# TODO: rewrite (in perl, probably) to be more generic +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.43)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\|0.4.39\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.27)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.44)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.37.2)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.28)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.21)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\)) *,* */, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.0)/ s/ *,* *\bdebhelper (>= \(4.1.60\)) *,* */, /g') + +# Cleanup superfluous commas +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e 's/ *,/,/g' -e 's/^ *, *//' -e 's/ *, *$$//') + +# Apply CDBS-declared dependencies to binary packages +$(patsubst %,binary-predeb/%,$(DEB_PACKAGES)) :: binary-predeb/%: + echo 'cdbs:Depends=$(CDBS_DEPENDS_ALL), $(or $(CDBS_DEPENDS_$(cdbs_curpkg)),$(CDBS_DEPENDS))' \ + | sed -e 's/ *,/,/g' -e 's/^ *, *//' -e 's/ *, *$$//' \ + >> debian/$(cdbs_curpkg).substvars + +endif --- netatalk-2.0.4~beta2.orig/debian/cdbs/1/rules/upstream-tarball.mk +++ netatalk-2.0.4~beta2/debian/cdbs/1/rules/upstream-tarball.mk @@ -0,0 +1,137 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2007-2008 Jonas Smedegaard +# Description: Convenience rules for dealing with upstream tarballs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_upstream_tarball +_cdbs_rules_upstream_tarball := 1 + +include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.39) + +# Prefix for upstream location of all upstream tarballs (mandatory!) +#DEB_UPSTREAM_URL = + +DEB_UPSTREAM_PACKAGE = $(DEB_SOURCE_PACKAGE) +DEB_UPSTREAM_TARBALL_VERSION = $(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_VERSION:$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)=),$(DEB_UPSTREAM_VERSION)) +DEB_UPSTREAM_TARBALL_EXTENSION = tar.gz +# Checksum to ensure integrity of downloadeds using get-orig-source (optional) +#DEB_UPSTREAM_TARBALL_MD5 = + +DEB_UPSTREAM_WORKDIR = ../tarballs + +# Base filename (without extension) as used in upstream URL +DEB_UPSTREAM_TARBALL_BASENAME = $(DEB_UPSTREAM_PACKAGE)-$(DEB_UPSTREAM_TARBALL_VERSION) + +# Perl regexp to change locally used string into that in upstream URL and srcdir +#DEB_UPSTREAM_TARBALL_BASENAME_MANGLE = + +# Base directory within tarball +DEB_UPSTREAM_TARBALL_SRCDIR = $(cdbs_upstream_tarball_basename) + +# Space-delimited list of directories and files to strip (optional) +#DEB_UPSTREAM_REPACKAGE_EXCLUDE = CVS .cvsignore doc/rfc*.txt doc/draft*.txt +DEB_UPSTREAM_REPACKAGE_TAG = dfsg +DEB_UPSTREAM_REPACKAGE_DELIMITER = ~ + +cdbs_upstream_tarball_basename = $(if $(strip $(DEB_UPSTREAM_TARBALL_BASENAME_MANGLE)),$(shell echo '$(DEB_UPSTREAM_TARBALL_BASENAME)' | perl -pe '$(DEB_UPSTREAM_TARBALL_BASENAME_MANGLE)'),$(DEB_UPSTREAM_TARBALL_BASENAME)) +cdbs_upstream_tarball = $(cdbs_upstream_tarball_basename).$(DEB_UPSTREAM_TARBALL_EXTENSION) +cdbs_upstream_received_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.$(if $(findstring $(DEB_UPSTREAM_TARBALL_EXTENSION),tgz),tar.gz,$(DEB_UPSTREAM_TARBALL_EXTENSION)) +cdbs_upstream_local_basename = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION)$(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)) +cdbs_upstream_local_srcdir = $(cdbs_upstream_tarball_basename)$(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)) + +# # These variables are deprecated +_cdbs_deprecated_vars += DEB_UPSTREAM_TARBALL DEB_UPSTREAM_LOCAL_TARBALL DEB_UPSTREAM_REPACKAGE_TARBALL DEB_UPSTREAM_TARBALL_VERSION_MANGLE +_cdbs_deprecated_vars += DEB_UPSTREAM_REPACKAGE_EXCLUDES +DEB_UPSTREAM_REPACKAGE_EXCLUDE += $(DEB_UPSTREAM_REPACKAGE_EXCLUDES) + +print-version: + @@echo "Debian version: $(DEB_VERSION)" + @@echo "Upstream version: $(DEB_UPSTREAM_TARBALL_VERSION)" + +get-orig-source: + @@dh_testdir + @@mkdir -p "$(DEB_UPSTREAM_WORKDIR)" + + @if [ ! -s "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ] ; then \ + if [ -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ] ; then \ + rm "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \ + fi ; \ + echo "Downloading $(cdbs_upstream_received_tarball) from $(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball) ..." ; \ + wget -nv -T10 -t3 -O "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" "$(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball)" ; \ + else \ + echo "Upstream source tarball have been already downloaded: $(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \ + fi + + @md5current=`md5sum "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" | sed -e 's/ .*//'`; \ + if [ -n "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \ + if [ "$$md5current" != "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \ + echo "Expecting upstream tarball md5sum $(DEB_UPSTREAM_TARBALL_MD5), but $$md5current found" ; \ + echo "Upstream tarball md5sum is NOT trusted! Possible upstream tarball forge!" ; \ + echo "Purging downloaded file. Try new download." ; \ + rm -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \ + false ; \ + else \ + echo "Upstream tarball is trusted!" ; \ + fi; \ + else \ + echo "Upstream tarball NOT trusted (current md5sum is $$md5current)!" ; \ + fi + +# TODO: Rewrite using make variables like cdbs_upstream_unpack_cmd and +# DEB_UPSTREAM_SUPPORTED_COMPRESSIONS (recent dpkg supports bz2) +# TODO: Add .orig suffix to top folder inside tarball when only +# recompressing (when $uncompress set and ...REPACKAGE_EXCLUDE unset) + @untar="tar -x -C"; \ + case "$(cdbs_upstream_received_tarball)" in \ + *.tar.gz) unpack="gunzip -c";; \ + *.tar.bz2) unpack="bunzip2 -c"; uncompress="bunzip2";; \ + *.tar.Z) unpack="uncompress -c"; uncompress="uncompress";; \ + *.zip) unpack="unzip -q"; uncompress="false"; untar="-d"; nopipe="true";; \ + *.tar) unpack="cat"; uncompress="true";; \ + *) echo "Unknown extension for upstream tarball $(cdbs_upstream_received_tarball)"; false;; \ + esac && \ + if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ] || [ "$$uncompress" = "false" ]; then \ + echo "Repackaging tarball ..." && \ + mkdir -p "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" && \ + if [ -n "$$nopipe" ]; then \ + $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" \ + $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \ + else \ + $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" \ + | $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \ + fi && \ + if [ "$(DEB_UPSTREAM_TARBALL_SRCDIR)" != "$(cdbs_upstream_local_srcdir)" ]; then \ + mv -T "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(DEB_UPSTREAM_TARBALL_SRCDIR)" "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(cdbs_upstream_local_srcdir)"; \ + fi && \ + GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_basename).orig.tar.gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_local_srcdir)" && \ + echo "Cleaning up" && \ + rm -rf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)"; \ + elif [ -n "$$uncompress" ]; then \ + echo "Recompressing tarball ..." && \ + $$uncompress "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)"; \ + gzip -9 "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_basename).orig.tar"; \ + fi + +DEB_PHONY_RULES += print-version get-orig-source + +endif --- netatalk-2.0.4~beta2.orig/debian/cdbs/1/rules/buildinfo.mk +++ netatalk-2.0.4~beta2/debian/cdbs/1/rules/buildinfo.mk @@ -0,0 +1,40 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2007 Jonas Smedegaard +# Description: Generate and include build information +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_buildinfo +_cdbs_rules_buildinfo = 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), dh-buildinfo + +common-install-arch common-install-indep:: debian/stamp-buildinfo + +debian/stamp-buildinfo: + dh_buildinfo + touch debian/stamp-buildinfo + +clean:: + rm -f debian/stamp-buildinfo + +endif --- netatalk-2.0.4~beta2.orig/debian/patches/212_disable_cnid_metad_by_default.patch +++ netatalk-2.0.4~beta2/debian/patches/212_disable_cnid_metad_by_default.patch @@ -0,0 +1,24 @@ +diff -ruN netatalk-2.0.3.orig/config/netatalk.conf netatalk-2.0.3/config/netatalk.conf +--- netatalk-2.0.3.orig/config/netatalk.conf 2007-08-12 23:53:44.000000000 +0200 ++++ netatalk-2.0.3/config/netatalk.conf 2007-08-12 23:56:14.000000000 +0200 +@@ -31,7 +31,7 @@ + # Set which daemons to run (papd is dependent upon atalkd): + ATALKD_RUN=yes + PAPD_RUN=yes +-CNID_METAD_RUN=yes ++CNID_METAD_RUN=no + AFPD_RUN=yes + TIMELORD_RUN=no + A2BOOT_RUN=no +diff -ruN netatalk-2.0.3.orig/distrib/initscripts/rc.atalk.debian.tmpl netatalk-2.0.3/distrib/initscripts/rc.atalk.debian.tmpl +--- netatalk-2.0.3.orig/distrib/initscripts/rc.atalk.debian.tmpl 2007-08-12 23:53:44.000000000 +0200 ++++ netatalk-2.0.3/distrib/initscripts/rc.atalk.debian.tmpl 2007-08-12 23:54:33.000000000 +0200 +@@ -30,7 +30,7 @@ + ATALK_ZONE= + ATALK_NAME=`/bin/hostname --short` + ATALK_BGROUND=no +-CNID_METAD_RUN=yes ++CNID_METAD_RUN=no + ATALK_MAC_CHARSET='MAC_ROMAN' + ATALK_UNIX_CHARSET='LOCALE' + --- netatalk-2.0.4~beta2.orig/debian/patches/103_initscript_background_off_by_default.patch +++ netatalk-2.0.4~beta2/debian/patches/103_initscript_background_off_by_default.patch @@ -0,0 +1,11 @@ +--- netatalk/distrib/initscripts/rc.atalk.debian.tmpl.old ++++ netatalk/distrib/initscripts/rc.atalk.debian.tmpl +@@ -22,7 +22,7 @@ + AFPD_MAX_CLIENTS=50 + ATALK_ZONE= + ATALK_NAME=`/bin/hostname --short` +-ATALK_BGROUND=yes ++ATALK_BGROUND=no + CNID_METAD_RUN=yes + ATALK_MAC_CHARSET='MAC_ROMAN' + ATALK_UNIX_CHARSET='LOCALE' --- netatalk-2.0.4~beta2.orig/debian/patches/210_avoid_update-rc-d.patch +++ netatalk-2.0.4~beta2/debian/patches/210_avoid_update-rc-d.patch @@ -0,0 +1,17 @@ +--- netatalk/distrib/initscripts/Makefile.am.old ++++ netatalk/distrib/initscripts/Makefile.am +@@ -229,11 +229,11 @@ + chmod a+x netatalk + + install-data-hook: +- update-rc.d netatalk defaults 90 10 ++# update-rc.d netatalk defaults 90 10 + + uninstall-startup: +- rm -f /etc/init.d/netatalk +- update-rc.d netatalk remove ++# rm -f /etc/init.d/netatalk ++# update-rc.d netatalk remove + + endif + --- netatalk-2.0.4~beta2.orig/debian/patches/106_papd_needs_atalk_and_fix_bashism.patch +++ netatalk-2.0.4~beta2/debian/patches/106_papd_needs_atalk_and_fix_bashism.patch @@ -0,0 +1,37 @@ +--- netatalk/distrib/initscripts/rc.atalk.debian.tmpl.old ++++ netatalk/distrib/initscripts/rc.atalk.debian.tmpl +@@ -52,7 +52,7 @@ + fi + + # prepare startup of file services +- if [ "x${CNID_METAD_RUN}" = "xyes" -a -x :SBINDIR:/cnid_metad ] ; then ++ if [ "x$CNID_METAD_RUN" = "xyes" -a -x :SBINDIR:/cnid_metad ] ; then + echo -n " cnid_metad" + :SBINDIR:/cnid_metad + fi +@@ -63,7 +63,9 @@ + echo -n " afpd" + fi + +- if [ "x$ATALKD_RUN" = "xyes" -a "x$PAPD_RUN" = "xyes" ]; then ++ if [ "x$ATALKD_RUN" = "xyes" ]; then ++ ++ if [ "x$PAPD_RUN" = "xyes" ]; then + :SBINDIR:/papd + echo -n " papd" + fi +@@ -72,11 +74,13 @@ + :SBINDIR:/timelord + echo -n " timelord" + fi ++ ++ fi + } + + case "$1" in + start) +- if test "x${ATALK_BGROUND}" = "xyes"; then ++ if [ "x$ATALK_BGROUND" = "xyes" ]; then + echo "Starting Netatalk services in the background." + atalk_startup >/dev/null & + else --- netatalk-2.0.4~beta2.orig/debian/patches/series +++ netatalk-2.0.4~beta2/debian/patches/series @@ -0,0 +1,33 @@ +#001_make_dist_was_missing_files.patch +#002_avoid_bdb_if_unneeded.patch +003_fix_afp3_dir_error.patch +#004_fix_solaris10_compilation.patch +#005_add_CJK_encoding.patch +006_CVS_sync_20090121.patch +101_fix_manpage_sed_replacements.patch +102_rename_initscript.patch +103_initscript_background_off_by_default.patch +104_initscript_load_module_only_if_intended.patch +105_initscript_config_in_etc-default.patch +106_papd_needs_atalk_and_fix_bashism.patch +107_afpd-zeroconf.patch +109_xfs_option.patch +111_db_macro.patch +112_fix_zeroconf_assertion.patch +113_LSB_sysv_dep_info.patch +114_fix_macusers_ps_parsing.patch +200_netatalk_conf_defaults.diff +201_etc2ps_paths.diff +202_psf_8_paths.diff +204_uniconv_namespace_conflict.diff +204a_uniconv_namespace_conflict_autobuilt.diff +205_applevolumes_default_homedir.diff +206_fix_cnid_maint_paths.diff +207_afile_namespace_conflict.diff +207a_afile_namespace_conflict_autobuilt.diff +208_fix_manpage_sed_replacements_for_automade_file.patch +209_rename_initscript_for_automade_file.patch +210_avoid_update-rc-d.patch +211_avoid_update-rc-d_for_automade_file.patch +212_disable_cnid_metad_by_default.patch +213_CVE-2008-5718.patch --- netatalk-2.0.4~beta2.orig/debian/patches/README +++ netatalk-2.0.4~beta2/debian/patches/README @@ -0,0 +1,3 @@ +0xx: Backports from newer upstream CVS. +1xx: Possibly relevant for upstream adoption. +2xx: Only relevant for official Debian release. --- netatalk-2.0.4~beta2.orig/debian/patches/005_add_CJK_encoding.patch +++ netatalk-2.0.4~beta2/debian/patches/005_add_CJK_encoding.patch @@ -0,0 +1,3197 @@ +diff --git a/NEWS b/NEWS +index b9e4731..ee0730d 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,15 +2,19 @@ Changes in 2.0.4 + ================ + + * NEW: afpd: DHX2 uams using GNU libgcrypt. +-* NEW: afpd: volume options 'perm' and 'invisibledots' ++* NEW: afpd: volume options 'illegalseq', 'perm' and 'invisibledots' ++ 'ilegalseq' encode illegal sequence in filename asis, ex "\217-", which is not ++ a valid SHIFT-JIS char, is encoded as U\217 -. + 'perm' value OR with the client requested permissions. (help with OSX 10.5 + strange permissions). + Make dot files visible by default with 'usedots', use 'invisibledots' + for keeping the old behavior, ie for OS9 (OSX hide dot files on its + own). + * NEW: afpd: Mac greek encoding. ++* NEW: afpd: CJK encoding. + * FIX: afpd: return the right error in createfile and copyfile if the disk + is full. ++* FIX: afpd: resolveid return the same error code than OSX if it's a directory + * FIX: afpd: server name check, test for the whole loopback subnet + not only 127.0.0.1. + * UPD: afpd: limit comments size to 128 bytes, (workaround for Adobe CS2 bug). +@@ -20,7 +24,7 @@ Changes in 2.0.4 + * FIX: cnid: dbd detach the daemon from the control terminal. + * UPD: cnid: never ending Berkeley API changes... + * UPD: cnid: dbd add a timeout when reading data from afpd client. +-* UPD: Don't wait five second after the first error when speaking to the dbd ++* UPD: cnid: Don't wait five second after the first error when speaking to the dbd + backend. + * FIX: papd: vars use % not $ + * FIX: papd: quote chars in popen variables expansion. security fix. +diff --git a/bin/uniconv/iso8859_1_adapted.c b/bin/uniconv/iso8859_1_adapted.c +index 1ec5735..c1277e8 100644 +--- a/bin/uniconv/iso8859_1_adapted.c ++++ b/bin/uniconv/iso8859_1_adapted.c +@@ -40,7 +40,7 @@ struct charset_functions charset_iso8859_adapted = + iso8859_adapted_pull, + iso8859_adapted_push, + CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED, +- NULL, NULL ++ NULL, NULL, NULL + }; + + +diff --git a/config/AppleVolumes.default.tmpl b/config/AppleVolumes.default.tmpl +index 823a1a4..111f1a7 100644 +--- a/config/AppleVolumes.default.tmpl ++++ b/config/AppleVolumes.default.tmpl +@@ -95,6 +95,8 @@ + # volume being mounted. + # nostat -> don't stat volume path when enumerating volumes list + # upriv -> use unix privilege. ++# illegalseq -> encode illegal sequence in filename asis, ex "\217-", which is not ++# a valid SHIFT-JIS char, is encoded as U\217 - + # + # + # dbpath:path -> store the database stuff in the following path. +diff --git a/etc/afpd/desktop.c b/etc/afpd/desktop.c +index 94e1436..246b64f 100644 +--- a/etc/afpd/desktop.c ++++ b/etc/afpd/desktop.c +@@ -1,5 +1,5 @@ + /* +- * $Id: desktop.c,v 1.26.2.4.2.18.2.7 2006/09/19 00:08:00 didg Exp $ ++ * $Id: desktop.c,v 1.26.2.4.2.18.2.8 2009/01/13 01:05:53 didg Exp $ + * + * See COPYRIGHT. + * +@@ -638,11 +638,15 @@ char *mtoupath(const struct vol *vol, char *mpath, cnid_t did, int utf8) + if (!(vol->v_flags & AFPVOL_USEDOTS)) + flags |= CONV_ESCAPEDOTS; + +- if ((vol->v_casefold & AFPVOL_MTOUUPPER)) ++ if (vol->v_casefold & AFPVOL_MTOUUPPER) + flags |= CONV_TOUPPER; +- else if ((vol->v_casefold & AFPVOL_MTOULOWER)) ++ else if (vol->v_casefold & AFPVOL_MTOULOWER) + flags |= CONV_TOLOWER; + ++ if (vol->v_flags & AFPVOL_EILSEQ) { ++ flags |= CONV__EILSEQ; ++ } ++ + m = demangle(vol, mpath, did); + if (m != mpath) { + return m; +@@ -677,11 +681,15 @@ char *utompath(const struct vol *vol, char *upath, cnid_t id, int utf8) + m = mpath; + outlen = strlen(upath); + +- if (vol->v_casefold & AFPVOL_UTOMUPPER) ++ if ((vol->v_casefold & AFPVOL_UTOMUPPER)) + flags |= CONV_TOUPPER; +- else if (vol->v_casefold & AFPVOL_UTOMLOWER) ++ else if ((vol->v_casefold & AFPVOL_UTOMLOWER)) + flags |= CONV_TOLOWER; + ++ if (vol->v_flags & AFPVOL_EILSEQ) { ++ flags |= CONV__EILSEQ; ++ } ++ + u = upath; + + /* convert charsets */ +diff --git a/etc/afpd/mangle.c b/etc/afpd/mangle.c +index 8edf00c..e22d7b8 100644 +--- a/etc/afpd/mangle.c ++++ b/etc/afpd/mangle.c +@@ -1,5 +1,5 @@ + /* +- * $Id: mangle.c,v 1.16.2.1.2.12.2.6 2006/09/19 00:08:01 didg Exp $ ++ * $Id: mangle.c,v 1.16.2.1.2.12.2.7 2009/01/13 01:05:53 didg Exp $ + * + * Copyright (c) 2002. Joe Marcus Clarke (marcus@marcuscom.com) + * All Rights Reserved. See COPYRIGHT. +@@ -22,25 +22,45 @@ + #define hextoint( c ) ( isdigit( c ) ? c - '0' : c + 10 - 'A' ) + #define isuxdigit(x) (isdigit(x) || (isupper(x) && isxdigit(x))) + ++static size_t mangle_extension(const struct vol *vol, const char* uname, ++ char* extension, charset_t charset) ++{ ++ char *p = strrchr(uname, '.'); ++ ++ if (p && p != uname) { ++ u_int16_t flags = CONV_FORCE | CONV_UNESCAPEHEX; ++ size_t len = convert_charset(vol->v_volcharset, charset, ++ vol->v_maccharset, p, strlen(p), ++ extension, MAX_EXT_LENGTH, &flags); ++ ++ if (len != (size_t)-1) return len; ++ } ++ return 0; ++} ++ + static char *demangle_checks ( const struct vol *vol, char* uname, char * mfilename, size_t prefix, char * ext) + { + u_int16_t flags; + static char buffer[MAXPATHLEN +2]; /* for convert_charset dest_len parameter +2 */ + size_t len; + size_t mfilenamelen; +- char *u; + + /* We need to check, whether we really need to demangle the filename */ + /* i.e. it's not just a file with a valid #HEX in the name ... */ + /* but we don't want to miss valid demangle as well. */ + + /* check whether file extensions match */ +- if ( NULL != (u = strchr(uname, '.')) ) { +- if (strcmp(ext,u)) +- return mfilename; ++ { ++ char buf[MAX_EXT_LENGTH + 2]; /* for convert_charset dest_len parameter +2 */ ++ size_t ext_len = mangle_extension(vol, uname, buf, CH_UTF8_MAC); ++ ++ if (ext_len) { ++ buf[ext_len] = '\0'; ++ if (strcmp(ext, buf)) return mfilename; ++ } else { ++ if (*ext) return mfilename; ++ } + } +- else if ( *ext == '.' ) +- return mfilename; + + /* First we convert the unix name to our volume maccharset */ + /* This assumes, OSX will not send us a mangled name for *any* */ +@@ -68,7 +88,7 @@ static char *demangle_checks ( const struct vol *vol, char* uname, char * mfilen + /* if we only checked if "prefix" number of characters match */ + /* we get a false postive in above case */ + +- if ( flags & CONV_REQMANGLE ) { ++ if ( (flags & CONV_REQMANGLE) ) { + if (len) { + /* convert the buffer to UTF8_MAC ... */ + if ((size_t) -1 == (len = convert_charset(vol->v_maccharset, CH_UTF8_MAC, 0, +@@ -203,27 +223,6 @@ demangle_osx(const struct vol *vol, char *mfilename, cnid_t did, cnid_t *fileid) + } + + +-/* ------------------------------------------------------- +- * find the start of a utf8 character +- */ +-static char * +-utf8_mangle_validate(char *path, size_t len) +-{ +- unsigned char *p = (unsigned char *)path + len; +- int dec = 0; +- +- /* char matches with 10xxxxxx ? */ +- while ( len && *p && ((*p & 0xc0) == 0x80)) { +- dec = 1; +- len--; +- p--; +- } +- if (dec) +- *p = 0; +- +- return path; +-} +- + /* ----------------------- + with utf8 filename not always round trip + filename mac filename too long or first chars if unmatchable chars. +@@ -232,12 +231,12 @@ utf8_mangle_validate(char *path, size_t len) + + */ + char * +-mangle(const struct vol *vol _U_, char *filename, size_t filenamelen, char *uname, cnid_t id, int flags) { +- char *ext = NULL; ++mangle(const struct vol *vol, char *filename, size_t filenamelen, char *uname, cnid_t id, int flags) { + char *m = NULL; +- static char mfilename[MAXPATHLEN + 1]; ++ static char mfilename[MAXPATHLEN]; /* way > maxlen */ + char mangle_suffix[MANGLE_LENGTH + 1]; +- size_t ext_len = 0; ++ char ext[MAX_EXT_LENGTH +2]; /* for convert_charset dest_len parameter +2 */ ++ size_t ext_len; + size_t maxlen; + int k; + +@@ -252,24 +251,25 @@ mangle(const struct vol *vol _U_, char *filename, size_t filenamelen, char *unam + return NULL; + } + /* First, attempt to locate a file extension. */ +- if (NULL != (ext = strrchr(uname, '.')) ) { +- ext_len = strlen(ext); +- if (ext_len > MAX_EXT_LENGTH) { +- /* Do some bounds checking to prevent an extension overflow. */ +- ext_len = MAX_EXT_LENGTH; +- } +- } ++ ext_len = mangle_extension(vol, uname, ext, (flags & 2) ? CH_UTF8_MAC : vol->v_maccharset); + m = mfilename; + k = sprintf(mangle_suffix, "%c%X", MANGLE_CHAR, ntohl(id)); + +- strlcpy(m, filename, maxlen - k - ext_len +1); +- if (flags & 2) +- m = utf8_mangle_validate(m, maxlen - k - ext_len +1); ++ if (filenamelen + k + ext_len > maxlen) { ++ u_int16_t opt = CONV_FORCE | CONV_UNESCAPEHEX; ++ size_t n = convert_charset(vol->v_volcharset, ++ (flags & 2) ? CH_UTF8_MAC : vol->v_maccharset, ++ vol->v_maccharset, uname, strlen(uname), ++ m, maxlen - k - ext_len, &opt); ++ m[n != (size_t)-1 ? n : 0] = 0; ++ } else { ++ strlcpy(m, filename, filenamelen + 1); ++ } + if (*m == 0) { + strcat(m, "???"); + } + strcat(m, mangle_suffix); +- if (ext) { ++ if (ext_len) { + strncat(m, ext, ext_len); + } + +diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c +index 8542662..f3144cb 100644 +--- a/etc/afpd/volume.c ++++ b/etc/afpd/volume.c +@@ -1,5 +1,5 @@ + /* +- * $Id: volume.c,v 1.51.2.7.2.33.2.15 2008/11/25 15:16:33 didg Exp $ ++ * $Id: volume.c,v 1.51.2.7.2.33.2.16 2009/01/13 01:05:53 didg Exp $ + * + * Copyright (c) 1990,1993 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -171,6 +171,7 @@ static const _vol_opt_name vol_opt_names[] = { + * maybe because it will be mounted later in preexec */ + {AFPVOL_UNIX_PRIV, "UNIXPRIV"}, /* support unix privileges */ + {AFPVOL_NODEV, "NODEV"}, /* always use 0 for device number in cnid calls */ ++ {AFPVOL_EILSEQ, "ILLEGALSEQ"}, /* encode illegal sequence */ + {AFPVOL_CACHE, "CACHEID"}, /* Use adouble v2 CNID caching, default don't use it */ + {0, NULL} + }; +@@ -473,6 +474,8 @@ static void volset(struct vol_option *options, struct vol_option *save, + options[VOLOPT_FLAGS].i_value |= AFPVOL_UNIX_PRIV; + else if (strcasecmp(p, "nodev") == 0) + options[VOLOPT_FLAGS].i_value |= AFPVOL_NODEV; ++ else if (strcasecmp(p, "illegalseq") == 0) ++ options[VOLOPT_FLAGS].i_value |= AFPVOL_EILSEQ; + else if (strcasecmp(p, "cachecnid") == 0) + options[VOLOPT_FLAGS].i_value |= AFPVOL_CACHE; + +diff --git a/etc/afpd/volume.h b/etc/afpd/volume.h +index 24afecd..a68b5d7 100644 +--- a/etc/afpd/volume.h ++++ b/etc/afpd/volume.h +@@ -1,5 +1,5 @@ + /* +- * $Id: volume.h,v 1.19.2.5.2.7.2.3 2006/09/19 02:24:06 didg Exp $ ++ * $Id: volume.h,v 1.19.2.5.2.7.2.4 2009/01/13 01:05:53 didg Exp $ + * + * Copyright (c) 1990,1994 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -116,8 +116,12 @@ this is going away. */ + * help if device number is notconsistent across reboot + * NOTE symlink to a different device will return an ACCESS error + */ +-#define AFPVOL_CACHE (1 << 19) /* Use adouble v2 CNID caching, default don't use it */ +-#define AFPVOL_INV_DOTS (1 << 20) /* dots files are invisible */ ++#define AFPVOL_RESERVED (1 << 19) /* was AFPVOL_CASEINSEN, volume is case insensitive */ ++#define AFPVOL_EILSEQ (1 << 20) /* encode illegal sequence 'asis' UCS2, ex "\217-", which is not ++ a valid SHIFT-JIS char, is encoded as U\217 -*/ ++ ++#define AFPVOL_CACHE (1 << 21) /* Use adouble v2 CNID caching, default don't use it */ ++#define AFPVOL_INV_DOTS (1 << 22) /* dots files are invisible */ + + /* FPGetSrvrParms options */ + #define AFPSRVR_CONFIGINFO (1 << 0) +diff --git a/include/atalk/unicode.h b/include/atalk/unicode.h +index c00e6e8..e927b5e 100644 +--- a/include/atalk/unicode.h ++++ b/include/atalk/unicode.h +@@ -46,7 +46,7 @@ typedef struct { + #define IGNORE_CHAR '_' + + /* conversion flags */ +-#define CONV_IGNORE (1<<0) /* ignore EILSEQ, replace with IGNORE_CHAR */ ++#define CONV_IGNORE (1<<0) /* return the first convertable characters. */ + #define CONV_ESCAPEHEX (1<<1) /* escape unconvertable chars with :[UCS2HEX] */ + #define CONV_ESCAPEDOTS (1<<2) /* escape leading dots with :2600 */ + #define CONV_UNESCAPEHEX (1<<3) +@@ -54,6 +54,8 @@ typedef struct { + #define CONV_TOLOWER (1<<5) /* convert to lowercase */ + #define CONV_PRECOMPOSE (1<<6) /* precompose */ + #define CONV_DECOMPOSE (1<<7) /* precompose */ ++#define CONV_FORCE (1<<8) /* force convertion */ ++#define CONV__EILSEQ (1<<9) /* ignore EILSEQ, replace with IGNORE_CHAR (try USC2) */ + + /* conversion return flags */ + #define CONV_REQMANGLE (1<<14) /* mangling of returned name is required */ +@@ -77,6 +79,7 @@ struct charset_functions { + size_t (*push)(void *, char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft); + u_int32_t flags; ++ const char *iname; + struct charset_functions *prev, *next; + }; + +diff --git a/libatalk/unicode/charcnv.c b/libatalk/unicode/charcnv.c +index 23e624e..f560ad0 100644 +--- a/libatalk/unicode/charcnv.c ++++ b/libatalk/unicode/charcnv.c +@@ -316,8 +316,15 @@ static size_t convert_string_internal(charset_t from, charset_t to, + char* o_save = outbuf; + atalk_iconv_t descriptor; + +- if (srclen == (size_t)-1) +- srclen = strlen(src)+1; ++ /* Fixed based on Samba 3.0.6 */ ++ if (srclen == (size_t)-1) { ++ if (from == CH_UCS2) { ++ srclen = (strlen_w((const ucs2_t *)src)+1) * 2; ++ } else { ++ srclen = strlen((const char *)src)+1; ++ } ++ } ++ + + lazy_initialize_conv(); + +@@ -636,7 +643,7 @@ size_t charset_to_ucs2_allocate(charset_t ch, ucs2_t **dest, const char *src) + return convert_string_allocate(ch, CH_UCS2, src, src_len, (char**) dest); + } + +-/** ++/** ----------------------------------- + * Copy a string from a charset_t char* src to a UTF-8 destination, allocating a buffer + * + * @param dest always set at least to NULL +@@ -652,7 +659,7 @@ size_t charset_to_utf8_allocate(charset_t ch, char **dest, const char *src) + return convert_string_allocate(ch, CH_UTF8, src, src_len, dest); + } + +-/** ++/** ----------------------------------- + * Copy a string from a UCS2 src to a unix char * destination, allocating a buffer + * + * @param dest always set at least to NULL +@@ -666,7 +673,7 @@ size_t ucs2_to_charset(charset_t ch, const ucs2_t *src, char *dest, size_t destl + return convert_string(CH_UCS2, ch, src, src_len, dest, destlen); + } + +- ++/* --------------------------------- */ + size_t ucs2_to_charset_allocate(charset_t ch, char **dest, const ucs2_t *src) + { + size_t src_len = (strlen_w(src)) * sizeof(ucs2_t); +@@ -674,7 +681,7 @@ size_t ucs2_to_charset_allocate(charset_t ch, char **dest, const ucs2_t *src) + return convert_string_allocate(CH_UCS2, ch, src, src_len, dest); + } + +-/** ++/** --------------------------------- + * Copy a string from a UTF-8 src to a unix char * destination, allocating a buffer + * + * @param dest always set at least to NULL +@@ -779,108 +786,109 @@ char * debug_out ( char * seq, size_t len) + * Flags: + * CONV_UNESCAPEHEX: ':XX' will be converted to an UCS2 character + * CONV_IGNORE: return the first convertable characters. ++ * CONV_FORCE: force convertion + * FIXME: + * This will *not* work if the destination charset is not multibyte, i.e. UCS2->UCS2 will fail + * The (un)escape scheme is not compatible to the old cap style escape. This is bad, we need it + * for e.g. HFS cdroms. + */ + +-static size_t pull_charset_flags (charset_t from_set, charset_t cap_charset, char* src, size_t srclen, char* dest, size_t destlen, u_int16_t *flags) ++static size_t pull_charset_flags (charset_t from_set, charset_t cap_set, char* src, size_t srclen, char* dest, size_t destlen, u_int16_t *flags) + { +- size_t i_len, o_len, hlen; +- size_t retval, j = 0; +- const char* inbuf = (const char*)src; +- char* outbuf = (char*)dest; +- atalk_iconv_t descriptor; +- atalk_iconv_t descriptor_cap; +- char *s; +- char h[MAXPATHLEN]; +- const char *h_buf; +- +- if (srclen == (size_t)-1) +- srclen = strlen(src)+1; +- +- lazy_initialize_conv(); +- +- descriptor = conv_handles[from_set][CH_UCS2]; +- descriptor_cap = conv_handles[cap_charset][CH_UCS2]; ++ const u_int16_t option = (flags ? *flags : 0); ++ size_t i_len, o_len; ++ size_t j = 0; ++ const char* inbuf = (const char*)src; ++ char* outbuf = dest; ++ atalk_iconv_t descriptor; ++ atalk_iconv_t descriptor_cap; ++ ++ if (srclen == (size_t)-1) ++ srclen = strlen(src) + 1; ++ ++ lazy_initialize_conv(); ++ ++ descriptor = conv_handles[from_set][CH_UCS2]; ++ descriptor_cap = conv_handles[cap_set][CH_UCS2]; ++ ++ if (descriptor == (atalk_iconv_t)-1 || descriptor == (atalk_iconv_t)0) { ++ errno = EINVAL; ++ return (size_t)-1; ++ } ++ ++ i_len=srclen; ++ o_len=destlen; ++ ++ while (i_len > 0) { ++ if ((option & CONV_UNESCAPEHEX)) { ++ for (j = 0; j < i_len; ++j) { ++ if (inbuf[j] == ':') break; ++ } ++ j = i_len - j; ++ i_len -= j; ++ } + +- if (descriptor == (atalk_iconv_t)-1 || descriptor == (atalk_iconv_t)0) { +- return (size_t) -1; ++ if (i_len > 0 && ++ atalk_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len) == (size_t)-1) { ++ if (errno == EILSEQ || errno == EINVAL) { ++ errno = EILSEQ; ++ if ((option & CONV_IGNORE)) { ++ *flags |= CONV_REQMANGLE; ++ return destlen - o_len; ++ } ++ if ((option & CONV__EILSEQ)) { ++ if (o_len < 2) { ++ errno = E2BIG; ++ goto end; ++ } ++ *((ucs2_t *)outbuf) = (ucs2_t) IGNORE_CHAR; /**inbuf */ ++ inbuf++; ++ i_len--; ++ outbuf += 2; ++ o_len -= 2; ++ /* FIXME reset stat ? */ ++ continue; + } ++ } ++ goto end; ++ } + +- i_len=srclen; +- o_len=destlen; +- +-conversion_loop: +- if ( flags && (*flags & CONV_UNESCAPEHEX)) { +- if ( NULL != (s = strchr ( inbuf, ':'))) { +- j = i_len - (s - inbuf); +- if ( 0 == (i_len = (s - inbuf))) +- goto unhex_char; ++ if (j) { ++ /* we're at the start on an hex encoded ucs2 char */ ++ char h[MAXPATHLEN]; ++ size_t hlen = 0; ++ ++ i_len = j, j = 0; ++ while (i_len >= 3 && inbuf[0] == ':' && ++ isxdigit(inbuf[1]) && isxdigit(inbuf[2])) { ++ h[hlen++] = (hextoint(inbuf[1]) << 4) | hextoint(inbuf[2]); ++ inbuf += 3; ++ i_len -= 3; ++ } ++ if (hlen) { ++ const char *h_buf = h; ++ if (atalk_iconv(descriptor_cap, &h_buf, &hlen, &outbuf, &o_len) == (size_t)-1) { ++ i_len += hlen * 3; ++ inbuf -= hlen * 3; ++ if (errno == EILSEQ && (option & CONV_IGNORE)) { ++ *flags |= CONV_REQMANGLE; ++ return destlen - o_len; ++ } ++ goto end; + } ++ } else { ++ /* We have an invalid :xx sequence */ ++ errno = EILSEQ; ++ if ((option & CONV_IGNORE)) { ++ *flags |= CONV_REQMANGLE; ++ return destlen - o_len; + } +- +- retval = atalk_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len); +- if(retval==(size_t)-1) { +- if (errno == EILSEQ && flags && (*flags & CONV_IGNORE)) { +- *flags |= CONV_REQMANGLE; +- return destlen-o_len; +- } +- else +- return (size_t) -1; ++ goto end; ++ } + } +- +-unhex_char: +- if (j && flags && (*flags & CONV_UNESCAPEHEX )) { +- /* we're at the start on an hex encoded ucs2 char */ +- if (o_len < 2) { +- errno = E2BIG; +- return (size_t) -1; +- } +- if ( j >= 3 && +- isxdigit( *(inbuf+1)) && isxdigit( *(inbuf+2)) ) { +- hlen = 0; +- while ( *inbuf == ':' && j >=3 && +- isxdigit( *(inbuf+1)) && isxdigit( *(inbuf+2)) ) { +- inbuf++; +- h[hlen] = hextoint( *inbuf ) << 4; +- inbuf++; +- h[hlen++] |= hextoint( *inbuf ); +- inbuf++; +- j -= 3; +- } +- h_buf = (const char*) h; +- if ((size_t) -1 == (retval = atalk_iconv(descriptor_cap, &h_buf, &hlen, &outbuf, &o_len)) ) { +- if (errno == EILSEQ && CHECK_FLAGS(flags, CONV_IGNORE)) { +- *flags |= CONV_REQMANGLE; +- return destlen-o_len; +- } +- else { +- return retval; +- } +- } +- } +- else { +- /* We have an invalid :xx sequence */ +- if (CHECK_FLAGS(flags, CONV_IGNORE)) { +- *flags |= CONV_REQMANGLE; +- return destlen-o_len; +- } +- else { +- errno=EILSEQ; +- return (size_t) -1; +- } +- } +- i_len = j; +- j = 0; +- if (i_len > 0) +- goto conversion_loop; +- } +- +- +- +- return destlen-o_len; ++ } ++ end: ++ return (i_len + j == 0 || (option & CONV_FORCE)) ? destlen - o_len : (size_t)-1; + } + + /* +@@ -888,7 +896,9 @@ unhex_char: + * Flags: + * CONV_ESCAPEDOTS: escape leading dots + * CONV_ESCAPEHEX: unconvertable characters and '/' will be escaped to :XX +- * CONV_IGNORE: unconvertable characters will be replaced with '_' ++ * CONV_IGNORE: return the first convertable characters. ++ * CONV__EILSEQ: unconvertable characters will be replaced with '_' ++ * CONV_FORCE: force convertion + * FIXME: + * CONV_IGNORE and CONV_ESCAPEHEX can't work together. Should we check this ? + * This will *not* work if the destination charset is not multibyte, i.e. UCS2->UCS2 will fail +@@ -899,113 +909,122 @@ unhex_char: + + static size_t push_charset_flags (charset_t to_set, charset_t cap_set, char* src, size_t srclen, char* dest, size_t destlen, u_int16_t *flags) + { +- size_t i_len, o_len, i; +- size_t retval, j = 0; +- const char* inbuf = (const char*)src; +- char* outbuf = (char*)dest; +- atalk_iconv_t descriptor; +- char *o_save; +- char *buf, *buf_save; +- size_t buflen; +- +- lazy_initialize_conv(); +- +- descriptor = conv_handles[CH_UCS2][to_set]; +- +- if (descriptor == (atalk_iconv_t)-1 || descriptor == (atalk_iconv_t)0) { +- return (size_t) -1; ++ const u_int16_t option = (flags ? *flags : 0); ++ size_t i_len, o_len, i; ++ size_t j = 0; ++ const char* inbuf = (const char*)src; ++ char* outbuf = (char*)dest; ++ atalk_iconv_t descriptor; ++ atalk_iconv_t descriptor_cap; ++ ++ lazy_initialize_conv(); ++ ++ descriptor = conv_handles[CH_UCS2][to_set]; ++ descriptor_cap = conv_handles[CH_UCS2][cap_set]; ++ ++ if (descriptor == (atalk_iconv_t)-1 || descriptor == (atalk_iconv_t)0) { ++ errno = EINVAL; ++ return (size_t) -1; ++ } ++ ++ i_len=srclen; ++ o_len=destlen; ++ ++ if ((option & CONV_ESCAPEDOTS) && ++ i_len >= 2 && SVAL(inbuf, 0) == 0x002e) { /* 0x002e = . */ ++ if (o_len < 3) { ++ errno = E2BIG; ++ goto end; + } +- +- i_len=srclen; +- o_len=destlen; +- o_save=outbuf; +- +- if ( SVAL(inbuf,0) == 0x002e && flags && (*flags & CONV_ESCAPEDOTS)) { /* 0x002e = . */ +- if (o_len < 3) { +- errno = E2BIG; +- return (size_t) -1; +- } +- o_save[0] = ':'; +- o_save[1] = '2'; +- o_save[2] = 'e'; +- o_len -= 3; +- inbuf += 2; +- i_len -= 2; +- outbuf = o_save + 3; +- if (flags) *flags |= CONV_REQESCAPE; +- } +- +-conversion_loop: +- if ( flags && (*flags & CONV_ESCAPEHEX)) { +- for ( i = 0; i < i_len; i+=2) { +- if ( SVAL((inbuf+i),0) == 0x002f) { /* 0x002f = / */ +- j = i_len - i; +- if ( 0 == ( i_len = i)) +- goto escape_slash; +- break; +- } else if ( SVAL(inbuf+i,0) == 0x003a) { /* 0x003a = : */ +- errno = EILSEQ; +- return (size_t) -1; +- } +- } ++ *outbuf++ = ':'; ++ *outbuf++ = '2'; ++ *outbuf++ = 'e'; ++ o_len -= 3; ++ inbuf += 2; ++ i_len -= 2; ++ *flags |= CONV_REQESCAPE; ++ } ++ ++ while (i_len >= 2) { ++ if ((option & CONV_ESCAPEHEX)) { ++ for (i = 0; i < i_len; i += 2) { ++ ucs2_t c = SVAL(inbuf, i); ++ if (c == 0x002f) { /* 0x002f = / */ ++ j = i_len - i; ++ i_len = i; ++ break; ++ } else if (c == 0x003a) { /* 0x003a = : */ ++ errno = EILSEQ; ++ goto end; ++ } ++ } + } +- +- retval = atalk_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len); +- if (retval==(size_t)-1) { +- if (errno == EILSEQ && CHECK_FLAGS(flags, CONV_IGNORE)) { +- *flags |= CONV_REQMANGLE; +- return destlen -o_len; +- } +- else if ( errno == EILSEQ && flags && (*flags & CONV_ESCAPEHEX)) { +- if (o_len < 3) { +- errno = E2BIG; +- return (size_t) -1; ++ while (i_len > 0 && ++ atalk_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len) == (size_t)-1) { ++ if (errno == EILSEQ) { ++ if ((option & CONV_IGNORE)) { ++ *flags |= CONV_REQMANGLE; ++ return destlen - o_len; ++ } ++ if ((option & CONV_ESCAPEHEX)) { ++ const size_t bufsiz = o_len / 3 + 1; ++ char *buf = malloc(bufsiz); ++ size_t buflen; ++ ++ if (!buf) ++ goto end; ++ i = i_len; ++ for (buflen = 1; buflen <= bufsiz; ++buflen) { ++ char *b = buf; ++ size_t o = buflen; ++ if (atalk_iconv(descriptor_cap, &inbuf, &i, &b, &o) != (size_t)-1) { ++ buflen -= o; ++ break; ++ } else if (errno != E2BIG) { ++ SAFE_FREE(buf); ++ goto end; ++ } else if (o < buflen) { ++ buflen -= o; ++ break; + } +- if ((size_t) -1 == (buflen = convert_string_allocate_internal(CH_UCS2, cap_set, inbuf, 2, &buf)) ) +- return buflen; +- buf_save = buf; +- while (buflen > 0) { +- if ( o_len < 3) { +- errno = E2BIG; +- return (size_t) -1; +- } +- *outbuf++ = ':'; +- *outbuf++ = hexdig[ ( *buf & 0xf0 ) >> 4 ]; +- *outbuf++ = hexdig[ *buf & 0x0f ]; +- buf++; +- buflen--; +- o_len -= 3; +- } +- SAFE_FREE(buf_save); +- buflen = 0; +- i_len -= 2; +- inbuf += 2; +- if (flags) *flags |= CONV_REQESCAPE; +- if ( i_len > 0) +- goto conversion_loop; ++ } ++ if (o_len < buflen * 3) { ++ SAFE_FREE(buf); ++ errno = E2BIG; ++ goto end; ++ } ++ o_len -= buflen * 3; ++ i_len = i; ++ for (i = 0; i < buflen; ++i) { ++ *outbuf++ = ':'; ++ *outbuf++ = hexdig[(buf[i] >> 4) & 0x0f]; ++ *outbuf++ = hexdig[buf[i] & 0x0f]; ++ } ++ SAFE_FREE(buf); ++ *flags |= CONV_REQESCAPE; ++ continue; + } +- else +- return (size_t)(-1); ++ } ++ goto end; + } +- +-escape_slash: +- if (j && flags && (*flags & CONV_ESCAPEHEX)) { +- if (o_len < 3) { +- errno = E2BIG; +- return (size_t) -1; +- } +- o_save[destlen -o_len] = ':'; +- o_save[destlen -o_len+1] = '2'; +- o_save[destlen -o_len+2] = 'f'; +- inbuf += 2; +- i_len = j-2; +- o_len -= 3; +- outbuf += 3; +- j = 0; +- if ( i_len > 0) +- goto conversion_loop; ++ ++ if (j) { ++ i_len = j, j = 0; ++ if (o_len < 3) { ++ errno = E2BIG; ++ goto end; ++ } ++ *outbuf++ = ':'; ++ *outbuf++ = '2'; ++ *outbuf++ = 'f'; ++ o_len -= 3; ++ inbuf += 2; ++ i_len -= 2; + } +- return destlen -o_len; ++ } ++ if (i_len > 0) errno = EINVAL; ++ end: ++ return (i_len + j == 0 || (option & CONV_FORCE)) ? destlen - o_len : (size_t)-1; + } + + /* +diff --git a/libatalk/unicode/charsets/Makefile.am b/libatalk/unicode/charsets/Makefile.am +index a1f6051..6114720 100644 +--- a/libatalk/unicode/charsets/Makefile.am ++++ b/libatalk/unicode/charsets/Makefile.am +@@ -2,7 +2,7 @@ + + noinst_LTLIBRARIES = libcharsets.la + +-CFLAGS = -I$(top_srcdir)/sys @CFLAGS@ ++AM_CFLAGS = -I$(top_srcdir)/sys @CFLAGS@ @ICONV_CFLAGS@ + LIBS = + + libcharsets_la_SOURCES = \ +@@ -12,6 +12,11 @@ libcharsets_la_SOURCES = \ + mac_centraleurope.c \ + mac_turkish.c \ + mac_cyrillic.c \ ++ mac_japanese.c \ ++ mac_chinese_trad.c \ ++ mac_chinese_simp.c \ ++ mac_korean.c \ ++ generic_cjk.c \ + generic_mb.c + + noinst_HEADERS = \ +@@ -21,4 +26,9 @@ noinst_HEADERS = \ + mac_hebrew.h \ + mac_turkish.h \ + mac_cyrillic.h \ ++ mac_japanese.h \ ++ mac_chinese_trad.h \ ++ mac_chinese_simp.h \ ++ mac_korean.h \ ++ generic_cjk.h \ + generic_mb.h +diff --git a/libatalk/unicode/charsets/generic_cjk.c b/libatalk/unicode/charsets/generic_cjk.c +new file mode 100644 +index 0000000..29358a8 +--- /dev/null ++++ b/libatalk/unicode/charsets/generic_cjk.c +@@ -0,0 +1,215 @@ ++/* ++ * generic_cjk ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif /* HAVE_CONFIG_H */ ++ ++#if HAVE_USABLE_ICONV ++ ++#include "generic_cjk.h" ++#include ++ ++static size_t cjk_iconv(void *cd, char **inbuf, char *end, ++ char **outbuf, size_t *outbytesleft) ++{ ++ size_t n = end - *inbuf; ++ if (iconv(cd, (ICONV_CONST char**)inbuf, &n, outbuf, outbytesleft) == (size_t)-1) { ++ iconv(cd, NULL, NULL, NULL, NULL); ++ } ++ return n; ++} ++ ++size_t cjk_generic_push(size_t (*char_func)(u_int8_t*, const ucs2_t*, size_t*), ++ void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ char *in = *inbuf; ++ ++ while (*inbytesleft >= sizeof(ucs2_t) && *outbytesleft > 0) { ++ u_int8_t buf[CJK_PUSH_BUFFER]; ++ size_t size = *inbytesleft / sizeof(ucs2_t); ++ size_t n = (char_func)(buf, (const ucs2_t*)in, &size); ++ if (n == 0) { ++ in += size * sizeof(ucs2_t); ++ *inbytesleft -= size * sizeof(ucs2_t); ++ continue; ++ } ++ if (in != *inbuf) { ++ int err = errno; ++ ++ *inbytesleft += cjk_iconv(cd, inbuf, in, outbuf, outbytesleft); ++ if (in != *inbuf) return -1; ++ errno = err; ++ } ++ if (n == (size_t)-1) return -1; ++ if (*outbytesleft < n) break; ++ memcpy(*outbuf, buf, n); ++ *outbuf += n; ++ *outbytesleft -= n; ++ in += size * sizeof(ucs2_t); ++ *inbytesleft -= size * sizeof(ucs2_t); ++ *inbuf = in; ++ } ++ if (in != *inbuf) { ++ *inbytesleft += cjk_iconv(cd, inbuf, in, outbuf, outbytesleft); ++ if (in != *inbuf) return -1; ++ } ++ if (*inbytesleft > 0) { ++ errno = (*inbytesleft < sizeof(ucs2_t) ? EINVAL : E2BIG); ++ return -1; ++ } ++ return 0; ++} ++ ++size_t cjk_generic_pull(size_t (*char_func)(ucs2_t*, const u_int8_t*, size_t*), ++ void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ char *in = *inbuf; ++ ++ while (*inbytesleft > 0 && *outbytesleft >= sizeof(ucs2_t)) { ++ ucs2_t buf[CJK_PULL_BUFFER]; ++ size_t size = *inbytesleft; ++ size_t n = (char_func)(buf, (const u_int8_t*)in, &size); ++ if (n == 0) { ++ in += size; ++ *inbytesleft -= size; ++ continue; ++ } ++ if (in != *inbuf) { ++ int err = errno; ++ ++ *inbytesleft += cjk_iconv(cd, inbuf, in, outbuf, outbytesleft); ++ if (in != *inbuf) return -1; ++ errno = err; ++ } ++ if (n == (size_t)-1) return -1; ++ if (*outbytesleft < n * sizeof(ucs2_t)) break; ++ memcpy(*outbuf, buf, n * sizeof(ucs2_t)); ++ *outbuf += n * sizeof(ucs2_t); ++ *outbytesleft -= n * sizeof(ucs2_t); ++ in += size; ++ *inbytesleft -= size; ++ *inbuf = in; ++ } ++ if (in != *inbuf) { ++ *inbytesleft += cjk_iconv(cd, inbuf, in, outbuf, outbytesleft); ++ if (in != *inbuf) return -1; ++ } ++ if (*inbytesleft > 0) { ++ errno = E2BIG; ++ return -1; ++ } ++ return 0; ++} ++ ++size_t cjk_char_push(u_int16_t c, u_int8_t *out) ++{ ++ if (!c) return 0; ++ if (c == (u_int16_t)-1) { ++ errno = EILSEQ; ++ return (size_t)-1; ++ } ++ if (c <= 0xff) { ++ out[0] = (u_int8_t)c; ++ return 1; ++ } ++ out[0] = (u_int8_t)(c >> 8); ++ out[1] = (u_int8_t)c; ++ return 2; ++} ++ ++size_t cjk_char_pull(ucs2_t wc, ucs2_t* out, const u_int32_t* compose) ++{ ++ if (!wc) return 0; ++ if ((wc & 0xf000) == 0xe000) { ++ ucs2_t buf[CJK_PULL_BUFFER]; ++ size_t i = sizeof(buf) / sizeof(*buf) - 1; ++ do { ++ u_int32_t v = compose[wc & 0xfff]; ++ buf[i] = (ucs2_t)v; ++ wc = (ucs2_t)(v >> 16); ++ } while (--i && (wc & 0xf000) == 0xe000); ++ buf[i] = wc; ++ memcpy(out, buf + i, sizeof(buf) - sizeof(*buf) * i); ++ return sizeof(buf) / sizeof(*buf) - i; ++ } ++ *out = wc; ++ return 1; ++} ++ ++u_int16_t cjk_lookup(u_int16_t c, const cjk_index_t *index, const u_int16_t *charset) ++{ ++ while (index->summary && c >= index->range[0]) { ++ if (c <= index->range[1]) { ++ const u_int16_t* summary = index->summary[(c - index->range[0]) >> 4]; ++ u_int16_t used = 1 << (c & 15); ++ ++ if (summary[0] & used) { ++ used = summary[0] & (used - 1); ++ charset += summary[1]; ++ while (used) used &= used - 1, ++charset; ++ return *charset; ++ } ++ return 0; ++ } ++ ++index; ++ } ++ return 0; ++} ++ ++ucs2_t cjk_compose(ucs2_t base, ucs2_t comb, const u_int32_t* table, size_t size) ++{ ++ u_int32_t v = ((u_int32_t)base << 16) | comb; ++ size_t low = 0; ++ while (size > low) { ++ size_t n = (low + size) / 2; ++ if (table[n] == v) return 0xe000 + n; ++ if (table[n] < v) { ++ low = n + 1; ++ } else { ++ size = n; ++ } ++ } ++ return 0; ++} ++ ++ucs2_t cjk_compose_seq(const ucs2_t* in, size_t* len, const u_int32_t* table, size_t size) ++{ ++ static u_int8_t sz[] = { 3, 4, 5, 5, 5, 5, 5, 3 }; ++ ucs2_t wc = in[0]; ++ size_t n = sz[wc & 7]; ++ size_t i = 0; ++ ++ if (n > *len) { ++ errno = EINVAL; ++ return 0; ++ } ++ while (++i < n) { ++ wc = cjk_compose(wc, in[i], table, size); ++ if (!wc) { ++ errno = EILSEQ; ++ return 0; ++ } ++ } ++ *len = n; ++ return wc; ++} ++#endif +diff --git a/libatalk/unicode/charsets/generic_cjk.h b/libatalk/unicode/charsets/generic_cjk.h +new file mode 100644 +index 0000000..1f9e208 +--- /dev/null ++++ b/libatalk/unicode/charsets/generic_cjk.h +@@ -0,0 +1,42 @@ ++/* ++ * generic_cjk ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#include ++#include ++#include "../byteorder.h" ++ ++#define CJK_PUSH_BUFFER 4 ++#define CJK_PULL_BUFFER 8 ++ ++typedef struct { ++ u_int16_t range[2]; ++ const u_int16_t (*summary)[2]; ++} cjk_index_t; ++ ++extern size_t cjk_generic_push __P((size_t (*)(u_int8_t*, const ucs2_t*, size_t*), ++ void*, char**, size_t*, char**, size_t*)); ++extern size_t cjk_generic_pull __P((size_t (*)(ucs2_t*, const u_int8_t*, size_t*), ++ void*, char**, size_t*, char**, size_t*)); ++ ++extern size_t cjk_char_push __P((u_int16_t, u_int8_t*)); ++extern size_t cjk_char_pull __P((ucs2_t, ucs2_t*, const u_int32_t*)); ++ ++extern u_int16_t cjk_lookup __P((u_int16_t, const cjk_index_t*, const u_int16_t*)); ++extern ucs2_t cjk_compose __P((ucs2_t, ucs2_t, const u_int32_t*, size_t)); ++extern ucs2_t cjk_compose_seq __P((const ucs2_t*, size_t*, const u_int32_t*, size_t)); +diff --git a/libatalk/unicode/charsets/mac_centraleurope.c b/libatalk/unicode/charsets/mac_centraleurope.c +index f47e9f1..dda862c 100644 +--- a/libatalk/unicode/charsets/mac_centraleurope.c ++++ b/libatalk/unicode/charsets/mac_centraleurope.c +@@ -44,7 +44,7 @@ struct charset_functions charset_mac_centraleurope = + mac_centraleurope_pull, + mac_centraleurope_push, + CHARSET_CLIENT | CHARSET_MULTIBYTE, +- NULL, NULL ++ NULL, NULL, NULL + }; + + +diff --git a/libatalk/unicode/charsets/mac_chinese_simp.c b/libatalk/unicode/charsets/mac_chinese_simp.c +new file mode 100644 +index 0000000..f0ad464 +--- /dev/null ++++ b/libatalk/unicode/charsets/mac_chinese_simp.c +@@ -0,0 +1,117 @@ ++/* ++ * MacChineseSimp ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Reference ++ * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif /* HAVE_CONFIG_H */ ++#include ++ ++#if HAVE_USABLE_ICONV ++ ++#include "generic_cjk.h" ++#include "mac_chinese_simp.h" ++ ++static size_t mac_chinese_simp_pull(void *,char **, size_t *, char **, size_t *); ++static size_t mac_chinese_simp_push(void *,char **, size_t *, char **, size_t *); ++ ++struct charset_functions charset_mac_chinese_simp = { ++ "MAC_CHINESE_SIMP", ++ 25, ++ mac_chinese_simp_pull, ++ mac_chinese_simp_push, ++ CHARSET_ICONV | CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED | CHARSET_CLIENT, ++ "EUC-CN", ++ NULL, NULL ++}; ++ ++static size_t mac_chinese_simp_char_push(u_int8_t* out, const ucs2_t* in, size_t* size) ++{ ++ ucs2_t wc = in[0]; ++ ++ if (wc <= 0x7f) { ++ *size = 1; ++ out[0] = (u_int8_t)wc; ++ return 1; ++ } else if ((wc & 0xf000) == 0xe000) { ++ *size = 1; ++ return 0; ++ } else if (*size >= 2 && (in[1] & ~15) == 0xf870) { ++ ucs2_t comp = cjk_compose(wc, in[1], mac_chinese_simp_compose, ++ sizeof(mac_chinese_simp_compose) / sizeof(u_int32_t)); ++ if (comp) { ++ wc = comp; ++ *size = 2; ++ } else { ++ *size = 1; ++ } ++ } else { ++ *size = 1; ++ } ++ return cjk_char_push(cjk_lookup(wc, mac_chinese_simp_uni2_index, ++ mac_chinese_simp_uni2_charset), out); ++} ++ ++static size_t mac_chinese_simp_push(void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ return cjk_generic_push(mac_chinese_simp_char_push, ++ cd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++ ++static size_t mac_chinese_simp_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size) ++{ ++ u_int16_t c = in[0]; ++ ++ if (c <= 0x7f) { ++ *size = 1; ++ *out = c; ++ return 1; ++ } else if (c >= 0xa1 && c <= 0xfc) { ++ if (*size >= 2) { ++ u_int8_t c2 = in[1]; ++ ++ if (c2 >= 0xa1 && c2 <= 0xfe) { ++ *size = 2; ++ c = (c << 8) + c2; ++ } else { ++ errno = EILSEQ; ++ return (size_t)-1; ++ } ++ } else { ++ errno = EINVAL; ++ return (size_t)-1; ++ } ++ } else { ++ *size = 1; ++ } ++ return cjk_char_pull(cjk_lookup(c, mac_chinese_simp_2uni_index, ++ mac_chinese_simp_2uni_charset), ++ out, mac_chinese_simp_compose); ++} ++ ++static size_t mac_chinese_simp_pull(void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ return cjk_generic_pull(mac_chinese_simp_char_pull, ++ cd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++#endif +diff --git a/libatalk/unicode/charsets/mac_chinese_simp.h b/libatalk/unicode/charsets/mac_chinese_simp.h +new file mode 100644 +index 0000000..105f150 +--- /dev/null ++++ b/libatalk/unicode/charsets/mac_chinese_simp.h +@@ -0,0 +1,146 @@ ++/* ++ * MacChineseSimp ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Reference ++ * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ ++ */ ++ ++static const u_int16_t mac_chinese_simp_uni2_page00[][2] = { ++ /* 0x00a */ { 0x022d, 0 }, { 0x0080, 5 }, ++ /* 0x00c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x010 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x014 */ { 0x0110, 6 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x018 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x01c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0200, 8 }, ++ /* 0x020 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x024 */ { 0x0000, 0 }, { 0x0002, 9 }, { 0x0002, 10 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_page1e[][2] = { ++ /* 0x1e3 */ { 0x8000, 11 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_page20[][2] = { ++ /* 0x201 */ { 0x0070, 12 }, { 0x0040, 15 }, { 0x4000, 16 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_page21[][2] = { ++ /* 0x212 */ { 0x0004, 17 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_page22[][2] = { ++ /* 0x22e */ { 0x8000, 18 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_page30[][2] = { ++ /* 0x301 */ { 0x1000, 19 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x304 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x308 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x30c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0800, 20 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_pagee0[][2] = { ++ /* 0xe00 */ { 0x07ff, 21 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_pagef8[][2] = { ++ /* 0xf88 */ { 0x0003, 32 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_pagefe[][2] = { ++ /* 0xfe3 */ { 0xfffa, 34 }, { 0x001f, 48 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_pageff[][2] = { ++ /* 0xff5 */ { 0x4000, 53 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xff8 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xffc */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x002b, 54 }, ++}; ++ ++static const cjk_index_t mac_chinese_simp_uni2_index[] = { ++ { { 0x00a0, 0x026f }, mac_chinese_simp_uni2_page00 }, ++ { { 0x1e30, 0x1e3f }, mac_chinese_simp_uni2_page1e }, ++ { { 0x2010, 0x203f }, mac_chinese_simp_uni2_page20 }, ++ { { 0x2120, 0x212f }, mac_chinese_simp_uni2_page21 }, ++ { { 0x22e0, 0x22ef }, mac_chinese_simp_uni2_page22 }, ++ { { 0x3010, 0x30ff }, mac_chinese_simp_uni2_page30 }, ++ { { 0xe000, 0xe00f }, mac_chinese_simp_uni2_pagee0 }, ++ { { 0xf880, 0xf88f }, mac_chinese_simp_uni2_pagef8 }, ++ { { 0xfe30, 0xfe4f }, mac_chinese_simp_uni2_pagefe }, ++ { { 0xff50, 0xffef }, mac_chinese_simp_uni2_pageff }, ++ { { 0, 0 }, 0 } ++}; ++ ++static const u_int16_t mac_chinese_simp_uni2_charset[] = { ++ 0x00a0, 0xa1e9, 0xa1ea, 0xa3a4, 0x00fd, 0xa1a4, 0xa8bd, 0xa8be, ++ 0xa8bf, 0xa8bb, 0xa8c0, 0xa8bc, 0xa1aa, 0xffff, 0xa1ac, 0x00ff, ++ 0xa3fe, 0x00fe, 0xa1ad, 0xa1ab, 0xffff, 0x0080, 0xa6f3, 0xa6db, ++ 0xa6da, 0xa6ec, 0xa6ed, 0xa6de, 0xa6d9, 0xa6dc, 0xa6dd, 0xa6df, ++ 0x0081, 0x0082, 0xa6f2, 0xa6f4, 0xa6f5, 0xa6e0, 0xa6e1, 0xa6f0, ++ 0xa6f1, 0xa6e2, 0xa6e3, 0xa6ee, 0xa6ef, 0xa6e6, 0xa6e7, 0xa6e4, ++ 0xa6e5, 0xa6e8, 0xa6e9, 0xa6ea, 0xa6eb, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, ++}; ++ ++static const u_int16_t mac_chinese_simp_2uni_page00[][2] = { ++ /* 0x008 */ { 0x0007, 0 }, { 0x0000, 0 }, { 0x0001, 3 }, { 0x0000, 0 }, ++ /* 0x00c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0xe000, 4 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_2uni_pagea1[][2] = { ++ /* 0xa1a */ { 0x3c10, 7 }, { 0x0000, 0 }, ++ /* 0xa1c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0600, 12 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_2uni_pagea3[][2] = { ++ /* 0xa3a */ { 0x0010, 14 }, { 0x0000, 0 }, ++ /* 0xa3c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x4000, 15 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_2uni_pagea6[][2] = { ++ /* 0xa6d */ { 0xfe00, 16 }, { 0xffff, 23 }, { 0x003f, 39 }, ++}; ++ ++static const u_int16_t mac_chinese_simp_2uni_pagea8[][2] = { ++ /* 0xa8b */ { 0xf800, 45 }, { 0x0001, 50 }, ++}; ++ ++static const cjk_index_t mac_chinese_simp_2uni_index[] = { ++ { { 0x0080, 0x00ff }, mac_chinese_simp_2uni_page00 }, ++ { { 0xa1a0, 0xa1ef }, mac_chinese_simp_2uni_pagea1 }, ++ { { 0xa3a0, 0xa3ff }, mac_chinese_simp_2uni_pagea3 }, ++ { { 0xa6d0, 0xa6ff }, mac_chinese_simp_2uni_pagea6 }, ++ { { 0xa8b0, 0xa8cf }, mac_chinese_simp_2uni_pagea8 }, ++ { { 0, 0 }, 0 } ++}; ++ ++static const u_int16_t mac_chinese_simp_2uni_charset[] = { ++ 0xe000, 0xf880, 0xf881, 0x00a0, 0x00a9, 0x2122, 0x2026, 0x00b7, ++ 0x2014, 0x301c, 0x2016, 0x22ef, 0x00a2, 0x00a3, 0x00a5, 0x203e, ++ 0xe007, 0xe003, 0xe002, 0xe008, 0xe009, 0xe006, 0xe00a, 0xfe35, ++ 0xfe36, 0xfe39, 0xfe3a, 0xfe3f, 0xfe40, 0xfe3d, 0xfe3e, 0xfe41, ++ 0xfe42, 0xfe43, 0xfe44, 0xe004, 0xe005, 0xfe3b, 0xfe3c, 0xfe37, ++ 0xfe38, 0xfe31, 0xe001, 0xfe33, 0xfe34, 0x0251, 0x1e3f, 0x0144, ++ 0x0148, 0x01f9, 0x0261, ++}; ++ ++static const u_int32_t mac_chinese_simp_compose[] = { ++ 0x00fcf87f, 0x22eff87e, 0x3001f87e, 0x3002f87e, ++ 0x3016f87e, 0x3017f87e, 0xff01f87e, 0xff0cf87e, ++ 0xff1af87e, 0xff1bf87e, 0xff1ff87e, ++}; +diff --git a/libatalk/unicode/charsets/mac_chinese_trad.c b/libatalk/unicode/charsets/mac_chinese_trad.c +new file mode 100644 +index 0000000..7412bee +--- /dev/null ++++ b/libatalk/unicode/charsets/mac_chinese_trad.c +@@ -0,0 +1,122 @@ ++/* ++ * MacChineseTrad ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Reference ++ * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif /* HAVE_CONFIG_H */ ++#include ++ ++#if HAVE_USABLE_ICONV ++ ++#include "generic_cjk.h" ++#include "mac_chinese_trad.h" ++ ++static size_t mac_chinese_trad_pull(void *,char **, size_t *, char **, size_t *); ++static size_t mac_chinese_trad_push(void *,char **, size_t *, char **, size_t *); ++ ++struct charset_functions charset_mac_chinese_trad = { ++ "MAC_CHINESE_TRAD", ++ 2, ++ mac_chinese_trad_pull, ++ mac_chinese_trad_push, ++ CHARSET_ICONV | CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED | CHARSET_CLIENT, ++ "BIG-5", ++ NULL, NULL ++}; ++ ++static size_t mac_chinese_trad_char_push(u_int8_t* out, const ucs2_t* in, size_t* size) ++{ ++ ucs2_t wc = in[0]; ++ ++ if (wc <= 0x7f) { ++ if (wc == 0x5c && *size >= 2 && in[1] == 0xf87f) { ++ *size = 2; ++ out[0] = 0x80; ++ } else { ++ *size = 1; ++ out[0] = (u_int8_t)wc; ++ } ++ return 1; ++ } else if ((wc & 0xf000) == 0xe000) { ++ *size = 1; ++ return 0; ++ } else if (*size >= 2 && (in[1] & ~15) == 0xf870) { ++ ucs2_t comp = cjk_compose(wc, in[1], mac_chinese_trad_compose, ++ sizeof(mac_chinese_trad_compose) / sizeof(u_int32_t)); ++ if (comp) { ++ wc = comp; ++ *size = 2; ++ } else { ++ *size = 1; ++ } ++ } else { ++ *size = 1; ++ } ++ return cjk_char_push(cjk_lookup(wc, mac_chinese_trad_uni2_index, ++ mac_chinese_trad_uni2_charset), out); ++} ++ ++static size_t mac_chinese_trad_push(void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ return cjk_generic_push(mac_chinese_trad_char_push, ++ cd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++ ++static size_t mac_chinese_trad_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size) ++{ ++ u_int16_t c = in[0]; ++ ++ if (c <= 0x7f) { ++ *size = 1; ++ *out = c; ++ return 1; ++ } else if (c >= 0xa1 && c <= 0xfc) { ++ if (*size >= 2) { ++ u_int8_t c2 = in[1]; ++ ++ if ((c2 >= 0x40 && c2 <= 0x7e) || (c2 >= 0xa1 && c2 <= 0xfe)) { ++ *size = 2; ++ c = (c << 8) + c2; ++ } else { ++ errno = EILSEQ; ++ return (size_t)-1; ++ } ++ } else { ++ errno = EINVAL; ++ return (size_t)-1; ++ } ++ } else { ++ *size = 1; ++ } ++ return cjk_char_pull(cjk_lookup(c, mac_chinese_trad_2uni_index, ++ mac_chinese_trad_2uni_charset), ++ out, mac_chinese_trad_compose); ++} ++ ++static size_t mac_chinese_trad_pull(void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ return cjk_generic_pull(mac_chinese_trad_char_pull, ++ cd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++#endif +diff --git a/libatalk/unicode/charsets/mac_chinese_trad.h b/libatalk/unicode/charsets/mac_chinese_trad.h +new file mode 100644 +index 0000000..2747f35 +--- /dev/null ++++ b/libatalk/unicode/charsets/mac_chinese_trad.h +@@ -0,0 +1,124 @@ ++/* ++ * MacChineseTrad ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Reference ++ * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ ++ */ ++ ++static const u_int16_t mac_chinese_trad_uni2_page00[][2] = { ++ /* 0x00a */ { 0x0201, 0 }, { 0x0080, 2 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_page20[][2] = { ++ /* 0x202 */ { 0x0044, 3 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_page21[][2] = { ++ /* 0x212 */ { 0x0004, 5 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_page22[][2] = { ++ /* 0x229 */ { 0x0020, 6 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x22c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x8000, 7 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_page25[][2] = { ++ /* 0x259 */ { 0x0020, 8 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_page26[][2] = { ++ /* 0x264 */ { 0x0002, 9 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_pagee0[][2] = { ++ /* 0xe00 */ { 0xffff, 10 }, { 0x00ff, 26 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_pagef8[][2] = { ++ /* 0xf88 */ { 0x0003, 34 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_pagefe[][2] = { ++ /* 0xfe4 */ { 0x1000, 36 }, { 0x7ef5, 37 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_pageff[][2] = { ++ /* 0xff6 */ { 0x0010, 49 }, ++}; ++ ++static const cjk_index_t mac_chinese_trad_uni2_index[] = { ++ { { 0x00a0, 0x00bf }, mac_chinese_trad_uni2_page00 }, ++ { { 0x2020, 0x202f }, mac_chinese_trad_uni2_page20 }, ++ { { 0x2120, 0x212f }, mac_chinese_trad_uni2_page21 }, ++ { { 0x2290, 0x22ef }, mac_chinese_trad_uni2_page22 }, ++ { { 0x2590, 0x259f }, mac_chinese_trad_uni2_page25 }, ++ { { 0x2640, 0x264f }, mac_chinese_trad_uni2_page26 }, ++ { { 0xe000, 0xe01f }, mac_chinese_trad_uni2_pagee0 }, ++ { { 0xf880, 0xf88f }, mac_chinese_trad_uni2_pagef8 }, ++ { { 0xfe40, 0xfe5f }, mac_chinese_trad_uni2_pagefe }, ++ { { 0xff60, 0xff6f }, mac_chinese_trad_uni2_pageff }, ++ { { 0, 0 }, 0 } ++}; ++ ++static const u_int16_t mac_chinese_trad_uni2_charset[] = { ++ 0x00a0, 0x00fd, 0xa145, 0xffff, 0x00ff, 0x00fe, 0xa1f2, 0xa14b, ++ 0xffff, 0xffff, 0x0080, 0xa1c3, 0xa279, 0xa14e, 0xa1a3, 0xa1a4, ++ 0xa2cc, 0xa2ce, 0xa1cb, 0xa154, 0xa17d, 0xa17e, 0xa14d, 0xa14f, ++ 0xa150, 0xa1fe, 0xa152, 0xa151, 0xa153, 0xa240, 0xa1c5, 0xa15a, ++ 0xa1a1, 0xa1a2, 0x0081, 0x0082, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, ++}; ++ ++static const u_int16_t mac_chinese_trad_2uni_page00[][2] = { ++ /* 0x008 */ { 0x0007, 0 }, { 0x0000, 0 }, { 0x0001, 3 }, { 0x0000, 0 }, ++ /* 0x00c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0xe000, 4 }, ++}; ++ ++static const u_int16_t mac_chinese_trad_2uni_pagea1[][2] = { ++ /* 0xa14 */ { 0xe820, 7 }, { 0x041f, 12 }, { 0x0000, 0 }, { 0x6000, 18 }, ++ /* 0xa18 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x001e, 20 }, { 0x0000, 0 }, ++ /* 0xa1c */ { 0x0828, 24 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x4004, 27 }, ++ /* 0xa20 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa24 */ { 0x0001, 29 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0200, 30 }, ++ /* 0xa28 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa2c */ { 0x5000, 31 }, ++}; ++ ++static const cjk_index_t mac_chinese_trad_2uni_index[] = { ++ { { 0x0080, 0x00ff }, mac_chinese_trad_2uni_page00 }, ++ { { 0xa140, 0xa2cf }, mac_chinese_trad_2uni_pagea1 }, ++ { { 0, 0 }, 0 } ++}; ++ ++static const u_int16_t mac_chinese_trad_2uni_charset[] = { ++ 0xe000, 0xf880, 0xf881, 0x00a0, 0x00a9, 0x2122, 0x2026, 0x00b7, ++ 0x22ef, 0xe00c, 0xe003, 0xe00d, 0xe00e, 0xe011, 0xe010, 0xe012, ++ 0xe009, 0xe015, 0xe00a, 0xe00b, 0xe016, 0xe017, 0xe004, 0xe005, ++ 0xe001, 0xe014, 0xe008, 0x2295, 0xe00f, 0xe013, 0xe002, 0xe006, ++ 0xe007, ++}; ++ ++static const u_int32_t mac_chinese_trad_compose[] = { ++ 0x005cf87f, 0x203ef87c, 0x2502f87f, 0x3001f87d, ++ 0x3014f87f, 0x3015f87f, 0x5341f87f, 0x5345f87f, ++ 0xfe4bf87c, 0xff01f87d, 0xff08f87f, 0xff09f87f, ++ 0xff0cf87d, 0xff0ef87d, 0xff0ef87e, 0xff0ff87f, ++ 0xff1af87d, 0xff1bf87d, 0xff1ff87d, 0xff3cf87f, ++ 0xff3ff87c, 0xff3ff87f, 0xff5bf87f, 0xff5df87f, ++}; +diff --git a/libatalk/unicode/charsets/mac_cyrillic.c b/libatalk/unicode/charsets/mac_cyrillic.c +index 9d3e0c1..bf3d9e7 100644 +--- a/libatalk/unicode/charsets/mac_cyrillic.c ++++ b/libatalk/unicode/charsets/mac_cyrillic.c +@@ -45,7 +45,7 @@ struct charset_functions charset_mac_cyrillic = + mac_cyrillic_pull, + mac_cyrillic_push, + CHARSET_CLIENT | CHARSET_MULTIBYTE, +- NULL, NULL ++ NULL, NULL, NULL + }; + + +diff --git a/libatalk/unicode/charsets/mac_greek.c b/libatalk/unicode/charsets/mac_greek.c +index f41846d..5fb3af9 100644 +--- a/libatalk/unicode/charsets/mac_greek.c ++++ b/libatalk/unicode/charsets/mac_greek.c +@@ -46,7 +46,7 @@ struct charset_functions charset_mac_greek = + mac_greek_pull, + mac_greek_push, + CHARSET_CLIENT | CHARSET_MULTIBYTE, +- NULL, NULL ++ NULL, NULL, NULL + }; + + /* ------------------------ */ +diff --git a/libatalk/unicode/charsets/mac_hebrew.c b/libatalk/unicode/charsets/mac_hebrew.c +index 2830458..017104b 100644 +--- a/libatalk/unicode/charsets/mac_hebrew.c ++++ b/libatalk/unicode/charsets/mac_hebrew.c +@@ -48,7 +48,7 @@ struct charset_functions charset_mac_hebrew = + mac_hebrew_pull, + mac_hebrew_push, + CHARSET_CLIENT | CHARSET_MULTIBYTE, +- NULL, NULL ++ NULL, NULL, NULL + }; + + +diff --git a/libatalk/unicode/charsets/mac_japanese.c b/libatalk/unicode/charsets/mac_japanese.c +new file mode 100644 +index 0000000..b78ce01 +--- /dev/null ++++ b/libatalk/unicode/charsets/mac_japanese.c +@@ -0,0 +1,130 @@ ++/* ++ * MacJapanese ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Reference ++ * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif /* HAVE_CONFIG_H */ ++#include ++ ++#if HAVE_USABLE_ICONV ++ ++#include "generic_cjk.h" ++#include "mac_japanese.h" ++ ++static size_t mac_japanese_pull(void *,char **, size_t *, char **, size_t *); ++static size_t mac_japanese_push(void *,char **, size_t *, char **, size_t *); ++ ++struct charset_functions charset_mac_japanese = { ++ "MAC_JAPANESE", ++ 1, ++ mac_japanese_pull, ++ mac_japanese_push, ++ CHARSET_ICONV | CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED | CHARSET_CLIENT, ++ "SHIFT_JIS", ++ NULL, NULL ++}; ++ ++static size_t mac_japanese_char_push(u_int8_t* out, const ucs2_t* in, size_t* size) ++{ ++ ucs2_t wc = in[0]; ++ ++ if (wc <= 0x7f) { ++ *size = 1; ++ out[0] = (u_int8_t)(wc == 0x5c ? 0x80 : wc); ++ return 1; ++ } else if ((wc & 0xf000) == 0xe000) { /* user defined */ ++ *size = 1; ++ if (wc > 0xe98b) return 0; ++ wc -= 0xe000; ++ out[0] = (u_int8_t)(wc / 188 + 0xf0); ++ out[1] = (u_int8_t)(wc % 188 + 0x40); ++ if (out[1] >= 0x7f) ++out[1]; ++ return 2; ++ } else if ((wc & ~7) == 0xf860) { ++ wc = cjk_compose_seq(in, size, mac_japanese_compose, ++ sizeof(mac_japanese_compose) / sizeof(u_int32_t)); ++ if (!wc) return (size_t)-1; ++ } else if (*size >= 2 && ((in[1] & ~15) == 0xf870 || in[1] == 0x20dd)) { ++ ucs2_t comp = cjk_compose(wc, in[1], mac_japanese_compose, ++ sizeof(mac_japanese_compose) / sizeof(u_int32_t)); ++ if (comp) { ++ wc = comp; ++ *size = 2; ++ } else { ++ *size = 1; ++ } ++ } else { ++ *size = 1; ++ } ++ return cjk_char_push(cjk_lookup(wc, mac_japanese_uni2_index, ++ mac_japanese_uni2_charset), out); ++} ++ ++static size_t mac_japanese_push(void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ return cjk_generic_push(mac_japanese_char_push, ++ cd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++ ++static size_t mac_japanese_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size) ++{ ++ u_int16_t c = in[0]; ++ ++ if (c <= 0x7f) { ++ *size = 1; ++ *out = (c == 0x5c ? 0xa5 : c); ++ return 1; ++ } else if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) { ++ if (*size >= 2) { ++ u_int8_t c2 = in[1]; ++ ++ if ((c2 >= 0x40 && c2 <= 0x7e) || (c2 >= 0x80 && c2 <= 0xfc)) { ++ *size = 2; ++ if (c >= 0xf0) { /* user defined */ ++ *out = 0xe000 + (c - 0xf0) * 188 + c2 - (c2 < 0x80 ? 0x40 : 0x41); ++ return 1; ++ } ++ c = (c << 8) + c2; ++ } else { ++ errno = EILSEQ; ++ return (size_t)-1; ++ } ++ } else { ++ errno = EINVAL; ++ return (size_t)-1; ++ } ++ } else { ++ *size = 1; ++ } ++ return cjk_char_pull(cjk_lookup(c, mac_japanese_2uni_index, ++ mac_japanese_2uni_charset), ++ out, mac_japanese_compose); ++} ++ ++static size_t mac_japanese_pull(void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ return cjk_generic_pull(mac_japanese_char_pull, ++ cd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++#endif +diff --git a/libatalk/unicode/charsets/mac_japanese.h b/libatalk/unicode/charsets/mac_japanese.h +new file mode 100644 +index 0000000..d032a83 +--- /dev/null ++++ b/libatalk/unicode/charsets/mac_japanese.h +@@ -0,0 +1,252 @@ ++/* ++ * MacJapanese ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Reference ++ * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ ++ */ ++ ++static const u_int16_t mac_japanese_uni2_page00[][2] = { ++ /* 0x00a */ { 0x0201, 1 }, ++}; ++ ++static const u_int16_t mac_japanese_uni2_page20[][2] = { ++ /* 0x201 */ { 0x0030, 3 }, { 0x0000, 0 }, { 0x4000, 5 }, ++ /* 0x204 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x208 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x20c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x210 */ { 0x0200, 6 }, { 0x0048, 7 }, { 0x0006, 9 }, { 0x0000, 0 }, ++ /* 0x214 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0fff, 11 }, { 0x0fff, 23 }, ++ /* 0x218 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x21c */ { 0x0070, 35 }, { 0x0000, 0 }, { 0x03c0, 38 }, { 0x0000, 0 }, ++ /* 0x220 */ { 0x0000, 0 }, { 0x8000, 42 }, { 0x4000, 43 }, { 0x0000, 0 }, ++ /* 0x224 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x228 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x8000, 44 }, ++}; ++ ++static const u_int16_t mac_japanese_uni2_page24[][2] = { ++ /* 0x246 */ { 0xffff, 45 }, { 0xffff, 61 }, ++ /* 0x248 */ { 0xffff, 77 }, { 0xf001, 93 }, { 0xffff, 98 }, { 0x003f, 114 }, ++}; ++ ++static const u_int16_t mac_japanese_uni2_page26[][2] = { ++ /* 0x260 */ { 0x4000, 120 }, { 0xf000, 121 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x264 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x00ff, 125 }, { 0x0000, 0 }, ++ /* 0x268 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x26c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x270 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x274 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x7fc0, 133 }, ++}; ++ ++static const u_int16_t mac_japanese_uni2_page30[][2] = { ++ /* 0x300 */ { 0x0010, 142 }, { 0xa000, 143 }, { 0x0001, 145 }, { 0x0000, 0 }, ++ /* 0x304 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x308 */ { 0x0000, 0 }, { 0x0010, 146 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x30c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0780, 147 }, ++}; ++ ++static const u_int16_t mac_japanese_uni2_page32[][2] = { ++ /* 0x322 */ { 0xfc00, 151 }, { 0xffff, 157 }, ++ /* 0x324 */ { 0x000d, 173 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x328 */ { 0x0000, 0 }, { 0x6340, 176 }, { 0x03f0, 181 }, { 0x0000, 0 }, ++ /* 0x32c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x330 */ { 0x2029, 187 }, { 0x4170, 191 }, { 0x0ccc, 196 }, { 0x0a4a, 202 }, ++ /* 0x334 */ { 0x6684, 207 }, { 0x0082, 213 }, { 0x0000, 0 }, { 0xf800, 215 }, ++ /* 0x338 */ { 0xc0e0, 220 }, { 0xf1c1, 225 }, { 0x0037, 233 }, { 0x000f, 238 }, ++ /* 0x33c */ { 0x2810, 242 }, { 0x0010, 245 }, ++}; ++ ++static const u_int16_t mac_japanese_uni2_pagee0[][2] = { ++ /* 0xe00 */ { 0xffff, 246 }, { 0xffff, 262 }, { 0x0fff, 278 }, { 0x001f, 290 }, ++ /* 0xe04 */ { 0x7f00, 295 }, ++}; ++ ++static const u_int16_t mac_japanese_uni2_pagefe[][2] = { ++ /* 0xfe3 */ { 0xffeb, 302 }, ++ /* 0xfe4 */ { 0x001f, 316 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xfe8 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xfec */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xff0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x1000, 321 }, ++}; ++ ++static const cjk_index_t mac_japanese_uni2_index[] = { ++ { { 0x00a0, 0x00af }, mac_japanese_uni2_page00 }, ++ { { 0x2010, 0x22bf }, mac_japanese_uni2_page20 }, ++ { { 0x2460, 0x24bf }, mac_japanese_uni2_page24 }, ++ { { 0x2600, 0x277f }, mac_japanese_uni2_page26 }, ++ { { 0x3000, 0x30ff }, mac_japanese_uni2_page30 }, ++ { { 0x3220, 0x33df }, mac_japanese_uni2_page32 }, ++ { { 0xe000, 0xe04f }, mac_japanese_uni2_pagee0 }, ++ { { 0xfe30, 0xff3f }, mac_japanese_uni2_pagefe }, ++ { { 0, 0 }, 0 } ++}; ++ ++static const u_int16_t mac_japanese_uni2_charset[] = { ++ 0x0080, 0x00a0, 0x00fd, 0x815c, 0xffff, 0xffff, 0x8656, 0x8650, ++ 0x869b, 0x869d, 0x00fe, 0x859f, 0x85a0, 0x85a1, 0x85a2, 0x85a3, ++ 0x85a4, 0x85a5, 0x85a6, 0x85a7, 0x85a8, 0x85a9, 0x85aa, 0x85b3, ++ 0x85b4, 0x85b5, 0x85b6, 0x85b7, 0x85b8, 0x85b9, 0x85ba, 0x85bb, ++ 0x85bc, 0x85bd, 0x85be, 0x86cc, 0x86cd, 0x86cb, 0x86d0, 0x86d1, ++ 0x86cf, 0x86d2, 0x8841, 0x8840, 0x8842, 0x8540, 0x8541, 0x8542, ++ 0x8543, 0x8544, 0x8545, 0x8546, 0x8547, 0x8548, 0x8549, 0x854a, ++ 0x854b, 0x854c, 0x854d, 0x854e, 0x854f, 0x8550, 0x8551, 0x8552, ++ 0x8553, 0x855e, 0x855f, 0x8560, 0x8561, 0x8562, 0x8563, 0x8564, ++ 0x8565, 0x8566, 0x8567, 0x8568, 0x8569, 0x856a, 0x856b, 0x856c, ++ 0x856d, 0x856e, 0x856f, 0x8570, 0x8571, 0x8592, 0x8593, 0x8594, ++ 0x8595, 0x8596, 0x8597, 0x8598, 0x8599, 0x859a, 0x85db, 0x85dc, ++ 0x85dd, 0x85de, 0x85df, 0x85e0, 0x85e1, 0x85e2, 0x85e3, 0x85e4, ++ 0x85e5, 0x85e6, 0x85e7, 0x85e8, 0x85e9, 0x85ea, 0x85eb, 0x85ec, ++ 0x85ed, 0x85ee, 0x85ef, 0x85f0, 0x85f1, 0x85f2, 0x85f3, 0x85f4, ++ 0x86b4, 0x86c8, 0x86c9, 0x86c7, 0x86ca, 0x86a3, 0x86a1, 0x86a2, ++ 0x86a4, 0x869f, 0x86a5, 0x86a6, 0x86a0, 0x857c, 0x857d, 0x857e, ++ 0x8580, 0x8581, 0x8582, 0x8583, 0x8584, 0x8585, 0x86b5, 0x8854, ++ 0x8855, 0x86b3, 0x8868, 0x886a, 0x886b, 0x886c, 0x886d, 0x8741, ++ 0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x8740, 0x874d, 0x8750, ++ 0x8753, 0x874f, 0x8754, 0x8752, 0x8748, 0x8758, 0x874b, 0x874c, ++ 0x8751, 0x8755, 0x8756, 0x874e, 0x8757, 0x8747, 0x8749, 0x874a, ++ 0x8799, 0x879b, 0x879e, 0x879a, 0x879c, 0x8793, 0x8794, 0x8795, ++ 0x8796, 0x8797, 0x8798, 0x87bd, 0x87a7, 0x87a4, 0x87b0, 0x87a2, ++ 0x87aa, 0x87a3, 0x87a9, 0x87be, 0x87a0, 0x87b2, 0x87b3, 0x87ab, ++ 0x87bf, 0x87b5, 0x87c0, 0x87a5, 0x87a8, 0x87ae, 0x87b4, 0x87b1, ++ 0x87c1, 0x879f, 0x87ad, 0x87a1, 0x87a6, 0x87ac, 0x87af, 0x87e8, ++ 0x87e7, 0x87e6, 0x87e5, 0x87fa, 0x865a, 0x865b, 0x865c, 0x864a, ++ 0x864c, 0x8659, 0x864e, 0x864f, 0x8651, 0x8640, 0x8642, 0x8648, ++ 0x8641, 0x8643, 0x8646, 0x8649, 0x8644, 0x8647, 0x8655, 0x8654, ++ 0x8653, 0x8652, 0x864d, 0x8658, 0x869c, 0x8657, 0xeb5d, 0xeb61, ++ 0xeb63, 0x00ff, 0x86d4, 0x86d5, 0x86d3, 0x86d6, 0xeb41, 0xeb42, ++ 0xeb60, 0xec9f, 0xeca1, 0xeca3, 0xeca5, 0xeca7, 0xecc1, 0xece1, ++ 0xece3, 0xece5, 0xecec, 0xed40, 0xed42, 0xed44, 0xed46, 0xed48, ++ 0xed62, 0xed83, 0xed85, 0xed87, 0xed8e, 0xed95, 0xed96, 0xeb5b, ++ 0x8791, 0x8792, 0x879d, 0x85ab, 0x85bf, 0x87fb, 0x87fc, 0x869e, ++ 0x85ac, 0x85c0, 0x8591, 0x865d, 0x85ad, 0x85c1, 0x86ce, 0xeb81, ++ 0xeb6d, 0xeb6e, 0x864b, 0x8645, 0xeb62, 0xeb50, 0xeb64, 0xeb5c, ++ 0xeb51, 0xeb69, 0xeb6a, 0xeb6f, 0xeb70, 0xeb6b, 0xeb6c, 0xeb79, ++ 0xeb7a, 0xeb73, 0xeb74, 0xeb71, 0xeb72, 0xeb75, 0xeb76, 0xeb77, ++ 0xeb78, 0x815f, ++}; ++ ++static const u_int16_t mac_japanese_2uni_page00[][2] = { ++ /* 0x008 */ { 0x0001, 0 }, { 0x0000, 0 }, { 0x0001, 1 }, { 0x0000, 0 }, ++ /* 0x00c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0xe000, 2 }, ++}; ++ ++static const u_int16_t mac_japanese_2uni_page81[][2] = { ++ /* 0x815 */ { 0x9000, 5 }, ++}; ++ ++static const u_int16_t mac_japanese_2uni_page85[][2] = { ++ /* 0x854 */ { 0xffff, 7 }, { 0xc00f, 23 }, { 0xffff, 29 }, { 0x7003, 45 }, ++ /* 0x858 */ { 0x003f, 50 }, { 0x87fe, 56 }, { 0x3fff, 67 }, { 0xfff8, 81 }, ++ /* 0x85c */ { 0x0003, 94 }, { 0xf800, 96 }, { 0xffff, 101 }, { 0x001f, 117 }, ++ /* 0x860 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x864 */ { 0xffff, 122 }, { 0x3fff, 138 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x868 */ { 0x0000, 0 }, { 0xf800, 152 }, { 0x007f, 157 }, { 0x0038, 164 }, ++ /* 0x86c */ { 0xff80, 167 }, { 0x007f, 176 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x870 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x874 */ { 0xffff, 183 }, { 0x01ff, 199 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x878 */ { 0x0000, 0 }, { 0xfffe, 208 }, { 0xffff, 223 }, { 0xe03f, 239 }, ++ /* 0x87c */ { 0x0003, 248 }, { 0x0000, 0 }, { 0x01e0, 250 }, { 0x1c00, 254 }, ++ /* 0x880 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x884 */ { 0x0007, 257 }, { 0x0030, 260 }, { 0x3d00, 262 }, ++}; ++ ++static const u_int16_t mac_japanese_2uni_pageeb[][2] = { ++ /* 0xeb4 */ { 0x0006, 267 }, { 0x3803, 269 }, { 0xfe1f, 274 }, { 0x07ff, 286 }, ++ /* 0xeb8 */ { 0x0002, 297 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xebc */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xec0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xec4 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xec8 */ { 0x0000, 0 }, { 0x8000, 298 }, { 0x00aa, 299 }, { 0x0000, 0 }, ++ /* 0xecc */ { 0x0002, 303 }, { 0x0000, 0 }, { 0x102a, 304 }, { 0x0000, 0 }, ++ /* 0xed0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xed4 */ { 0x0155, 308 }, { 0x0000, 0 }, { 0x0004, 313 }, { 0x0000, 0 }, ++ /* 0xed8 */ { 0x40a8, 314 }, { 0x0060, 318 }, ++}; ++ ++static const cjk_index_t mac_japanese_2uni_index[] = { ++ { { 0x0080, 0x00ff }, mac_japanese_2uni_page00 }, ++ { { 0x8150, 0x815f }, mac_japanese_2uni_page81 }, ++ { { 0x8540, 0x886f }, mac_japanese_2uni_page85 }, ++ { { 0xeb40, 0xed9f }, mac_japanese_2uni_pageeb }, ++ { { 0, 0 }, 0 } ++}; ++ ++static const u_int16_t mac_japanese_2uni_charset[] = { ++ 0x005c, 0x00a0, 0x00a9, 0x2122, 0xe003, 0x2014, 0xff3c, 0x2460, ++ 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, ++ 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f, 0x2470, ++ 0x2471, 0x2472, 0x2473, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, ++ 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f, 0x2480, ++ 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487, 0x2776, ++ 0x2777, 0x2778, 0x2779, 0x277a, 0x277b, 0x277c, 0x277d, 0x277e, ++ 0xe030, 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, ++ 0x248f, 0x2490, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, ++ 0x2166, 0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0xe025, 0xe02a, ++ 0xe032, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, ++ 0x2177, 0x2178, 0x2179, 0x217a, 0x217b, 0xe026, 0xe02b, 0xe033, ++ 0x249c, 0x249d, 0x249e, 0x249f, 0x24a0, 0x24a1, 0x24a2, 0x24a3, ++ 0x24a4, 0x24a5, 0x24a6, 0x24a7, 0x24a8, 0x24a9, 0x24aa, 0x24ab, ++ 0x24ac, 0x24ad, 0x24ae, 0x24af, 0x24b0, 0x24b1, 0x24b2, 0x24b3, ++ 0x24b4, 0x24b5, 0x339c, 0x339f, 0x339d, 0x33a0, 0x33a4, 0xe04c, ++ 0x33a1, 0x33a5, 0x339e, 0x33a2, 0x338e, 0xe04b, 0x338f, 0x33c4, ++ 0x3396, 0x3397, 0x2113, 0x3398, 0x33b3, 0x33b2, 0x33b1, 0x33b0, ++ 0x2109, 0x33d4, 0x33cb, 0x3390, 0x3385, 0x3386, 0x3387, 0xe031, ++ 0x2116, 0x33cd, 0x2121, 0xe029, 0x2664, 0x2667, 0x2661, 0x2662, ++ 0x2660, 0x2663, 0x2665, 0x2666, 0x3020, 0x260e, 0x3004, 0x261e, ++ 0x261c, 0x261d, 0x261f, 0x21c6, 0x21c4, 0x21c5, 0xe034, 0x21e8, ++ 0x21e6, 0x21e7, 0x21e9, 0xe006, 0xe004, 0xe005, 0xe007, 0x3230, ++ 0x322a, 0x322b, 0x322c, 0x322d, 0x322e, 0x322f, 0x3240, 0x3237, ++ 0x3242, 0x3243, 0x3239, 0x323a, 0x3231, 0x323e, 0x3234, 0x3232, ++ 0x323b, 0x3236, 0x3233, 0x3235, 0x323c, 0x323d, 0x323f, 0x3238, ++ 0xe022, 0xe023, 0x32a4, 0x32a5, 0x32a6, 0x32a7, 0x32a8, 0x32a9, ++ 0x3296, 0x329d, 0x3298, 0x329e, 0xe024, 0x3299, 0x3349, 0x3322, ++ 0x334d, 0x3314, 0x3316, 0x3305, 0x3333, 0x334e, 0x3303, 0x3336, ++ 0x3318, 0x3315, 0x3327, 0x3351, 0x334a, 0x3339, 0x3357, 0x330d, ++ 0x3342, 0x3323, 0x3326, 0x333b, 0x332b, 0x3300, 0x331e, 0x332a, ++ 0x3331, 0x3347, 0x337e, 0x337d, 0x337c, 0x337b, 0x337f, 0xe027, ++ 0xe028, 0x222e, 0x221f, 0x22bf, 0x301d, 0x301f, 0x3094, 0x30f7, ++ 0x30f8, 0x30f9, 0x30fa, 0xe008, 0xe009, 0xe04e, 0xfe33, 0xe021, ++ 0xfe31, 0xe000, 0xe00a, 0xe001, 0xe04d, 0xe002, 0xfe30, 0xfe35, ++ 0xfe36, 0xfe39, 0xfe3a, 0xe049, 0xe04a, 0xfe37, 0xfe38, 0xfe3f, ++ 0xfe40, 0xfe3d, 0xfe3e, 0xfe41, 0xfe42, 0xfe43, 0xfe44, 0xfe3b, ++ 0xfe3c, 0xe048, 0xe00b, 0xe00c, 0xe00d, 0xe00e, 0xe00f, 0xe010, ++ 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016, 0xe017, 0xe018, ++ 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, 0xe01f, 0xe020, ++}; ++ ++static const u_int32_t mac_japanese_compose[] = { ++ 0x2010f87e, 0x2016f87e, 0x2026f87e, 0x2026f87f, ++ 0x21e6f87a, 0x21e7f87a, 0x21e8f87a, 0x21e9f87a, ++ 0x3001f87e, 0x3002f87e, 0x301cf87e, 0x3041f87e, ++ 0x3043f87e, 0x3045f87e, 0x3047f87e, 0x3049f87e, ++ 0x3063f87e, 0x3083f87e, 0x3085f87e, 0x3087f87e, ++ 0x308ef87e, 0x30a1f87e, 0x30a3f87e, 0x30a5f87e, ++ 0x30a7f87e, 0x30a9f87e, 0x30c3f87e, 0x30e3f87e, ++ 0x30e5f87e, 0x30e7f87e, 0x30eef87e, 0x30f5f87e, ++ 0x30f6f87e, 0x30fcf87e, 0x592720dd, 0x5c0f20dd, ++ 0x63a720dd, 0xe02c0049, 0xe02d0069, 0xe02e793e, ++ 0xe02f4eba, 0xe0350058, 0xe0360056, 0xe0370076, ++ 0xe0380049, 0xe0390069, 0xe03a4f1a, 0xe03b6cd5, ++ 0xe03c002e, 0xe03d0042, 0xe03e0056, 0xe03f0076, ++ 0xe0402191, 0xe0410041, 0xe0420049, 0xe0430069, ++ 0xe0440049, 0xe0450069, 0xe0469650, 0xe04756e3, ++ 0xf8600030, 0xf8600054, 0xf8600058, 0xf8600078, ++ 0xf8602193, 0xf8610046, 0xf8610058, 0xf8610078, ++ 0xf8620058, 0xf8620078, 0xf8626709, 0xf8628ca1, ++ 0xff1df87e, 0xff3bf87e, 0xff3df87e, 0xff47f87f, ++ 0xff4df87f, 0xff5cf87e, 0xffe3f87e, ++}; +diff --git a/libatalk/unicode/charsets/mac_korean.c b/libatalk/unicode/charsets/mac_korean.c +new file mode 100644 +index 0000000..a16f4a0 +--- /dev/null ++++ b/libatalk/unicode/charsets/mac_korean.c +@@ -0,0 +1,126 @@ ++/* ++ * MacKorean ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Reference ++ * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif /* HAVE_CONFIG_H */ ++#include ++ ++#if HAVE_USABLE_ICONV ++ ++#include "generic_cjk.h" ++#include "mac_korean.h" ++ ++static size_t mac_korean_pull(void *,char **, size_t *, char **, size_t *); ++static size_t mac_korean_push(void *,char **, size_t *, char **, size_t *); ++ ++struct charset_functions charset_mac_korean = { ++ "MAC_KOREAN", ++ 3, ++ mac_korean_pull, ++ mac_korean_push, ++ CHARSET_ICONV | CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED | CHARSET_CLIENT, ++ "EUC-KR", ++ NULL, NULL ++}; ++ ++static size_t mac_korean_char_push(u_int8_t* out, const ucs2_t* in, size_t* size) ++{ ++ ucs2_t wc = in[0]; ++ ++ if ((wc & ~7) == 0xf860) { ++ wc = cjk_compose_seq(in, size, mac_korean_compose, ++ sizeof(mac_korean_compose) / sizeof(u_int32_t)); ++ if (!wc) return (size_t)-1; ++ } else if ((wc & 0xf000) == 0xe000) { ++ *size = 1; ++ return 0; ++ } else if (*size >= 2) { ++ ucs2_t comb = in[1]; ++ size_t n = 1; ++ ++ while ((comb & ~15) == 0xf870 || ++ (comb >= 0x0300 && comb <= 0x036f) || ++ (comb >= 0x20d0 && comb <= 0x20ea)) { ++ ucs2_t comp = cjk_compose(wc, comb, mac_korean_compose, ++ sizeof(mac_korean_compose) / sizeof(u_int32_t)); ++ if (!comp) break; ++ wc = comp; ++ if (++n == *size) break; ++ comb = in[n]; ++ } ++ *size = n; ++ } else { ++ *size = 1; ++ } ++ if (wc <= 0x7f) { ++ out[0] = (u_int8_t)wc; ++ return 1; ++ } ++ return cjk_char_push(cjk_lookup(wc, mac_korean_uni2_index, ++ mac_korean_uni2_charset), out); ++} ++ ++static size_t mac_korean_push(void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ return cjk_generic_push(mac_korean_char_push, ++ cd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++ ++static size_t mac_korean_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size) ++{ ++ u_int16_t c = in[0]; ++ ++ if (c <= 0x7f) { ++ *size = 1; ++ *out = c; ++ return 1; ++ } else if (c >= 0xa1 && c <= 0xfe) { ++ if (*size >= 2) { ++ u_int8_t c2 = in[1]; ++ if ((c2 >= 0x41 && c2 <= 0x7d) || (c2 >= 0x81 && c2 <= 0xfe)) { ++ *size = 2; ++ c = (c << 8) + c2; ++ } else { ++ errno = EILSEQ; ++ return (size_t)-1; ++ } ++ } else { ++ errno = EINVAL; ++ return (size_t)-1; ++ } ++ } else { ++ *size = 1; ++ } ++ return cjk_char_pull(cjk_lookup(c, mac_korean_2uni_index, ++ mac_korean_2uni_charset), ++ out, mac_korean_compose); ++} ++ ++static size_t mac_korean_pull(void *cd, char **inbuf, size_t *inbytesleft, ++ char **outbuf, size_t *outbytesleft) ++{ ++ return cjk_generic_pull(mac_korean_char_pull, ++ cd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++#endif +diff --git a/libatalk/unicode/charsets/mac_korean.h b/libatalk/unicode/charsets/mac_korean.h +new file mode 100644 +index 0000000..578ac51 +--- /dev/null ++++ b/libatalk/unicode/charsets/mac_korean.h +@@ -0,0 +1,771 @@ ++/* ++ * MacKorean ++ * Copyright (C) TSUBAKIMOTO Hiroya 2004 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * Reference ++ * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ ++ */ ++ ++static const u_int16_t mac_korean_uni2_page00[][2] = { ++ /* 0x00a */ { 0x7a2d, 0 }, { 0x0880, 9 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_page02[][2] = { ++ /* 0x02b */ { 0x1000, 11 }, ++ /* 0x02c */ { 0x0000, 0 }, { 0x1001, 12 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x030 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x034 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x038 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x03c */ { 0x0000, 0 }, { 0x0020, 14 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_page20[][2] = { ++ /* 0x201 */ { 0x8878, 15 }, { 0x0004, 21 }, { 0x5670, 22 }, ++ /* 0x204 */ { 0x7284, 29 }, { 0x0002, 35 }, { 0x0000, 0 }, { 0x7c00, 36 }, ++ /* 0x208 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x1200, 41 }, { 0x0000, 0 }, ++ /* 0x20c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x210 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x214 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x218 */ { 0x0000, 0 }, { 0x3000, 43 }, { 0x0000, 0 }, { 0x10df, 45 }, ++ /* 0x21c */ { 0xa031, 53 }, { 0x0001, 58 }, { 0x03cf, 59 }, { 0x0001, 67 }, ++ /* 0x220 */ { 0x1240, 68 }, { 0x8008, 71 }, { 0x0064, 73 }, { 0x1080, 76 }, ++ /* 0x224 */ { 0x0128, 78 }, { 0x040b, 81 }, { 0xccc4, 85 }, { 0x0ecf, 92 }, ++ /* 0x228 */ { 0x0033, 101 }, { 0x02e0, 105 }, { 0x0018, 109 }, { 0x1800, 111 }, ++ /* 0x22c */ { 0xc000, 113 }, { 0x0c00, 115 }, { 0x4000, 117 }, { 0x0000, 0 }, ++ /* 0x230 */ { 0x0040, 118 }, { 0x0010, 119 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_page24[][2] = { ++ /* 0x246 */ { 0x8000, 120 }, { 0x000f, 121 }, ++ /* 0x248 */ { 0x00f8, 125 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0xffc0, 130 }, ++ /* 0x24c */ { 0xffff, 140 }, { 0x0000, 0 }, { 0xf800, 156 }, { 0x001f, 161 }, ++ /* 0x250 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x254 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x258 */ { 0x0100, 166 }, { 0x0000, 0 }, { 0x2004, 167 }, { 0x8222, 169 }, ++ /* 0x25c */ { 0x3608, 173 }, { 0x0000, 0 }, { 0x8040, 178 }, { 0x1800, 180 }, ++ /* 0x260 */ { 0x0000, 0 }, { 0xa001, 182 }, { 0x8000, 185 }, { 0x0000, 0 }, ++ /* 0x264 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x8040, 186 }, { 0x0000, 0 }, ++ /* 0x268 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x26c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x270 */ { 0x0000, 0 }, { 0x0440, 188 }, { 0x0009, 190 }, { 0xa002, 192 }, ++ /* 0x274 */ { 0x2083, 195 }, { 0x0040, 199 }, { 0x0000, 0 }, { 0xffc0, 200 }, ++ /* 0x278 */ { 0xfc00, 210 }, { 0x581f, 216 }, { 0x0012, 224 }, { 0x0024, 226 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_page29[][2] = { ++ /* 0x293 */ { 0x02f0, 228 }, ++ /* 0x294 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x003c, 233 }, { 0x0000, 0 }, ++ /* 0x298 */ { 0x0062, 237 }, { 0x0180, 240 }, { 0x0008, 242 }, { 0xc000, 243 }, ++ /* 0x29c */ { 0x0100, 245 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x2a0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0040, 246 }, { 0x0100, 247 }, ++ /* 0x2a4 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0004, 248 }, ++ /* 0x2a8 */ { 0x1800, 249 }, { 0x0006, 251 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x2ac */ { 0x1860, 253 }, { 0x0000, 0 }, { 0x0100, 257 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_page30[][2] = { ++ /* 0x301 */ { 0xd3c4, 258 }, { 0x0001, 266 }, { 0x0040, 267 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_page32[][2] = { ++ /* 0x323 */ { 0x0202, 268 }, ++ /* 0x324 */ { 0x0000, 0 }, { 0x07fe, 270 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x328 */ { 0xfc00, 280 }, { 0x4011, 286 }, { 0x0020, 289 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_page33[][2] = { ++ /* 0x33c */ { 0x0800, 290 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_pagee0[][2] = { ++ /* 0xe00 */ { 0xffff, 291 }, { 0xffff, 307 }, { 0xffff, 323 }, { 0xffff, 339 }, ++ /* 0xe04 */ { 0xffff, 355 }, { 0xffff, 371 }, { 0xffff, 387 }, { 0xffff, 403 }, ++ /* 0xe08 */ { 0xffff, 419 }, { 0xffff, 435 }, { 0xffff, 451 }, { 0xffff, 467 }, ++ /* 0xe0c */ { 0xffff, 483 }, { 0xffff, 499 }, { 0xffff, 515 }, { 0xffff, 531 }, ++ /* 0xe10 */ { 0xffff, 547 }, { 0xffff, 563 }, { 0xffff, 579 }, { 0xffff, 595 }, ++ /* 0xe14 */ { 0xffff, 611 }, { 0xffff, 627 }, { 0xffff, 643 }, { 0xffff, 659 }, ++ /* 0xe18 */ { 0xffff, 675 }, { 0xffff, 691 }, { 0xffde, 707 }, { 0xfff7, 721 }, ++ /* 0xe1c */ { 0xdfff, 736 }, { 0xffbf, 751 }, { 0xffe7, 766 }, { 0xff9f, 780 }, ++ /* 0xe20 */ { 0xffff, 794 }, { 0xffff, 810 }, { 0xffff, 826 }, { 0xffff, 842 }, ++ /* 0xe24 */ { 0xffff, 858 }, { 0xffff, 874 }, { 0xffff, 890 }, { 0xffff, 906 }, ++ /* 0xe28 */ { 0xffff, 922 }, { 0xffff, 938 }, { 0xffff, 954 }, { 0xffff, 970 }, ++ /* 0xe2c */ { 0xffff, 986 }, { 0x07ff, 1002 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xe30 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0xfffc, 1013 }, ++ /* 0xe34 */ { 0xffff, 1027 }, { 0xffff, 1043 }, { 0xffff, 1059 }, { 0xffff, 1075 }, ++ /* 0xe38 */ { 0xffff, 1091 }, { 0x1fff, 1107 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xe3c */ { 0xfc00, 1120 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xe40 */ { 0x0000, 0 }, { 0x1ffc, 1126 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_pagef8[][2] = { ++ /* 0xf80 */ { 0x1fe0, 1137 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x2000, 1145 }, ++ /* 0xf84 */ { 0xffff, 1146 }, ++}; ++ ++static const u_int16_t mac_korean_uni2_pagefe[][2] = { ++ /* 0xfe5 */ { 0x0600, 1162 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xfe8 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xfec */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xff0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xff4 */ { 0x0000, 0 }, { 0x4000, 1164 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xff8 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xffc */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x002f, 1165 }, ++}; ++ ++static const cjk_index_t mac_korean_uni2_index[] = { ++ { { 0x00a0, 0x00bf }, mac_korean_uni2_page00 }, ++ { { 0x02b0, 0x03df }, mac_korean_uni2_page02 }, ++ { { 0x2010, 0x231f }, mac_korean_uni2_page20 }, ++ { { 0x2460, 0x27bf }, mac_korean_uni2_page24 }, ++ { { 0x2930, 0x2aef }, mac_korean_uni2_page29 }, ++ { { 0x3010, 0x303f }, mac_korean_uni2_page30 }, ++ { { 0x3230, 0x32af }, mac_korean_uni2_page32 }, ++ { { 0x33c0, 0x33cf }, mac_korean_uni2_page33 }, ++ { { 0xe000, 0xe41f }, mac_korean_uni2_pagee0 }, ++ { { 0xf800, 0xf84f }, mac_korean_uni2_pagef8 }, ++ { { 0xfe50, 0xffef }, mac_korean_uni2_pagefe }, ++ { { 0, 0 }, 0 } ++}; ++ ++static const u_int16_t mac_korean_uni2_charset[] = { ++ 0x0080, 0xa1cb, 0xa1cc, 0xa1cd, 0x0083, 0xa65c, 0xa1fe, 0xffff, ++ 0xffff, 0xa1a4, 0xa65d, 0xa198, 0xa2b0, 0xa2a6, 0xa76a, 0xa1a9, ++ 0xa1aa, 0xffff, 0xa1ab, 0xa170, 0xa16f, 0xa655, 0xa5de, 0xadad, ++ 0xadab, 0xa65a, 0xa65b, 0xa784, 0xa3fe, 0xa64d, 0xa787, 0xa785, ++ 0xa196, 0xa197, 0xa64e, 0xa16d, 0xa171, 0xa172, 0xa17a, 0xa17c, ++ 0xa17d, 0x0081, 0xffff, 0xac53, 0xac52, 0xa882, 0xa87c, 0xa87b, ++ 0xa883, 0xa881, 0xac50, 0xac51, 0xa892, 0xa893, 0xa89e, 0xa89f, ++ 0xa84b, 0xa84a, 0xa849, 0xac6a, 0xac6c, 0xac6b, 0xac6d, 0xac72, ++ 0xac74, 0xac73, 0xac75, 0xac41, 0xa751, 0xa773, 0xa774, 0xa75c, ++ 0xa753, 0xa768, 0xa755, 0xa756, 0xa2fe, 0xffff, 0xa49a, 0xa499, ++ 0xa49b, 0xa769, 0xa759, 0xa758, 0xa777, 0xa764, 0xa75a, 0xa75b, ++ 0xa1ec, 0xa1ed, 0xa76f, 0xa770, 0xa487, 0xa488, 0xa489, 0xa48a, ++ 0xa48f, 0xa490, 0xa491, 0xa481, 0xa482, 0xa485, 0xa486, 0xa772, ++ 0xa771, 0xa75d, 0xa75e, 0xa75f, 0xffff, 0xa76c, 0xa49d, 0xa775, ++ 0xa776, 0xa483, 0xa484, 0xa492, 0xa493, 0xa2fd, 0xa778, 0xa761, ++ 0xa7f0, 0xa7f1, 0xa7f2, 0xa7f3, 0xa7f4, 0xaaf4, 0xaaf5, 0xaaf6, ++ 0xaaf7, 0xaaf8, 0xa386, 0xa387, 0xa388, 0xa389, 0xa38a, 0xa38b, ++ 0xa38c, 0xa38d, 0xa38e, 0xa38f, 0xa390, 0xa391, 0xa392, 0xa393, ++ 0xa394, 0xa395, 0xa396, 0xa397, 0xa398, 0xa399, 0xa39a, 0xa39b, ++ 0xa39c, 0xa39d, 0xa39e, 0xa39f, 0xa6ef, 0xa6f0, 0xa6f1, 0xa6f2, ++ 0xa6f3, 0xa6f4, 0xa6f5, 0xa6f6, 0xa6f7, 0xa6f8, 0xa78f, 0xa678, ++ 0xa74a, 0xa766, 0xa795, 0xa796, 0xa794, 0xa797, 0xa2c1, 0xa79c, ++ 0xa675, 0xa684, 0xa790, 0xa66f, 0xa746, 0xa79a, 0xa677, 0xac8d, ++ 0xac8e, 0xa693, 0xa798, 0xa648, 0xa66d, 0xa66c, 0xa688, 0xa672, ++ 0xa653, 0xa652, 0xa67c, 0xa699, 0xa68d, 0xa654, 0xa683, 0xa673, ++ 0xa6e5, 0xa6e6, 0xa6e7, 0xa6e8, 0xa6e9, 0xa6ea, 0xa6eb, 0xa6ec, ++ 0xa6ed, 0xa6ee, 0xa355, 0xa356, 0xa357, 0xa358, 0xa359, 0xa35a, ++ 0xa35b, 0xa35c, 0xa35d, 0xa35e, 0xac5e, 0xa86a, 0xa860, 0xa878, ++ 0xa874, 0xac48, 0xa85c, 0xac43, 0xa88d, 0xa889, 0xa886, 0xa88b, ++ 0xa88c, 0xa86f, 0xa871, 0xa870, 0xa872, 0xa799, 0xa159, 0xa15a, ++ 0xa199, 0xa19a, 0xa49c, 0xa668, 0xa66e, 0xa664, 0xa47d, 0xa760, ++ 0xa77b, 0xa494, 0xa495, 0xa496, 0xa497, 0xa48b, 0xa48d, 0xa48c, ++ 0xa48e, 0xa76b, 0xa742, 0xa15d, 0xa15e, 0xa15f, 0xa160, 0xa1ad, ++ 0xada9, 0xadaa, 0xa69e, 0xa743, 0xa79d, 0xa79e, 0xa7f5, 0xa7f6, ++ 0xa7f7, 0xa7f8, 0xa7f9, 0xa7fa, 0xa7fb, 0xa7fc, 0xa7fd, 0xa7fe, ++ 0xad71, 0xad72, 0xad73, 0xad74, 0xad75, 0xad76, 0xad70, 0xab5c, ++ 0xa782, 0xab6c, 0xa79f, 0xa18a, 0xadb0, 0xa157, 0xa24b, 0xa158, ++ 0xa24c, 0xa16c, 0xa767, 0xa541, 0xa542, 0xa543, 0xa544, 0xa545, ++ 0xa546, 0xa547, 0xa548, 0xa549, 0xa54a, 0xa179, 0xa765, 0xa762, ++ 0xa178, 0xa183, 0xa161, 0xa163, 0xa184, 0xa162, 0xa164, 0xa181, ++ 0xa182, 0xa647, 0xa176, 0xa2fa, 0xa173, 0x0082, 0xa2fb, 0xa2fc, ++ 0xa16b, 0xa169, 0xa643, 0xa167, 0xa16a, 0xa168, 0x00ff, 0xadae, ++ 0xa5dc, 0xadac, 0xa5dd, 0xa786, 0xa651, 0xa64f, 0xa64b, 0xa1a0, ++ 0xa19d, 0xa690, 0xac89, 0xa869, 0xa86b, 0xac5d, 0xac66, 0xa863, ++ 0xac62, 0xa853, 0xac55, 0xa842, 0xa84e, 0xa85f, 0xac8b, 0xa86d, ++ 0xac60, 0xac68, 0xa865, 0xac64, 0xa855, 0xac57, 0xa843, 0xa84f, ++ 0xa861, 0xac8a, 0xa86c, 0xac67, 0xa864, 0xac63, 0xa854, 0xac56, ++ 0xa841, 0xa84d, 0xac8c, 0xa86e, 0xac61, 0xac69, 0xa866, 0xac65, ++ 0xa856, 0xac58, 0xa844, 0xa850, 0xa862, 0xa851, 0xa852, 0xa845, ++ 0xa846, 0xa847, 0xa848, 0xac7a, 0xac85, 0xa88a, 0xac77, 0xac82, ++ 0xa887, 0xac78, 0xa87d, 0xac83, 0xa888, 0xa899, 0xac4d, 0xa898, ++ 0xac4c, 0xa89b, 0xa89a, 0xa895, 0xa84c, 0xa85b, 0xa857, 0xac47, ++ 0xa897, 0xac6e, 0xada6, 0xa88e, 0xa873, 0xa877, 0xac59, 0xac4f, ++ 0xa85d, 0xa859, 0xac70, 0xada7, 0xa890, 0xa875, 0xa879, 0xac5b, ++ 0xadaf, 0xa858, 0xac46, 0xa896, 0xac6f, 0xada5, 0xa88f, 0xac5a, ++ 0xac4e, 0xa85e, 0xa85a, 0xac71, 0xada8, 0xa891, 0xa876, 0xa87a, ++ 0xac5c, 0xa752, 0xa188, 0xa189, 0xa177, 0xa174, 0xa498, 0xa49e, ++ 0xa185, 0xa757, 0xa186, 0xa754, 0xa779, 0xa175, 0xa17b, 0xa76e, ++ 0xa763, 0xa187, 0xa76d, 0xa77a, 0xa748, 0xa54c, 0xa54d, 0xa54e, ++ 0xa54f, 0xa550, 0xa551, 0xa552, 0xa553, 0xa554, 0xa54b, 0xa473, ++ 0xa35f, 0xa474, 0xa360, 0xa475, 0xa361, 0xa476, 0xa362, 0xa477, ++ 0xa363, 0xa478, 0xa364, 0xa479, 0xa365, 0xa47a, 0xa366, 0xa47b, ++ 0xa367, 0xa47c, 0xa368, 0xa656, 0xa659, 0xa78d, 0xa78e, 0xa78c, ++ 0xa68a, 0xa749, 0xa66b, 0xa66a, 0xa745, 0xa79b, 0xa665, 0xa78b, ++ 0xa662, 0xa657, 0xa789, 0xa78a, 0xa788, 0xa74e, 0xa689, 0xa682, ++ 0xa791, 0xa792, 0xa744, 0xa669, 0xa793, 0xa670, 0xa671, 0xa676, ++ 0xa65e, 0xac8f, 0xa65f, 0xac90, 0xa698, 0xa697, 0xa741, 0xa687, ++ 0xa679, 0xa67b, 0xa69b, 0xa67a, 0xa68e, 0xa469, 0xa46a, 0xa46b, ++ 0xa46c, 0xa46d, 0xa46e, 0xa46f, 0xa470, 0xa471, 0xa472, 0xa685, ++ 0xac7d, 0xac88, 0xa885, 0xac79, 0xac84, 0xac76, 0xac81, 0xac7b, ++ 0xac86, 0xac7c, 0xac87, 0xa884, 0xac45, 0xac44, 0xa243, 0xa241, ++ 0xa153, 0xa165, 0xa155, 0xa151, 0xa244, 0xa242, 0xa154, 0xa166, ++ 0xa156, 0xa152, 0xa667, 0xa49f, 0xa5db, 0xa18b, 0xa14b, 0xa14c, ++ 0xa149, 0xa14a, 0xada1, 0xa143, 0xa145, 0xa141, 0xada2, 0xa144, ++ 0xa146, 0xa142, 0xada3, 0xa147, 0xada4, 0xa148, 0xa249, 0xa15b, ++ 0xa24a, 0xa15c, 0xa67d, 0xa247, 0xa248, 0xa6f9, 0xa6fa, 0xa6fb, ++ 0xa6fc, 0xa6fd, 0xa6fe, 0xa5f9, 0xa5fa, 0xa5fb, 0xa5fc, 0xa783, ++ 0xad55, 0xa18c, 0xad5b, 0xa192, 0xad57, 0xa18e, 0xad5d, 0xa194, ++ 0xad56, 0xa18d, 0xad59, 0xa190, 0xab6d, 0xaa6e, 0xab5a, 0xaa5a, ++ 0xaa66, 0xad5c, 0xa193, 0xad5a, 0xa191, 0xaa9f, 0xaa58, 0xa750, ++ 0xa74f, 0xab60, 0xaa69, 0xab5e, 0xaa62, 0xab63, 0xaa6c, 0xab5b, ++ 0xaa5c, 0xad5e, 0xa195, 0xa692, 0xab44, 0xaa54, 0xab65, 0xab5d, ++ 0xaa5f, 0xaa5d, 0xad58, 0xa18f, 0xab6b, 0xad6f, 0xaa68, 0xaa63, ++ 0xab69, 0xaa70, 0xaa65, 0xab58, 0xaa57, 0xab59, 0xaa6d, 0xab62, ++ 0xaa6b, 0xab67, 0xad69, 0xad6a, 0xad6d, 0xab46, 0xab66, 0xaa61, ++ 0xad6c, 0xab64, 0xaa6f, 0xaa67, 0xad6b, 0xab68, 0xaa5e, 0xaa59, ++ 0xaa6a, 0xab5f, 0xab45, 0xaa60, 0xa77c, 0xaa55, 0xaa64, 0xad6e, ++ 0xab6a, 0xab61, 0xaa5b, 0xab75, 0xab55, 0xab43, 0xaa50, 0xab56, ++ 0xab47, 0xaa96, 0xaa9e, 0xab42, 0xab76, 0xaa8c, 0xaa8b, 0xab77, ++ 0xac91, 0xab48, 0xaa42, 0xaa8e, 0xaa45, 0xaa94, 0xaa4b, 0xaa53, ++ 0xaa81, 0xaa82, 0xaa8d, 0xaa44, 0xaa83, 0xaa97, 0xaa4d, 0xab49, ++ 0xaa9a, 0xaa90, 0xaa47, 0xaa95, 0xaa4c, 0xab6e, 0xaa84, 0xab4a, ++ 0xab4b, 0xac93, 0xaa98, 0xaa93, 0xaa4a, 0xaa9c, 0xab6f, 0xab4c, ++ 0xab57, 0xaa85, 0xaa9b, 0xaa51, 0xab4d, 0xab4e, 0xaa56, 0xab53, ++ 0xaa41, 0xab4f, 0xaa9d, 0xab71, 0xab72, 0xac96, 0xaa99, 0xaa52, ++ 0xac95, 0xab70, 0xaa86, 0xaa4e, 0xab50, 0xaa91, 0xaa48, 0xaa92, ++ 0xaa49, 0xab41, 0xaa71, 0xaa7d, 0xaa43, 0xab51, 0xac94, 0xab73, ++ 0xaa87, 0xac92, 0xaa88, 0xab52, 0xaa89, 0xaa4f, 0xaa8a, 0xab74, ++ 0xab78, 0xaa8f, 0xaa46, 0xab54, 0xac97, 0xacc2, 0xa455, 0xa341, ++ 0xa2e6, 0xa441, 0xacc3, 0xa456, 0xa342, 0xa2e7, 0xa442, 0xacc4, ++ 0xa457, 0xa343, 0xa2e8, 0xa443, 0xacc5, 0xa458, 0xa344, 0xa2e9, ++ 0xa444, 0xacc6, 0xa459, 0xa345, 0xa2ea, 0xa445, 0xacc7, 0xa45a, ++ 0xa346, 0xa2eb, 0xa446, 0xacc8, 0xa45b, 0xa347, 0xa2ec, 0xa447, ++ 0xacc9, 0xa45c, 0xa348, 0xa2ed, 0xa448, 0xacca, 0xa45d, 0xa349, ++ 0xa2ee, 0xa449, 0xa661, 0xad41, 0xad47, 0xad43, 0xad49, 0xad42, ++ 0xad45, 0xad48, 0xad46, 0xad4a, 0xad44, 0xad7d, 0xad77, 0xad78, ++ 0xad7b, 0xad7a, 0xad79, 0xaa76, 0xad7c, 0xab9b, 0xaa77, 0xab9c, ++ 0xab99, 0xab98, 0xab97, 0xab9d, 0xab8a, 0xab87, 0xaa73, 0xaa75, ++ 0xab9e, 0xab79, 0xaa72, 0xab7a, 0xab9a, 0xab89, 0xab86, 0xab88, ++ 0xab7b, 0xab8b, 0xab8c, 0xab7c, 0xab8d, 0xaa78, 0xab8e, 0xaa7c, ++ 0xab9f, 0xab8f, 0xab90, 0xaa79, 0xab91, 0xab7d, 0xaa7a, 0xab92, ++ 0xab93, 0xaa74, 0xab94, 0xab81, 0xab82, 0xab83, 0xab84, 0xab95, ++ 0xab85, 0xab96, 0xaa7b, 0xaaf9, 0xaafa, 0xaafb, 0xaafc, 0xaafd, ++ 0xaafe, 0xabf7, 0xabf8, 0xabf9, 0xabfa, 0xa44a, 0xa44b, 0xa44c, ++ 0xa44d, 0xa44e, 0xa44f, 0xa450, 0xa451, 0xa452, 0xa453, 0xa454, ++ 0xad68, 0xad5f, 0xad65, 0xad61, 0xad67, 0xad60, 0xad63, 0xad66, ++ 0xad64, 0xad62, 0xa77d, 0xa2ef, 0xa2f0, 0xa2f1, 0xa2f2, 0xa2f3, ++ 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7, 0xa2f8, 0xa2f9, 0xad54, 0xad4b, ++ 0xad51, 0xad4d, 0xad53, 0xad4c, 0xad4f, 0xad52, 0xad50, 0xad4e, ++ 0xa781, 0xa34a, 0xa34b, 0xa34c, 0xa34d, 0xa34e, 0xa34f, 0xa350, ++ 0xa351, 0xa352, 0xa353, 0xa354, 0xa45e, 0xa45f, 0xa460, 0xa461, ++ 0xa462, 0xa463, 0xa464, 0xa465, 0xa466, 0xa467, 0xa468, 0xaccb, ++ 0xaccc, 0xaccd, 0xacce, 0xaccf, 0xacd0, 0xacf2, 0xacf3, 0xacf4, ++ 0xacf5, 0xacf6, 0xa369, 0xa36a, 0xa36b, 0xa36c, 0xa36d, 0xa36e, ++ 0xa36f, 0xa370, 0xa371, 0xa372, 0xa373, 0xa374, 0xa375, 0xa376, ++ 0xa377, 0xa378, 0xa379, 0xa37a, 0xa37b, 0xa37c, 0xa37d, 0xa381, ++ 0xa382, 0xa383, 0xa384, 0xa385, 0xa646, 0xa64c, 0xa555, 0xa941, ++ 0xa556, 0xa942, 0xa557, 0xa943, 0xa558, 0xa944, 0xa559, 0xa945, ++ 0xa55a, 0xa946, 0xa55b, 0xa947, 0xa55c, 0xa948, 0xa55d, 0xa949, ++ 0xa55e, 0xa94a, 0xa55f, 0xa94b, 0xa560, 0xa94c, 0xa561, 0xa94d, ++ 0xa562, 0xa94e, 0xa563, 0xa94f, 0xa564, 0xa950, 0xa565, 0xa951, ++ 0xa566, 0xa952, 0xa567, 0xa953, 0xa568, 0xa954, 0xa569, 0xa955, ++ 0xa56a, 0xa956, 0xa56b, 0xa957, 0xa56c, 0xa958, 0xa56d, 0xa959, ++ 0xa56e, 0xa95a, 0xa56f, 0xa95b, 0xa570, 0xa95c, 0xa571, 0xa95d, ++ 0xa572, 0xa95e, 0xa573, 0xa95f, 0xa574, 0xa960, 0xa575, 0xa961, ++ 0xa576, 0xa962, 0xa577, 0xa963, 0xa578, 0xa964, 0xa579, 0xa965, ++ 0xa57a, 0xa966, 0xa57b, 0xa967, 0xa57c, 0xa968, 0xa57d, 0xa969, ++ 0xa581, 0xa96a, 0xa582, 0xa96b, 0xa583, 0xa96c, 0xa584, 0xa96d, ++ 0xa585, 0xa96e, 0xa586, 0xa96f, 0xa587, 0xa970, 0xa588, 0xa971, ++ 0xa589, 0xa972, 0xa58a, 0xa973, 0xa58b, 0xa974, 0xa644, 0xa645, ++ 0xa650, 0xa666, 0xa660, 0xa691, 0xa686, 0xa641, 0xa245, 0xa14f, ++ 0xa246, 0xa150, 0xa5da, 0xa19f, 0xa64a, 0xa19c, 0xa19e, 0xa649, ++ 0x0084, 0xa658, 0xa663, 0xa69f, 0xa68f, 0xa681, 0xa674, 0xa696, ++ 0xa69a, 0xa642, 0xa16e, 0xa894, 0xac54, 0xac42, 0xac49, 0xac5f, ++ 0xa867, 0xa868, 0xa89d, 0xa89c, 0xac4b, 0xac4a, 0xa747, 0xa74b, ++ 0xa74c, 0xa74d, 0xa14d, 0xa14e, 0xffff, 0xffff, 0xffff, 0xffff, ++ 0xffff, 0xffff, ++}; ++ ++static const u_int16_t mac_korean_2uni_page00[][2] = { ++ /* 0x008 */ { 0x001f, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0x00c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x8000, 5 }, ++}; ++ ++static const u_int16_t mac_korean_2uni_pagea1[][2] = { ++ /* 0xa14 */ { 0xfffe, 6 }, { 0xffff, 21 }, { 0xffff, 37 }, { 0x3fff, 53 }, ++ /* 0xa18 */ { 0xfffe, 67 }, { 0xf7ff, 82 }, { 0x2e11, 97 }, { 0x0000, 0 }, ++ /* 0xa1c */ { 0x3800, 103 }, { 0x0000, 0 }, { 0x3000, 106 }, { 0x4000, 108 }, ++ /* 0xa20 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa24 */ { 0x1ffe, 109 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa28 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0040, 121 }, { 0x0001, 122 }, ++ /* 0xa2c */ { 0x0002, 123 }, { 0x0000, 0 }, { 0xffc0, 124 }, { 0x7fff, 134 }, ++ /* 0xa30 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa34 */ { 0xfffe, 149 }, { 0xffff, 164 }, { 0xffff, 180 }, { 0x3fff, 196 }, ++ /* 0xa38 */ { 0xfffe, 210 }, { 0xffff, 225 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa3c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x4000, 241 }, ++ /* 0xa40 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa44 */ { 0xfffe, 242 }, { 0xffff, 257 }, { 0xffff, 273 }, { 0x3fff, 289 }, ++ /* 0xa48 */ { 0xfffe, 303 }, { 0xffff, 318 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa4c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa50 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa54 */ { 0xfffe, 334 }, { 0xffff, 349 }, { 0xffff, 365 }, { 0x3fff, 381 }, ++ /* 0xa58 */ { 0x0ffe, 395 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa5c */ { 0x0000, 0 }, { 0x7c00, 406 }, { 0x0000, 0 }, { 0x1e00, 411 }, ++ /* 0xa60 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa64 */ { 0xfffe, 415 }, { 0xffff, 430 }, { 0xffff, 446 }, { 0x3fff, 462 }, ++ /* 0xa68 */ { 0xe7fe, 476 }, { 0xcfcf, 489 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa6c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0xffe0, 501 }, { 0x7fff, 512 }, ++ /* 0xa70 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa74 */ { 0xfffe, 527 }, { 0xffff, 542 }, { 0xffff, 558 }, { 0x3fff, 574 }, ++ /* 0xa78 */ { 0xfffe, 588 }, { 0xffff, 603 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa7c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x7fff, 619 }, ++ /* 0xa80 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa84 */ { 0xfffe, 634 }, { 0xffff, 649 }, { 0xffff, 665 }, { 0x3fff, 681 }, ++ /* 0xa88 */ { 0xfffe, 695 }, { 0xffff, 710 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa8c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa90 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa94 */ { 0xfffe, 726 }, { 0xffff, 741 }, { 0xffff, 757 }, { 0x001f, 773 }, ++ /* 0xa98 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xa9c */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xaa0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xaa4 */ { 0xfffe, 778 }, { 0xffff, 793 }, { 0xffff, 809 }, { 0x3fff, 825 }, ++ /* 0xaa8 */ { 0xfffe, 839 }, { 0xffff, 854 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xaac */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x7ff0, 870 }, ++ /* 0xab0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xab4 */ { 0xfffe, 881 }, { 0xffff, 896 }, { 0xffff, 912 }, { 0x3fff, 928 }, ++ /* 0xab8 */ { 0xfffe, 942 }, { 0xffff, 957 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xabc */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0780, 973 }, ++ /* 0xac0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xac4 */ { 0xfffe, 977 }, { 0xffff, 992 }, { 0xffff, 1008 }, { 0x3fff, 1024 }, ++ /* 0xac8 */ { 0xfffe, 1038 }, { 0x00ff, 1053 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xacc */ { 0xfffc, 1061 }, { 0x0001, 1075 }, { 0x0000, 0 }, { 0x007c, 1076 }, ++ /* 0xad0 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, { 0x0000, 0 }, ++ /* 0xad4 */ { 0xfffe, 1081 }, { 0xffff, 1096 }, { 0xffff, 1112 }, { 0x3fff, 1128 }, ++ /* 0xad8 */ { 0x0000, 0 }, { 0x0000, 0 }, { 0xfffe, 1142 }, { 0x0001, 1157 }, ++}; ++ ++static const cjk_index_t mac_korean_2uni_index[] = { ++ { { 0x0080, 0x00ff }, mac_korean_2uni_page00 }, ++ { { 0xa140, 0xadbf }, mac_korean_2uni_pagea1 }, ++ { { 0, 0 }, 0 } ++}; ++ ++static const u_int16_t mac_korean_2uni_charset[] = { ++ 0x00a0, 0x20a9, 0xe022, 0x00a9, 0xe41c, 0xe02b, 0xe12a, 0xe12e, ++ 0xe128, 0xe12c, 0xe129, 0xe12d, 0xe130, 0xe132, 0xe125, 0xe126, ++ 0xe123, 0xe124, 0xfe59, 0xfe5a, 0xe413, 0xe415, 0xe118, 0xe11e, ++ 0xe115, 0xe11b, 0xe117, 0xe11d, 0xe002, 0xe004, 0x2985, 0x2986, ++ 0xe134, 0xe136, 0x3016, 0x3017, 0x3018, 0x3019, 0xe017, 0xe01a, ++ 0xe018, 0xe01b, 0xe116, 0xe11c, 0xe028, 0xe02a, 0xe026, 0xe029, ++ 0xe025, 0xe006, 0x2051, 0xf840, 0x201f, 0x201b, 0x207a, 0x207b, ++ 0xe021, 0xe0a2, 0xe0aa, 0xe01f, 0xe0a1, 0xe015, 0xe012, 0x207c, ++ 0xe0ab, 0x207d, 0x207e, 0xe01c, 0xe01d, 0xe016, 0xe019, 0xe0a5, ++ 0xe0a7, 0xe0ae, 0xe09f, 0xe0a0, 0xe000, 0xe122, 0xe146, 0xe14e, ++ 0xe14a, 0xe170, 0xe150, 0xe159, 0xe148, 0xe157, 0xe14c, 0xe167, ++ 0x204c, 0x204d, 0x02bc, 0x2997, 0x2998, 0xe419, 0xe035, 0xe41a, ++ 0xe417, 0xe034, 0x00b7, 0x2013, 0x2014, 0x2016, 0x301c, 0x00a2, ++ 0x00a3, 0x00a5, 0x226a, 0x226b, 0x00ac, 0xe114, 0xe11a, 0xe113, ++ 0xe119, 0xe412, 0xe414, 0xe138, 0xe139, 0xe133, 0xe135, 0xe003, ++ 0xe005, 0x02dc, 0x02d0, 0x25c9, 0xe1fe, 0xe203, 0xe208, 0xe20d, ++ 0xe212, 0xe217, 0xe21c, 0xe221, 0xe226, 0xe289, 0xe28a, 0xe28b, ++ 0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0xe292, 0xe293, ++ 0xe020, 0xe023, 0xe024, 0x22ee, 0x2237, 0xe1fd, 0xe202, 0xe207, ++ 0xe20c, 0xe211, 0xe216, 0xe21b, 0xe220, 0xe225, 0xe29f, 0xe2a0, ++ 0xe2a1, 0xe2a2, 0xe2a3, 0xe2a4, 0xe2a5, 0xe2a6, 0xe2a7, 0xe2a8, ++ 0xe2a9, 0x278a, 0x278b, 0x278c, 0x278d, 0x278e, 0x278f, 0x2790, ++ 0x2791, 0x2792, 0x2793, 0xe0bd, 0xe0bf, 0xe0c1, 0xe0c3, 0xe0c5, ++ 0xe0c7, 0xe0c9, 0xe0cb, 0xe0cd, 0xe0cf, 0xe2c0, 0xe2c1, 0xe2c2, ++ 0xe2c3, 0xe2c4, 0xe2c5, 0xe2c6, 0xe2c7, 0xe2c8, 0xe2c9, 0xe2ca, ++ 0xe2cb, 0xe2cc, 0xe2cd, 0xe2ce, 0xe2cf, 0xe2d0, 0xe2d1, 0xe2d2, ++ 0xe2d3, 0xe2d4, 0xe2d5, 0xe2d6, 0xe2d7, 0xe2d8, 0xe2d9, 0x24b6, ++ 0x24b7, 0x24b8, 0x24b9, 0x24ba, 0x24bb, 0x24bc, 0x24bd, 0x24be, ++ 0x24bf, 0x24c0, 0x24c1, 0x24c2, 0x24c3, 0x24c4, 0x24c5, 0x24c6, ++ 0x24c7, 0x24c8, 0x24c9, 0x24ca, 0x24cb, 0x24cc, 0x24cd, 0x24ce, ++ 0x24cf, 0x203e, 0xe1ff, 0xe204, 0xe209, 0xe20e, 0xe213, 0xe218, ++ 0xe21d, 0xe222, 0xe227, 0xe273, 0xe274, 0xe275, 0xe276, 0xe277, ++ 0xe278, 0xe279, 0xe27a, 0xe27b, 0xe27c, 0xe27d, 0xe1fc, 0xe201, ++ 0xe206, 0xe20b, 0xe210, 0xe215, 0xe21a, 0xe21f, 0xe224, 0xe2aa, ++ 0xe2ab, 0xe2ac, 0xe2ad, 0xe2ae, 0xe2af, 0xe2b0, 0xe2b1, 0xe2b2, ++ 0xe2b3, 0xe2b4, 0xe0fa, 0xe0fb, 0xe0fc, 0xe0fd, 0xe0fe, 0xe0ff, ++ 0xe100, 0xe101, 0xe102, 0xe103, 0xe0bc, 0xe0be, 0xe0c0, 0xe0c2, ++ 0xe0c4, 0xe0c6, 0xe0c8, 0xe0ca, 0xe0cc, 0xe0ce, 0x2a26, 0x227a, ++ 0x227b, 0x22ce, 0x22cf, 0x2280, 0x2281, 0x2270, 0x2271, 0x2272, ++ 0x2273, 0x2ac5, 0x2acb, 0x2ac6, 0x2acc, 0x2276, 0x2277, 0x2279, ++ 0x22da, 0x22db, 0x2a8b, 0x2a8c, 0x2a91, 0x2a92, 0xe0a3, 0x2245, ++ 0x2243, 0x2248, 0x29a3, 0x22a4, 0xe0a4, 0xe120, 0xe008, 0xe009, ++ 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e, 0xe00f, 0xe010, 0xe011, ++ 0xe0bb, 0xe0b2, 0xe0b3, 0xe0b4, 0xe0b5, 0xe0b6, 0xe0b7, 0xe0b8, ++ 0xe0b9, 0xe0ba, 0xe333, 0xe335, 0xe337, 0xe339, 0xe33b, 0xe33d, ++ 0xe33f, 0xe341, 0xe343, 0xe345, 0xe347, 0xe349, 0xe34b, 0xe34d, ++ 0xe34f, 0xe351, 0xe353, 0xe355, 0xe357, 0xe359, 0xe35b, 0xe35d, ++ 0xe35f, 0xe361, 0xe363, 0xe365, 0xe367, 0xe369, 0xe36b, 0xe36d, ++ 0xe36f, 0xe371, 0xe373, 0xe375, 0xe377, 0xe379, 0xe37b, 0xe37d, ++ 0xe37f, 0xe381, 0xe383, 0xe385, 0xe387, 0xe389, 0xe38b, 0xe38d, ++ 0xe38f, 0xe391, 0xe393, 0xe395, 0xe397, 0xe399, 0xe416, 0xe121, ++ 0xe02d, 0xe02f, 0x2034, 0xe140, 0xe141, 0xe142, 0xe143, 0xe3cf, ++ 0xf83d, 0xe027, 0xe39b, 0xe39c, 0xe2da, 0xe01e, 0x266f, 0xe41b, ++ 0xe418, 0xe033, 0xe332, 0x2042, 0x204e, 0xe032, 0xe3ca, 0xe031, ++ 0x273d, 0x2731, 0x2747, 0x2022, 0xe0d0, 0xe0de, 0xf805, 0xe0d1, ++ 0x2039, 0x203a, 0x00ab, 0x00bb, 0xe0ed, 0xe0ef, 0xe3cc, 0xe228, ++ 0xe0dd, 0xf806, 0x29c8, 0xe0db, 0xe3cb, 0xe11f, 0x29be, 0xe0e8, ++ 0xe0d8, 0xe0d7, 0x271a, 0x2716, 0x29bf, 0x25ef, 0xe0ea, 0xe0eb, ++ 0x2723, 0x2756, 0xf80a, 0x25cc, 0xe0ec, 0x2610, 0x25a2, 0xe0f5, ++ 0xe0f8, 0xe0f6, 0x273f, 0xe137, 0xf809, 0xe0e4, 0x274d, 0x25cd, ++ 0xe104, 0xe3ce, 0xe0f4, 0x2720, 0xe0e3, 0xe0d5, 0x2741, 0xe0f9, ++ 0xf808, 0xe036, 0xe3cd, 0xe168, 0x262f, 0xf80b, 0xe0f2, 0xe0f1, ++ 0x2740, 0xf80c, 0xe0f7, 0x3020, 0xf807, 0x2776, 0x2777, 0x2778, ++ 0x2779, 0x277a, 0x277b, 0x277c, 0x277d, 0x277e, 0x277f, 0x24eb, ++ 0x24ec, 0x24ed, 0x24ee, 0x24ef, 0x24f0, 0x24f1, 0x24f2, 0x24f3, ++ 0x24f4, 0xe13a, 0xe13b, 0xe13c, 0xe13d, 0xe13e, 0xe13f, 0xe0f3, ++ 0x3012, 0x3036, 0xe0e7, 0xe0d9, 0x25fb, 0xf84c, 0xe0b1, 0xe0d6, ++ 0x25ad, 0xf84d, 0xf84e, 0xf84f, 0xe0e2, 0xe15d, 0xe15c, 0x2206, ++ 0xe09e, 0x221f, 0xe0a8, 0x2225, 0x2226, 0xe0a6, 0x2253, 0x2251, ++ 0x2266, 0x2267, 0x2213, 0x2295, 0x2296, 0x2297, 0x2a38, 0x2314, ++ 0xe014, 0xe0ad, 0x2262, 0xe013, 0x25b1, 0xe007, 0x2222, 0x2250, ++ 0x03d5, 0x2ae8, 0x22a3, 0xe0af, 0xe0ac, 0x226e, 0x226f, 0x2285, ++ 0x2284, 0x2209, 0x220c, 0x22bb, 0x22bc, 0x225a, 0x2306, 0xe0a9, ++ 0xe0b0, 0x2a72, 0xe191, 0xe288, 0xe29e, 0x329e, 0xe144, 0x203c, ++ 0x2049, 0xe030, 0x2047, 0xe0e1, 0xe0df, 0xe0e0, 0xe0dc, 0xe0d4, ++ 0xe0d2, 0xe0d3, 0x2588, 0x25e6, 0xe0e5, 0xe0e6, 0xe0e9, 0x25bf, ++ 0x25b5, 0x25b9, 0x25c3, 0x2666, 0x2981, 0x25fc, 0xe0da, 0x25ca, ++ 0x3231, 0x3239, 0x33cb, 0x246f, 0x2470, 0x2471, 0x2472, 0x2473, ++ 0x3251, 0x3252, 0x3253, 0x3254, 0x3255, 0x3256, 0x3257, 0x3258, ++ 0x3259, 0x325a, 0xe055, 0xe040, 0xe04b, 0xe05f, 0xe064, 0xe065, ++ 0xe066, 0xe067, 0x21d0, 0x21cf, 0x21cd, 0xe079, 0xe056, 0xe041, ++ 0xe04c, 0xe060, 0xe062, 0xe063, 0xe03e, 0xe053, 0xe049, 0xe05d, ++ 0xe07b, 0xe08e, 0xe086, 0xe097, 0xe07a, 0x27b2, 0xe085, 0xe096, ++ 0xe042, 0x279c, 0xe04d, 0xe061, 0xe03c, 0xe051, 0xe047, 0xe05b, ++ 0xf846, 0xf847, 0xe038, 0x279b, 0xe039, 0xe04f, 0xe044, 0xe058, ++ 0x2962, 0x2964, 0x2963, 0x2965, 0xe081, 0x27a1, 0xe08a, 0xe09b, ++ 0xe082, 0x279e, 0xe08b, 0xe09c, 0x21b2, 0x21b1, 0xe06f, 0x21b4, ++ 0x21b0, 0x21b3, 0xe110, 0xe107, 0x2936, 0xe06d, 0xe071, 0x2935, ++ 0xe06a, 0x2937, 0x2939, 0x2934, 0xe080, 0xe093, 0xe089, 0xe09a, ++ 0x21bc, 0x21c0, 0xf841, 0xe078, 0xe090, 0xe07d, 0xe074, 0xe072, ++ 0xe077, 0xe076, 0xf849, 0xf848, 0x21c4, 0x21c5, 0xe334, 0xe336, ++ 0xe338, 0xe33a, 0xe33c, 0xe33e, 0xe340, 0xe342, 0xe344, 0xe346, ++ 0xe348, 0xe34a, 0xe34c, 0xe34e, 0xe350, 0xe352, 0xe354, 0xe356, ++ 0xe358, 0xe35a, 0xe35c, 0xe35e, 0xe360, 0xe362, 0xe364, 0xe366, ++ 0xe368, 0xe36a, 0xe36c, 0xe36e, 0xe370, 0xe372, 0xe374, 0xe376, ++ 0xe378, 0xe37a, 0xe37c, 0xe37e, 0xe380, 0xe382, 0xe384, 0xe386, ++ 0xe388, 0xe38a, 0xe38c, 0xe38e, 0xe390, 0xe392, 0xe394, 0xe396, ++ 0xe398, 0xe39a, 0xe1d1, 0xe1a9, 0xe1e8, 0xe1b2, 0xe1ab, 0xe1f8, ++ 0xe1ba, 0xe1e0, 0xe1e2, 0xe1c4, 0xe1ad, 0xe1bc, 0xe1b6, 0xe1dd, ++ 0xe1f1, 0xe19b, 0xe1cb, 0xe1d9, 0xe1ae, 0xe16a, 0xe192, 0xe1cf, ++ 0xe179, 0xe15b, 0xe18c, 0xe154, 0xe197, 0xe165, 0xe16e, 0xe18b, ++ 0xe16d, 0xe190, 0xe184, 0xe161, 0xe174, 0xe193, 0xe177, 0xe155, ++ 0xe188, 0xe173, 0xe15f, 0xe18d, 0xe17d, 0xe163, 0xe17b, 0xe152, ++ 0xe187, 0xe176, 0xe1e6, 0xe248, 0xe244, 0xe25f, 0xe245, 0xe239, ++ 0xe23c, 0xe253, 0xe259, 0xe25c, 0xe268, 0xe255, 0xe1e7, 0xe1af, ++ 0xe1b0, 0xe1b4, 0xe1be, 0xe1c9, 0xe1dc, 0xe1ec, 0xe1ee, 0xe1f0, ++ 0xe1f2, 0xe1a4, 0xe1a3, 0xe1b1, 0xe1aa, 0xe1f7, 0xe1b9, 0xe1df, ++ 0xe1e1, 0xe1c3, 0xe1ac, 0xe1bb, 0xe19e, 0xe1b5, 0xe1c2, 0xe1d8, ++ 0xe1b8, 0xe1ca, 0xe1c5, 0xe1d3, 0xe19f, 0xe15a, 0x2483, 0x2484, ++ 0x2485, 0x2486, 0x2487, 0xe269, 0xe26a, 0xe26b, 0xe26c, 0xe26d, ++ 0xe26e, 0xe1e5, 0xe1a1, 0xe19a, 0xe169, 0xe18f, 0xe182, 0xe19d, ++ 0xe1a8, 0xe1b7, 0xe1bf, 0xe1c0, 0xe1c7, 0xe1cc, 0xe1ce, 0xe1d2, ++ 0xe1de, 0xe1e9, 0xe1ef, 0xe1d0, 0xe1f9, 0xe199, 0xe19c, 0xe1c8, ++ 0xe178, 0xe17a, 0xe153, 0xe164, 0x3294, 0xe16c, 0xe160, 0xe18e, ++ 0xe15e, 0xe196, 0xe17c, 0xe162, 0xe186, 0xe16b, 0xe183, 0xe17e, ++ 0xe18a, 0xe175, 0xe195, 0xe171, 0x32a5, 0xe151, 0xe1bd, 0xe1c6, ++ 0xe1db, 0xe1d4, 0xe1d5, 0xe1eb, 0xe1f3, 0xe198, 0xe1a2, 0xe1a6, ++ 0xe1f4, 0xe247, 0xe249, 0xe24e, 0xe251, 0xe25b, 0xe261, 0xe262, ++ 0xe263, 0xe264, 0xe266, 0xe24c, 0xe243, 0xe24d, 0xe24b, 0xe242, ++ 0xe24f, 0xe250, 0xe252, 0xe254, 0xe257, 0xe258, 0xe25a, 0xe25d, ++ 0xe25e, 0xe260, 0xe265, 0xe267, 0xe240, 0xe23f, 0xe23e, 0xe24a, ++ 0xe23b, 0xe23d, 0xe241, 0xe246, 0xe256, 0xe26f, 0xe270, 0xe271, ++ 0xe272, 0x21f0, 0xf843, 0x27b5, 0xe112, 0xe111, 0xe08f, 0xe07c, ++ 0x27a4, 0xf844, 0xf84b, 0xf84a, 0xe075, 0xe073, 0xe095, 0xe084, ++ 0x21b6, 0x21b7, 0x219d, 0x219c, 0xf842, 0xe03f, 0xe054, 0xe04a, ++ 0xe05e, 0xe083, 0xe094, 0xe08c, 0xe09d, 0xe03a, 0x2794, 0xf845, ++ 0xe045, 0xe059, 0xe03d, 0xe052, 0xe048, 0xe05c, 0xe03b, 0xe050, ++ 0xe046, 0xe05a, 0x21e0, 0x21e2, 0x21e1, 0x21e3, 0xe07e, 0xe091, ++ 0xe087, 0xe098, 0x21e6, 0x21e8, 0x21e7, 0x21e9, 0xe10a, 0xe06b, ++ 0xe06e, 0xe108, 0xe068, 0xe10c, 0xe10e, 0xe105, 0xe10b, 0xe06c, ++ 0xe070, 0xe109, 0xe069, 0xe10d, 0xe10f, 0xe106, 0xe037, 0xe04e, ++ 0xe043, 0xe057, 0x261d, 0x261f, 0xe0ee, 0xe0f0, 0xe1a7, 0xe1ed, ++ 0xe1c1, 0xe1ea, 0xe1da, 0xe1d7, 0xe1fa, 0xe1fb, 0xe200, 0xe205, ++ 0xe20a, 0xe20f, 0xe214, 0xe219, 0xe21e, 0xe223, 0xe2b5, 0xe2b6, ++ 0xe2b7, 0xe2b8, 0xe2b9, 0xe2ba, 0xe2bb, 0xe2bc, 0xe2bd, 0xe2be, ++ 0xe2bf, 0xe229, 0xe22d, 0xe22b, 0xe232, 0xe22e, 0xe230, 0xe22a, ++ 0xe22f, 0xe22c, 0xe231, 0xe295, 0xe299, 0xe297, 0xe29d, 0xe29a, ++ 0xe29c, 0xe296, 0xe29b, 0xe298, 0xe294, 0xe145, 0xe14d, 0xe149, ++ 0xe16f, 0xe14f, 0xe158, 0xe147, 0xe156, 0xe14b, 0xe166, 0xe27f, ++ 0xe283, 0xe281, 0xe287, 0xe284, 0xe286, 0xe280, 0xe285, 0xe282, ++ 0xe27e, 0xe17f, 0xe180, 0xe189, 0xe185, 0xe181, 0xe194, 0xe172, ++ 0x3290, 0x328a, 0x328b, 0x328c, 0x328d, 0x328e, 0x328f, 0xe234, ++ 0xe235, 0xe238, 0xe237, 0xe236, 0xe23a, 0xe233, 0xe127, 0xe12b, ++ 0xe12f, 0xe131, 0xe092, 0xe07f, 0xe088, 0xe099, 0x301e, 0x301f, ++ 0x2036, 0xe02e, 0x2035, 0xe02c, 0xe08d, 0xe001, ++}; ++ ++static const u_int32_t mac_korean_compose[] = { ++ 0x0021f877, 0x0021f87f, 0x0028f87c, 0x0028f87f, ++ 0x0029f87c, 0x0029f87f, 0x002af877, 0x002d0308, ++ 0x003020de, 0x003120de, 0x003220de, 0x003320de, ++ 0x003420de, 0x003520de, 0x003620de, 0x003720de, ++ 0x003820de, 0x003920de, 0x003cf877, 0x003d20d2, ++ 0x003d20e5, 0x003ef877, 0x005bf877, 0x005bf87b, ++ 0x005bf87c, 0x005df877, 0x005df87b, 0x005df87c, ++ 0x007bf877, 0x007df877, 0x00a7f87c, 0x00b1f877, ++ 0x00b6f87f, 0x00d7f877, 0x2013f87f, 0x2016f87b, ++ 0x2016f87c, 0x2020f877, 0x2020f87b, 0x2020f87c, ++ 0x2020f87f, 0x2021f87c, 0x2021f87f, 0x2026f87f, ++ 0x2032f873, 0x2032f87f, 0x2033f873, 0x2033f87f, ++ 0x203cf87f, 0x2042f879, 0x2051f871, 0x2051f874, ++ 0x2051f879, 0x2051f87c, 0x20a9f87f, 0x2190f870, ++ 0x2190f871, 0x2190f872, 0x2190f873, 0x2190f874, ++ 0x2190f875, 0x2190f878, 0x2190f879, 0x2190f87a, ++ 0x2190f87b, 0x2190f87c, 0x2190f87f, 0x2191f870, ++ 0x2191f872, 0x2191f873, 0x2191f874, 0x2191f875, ++ 0x2191f878, 0x2191f879, 0x2191f87a, 0x2191f87b, ++ 0x2191f87c, 0x2191f87f, 0x2192f870, 0x2192f872, ++ 0x2192f874, 0x2192f875, 0x2192f878, 0x2192f879, ++ 0x2192f87a, 0x2192f87b, 0x2192f87c, 0x2193f870, ++ 0x2193f872, 0x2193f873, 0x2193f874, 0x2193f875, ++ 0x2193f878, 0x2193f879, 0x2193f87a, 0x2193f87b, ++ 0x2193f87c, 0x2193f87f, 0x2194f87c, 0x2195f87c, ++ 0x2196f87b, 0x2197f87b, 0x2198f87b, 0x2199f87b, ++ 0x21b0f87a, 0x21b0f87c, 0x21b0f87f, 0x21b1f87a, ++ 0x21b1f87c, 0x21b1f87f, 0x21bbf87a, 0x21bbf87b, ++ 0x21bbf87c, 0x21bbf87f, 0x21bcf879, 0x21bcf87f, ++ 0x21c0f879, 0x21c0f87f, 0x21d0f87c, 0x21d2f87c, ++ 0x21d4f879, 0x21d4f87f, 0x21e620dd, 0x21e620de, ++ 0x21e6f870, 0x21e6f874, 0x21e6f875, 0x21e6f878, ++ 0x21e6f879, 0x21e6f87a, 0x21e6f87b, 0x21e6f87c, ++ 0x21e6f87f, 0x21e720dd, 0x21e720de, 0x21e7f875, ++ 0x21e7f878, 0x21e7f879, 0x21e7f87a, 0x21e7f87b, ++ 0x21e7f87c, 0x21e7f87f, 0x21e820de, 0x21e8f870, ++ 0x21e8f874, 0x21e8f875, 0x21e8f878, 0x21e8f879, ++ 0x21e8f87c, 0x21e8f87f, 0x21e920dd, 0x21e920de, ++ 0x21e9f875, 0x21e9f878, 0x21e9f879, 0x21e9f87a, ++ 0x21e9f87b, 0x21e9f87c, 0x2206f87f, 0x2208f877, ++ 0x2211f877, 0x2213f877, 0x221ef877, 0x2222f87f, ++ 0x22250347, 0x2229f877, 0x2229f87f, 0x222af877, ++ 0x222af87f, 0x223d0336, 0x223df877, 0x2260f877, ++ 0x226120d2, 0x226120e5, 0x2282f877, 0x22a50338, ++ 0x2314f87f, 0x2394f876, 0x2460f87f, 0x2461f87f, ++ 0x2462f87f, 0x2463f87f, 0x2464f87f, 0x2465f87f, ++ 0x2466f87f, 0x2467f87f, 0x2468f87f, 0x24eaf87f, ++ 0x24ebf878, 0x24ebf87f, 0x24ecf878, 0x24ecf87f, ++ 0x24edf878, 0x24edf87f, 0x24eef878, 0x24eef87f, ++ 0x24eff878, 0x24eff87f, 0x24f0f878, 0x24f0f87f, ++ 0x24f1f878, 0x24f1f87f, 0x24f2f878, 0x24f2f87f, ++ 0x24f3f878, 0x24f3f87f, 0x24f4f878, 0x24f4f87f, ++ 0x25a020df, 0x25a120df, 0x25a1f879, 0x25a1f87b, ++ 0x25a1f87c, 0x25a8f87f, 0x25adf878, 0x25b220dd, ++ 0x25b320dd, 0x25b3f87f, 0x25b420e4, 0x25c620de, ++ 0x25c6f879, 0x25c720de, 0x25c720df, 0x25c7f879, ++ 0x25c7f87b, 0x25c7f87c, 0x25c7f87f, 0x25c8f87f, ++ 0x25c920dd, 0x25cbf879, 0x25cbf87b, 0x25cbf87f, ++ 0x25ce20dd, 0x25cff879, 0x25eff87c, 0x2610f87c, ++ 0x2610f87f, 0x261cf87f, 0x261df87f, 0x261ef87f, ++ 0x261ff87f, 0x262ff876, 0x262ff87a, 0x2642f87f, ++ 0x2720f87a, 0x2723f87a, 0x273ff87a, 0x274820d8, ++ 0x2756f87a, 0x2756f87f, 0x278af87f, 0x278bf87f, ++ 0x278cf87f, 0x278df87f, 0x278ef87f, 0x278ff87f, ++ 0x2790f87f, 0x2791f87f, 0x2792f87f, 0x2793f87f, ++ 0x27e120dd, 0x2934f87a, 0x2934f87c, 0x2934f87f, ++ 0x2935f87a, 0x2935f87c, 0x2936f87a, 0x2936f87c, ++ 0x2937f87a, 0x2937f87c, 0x2939f87a, 0x2939f87c, ++ 0x2939f87f, 0x2962f87f, 0x2964f87f, 0x2985f873, ++ 0x2985f878, 0x2985f879, 0x2985f87b, 0x2985f87c, ++ 0x2985f87f, 0x2986f873, 0x2986f878, 0x2986f879, ++ 0x2986f87b, 0x2986f87c, 0x2986f87f, 0x29c820de, ++ 0x2afd0347, 0x3002f87d, 0x3007f876, 0x3008f878, ++ 0x3009f878, 0x300af878, 0x300bf878, 0x300cf879, ++ 0x300cf87b, 0x300cf87c, 0x300cf87f, 0x300df879, ++ 0x300df87b, 0x300df87c, 0x300df87f, 0x300ef879, ++ 0x300ef87c, 0x300ff879, 0x300ff87c, 0x3010f878, ++ 0x3010f87f, 0x3011f878, 0x3011f87f, 0x3013f87c, ++ 0x3016f878, 0x3017f878, 0x3251f87a, 0x3252f87a, ++ 0x3253f87a, 0x3254f87a, 0x3255f87a, 0x3256f87a, ++ 0x3257f87a, 0x3258f87a, 0x3259f87a, 0x325af87a, ++ 0x329ef87f, 0x4e0020de, 0x4e00f876, 0x4e0320de, ++ 0x4e03f876, 0x4e0920de, 0x4e09f876, 0x4e5d20de, ++ 0x4e5df876, 0x4e8c20de, 0x4e8cf876, 0x4e9420de, ++ 0x4e94f876, 0x4ed620dd, 0x4ed620de, 0x4ee320dd, ++ 0x4ee320de, 0x4f8b20de, 0x516b20de, 0x516bf876, ++ 0x516d20de, 0x516df876, 0x51a020dd, 0x51a020de, ++ 0x51f8f87f, 0x51f9f87f, 0x524d20dd, 0x524d20de, ++ 0x526f20dd, 0x526f20de, 0x52a920dd, 0x52a920de, ++ 0x52d520dd, 0x52d520de, 0x534120de, 0x5341f876, ++ 0x534df87f, 0x537020dd, 0x537020de, 0x53c320dd, ++ 0x53cd20dd, 0x53cd20de, 0x540d20de, 0x56db20de, ++ 0x56dbf876, 0x570b20dd, 0x571f20de, 0x5b5020de, ++ 0x5e8f20de, 0x5f6220dd, 0x5f6220de, 0x5f7120de, ++ 0x611f20dd, 0x611f20de, 0x616320dd, 0x630720de, ++ 0x63a520dd, 0x63a520de, 0x65b020dd, 0x65e520de, ++ 0x670820de, 0x672820de, 0x672b20dd, 0x672c20dd, ++ 0x672c20de, 0x6c3420de, 0x6ce820dd, 0x6d3e20de, ++ 0x6e9020de, 0x706b20de, 0x73fe20dd, 0x76ee20de, ++ 0x7b5420de, 0x7bc020de, 0x81ea20dd, 0x886320dd, ++ 0x88dc20de, 0x88dc20e4, 0x8a3b20de, 0x902320de, ++ 0x91d120de, 0x959320dd, 0x96fb20dd, 0x982d20de, ++ 0xac0020dd, 0xac0420dd, 0xac1020dd, 0xac1020de, ++ 0xac1920dd, 0xac7020dd, 0xac8c20dd, 0xad0020dd, ++ 0xad5020de, 0xad6d20dd, 0xb09820dd, 0xb0ae20dd, ++ 0xb19220dd, 0xb29020dd, 0xb2e420dd, 0xb2e820dd, ++ 0xb2f520dd, 0xb2f520de, 0xb30020dd, 0xb30020de, ++ 0xb3d920dd, 0xb3d920de, 0xb73b20de, 0xb77c20dd, ++ 0xb9c820dd, 0xba8520dd, 0xba8520de, 0xbb3820de, ++ 0xbc1420dd, 0xbc1820dd, 0xbc1820de, 0xbcc020dd, ++ 0xbcf820dd, 0xbd8020dd, 0xbd8020de, 0xbe4420dd, ++ 0xbe4420de, 0xbe6020dd, 0xc0ac20dd, 0xc0c120dd, ++ 0xc13c20dd, 0xc18c20dd, 0xc18d20dd, 0xc21820dd, ++ 0xc21820de, 0xc21920dd, 0xc2dc20dd, 0xc2e020dd, ++ 0xc2e420dd, 0xc54420dd, 0xc57d20dd, 0xc57d20de, ++ 0xc5ec20dd, 0xc5ed20de, 0xc60820dd, 0xc60820de, ++ 0xc67820dd, 0xc6b420de, 0xc6d020dd, 0xc72020dd, ++ 0xc73c20dd, 0xc74c20dd, 0xc74c20de, 0xc77420dd, ++ 0xc77820dd, 0xc77820de, 0xc77c20dd, 0xc78520dd, ++ 0xc79020dd, 0xc79020de, 0xc79120dd, 0xc80420dd, ++ 0xc80420de, 0xc81120dd, 0xc81120de, 0xc81520de, ++ 0xc81c20dd, 0xc87020dd, 0xc87020de, 0xc87420dd, ++ 0xc8fc20de, 0xc90020dd, 0xc91120dd, 0xc9c120dd, ++ 0xcc2820dd, 0xcc3820dd, 0xce7420dd, 0xd0b920dd, ++ 0xd0c020dd, 0xd0c020de, 0xd30c20dd, 0xd45c20dd, ++ 0xd55820dd, 0xd57420dd, 0xd57420de, 0xd61520dd, ++ 0xd61520de, 0xd65c20dd, 0xd73420dd, 0xe009f875, ++ 0xe009f87a, 0xe009f87b, 0xe009f87c, 0xe009f87f, ++ 0xe00af875, 0xe00af87a, 0xe00af87b, 0xe00af87c, ++ 0xe00af87f, 0xe00bf875, 0xe00bf87a, 0xe00bf87b, ++ 0xe00bf87c, 0xe00bf87f, 0xe00cf875, 0xe00cf87a, ++ 0xe00cf87b, 0xe00cf87c, 0xe00cf87f, 0xe00df875, ++ 0xe00df87a, 0xe00df87b, 0xe00df87c, 0xe00df87f, ++ 0xe00ef875, 0xe00ef87a, 0xe00ef87b, 0xe00ef87c, ++ 0xe00ef87f, 0xe00ff875, 0xe00ff87a, 0xe00ff87b, ++ 0xe00ff87c, 0xe00ff87f, 0xe010f875, 0xe010f87a, ++ 0xe010f87b, 0xe010f87c, 0xe010f87f, 0xe011f875, ++ 0xe011f87a, 0xe011f87b, 0xe011f87c, 0xe011f87f, ++ 0xe0de20df, 0xe145f87a, 0xe147f87a, 0xe149f87a, ++ 0xe14bf87a, 0xe14df87a, 0xe14ff87a, 0xe156f87a, ++ 0xe158f87a, 0xe166f87a, 0xe16ff87a, 0xe172f87c, ++ 0xe17ff87c, 0xe180f87c, 0xe181f87c, 0xe185f87c, ++ 0xe189f87c, 0xe192f87a, 0xe194f87c, 0xe198f87a, ++ 0xe1a0f87a, 0xe1a2f87a, 0xe1a3f87a, 0xe1a4f87a, ++ 0xe1a5f87a, 0xe1a6f87a, 0xe1a7f87a, 0xe1a8f87a, ++ 0xe1a9f87a, 0xe1aef87a, 0xe1aff87a, 0xe1b0f87a, ++ 0xe1b3f87a, 0xe1b4f87a, 0xe1b5f87a, 0xe1b8f87a, ++ 0xe1bbf87a, 0xe1bdf87a, 0xe1bef87a, 0xe1c0f87a, ++ 0xe1c6f87a, 0xe1c9f87a, 0xe1ccf87a, 0xe1cdf87a, ++ 0xe1cef87a, 0xe1cff87a, 0xe1d0f87a, 0xe1d4f87a, ++ 0xe1d5f87a, 0xe1d6f87a, 0xe1dbf87a, 0xe1dcf87a, ++ 0xe1e3f87a, 0xe1e4f87a, 0xe1e7f87a, 0xe1e8f87a, ++ 0xe1e9f87a, 0xe1ecf87a, 0xe1eef87a, 0xe1f0f87a, ++ 0xe1f2f87a, 0xe1f3f87a, 0xe1f4f87a, 0xe1f5f87a, ++ 0xe1f6f87a, 0xe2db0029, 0xe2dc0029, 0xe2dd0029, ++ 0xe2de0029, 0xe2df0029, 0xe2e00029, 0xe2e10029, ++ 0xe2e20029, 0xe2e30029, 0xe2e40029, 0xe2e5005d, ++ 0xe2e6005d, 0xe2e7005d, 0xe2e8005d, 0xe2e9005d, ++ 0xe2ea005d, 0xe2eb005d, 0xe2ec005d, 0xe2ed005d, ++ 0xe2ee005d, 0xe2ef005d, 0xe2f0005d, 0xe2f1005d, ++ 0xe2f2005d, 0xe2f3005d, 0xe2f4005d, 0xe2f5005d, ++ 0xe2f6005d, 0xe2f7005d, 0xe2f8005d, 0xe2f9005d, ++ 0xe2fac0ac, 0xe2fb005d, 0xe2fc005d, 0xe2fd005d, ++ 0xe2fe005d, 0xe2ff005d, 0xe300005d, 0xe301005d, ++ 0xe302005d, 0xe303005d, 0xe304005d, 0xe305005d, ++ 0xe306005d, 0xe307005d, 0xe308005d, 0xe309005d, ++ 0xe30a005d, 0xe30b005d, 0xe30c005d, 0xe30d005d, ++ 0xe30e005d, 0xe30f005d, 0xe310c0ac, 0xe311005d, ++ 0xe312005d, 0xe313005d, 0xe314005d, 0xe315005d, ++ 0xe316005d, 0xe317005d, 0xe318005d, 0xe319005d, ++ 0xe31a005d, 0xe31b005d, 0xe31c005d, 0xe31d005d, ++ 0xe31e005d, 0xe31f005d, 0xe320005d, 0xe321005d, ++ 0xe322005d, 0xe323005d, 0xe324005d, 0xe325005d, ++ 0xe326005d, 0xe327005d, 0xe328005d, 0xe329005d, ++ 0xe32a005d, 0xe32b005d, 0xe32c005d, 0xe32d005d, ++ 0xe32e005d, 0xe32f005d, 0xe330005d, 0xe331005d, ++ 0xe39d0029, 0xe39e0029, 0xe39f0029, 0xe3a00029, ++ 0xe3a10029, 0xe3a20029, 0xe3a30029, 0xe3a40029, ++ 0xe3a50029, 0xe3a60029, 0xe3a70029, 0xe3a80029, ++ 0xe3a90029, 0xe3aa0029, 0xe3ab0029, 0xe3ac0029, ++ 0xe3ad0029, 0xe3ae0029, 0xe3af0029, 0xe3b00029, ++ 0xe3b10029, 0xe3b20029, 0xe3b30029, 0xe3b40029, ++ 0xe3b50029, 0xe3b60029, 0xe3b72020, 0xe3b80031, ++ 0xe3b80032, 0xe3b80033, 0xe3b80034, 0xe3b80035, ++ 0xe3b80036, 0xe3b80037, 0xe3b80038, 0xe3b80039, ++ 0xe3b90030, 0xe3ba0030, 0xe3ba0031, 0xe3ba0032, ++ 0xe3ba0033, 0xe3ba0034, 0xe3ba0035, 0xe3ba0036, ++ 0xe3ba0037, 0xe3ba0038, 0xe3ba0039, 0xe3bb0030, ++ 0xe3bc5341, 0xe3bd4e00, 0xe3bd4e03, 0xe3bd4e09, ++ 0xe3bd4e5d, 0xe3bd4e8c, 0xe3bd4e94, 0xe3bd516b, ++ 0xe3bd516d, 0xe3bd56db, 0xe3bed68c, 0xe3bf0030, ++ 0xe3bf0031, 0xe3bf0032, 0xe3bf0033, 0xe3bf0034, ++ 0xe3bf0035, 0xe3bf0036, 0xe3bf0037, 0xe3bf0038, ++ 0xe3bf0039, 0xe3c00030, 0xe3c15341, 0xe3c24e00, ++ 0xe3c24e03, 0xe3c24e09, 0xe3c24e5d, 0xe3c24e8c, ++ 0xe3c24e94, 0xe3c2516b, 0xe3c2516d, 0xe3c256db, ++ 0xe3c3d68c, 0xe3c40030, 0xe3c40031, 0xe3c40032, ++ 0xe3c40033, 0xe3c40034, 0xe3c40035, 0xe3c40036, ++ 0xe3c40037, 0xe3c40038, 0xe3c40039, 0xe3c50030, ++ 0xe3c60030, 0xe3c60031, 0xe3c60032, 0xe3c60033, ++ 0xe3c60034, 0xe3c60035, 0xe3c60036, 0xe3c60037, ++ 0xe3c60038, 0xe3c60039, 0xe3c70030, 0xe3c80030, ++ 0xe3c80031, 0xe3c80032, 0xe3c80033, 0xe3c80034, ++ 0xe3c80035, 0xe3c80036, 0xe3c80037, 0xe3c80038, ++ 0xe3c80039, 0xe3c90030, 0xe3d0002a, 0xe3d10029, ++ 0xe3d1002e, 0xe3d20029, 0xe3d2002e, 0xe3d30029, ++ 0xe3d3002e, 0xe3d40029, 0xe3d4002e, 0xe3d50029, ++ 0xe3d5002e, 0xe3d60029, 0xe3d6002e, 0xe3d70029, ++ 0xe3d7002e, 0xe3d80029, 0xe3d8002e, 0xe3d90029, ++ 0xe3d9002e, 0xe3da0029, 0xe3da002e, 0xe3db0029, ++ 0xe3db002e, 0xe3dc0029, 0xe3dc002e, 0xe3dd0029, ++ 0xe3dd002e, 0xe3de0029, 0xe3de002e, 0xe3df0029, ++ 0xe3df002e, 0xe3e00029, 0xe3e0002e, 0xe3e10029, ++ 0xe3e1002e, 0xe3e20029, 0xe3e2002e, 0xe3e30029, ++ 0xe3e3002e, 0xe3e40029, 0xe3e4002e, 0xe3e50029, ++ 0xe3e5002e, 0xe3e60029, 0xe3e6002e, 0xe3e70029, ++ 0xe3e7002e, 0xe3e80029, 0xe3e8002e, 0xe3e90029, ++ 0xe3e9002e, 0xe3ea0029, 0xe3ea002e, 0xe3eb0029, ++ 0xe3eb002e, 0xe3ec0029, 0xe3ec002e, 0xe3ed0029, ++ 0xe3ed002e, 0xe3ee0029, 0xe3ee002e, 0xe3ef0029, ++ 0xe3ef002e, 0xe3f00029, 0xe3f0002e, 0xe3f10029, ++ 0xe3f1002e, 0xe3f20029, 0xe3f2002e, 0xe3f30029, ++ 0xe3f3002e, 0xe3f40029, 0xe3f4002e, 0xe3f50029, ++ 0xe3f5002e, 0xe3f60029, 0xe3f6002e, 0xe3f70029, ++ 0xe3f7002e, 0xe3f80029, 0xe3f8002e, 0xe3f90029, ++ 0xe3f9002e, 0xe3fa0029, 0xe3fa002e, 0xe3fb0029, ++ 0xe3fb002e, 0xe3fc0029, 0xe3fc002e, 0xe3fd0029, ++ 0xe3fd002e, 0xe3fe0029, 0xe3fe002e, 0xe3ff0029, ++ 0xe3ff002e, 0xe4000029, 0xe400002e, 0xe4010029, ++ 0xe401002e, 0xe4020029, 0xe402002e, 0xe4030029, ++ 0xe403002e, 0xe4040029, 0xe404002e, 0xe4052020, ++ 0xe4062021, 0xe4070041, 0xe4070042, 0xe4070043, ++ 0xe4070044, 0xe4070045, 0xe4070046, 0xe4070047, ++ 0xe4070048, 0xe4070049, 0xe407004a, 0xe407004b, ++ 0xe407004c, 0xe407004d, 0xe407004e, 0xe407004f, ++ 0xe4070050, 0xe4070051, 0xe4070052, 0xe4070053, ++ 0xe4070054, 0xe4070055, 0xe4070056, 0xe4070057, ++ 0xe4070058, 0xe4070059, 0xe407005a, 0xe4082020, ++ 0xe4090032, 0xe4090033, 0xe40a0031, 0xe40a0032, ++ 0xe40a4e8c, 0xe40a5341, 0xe40bc2dd, 0xe40c0031, ++ 0xe40c0032, 0xe40c4e8c, 0xe40c5341, 0xe40dc2dd, ++ 0xe40e0031, 0xe40e0032, 0xe40f0031, 0xe40f0032, ++ 0xe4100031, 0xe4100032, 0xe411002a, 0xf80520de, ++ 0xf80620df, 0xf809f87a, 0xf80bf87f, 0xf83df87f, ++ 0xf860002a, 0xf8600041, 0xf8600042, 0xf8600043, ++ 0xf8600044, 0xf8600045, 0xf8600046, 0xf8600047, ++ 0xf8600048, 0xf8600049, 0xf860004a, 0xf860004b, ++ 0xf860004c, 0xf860004d, 0xf860004e, 0xf860004f, ++ 0xf8600050, 0xf8600051, 0xf8600052, 0xf8600053, ++ 0xf8600054, 0xf8600055, 0xf8600056, 0xf8600057, ++ 0xf8600058, 0xf8600059, 0xf860005a, 0xf8600061, ++ 0xf8600062, 0xf8600063, 0xf8600064, 0xf8600065, ++ 0xf8600066, 0xf8600067, 0xf8600068, 0xf8600069, ++ 0xf860006a, 0xf860006b, 0xf860006c, 0xf860006d, ++ 0xf860006e, 0xf860006f, 0xf8600070, 0xf8600071, ++ 0xf8600072, 0xf8600073, 0xf8600074, 0xf8600075, ++ 0xf8600076, 0xf8600077, 0xf8600078, 0xf8600079, ++ 0xf860007a, 0xf8602020, 0xf8602021, 0xf8610028, ++ 0xf8612020, 0xf8620028, 0xf862005b, 0xf862c8fc, ++ 0xf863005b, 0xf863c8fc, 0xf864005b, 0xf865005b, ++ 0xf866005b, 0xf867002a, 0xfe59f87c, 0xfe59f87f, ++ 0xfe5af87c, 0xfe5af87f, 0xff01f874, 0xff0af871, ++ 0xff0af873, 0xff0af874, 0xff0af875, 0xff0af87f, ++ 0xff3ff87f, ++}; +diff --git a/libatalk/unicode/charsets/mac_roman.c b/libatalk/unicode/charsets/mac_roman.c +index caf9a65..bfb84c8 100644 +--- a/libatalk/unicode/charsets/mac_roman.c ++++ b/libatalk/unicode/charsets/mac_roman.c +@@ -45,7 +45,7 @@ struct charset_functions charset_mac_roman = + mac_roman_pull, + mac_roman_push, + CHARSET_CLIENT | CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED, +- NULL, NULL ++ NULL, NULL, NULL + }; + + /* ------------------------ */ +diff --git a/libatalk/unicode/charsets/mac_turkish.c b/libatalk/unicode/charsets/mac_turkish.c +index 33431d4..5f906ea 100644 +--- a/libatalk/unicode/charsets/mac_turkish.c ++++ b/libatalk/unicode/charsets/mac_turkish.c +@@ -44,7 +44,7 @@ struct charset_functions charset_mac_turkish = + mac_turkish_pull, + mac_turkish_push, + CHARSET_CLIENT | CHARSET_MULTIBYTE, +- NULL, NULL ++ NULL, NULL, NULL + }; + + static size_t mac_turkish_push( void *cd, char **inbuf, size_t *inbytesleft, +diff --git a/libatalk/unicode/iconv.c b/libatalk/unicode/iconv.c +index 336af7d..2ca2ec0 100644 +--- a/libatalk/unicode/iconv.c ++++ b/libatalk/unicode/iconv.c +@@ -96,13 +96,19 @@ extern struct charset_functions charset_mac_greek; + extern struct charset_functions charset_mac_turkish; + extern struct charset_functions charset_utf8; + extern struct charset_functions charset_utf8_mac; ++#ifdef HAVE_USABLE_ICONV ++extern struct charset_functions charset_mac_japanese; ++extern struct charset_functions charset_mac_chinese_trad; ++extern struct charset_functions charset_mac_korean; ++extern struct charset_functions charset_mac_chinese_simp; ++#endif + + + static struct charset_functions builtin_functions[] = { +- {"UCS-2", 0, iconv_copy, iconv_copy, CHARSET_WIDECHAR | CHARSET_PRECOMPOSED, NULL, NULL}, +- {"ASCII", 0, ascii_pull, ascii_push, CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED, NULL, NULL}, +- {"SHIFT_JIS", 1568, NULL, NULL, CHARSET_ICONV | CHARSET_PRECOMPOSED | CHARSET_CLIENT, NULL, NULL}, +- {NULL, 0, NULL, NULL, 0, NULL, NULL} ++ {"UCS-2", 0, iconv_copy, iconv_copy, CHARSET_WIDECHAR | CHARSET_PRECOMPOSED, NULL, NULL, NULL}, ++ {"ASCII", 0, ascii_pull, ascii_push, CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED, NULL, NULL, NULL}, ++ {"SHIFT_JIS", 1568, NULL, NULL, CHARSET_ICONV | CHARSET_PRECOMPOSED | CHARSET_CLIENT, NULL, NULL, NULL}, ++ {NULL, 0, NULL, NULL, 0, NULL, NULL, NULL} + }; + + +@@ -171,6 +177,12 @@ void lazy_initialize_iconv(void) + atalk_register_charset(&charset_mac_turkish); + atalk_register_charset(&charset_mac_centraleurope); + atalk_register_charset(&charset_mac_cyrillic); ++#ifdef HAVE_USABLE_ICONV ++ atalk_register_charset(&charset_mac_japanese); ++ atalk_register_charset(&charset_mac_chinese_trad); ++ atalk_register_charset(&charset_mac_korean); ++ atalk_register_charset(&charset_mac_chinese_simp); ++#endif + } + } + +@@ -267,23 +279,27 @@ atalk_iconv_t atalk_iconv_open(const char *tocode, const char *fromcode) + + /* check if we have a builtin function for this conversion */ + from = find_charset_functions(fromcode); +- if(from && from->pull)ret->pull = from->pull; ++ if (from) ret->pull = from->pull; + + to = find_charset_functions(tocode); +- if(to && to->push)ret->push = to->push; ++ if (to) ret->push = to->push; + + /* check if we can use iconv for this conversion */ + #ifdef HAVE_USABLE_ICONV +- if (!ret->pull) { +- ret->cd_pull = iconv_open(UCS2ICONV, fromcode); +- if (ret->cd_pull != (iconv_t)-1) +- ret->pull = sys_iconv; ++ if (!from || (from->flags & CHARSET_ICONV)) { ++ ret->cd_pull = iconv_open(UCS2ICONV, from && from->iname ? from->iname : fromcode); ++ if (ret->cd_pull != (iconv_t)-1) { ++ if (!ret->pull) ret->pull = sys_iconv; ++ } else ret->pull = NULL; + } +- +- if (!ret->push) { +- ret->cd_push = iconv_open(tocode, UCS2ICONV); +- if (ret->cd_push != (iconv_t)-1) +- ret->push = sys_iconv; ++ if (ret->pull) { ++ if (!to || (to->flags & CHARSET_ICONV)) { ++ ret->cd_push = iconv_open(to && to->iname ? to->iname : tocode, UCS2ICONV); ++ if (ret->cd_push != (iconv_t)-1) { ++ if (!ret->push) ret->push = sys_iconv; ++ } else ret->push = NULL; ++ } ++ if (!ret->push && ret->cd_pull) iconv_close((iconv_t)ret->cd_pull); + } + #endif + +@@ -296,33 +312,16 @@ atalk_iconv_t atalk_iconv_open(const char *tocode, const char *fromcode) + } + + /* check for conversion to/from ucs2 */ +- if (strcasecmp(fromcode, "UCS-2") == 0 && to && to->push) { +- ret->direct = to->push; +- ret->push = ret->pull = NULL; +- return ret; +- } +- +- if (strcasecmp(tocode, "UCS-2") == 0 && from && from->pull) { +- ret->direct = from->pull; +- ret->push = ret->pull = NULL; +- return ret; +- } +- +- /* Check if we can do the conversion direct */ +-#ifdef HAVE_USABLE_ICONV + if (strcasecmp(fromcode, "UCS-2") == 0) { +- ret->direct = sys_iconv; +- ret->cd_direct = ret->cd_push; +- ret->cd_push = NULL; +- return ret; ++ ret->direct = ret->push; ++ ret->cd_direct = ret->cd_push; ++ ret->cd_push = NULL; + } + if (strcasecmp(tocode, "UCS-2") == 0) { +- ret->direct = sys_iconv; +- ret->cd_direct = ret->cd_pull; +- ret->cd_pull = NULL; +- return ret; ++ ret->direct = ret->pull; ++ ret->cd_direct = ret->cd_pull; ++ ret->cd_pull = NULL; + } +-#endif + + return ret; + } +diff --git a/libatalk/unicode/utf8.c b/libatalk/unicode/utf8.c +index 12aed01..f1dd6d9 100644 +--- a/libatalk/unicode/utf8.c ++++ b/libatalk/unicode/utf8.c +@@ -47,7 +47,7 @@ struct charset_functions charset_utf8 = + utf8_pull, + utf8_push, + CHARSET_VOLUME | CHARSET_MULTIBYTE | CHARSET_PRECOMPOSED, +- NULL, NULL ++ NULL, NULL, NULL + }; + + struct charset_functions charset_utf8_mac = +@@ -57,7 +57,7 @@ struct charset_functions charset_utf8_mac = + utf8_pull, + utf8_push, + CHARSET_VOLUME | CHARSET_CLIENT | CHARSET_MULTIBYTE | CHARSET_DECOMPOSED, +- NULL, NULL ++ NULL, NULL, NULL + }; + + /* ------------------------ */ --- netatalk-2.0.4~beta2.orig/debian/patches/200_netatalk_conf_defaults.diff +++ netatalk-2.0.4~beta2/debian/patches/200_netatalk_conf_defaults.diff @@ -0,0 +1,11 @@ +--- netatalk/config/netatalk.conf.old 2005-03-15 12:47:46.160398959 +0100 ++++ netatalk/config/netatalk.conf 2005-03-15 12:48:12.387463653 +0100 +@@ -14,7 +14,7 @@ + # quotes here if the zone name contains spaces. + # + #ATALK_ZONE="@some zone" +-ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1` ++ATALK_NAME=`/bin/hostname --short` + + # specify the Mac and unix charsets to be used + ATALK_MAC_CHARSET='MAC_ROMAN' --- netatalk-2.0.4~beta2.orig/debian/patches/112_fix_zeroconf_assertion.patch +++ netatalk-2.0.4~beta2/debian/patches/112_fix_zeroconf_assertion.patch @@ -0,0 +1,12 @@ +diff -ruN netatalk-2.0.3.orig/etc/afpd/afp_avahi.c netatalk-2.0.3/etc/afpd/afp_avahi.c +--- netatalk-2.0.3.orig/etc/afpd/afp_avahi.c 2008-01-08 13:47:25.000000000 +0100 ++++ netatalk-2.0.3/etc/afpd/afp_avahi.c 2008-01-08 13:49:22.000000000 +0100 +@@ -91,7 +91,7 @@ + { + struct context *ctx = userdata; + +- assert(g == ctx->group); ++ assert(!ctx->group || g == ctx->group); + + switch (state) { + --- netatalk-2.0.4~beta2.orig/debian/patches/002_avoid_bdb_if_unneeded.patch +++ netatalk-2.0.4~beta2/debian/patches/002_avoid_bdb_if_unneeded.patch @@ -0,0 +1,38 @@ +diff --git a/bin/cnid/Makefile.am b/bin/cnid/Makefile.am +index 53924c1..461b37f 100644 +--- a/bin/cnid/Makefile.am ++++ b/bin/cnid/Makefile.am +@@ -2,12 +2,12 @@ + + EXTRA_DIST = cnid_maint.in cnid2_create.in + +-#if COMPILE_CNID ++if USE_BDB + bin_SCRIPTS = cnid_maint cnid2_create + bin_PROGRAMS = cnid_index +-#else ++else + #bin_SCRIPTS = +-#endif ++endif + + cnid_index_SOURCES = cnid_index.c + +diff --git a/configure.in b/configure.in +index 30601e0..876cc8b 100644 +--- a/configure.in ++++ b/configure.in +@@ -1,4 +1,4 @@ +-dnl $Id: configure.in,v 1.179.2.3.2.37.2.9 2008/12/03 19:17:27 didg Exp $ ++dnl $Id: configure.in,v 1.179.2.3.2.37.2.10 2008/12/22 21:18:13 didg Exp $ + dnl configure.in for netatalk + + AC_INIT(etc/afpd/main.c) +@@ -1034,6 +1034,7 @@ AM_CONDITIONAL(USE_SOLARIS, test x$sysv_style = xsolaris) + AM_CONDITIONAL(USE_GENTOO, test x$sysv_style = xgentoo) + AM_CONDITIONAL(USE_DEBIAN, test x$sysv_style = xdebian) + AM_CONDITIONAL(USE_UNDEF, test x$sysv_style = x) ++AM_CONDITIONAL(USE_BDB, test x$bdb_required = xyes) + + dnl --------------------- generate files + --- netatalk-2.0.4~beta2.orig/debian/patches/114_fix_macusers_ps_parsing.patch +++ netatalk-2.0.4~beta2/debian/patches/114_fix_macusers_ps_parsing.patch @@ -0,0 +1,18 @@ +--- netatalk/contrib/macusers/macusers.in.orig 2003-01-26 17:40:44.000000000 +0100 ++++ netatalk/contrib/macusers/macusers.in 2008-04-05 03:25:44.000000000 +0200 +@@ -80,7 +80,14 @@ + $time = $4; + + if ($ppid != 1) { +- ($t, $t, $uid, $t, $t, $t, $name, $t, $t) = getpwnam($user); ++ # Deal with truncated usernames. Caution: this does make the ++ # assumption that no username will be all-numeric. ++ if ($user =~ /^[0-9]+$/) { ++ $uid = $user; ++ ($user, $t, $t, $t, $t, $t, $name, $t, $t) = getpwuid($uid); ++ } else { ++ ($t, $t, $uid, $t, $t, $t, $name, $t, $t) = getpwnam($user); ++ } + ($name) = ( $name =~ /(^[^,]+)/ ); + printf "%-8d %-8d %-16s %-20s %-9s %s\n", $pid, $uid, $user, + $name, $time, $mac{$pid}; --- netatalk-2.0.4~beta2.orig/debian/patches/211_avoid_update-rc-d_for_automade_file.patch +++ netatalk-2.0.4~beta2/debian/patches/211_avoid_update-rc-d_for_automade_file.patch @@ -0,0 +1,17 @@ +--- a/distrib/initscripts/Makefile.in ++++ b/distrib/initscripts/Makefile.in +@@ -663,11 +663,11 @@ + @USE_DEBIAN_TRUE@ chmod a+x netatalk + + @USE_DEBIAN_TRUE@install-data-hook: +-@USE_DEBIAN_TRUE@ update-rc.d netatalk defaults 90 10 ++@USE_DEBIAN_TRUE@# update-rc.d netatalk defaults 90 10 + + @USE_DEBIAN_TRUE@uninstall-startup: +-@USE_DEBIAN_TRUE@ rm -f /etc/init.d/netatalk +-@USE_DEBIAN_TRUE@ update-rc.d netatalk remove ++@USE_DEBIAN_TRUE@# rm -f /etc/init.d/netatalk ++@USE_DEBIAN_TRUE@# update-rc.d netatalk remove + + # + # defaults, no init scripts installed --- netatalk-2.0.4~beta2.orig/debian/patches/113_LSB_sysv_dep_info.patch +++ netatalk-2.0.4~beta2/debian/patches/113_LSB_sysv_dep_info.patch @@ -0,0 +1,14 @@ +--- netatalk/distrib/initscripts/rc.atalk.debian.tmpl.orig 2008-04-05 03:09:54.000000000 +0200 ++++ netatalk/distrib/initscripts/rc.atalk.debian.tmpl 2008-04-05 03:11:45.000000000 +0200 +@@ -1,4 +1,11 @@ + #!/bin/sh ++### BEGIN INIT INFO ++# Provides: netatalk ++# Required-Start: $remote_fs $syslog ++# Required-Stop: $remote_fs $syslog ++# Default-Start: 2 3 4 5 ++# Default-Stop: 1 ++### END INIT INFO + # + # atalk Netatalk 2.x initscript + # --- netatalk-2.0.4~beta2.orig/debian/patches/006_CVS_sync_20090121.patch +++ netatalk-2.0.4~beta2/debian/patches/006_CVS_sync_20090121.patch @@ -0,0 +1,271 @@ +diff --git a/etc/atalkd/main.c b/etc/atalkd/main.c +index 863df5d..58f3388 100644 +--- a/etc/atalkd/main.c ++++ b/etc/atalkd/main.c +@@ -1,5 +1,5 @@ + /* +- * $Id: main.c,v 1.17.8.6.2.2 2005/09/27 10:40:41 didg Exp $ ++ * $Id: main.c,v 1.17.8.6.2.3 2009/01/19 02:25:57 didg Exp $ + * + * Copyright (c) 1990,1993 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -11,11 +11,7 @@ + + #include + #include +-#if defined( sun ) && defined( __svr4__ ) +-#include +-#else /* sun __svr4__ */ + #include +-#endif /* sun __svr4__ */ + #include + #include + #include +diff --git a/etc/papd/lp.c b/etc/papd/lp.c +index 1ac71a0..95f3f6c 100644 +--- a/etc/papd/lp.c ++++ b/etc/papd/lp.c +@@ -1,5 +1,5 @@ + /* +- * $Id: lp.c,v 1.14.8.4.2.4 2008/11/25 15:16:33 didg Exp $ ++ * $Id: lp.c,v 1.14.8.4.2.6 2009/01/21 02:33:55 didg Exp $ + * + * Copyright (c) 1990,1994 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -54,11 +54,7 @@ + #include + #endif /* HAVE_UNISTD_H */ + +-#if defined( sun ) && defined( __svr4__ ) +-#include +-#else /* sun && __svr4__ */ + #include +-#endif /* sun && __svr4__ */ + #include + #include + #undef s_net +@@ -1007,7 +1003,9 @@ int lp_queue( out ) + char buf[ 1024 ], *start, *stop, *p, *q; + int linelength, crlflength; + static struct papfile pf; +- int n, len, s; ++ int s; ++ size_t len; ++ ssize_t n; + + if (( s = lp_conn_unix()) < 0 ) { + LOG(log_error, logtype_papd, "lp_queue: %s", strerror(errno) ); +diff --git a/etc/papd/main.c b/etc/papd/main.c +index 40ea9e3..f473c78 100644 +--- a/etc/papd/main.c ++++ b/etc/papd/main.c +@@ -1,5 +1,5 @@ + /* +- * $Id: main.c,v 1.18.6.2.2.4 2008/11/14 10:04:52 didg Exp $ ++ * $Id: main.c,v 1.18.6.2.2.6 2009/01/21 04:07:05 didg Exp $ + * + * Copyright (c) 1990,1995 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -14,11 +14,7 @@ + #include + #include + #include +-#if defined( sun ) && defined( __svr4__ ) +-#include +-#else /* sun && __svr4__ */ + #include +-#endif /* sun && __svr4__ */ + #include + #include + +@@ -76,7 +72,6 @@ char *strchr (), *strrchr (); + #include "uam_auth.h" + #include "print_cups.h" + +-#define _PATH_PAPDPPDFILE ".ppd" + + #define PIPED_STATUS "status: print spooler processing job" + +@@ -205,7 +200,6 @@ int main( ac, av ) + defprinter.p_type = "LaserWriter"; + defprinter.p_zone = "*"; + memset(&defprinter.p_addr, 0, sizeof(defprinter.p_addr)); +- defprinter.p_ppdfile = _PATH_PAPDPPDFILE; + #ifdef __svr4__ + defprinter.p_flags = P_PIPED; + defprinter.p_printer = "/usr/bin/lp -T PS"; +@@ -685,9 +679,7 @@ static void getprinters( cf ) + /* + * Get PPD file. + */ +- if (( p = pgetstr( "pd", &a )) == NULL ) { +- pr->p_ppdfile = defprinter.p_ppdfile; +- } else { ++ if (( p = pgetstr( "pd", &a ) )) { + if (( pr->p_ppdfile = (char *)malloc( strlen( p ) + 1 )) == NULL ) { + perror( "malloc" ); + exit( 1 ); +@@ -826,7 +818,7 @@ int rprintcap( pr ) + * Check for ppd file, moved here because of cups_autoadd we cannot check at the usual location + */ + +- if ( pr->p_ppdfile == defprinter.p_ppdfile ) { ++ if ( pr->p_ppdfile == NULL ) { + if ( (p = (char *) cups_get_printer_ppd ( pr->p_printer )) != NULL ) { + if (( pr->p_ppdfile = (char *)malloc( strlen( p ) + 1 )) == NULL ) { + LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) ); +@@ -834,7 +826,7 @@ int rprintcap( pr ) + } + strcpy( pr->p_ppdfile, p ); + pr->p_flags |= P_CUPS_PPD; +- /*LOG(log_info, logtype_papd, "PPD File for %s set to %s", pr->p_printer, pr->p_ppdfile );*/ ++ LOG(log_info, logtype_papd, "PPD File for %s set to %s", pr->p_printer, pr->p_ppdfile ); + } + } + +diff --git a/etc/papd/ppd.c b/etc/papd/ppd.c +index dd9f700..1cf167a 100644 +--- a/etc/papd/ppd.c ++++ b/etc/papd/ppd.c +@@ -1,5 +1,5 @@ + /* +- * $Id: ppd.c,v 1.9.8.1.2.3 2008/11/14 10:04:52 didg Exp $ ++ * $Id: ppd.c,v 1.9.8.1.2.6 2009/01/21 04:07:05 didg Exp $ + * + * Copyright (c) 1995 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -51,16 +51,17 @@ struct ppdent { + }; + + #ifndef SHOWPPD +-int ppd_inited = 0; ++static int ppd_inited; + +-int ppd_init() ++static void ppd_init() + { +- if ( ppd_inited ) { +- return( -1 ); +- } ++ if (ppd_inited) ++ return; ++ + ppd_inited++; + +- return read_ppd( printer->p_ppdfile, 0 ); ++ if (printer->p_ppdfile) ++ read_ppd( printer->p_ppdfile, 0 ); + } + #endif /* SHOWPPD */ + +@@ -75,7 +76,7 @@ static char* my_fgets(buf, bufsize, stream) + int p; /* uninitialized, OK 310105 */ + size_t count = 0; + +- while (count < bufsize && EOF != (p=fgetc(stream))) { ++ while (count < (bufsize - 1) && EOF != (p=fgetc(stream))) { + buf[count] = p; + count++; + if ( p == '\r' || p == '\n') +@@ -93,7 +94,7 @@ static char* my_fgets(buf, bufsize, stream) + return buf; + } + +-struct ppdent *getppdent( stream ) ++static struct ppdent *getppdent( stream ) + FILE *stream; + { + static char buf[ 1024 ]; +@@ -107,7 +108,7 @@ struct ppdent *getppdent( stream ) + if ( *p != '*' ) { /* main key word */ + continue; + } +- if ( p[ strlen( p ) - 1 ] != '\n' && p[ strlen( p ) - 1 ] != '\r') { ++ if ( p[ strlen( p ) - 1 ] != '\n') { + LOG(log_error, logtype_papd, "getppdent: line too long" ); + continue; + } +@@ -205,7 +206,7 @@ int read_ppd( file, fcnt ) + } + + /* *Font */ +- if ( strcmp( pe->pe_main, "*Font" ) == 0 ) { ++ if ( strcmp( pe->pe_main, "*Font" ) == 0 && pe->pe_option ) { + for ( pfo = ppd_fonts; pfo; pfo = pfo->pd_next ) { + if ( strcmp( pfo->pd_font, pe->pe_option ) == 0 ) { + break; +@@ -238,7 +239,7 @@ int read_ppd( file, fcnt ) + break; + } + } +- if ( pfe->pd_name ) { /*&& (pfe->pd_value == NULL) ) { */ ++ if ( pfe->pd_name && pe->pe_value ) { + if (( pfe->pd_value = + (char *)malloc( strlen( pe->pe_value ) + 1 )) == NULL ) { + LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) ); +diff --git a/etc/papd/ppd.h b/etc/papd/ppd.h +index 03da219..77ffbd9 100644 +--- a/etc/papd/ppd.h ++++ b/etc/papd/ppd.h +@@ -1,5 +1,5 @@ + /* +- * $Id: ppd.h,v 1.4 2001/06/25 20:13:45 rufustfirefly Exp $ ++ * $Id: ppd.h,v 1.4.16.1 2009/01/21 04:07:05 didg Exp $ + * + * Copyright (c) 1995 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -23,6 +23,5 @@ struct ppd_feature { + struct ppd_feature *ppd_feature __P((const char *, int)); + struct ppd_font *ppd_font __P((char *)); + int read_ppd __P((char *, int)); +-int ppd_init __P(( void )); + + #endif /* PAPD_PPD_H */ +diff --git a/etc/uams/uams_dhx2_pam.c b/etc/uams/uams_dhx2_pam.c +index 0c94a73..72bfa4e 100644 +--- a/etc/uams/uams_dhx2_pam.c ++++ b/etc/uams/uams_dhx2_pam.c +@@ -1,5 +1,5 @@ + /* +- * $Id: uams_dhx2_pam.c,v 1.5.2.2 2008/12/02 03:11:59 didg Exp $ ++ * $Id: uams_dhx2_pam.c,v 1.5.2.3 2009/01/15 03:58:05 didg Exp $ + * + * Copyright (c) 1990,1993 Regents of The University of Michigan. + * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) +@@ -573,9 +573,9 @@ static int logincont2(void *obj, struct passwd **uam_pwd, + + *rbuflen = 0; + +- /* Packet size should be: Session ID + ServerNonce + Passwd buffer */ +- if (ibuflen != 2 + 16 + 256) { +- LOG(log_error, logtype_uams, "DHX2: Paket length not correct"); ++ /* Packet size should be: Session ID + ServerNonce + Passwd buffer (evantually +10 extra bytes, see Apples Docs) */ ++ if ((ibuflen != 2 + 16 + 256) && (ibuflen != 2 + 16 + 256 + 10)) { ++ LOG(log_error, logtype_uams, "DHX2: Paket length not correct: %d. Should be 274 or 284.", ibuflen); + ret = AFPERR_PARAM; + goto error_noctx; + } +diff --git a/etc/uams/uams_dhx2_passwd.c b/etc/uams/uams_dhx2_passwd.c +index 2aebbb4..079a4cb 100644 +--- a/etc/uams/uams_dhx2_passwd.c ++++ b/etc/uams/uams_dhx2_passwd.c +@@ -1,5 +1,5 @@ + /* +- * $Id: uams_dhx2_passwd.c,v 1.4.2.2 2008/12/02 03:11:59 didg Exp $ ++ * $Id: uams_dhx2_passwd.c,v 1.4.2.3 2009/01/15 03:58:05 didg Exp $ + * + * Copyright (c) 1990,1993 Regents of The University of Michigan. + * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) +@@ -501,9 +501,9 @@ static int logincont2(void *obj _U_, struct passwd **uam_pwd, + gcry_error_t ctxerror; + + *rbuflen = 0; +- /* Packet size should be: Session ID + ServerNonce + Passwd buffer */ +- if (ibuflen != 2 + 16 + 256) { +- LOG(log_error, logtype_uams, "DHX2: Paket length not correct"); ++ /* Packet size should be: Session ID + ServerNonce + Passwd buffer (evantually +10 extra bytes, see Apples Docs)*/ ++ if ((ibuflen != 2 + 16 + 256) && (ibuflen != 2 + 16 + 256 + 10)) { ++ LOG(log_error, logtype_uams, "DHX2: Paket length not correct: %d. Should be 274 or 284.", ibuflen); + ret = AFPERR_PARAM; + goto error_noctx; + } --- netatalk-2.0.4~beta2.orig/debian/patches/208_fix_manpage_sed_replacements_for_automade_file.patch +++ netatalk-2.0.4~beta2/debian/patches/208_fix_manpage_sed_replacements_for_automade_file.patch @@ -0,0 +1,11 @@ +--- a/man/man5/Makefile.in ++++ b/man/man5/Makefile.in +@@ -515,6 +515,8 @@ + -e s@:BINDIR:@${bindir}@ \ + -e s@:ETCDIR:@${pkgconfdir}@ \ + -e s@:LIBDIR:@${libdir}@ \ ++ -e s@:DEFAULT_CNID_SCHEME:@${default_cnid_scheme}@ \ ++ -e 's@:COMPILED_BACKENDS:@${compiled_backends}@' \ + <$< >$@ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. --- netatalk-2.0.4~beta2.orig/debian/patches/205_applevolumes_default_homedir.diff +++ netatalk-2.0.4~beta2/debian/patches/205_applevolumes_default_homedir.diff @@ -0,0 +1,20 @@ +--- netatalk/config/AppleVolumes.default.tmpl.old 2005-03-15 12:55:26.970845044 +0100 ++++ netatalk/config/AppleVolumes.default.tmpl 2005-03-15 12:57:48.186659354 +0100 +@@ -1,7 +1,3 @@ +-# This file looks empty when viewed with "vi". In fact, there is one +-# '~', so users with no AppleVolumes file in their home directory get +-# their home directory by default. +-# + # volume format: + # :DEFAULT: [all of the default options except volume name] + # path [name] [casefold:x] [options:z,l,j] \ +@@ -102,7 +98,5 @@ + # cnidscheme:scheme -> set the cnid scheme for the volume, default is [:DEFAULT_CNID_SCHEME:] + # available schemes: [:COMPILED_BACKENDS:] + # +-# The "~" below indicates that Home directories are visible by default. +-# If you do not wish to have people accessing their Home directories, +-# please put a pound sign in front of the tilde or delete it. +-~ ++# By default all users have access to their home directories. ++~/ "Home Directory" --- netatalk-2.0.4~beta2.orig/debian/patches/207_afile_namespace_conflict.diff +++ netatalk-2.0.4~beta2/debian/patches/207_afile_namespace_conflict.diff @@ -0,0 +1,96 @@ +--- netatalk/bin/afile/Makefile.am.old 2005-12-29 18:41:20.478636301 +0100 ++++ netatalk/bin/afile/Makefile.am 2005-12-29 18:45:05.053933780 +0100 +@@ -2,10 +2,10 @@ + + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys + +-bin_PROGRAMS = afile achfile ++bin_PROGRAMS = apple_file apple_chfile + bin_SCRIPTS = acleandir.rc + +-afile_SOURCES = afile.c common.c common.h +-achfile_SOURCES = achfile.c common.c common.h ++apple_file_SOURCES = afile.c common.c common.h ++apple_chfile_SOURCES = achfile.c common.c common.h + + EXTRA_DIST = acleandir.rc +--- netatalk/man/man1/afile.1.old 2005-12-29 18:50:58.959272188 +0100 ++++ netatalk/man/man1/afile.1 2005-12-29 18:51:51.649585375 +0100 +@@ -1,18 +1,18 @@ +-.TH afile 1 "26 Feb 1998" 2.0.3 Netatalk ++.TH apple_file 1 "26 Feb 1998" 2.0.3 Netatalk + .SH NAME +-afile \- display type and creator of Apple Macintosh files (netatalk format) ++apple_file \- display type and creator of Apple Macintosh files (netatalk format) + .SH SYNOPSIS +-\fBafile\fR [\-a] \fBfile\fR \&... ++\fBapple_file\fR [\-a] \fBfile\fR \&... + .sp 1 + .SH DESCRIPTION +-afile displays the name and Macintosh type and ++apple_file displays the name and Macintosh type and + creator of the \fIfile\fR arguments. Tests + whether the file is an AppleDouble header, in which case it checks the + corresponding data fork exists, or assumes it is a data fork in which case + it looks for the corresponding AppleDouble to find the type/creator + information. + .PP +-afile does not look at any of the extension ++apple_file does not look at any of the extension + mapping files such as AppleVolumes.system. + .SH OPTIONS + .TP +@@ -43,6 +43,6 @@ + .PP + 9 bad magic in AppleDouble + .SH "SEE ALSO" +-\fBachfile\fR(1), ++\fBapple_chfile\fR(1), + \fBafpd\fR(8) + +--- netatalk/man/man1/achfile.1.old 2005-12-29 18:52:46.341353898 +0100 ++++ netatalk/man/man1/achfile.1 2005-12-29 18:53:09.446154302 +0100 +@@ -1,10 +1,10 @@ +-.TH achfile 1 "26 Feb 1998" 2.0.3 Netatalk ++.TH apple_chfile 1 "26 Feb 1998" 2.0.3 Netatalk + .SH NAME +-achfile \- change type and/or creator of Apple Macintosh files (netatalk format) ++apple_chfile \- change type and/or creator of Apple Macintosh files (netatalk format) + .SH SYNOPSIS +-\fBachfile\fR [ \-t \fBtype\fR ] [ \-c \fBcreator\fR ] \fBfile\fR \&... ++\fBapple_chfile\fR [ \-t \fBtype\fR ] [ \-c \fBcreator\fR ] \fBfile\fR \&... + .SH DESCRIPTION +-achfile changes the Macintosh type and/or creator ++apple_chfile changes the Macintosh type and/or creator + of the \fIfile\fR arguments which have a + corresponding .AppleDouble file. + .SH OPTIONS +@@ -15,6 +15,6 @@ + .SH DIAGNOSTICS + returns exit status 0 if all files changed successfully + .SH "SEE ALSO" +-\fBafile\fR(1), ++\fBapple_file\fR(1), + \fBafpd\fR(8) + +--- netatalk/bin/afile/acleandir.rc.old 2005-12-29 19:01:03.359755410 +0100 ++++ netatalk/bin/afile/acleandir.rc 2005-12-29 19:01:16.417250024 +0100 +@@ -42,7 +42,7 @@ + # now look at the .AppleDouble dir + # + emptydir $AD || for (i in $AD/*) { +- if (~ $aopt 1 || ! afile $i >/dev/null >[2=1] ) { ++ if (~ $aopt 1 || ! apple_file $i >/dev/null >[2=1] ) { + sizemess = () + size = `{wc -c $i} + ! ~ $size(1) 589 && sizemess = 'size='^$size(1) +--- netatalk/man/man1/acleandir.1.old 2005-12-29 19:10:45.810277957 +0100 ++++ netatalk/man/man1/acleandir.1 2005-12-29 19:10:54.312460226 +0100 +@@ -44,6 +44,6 @@ + returns exit status 0 unless bad options are provided or a directory + is not given on the command line. + .SH "SEE ALSO" +-\fBafile\fR(1), ++\fBapple_file\fR(1), + \fBafpd\fR(8) + --- netatalk-2.0.4~beta2.orig/debian/patches/104_initscript_load_module_only_if_intended.patch +++ netatalk-2.0.4~beta2/debian/patches/104_initscript_load_module_only_if_intended.patch @@ -0,0 +1,14 @@ +--- netatalk/distrib/initscripts/rc.atalk.debian.tmpl.old ++++ netatalk/distrib/initscripts/rc.atalk.debian.tmpl +@@ -36,8 +36,10 @@ + atalk_startup() { + if [ "x$ATALKD_RUN" = "xyes" ]; then + +- # Try to load the AppleTalk kernel module ++ # Try to load the AppleTalk kernel module if it was intended. ++ if grep -q '^appletalk$' /etc/modules; then + /sbin/modprobe appletalk || echo "[could not load appletalk module]" ++ fi + + # Start atalkd server. + :SBINDIR:/atalkd --- netatalk-2.0.4~beta2.orig/debian/patches/204a_uniconv_namespace_conflict_autobuilt.diff +++ netatalk-2.0.4~beta2/debian/patches/204a_uniconv_namespace_conflict_autobuilt.diff @@ -0,0 +1,155 @@ +--- a/bin/uniconv/Makefile.in ++++ b/bin/uniconv/Makefile.in +@@ -39,8 +39,8 @@ + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ +-bin_PROGRAMS = uniconv$(EXEEXT) +-subdir = bin/uniconv ++sbin_PROGRAMS = netatalk-uniconv$(EXEEXT) ++subdir = bin/netatalk + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/macros/afs-check.m4 \ +@@ -73,11 +73,11 @@ + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = + am__installdirs = "$(DESTDIR)$(bindir)" +-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +-PROGRAMS = $(bin_PROGRAMS) +-am_uniconv_OBJECTS = uniconv.$(OBJEXT) iso8859_1_adapted.$(OBJEXT) +-uniconv_OBJECTS = $(am_uniconv_OBJECTS) +-uniconv_DEPENDENCIES = $(top_builddir)/libatalk/cnid/libcnid.la \ ++sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) ++PROGRAMS = $(sbin_PROGRAMS) ++am_netatalk_uniconv_OBJECTS = uniconv.$(OBJEXT) iso8859_1_adapted.$(OBJEXT) ++netatalk_uniconv_OBJECTS = $(am_netatalk_uniconv_OBJECTS) ++netatalk_uniconv_DEPENDENCIES = $(top_builddir)/libatalk/cnid/libcnid.la \ + $(top_builddir)/libatalk/libatalk.la + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp +@@ -90,8 +90,8 @@ + CCLD = $(CC) + LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-SOURCES = $(uniconv_SOURCES) +-DIST_SOURCES = $(uniconv_SOURCES) ++SOURCES = $(netatalk_uniconv_SOURCES) ++DIST_SOURCES = $(netatalk_uniconv_SOURCES) + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +@@ -305,8 +305,8 @@ + target_os = @target_os@ + target_vendor = @target_vendor@ + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys +-uniconv_SOURCES = uniconv.c iso8859_1_adapted.c +-uniconv_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la ++netatalk_uniconv_SOURCES = uniconv.c iso8859_1_adapted.c ++netatalk_uniconv_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la + all: all-am + + .SUFFIXES: +@@ -340,37 +340,37 @@ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +-install-binPROGRAMS: $(bin_PROGRAMS) ++install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) +- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" +- @list='$(bin_PROGRAMS)'; for p in $$list; do \ ++ test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" ++ @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ +- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ +- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ ++ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ ++ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ + else :; fi; \ + done + +-uninstall-binPROGRAMS: ++uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) +- @list='$(bin_PROGRAMS)'; for p in $$list; do \ ++ @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ +- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ +- rm -f "$(DESTDIR)$(bindir)/$$f"; \ ++ echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(sbindir)/$$f"; \ + done + +-clean-binPROGRAMS: +- @list='$(bin_PROGRAMS)'; for p in $$list; do \ ++clean-sbinPROGRAMS: ++ @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +-uniconv$(EXEEXT): $(uniconv_OBJECTS) $(uniconv_DEPENDENCIES) +- @rm -f uniconv$(EXEEXT) +- $(LINK) $(uniconv_LDFLAGS) $(uniconv_OBJECTS) $(uniconv_LDADD) $(LIBS) ++netatalk-uniconv$(EXEEXT): $(netatalk_uniconv_OBJECTS) $(netatalk_uniconv_DEPENDENCIES) ++ @rm -f netatalk-uniconv$(EXEEXT) ++ $(LINK) $(netatalk_uniconv_LDFLAGS) $(netatalk_uniconv_OBJECTS) $(netatalk_uniconv_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -491,7 +491,7 @@ + check: check-am + all-am: Makefile $(PROGRAMS) + installdirs: +- for dir in "$(DESTDIR)$(bindir)"; do \ ++ for dir in "$(DESTDIR)$(sbindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done + install: install-am +@@ -520,7 +520,7 @@ + @echo "it deletes files that may require special tools to rebuild." + clean: clean-am + +-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am ++clean-am: clean-generic clean-libtool clean-sbinPROGRAMS mostlyclean-am + + distclean: distclean-am + -rm -rf ./$(DEPDIR) +@@ -540,7 +540,7 @@ + + install-data-am: + +-install-exec-am: install-binPROGRAMS ++install-exec-am: install-sbinPROGRAMS + + install-info: install-info-am + +@@ -566,19 +566,19 @@ + + ps-am: + +-uninstall-am: uninstall-binPROGRAMS uninstall-info-am ++uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS + +-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ ++.PHONY: CTAGS GTAGS all all-am check check-am clean clean-sbinPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ +- install-binPROGRAMS install-data install-data-am install-exec \ ++ install-sbinPROGRAMS install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ +- uninstall-binPROGRAMS uninstall-info-am ++ uninstall-sbinPROGRAMS uninstall-info-am + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. --- netatalk-2.0.4~beta2.orig/debian/patches/206_fix_cnid_maint_paths.diff +++ netatalk-2.0.4~beta2/debian/patches/206_fix_cnid_maint_paths.diff @@ -0,0 +1,25 @@ +--- netatalk/bin/cnid/cnid_maint.in.old 2003-02-17 03:32:45.000000000 +0100 ++++ netatalk/bin/cnid/cnid_maint.in 2004-08-27 17:10:34.748613050 +0200 +@@ -24,17 +24,17 @@ + ); + + ## Edit ME +-$STOP_CMD = '/usr/local/etc/rc.d/netatalk.sh stop'; +-$START_CMD = '/usr/local/etc/rc.d/netatalk.sh start'; ++$STOP_CMD = '/etc/init.d/netatalk stop'; ++$START_CMD = '/etc/init.d/netatalk start'; + + # This ps command needs to output the following fields in the following order: + # USER,PID,PPID,COMMAND + # Below is the example of a BSD ps. A SYSV example is: + # /bin/ps -eflouid,pid,ppid,comm + $PS_CMD = '@PS@ -axouser,pid,ppid,command'; +-$DB_STAT = '@BDB_BIN@/db_stat'; +-$DB_RECOVER = '@BDB_BIN@/db_recover'; +-$DB_VERIFY = '@BDB_BIN@/db_verify'; ++$DB_STAT = '@BDB_BIN@/db4.2_stat'; ++$DB_RECOVER = '@BDB_BIN@/db4.2_recover'; ++$DB_VERIFY = '@BDB_BIN@/db4.2_verify'; + $APPLE_VOLUMES_FILE = '@PKGCONFDIR@/AppleVolumes.default'; + ## End edit section + --- netatalk-2.0.4~beta2.orig/debian/patches/102_rename_initscript.patch +++ netatalk-2.0.4~beta2/debian/patches/102_rename_initscript.patch @@ -0,0 +1,48 @@ +--- netatalk/distrib/initscripts/Makefile.am.old ++++ netatalk/distrib/initscripts/Makefile.am +@@ -42,7 +42,7 @@ + rc.atalk.gentoo.tmpl \ + rc.atalk.debian.tmpl + +-CLEANFILES = $(GENERATED_FILES) atalk afpd atalkd papd timelord ++CLEANFILES = $(GENERATED_FILES) atalk netatalk afpd atalkd papd timelord + EXTRA_DIST = $(TEMPLATES) rc.atalk.cobalt + + # overwrite automake uninstall +@@ -222,18 +222,18 @@ + if USE_DEBIAN + + sysvdir = /etc/init.d +-sysv_SCRIPTS = atalk ++sysv_SCRIPTS = netatalk + +-atalk: rc.atalk.debian +- cp -f rc.atalk.debian atalk +- chmod a+x atalk ++netatalk: rc.atalk.debian ++ cp -f rc.atalk.debian netatalk ++ chmod a+x netatalk + + install-data-hook: +- update-rc.d atalk defaults 90 10 ++ update-rc.d netatalk defaults 90 10 + + uninstall-startup: +- rm -f /etc/init.d/atalk +- update-rc.d atalk remove ++ rm -f /etc/init.d/netatalk ++ update-rc.d netatalk remove + + endif + +--- netatalk/distrib/initscripts/rc.atalk.debian.tmpl.old ++++ netatalk/distrib/initscripts/rc.atalk.debian.tmpl +@@ -10,7 +10,7 @@ + + PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + DESC="Netatalk" +-NAME=atalk ++NAME=netatalk + SCRIPTNAME=/etc/init.d/$NAME + + # Guard to prevent execution if netatalk was removed. --- netatalk-2.0.4~beta2.orig/debian/patches/105_initscript_config_in_etc-default.patch +++ netatalk-2.0.4~beta2/debian/patches/105_initscript_config_in_etc-default.patch @@ -0,0 +1,22 @@ +--- netatalk/distrib/initscripts/rc.atalk.debian.tmpl.old ++++ netatalk/distrib/initscripts/rc.atalk.debian.tmpl +@@ -16,7 +16,7 @@ + # Guard to prevent execution if netatalk was removed. + test -x :SBINDIR:/atalkd || exit 0 + +-# Set defaults. Please change these options in :ETCDIR:/netatalk.conf. ++# Set defaults. Please change these options in /etc/default/netatalk. + AFPD_UAMLIST="-U uams_dhx.so,uams_clrtxt.so" + AFPD_GUEST=nobody + AFPD_MAX_CLIENTS=50 +@@ -28,8 +28,8 @@ + ATALK_UNIX_CHARSET='LOCALE' + + # Read in netatalk configuration. +-if [ -f :ETCDIR:/netatalk.conf ]; then +- . :ETCDIR:/netatalk.conf ++if [ -f /etc/default/netatalk ]; then ++ . /etc/default/netatalk + fi + + # Start Netatalk servers. --- netatalk-2.0.4~beta2.orig/debian/patches/111_db_macro.patch +++ netatalk-2.0.4~beta2/debian/patches/111_db_macro.patch @@ -0,0 +1,58 @@ +--- netatalk.orig/macros/db3-check.m4 2007-12-14 01:26:42.000000000 +0100 ++++ netatalk/macros/db3-check.m4 2007-12-14 01:40:56.000000000 +0100 +@@ -120,25 +120,36 @@ + AC_DEFUN([NETATALK_BERKELEY_LINK], + [ + atalk_cv_lib_db=no ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_6,[-ldb-4.6]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db46,[-ldb46]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_46,[-ldb-46]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_6,[-ldb-4-6]) ++ ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_5,[-ldb-4.5]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db45,[-ldb45]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_45,[-ldb-45]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_5,[-ldb-4-5]) ++ ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_4,[-ldb-4.4]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db44,[-ldb44]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_44,[-ldb-44]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_4,[-ldb-4-4]) ++ ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_3,[-ldb-4.3]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db43,[-ldb43]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_43,[-ldb-43]) ++NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_3,[-ldb-4-3]) ++ + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_2,[-ldb-4.2]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db42,[-ldb42]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_42,[-ldb-42]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_2,[-ldb-4-2]) + +-NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_2,[-ldb-4.4]) +-NETATALK_BDB_LINK_TRY(atalk_cv_db_db42,[-ldb44]) +-NETATALK_BDB_LINK_TRY(atalk_cv_db_db_42,[-ldb-44]) +-NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_2,[-ldb-4-4]) +- +-NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_2,[-ldb-4.3]) +-NETATALK_BDB_LINK_TRY(atalk_cv_db_db42,[-ldb43]) +-NETATALK_BDB_LINK_TRY(atalk_cv_db_db_42,[-ldb-43]) +-NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_2,[-ldb-4-3]) +- + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_1,[-ldb-4.1]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db41,[-ldb41]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_41,[-ldb-41]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_1,[-ldb-4-1]) ++ + NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4,[-ldb-4]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db4,[-ldb4]) + NETATALK_BDB_LINK_TRY(atalk_cv_db_db,[-ldb]) +@@ -150,7 +161,7 @@ + trybdbdir="" + dobdbsearch=yes + bdb_search_dirs="/usr/local/include /usr/include" +- search_subdirs="/db4.2 /db42 /db4.3 /db43 /db4.4 /db44 /db4.1 /db41 /db4 /" ++ search_subdirs="/db4.6 /db46 /db4.5 /db45 /db4.4 /db44 /db4.3 /db43 /db4.2 /db42 /db4.1 /db41 /db4 /" + + dnl required BDB version + DB_MAJOR_REQ=4 --- netatalk-2.0.4~beta2.orig/debian/patches/109_xfs_option.patch +++ netatalk-2.0.4~beta2/debian/patches/109_xfs_option.patch @@ -0,0 +1,19 @@ +--- netatalk-2.0.3.orig/configure.in ++++ netatalk-2.0.3/configure.in +@@ -697,11 +697,16 @@ + + # For quotas on Linux XFS filesystems + ++AC_ARG_WITH([xfs], ++ AS_HELP_STRING([--without-xfs], [Build without XFS filesystem quota support])) ++ ++if test "x$with_xfs" != "xno"; then + # For linux > 2.5.56 + AC_CHECK_HEADERS(linux/dqblk_xfs.h,, + [AC_CHECK_HEADERS(linux/xqm.h linux/xfs_fs.h) + AC_CHECK_HEADERS(xfs/libxfs.h xfs/xqm.h xfs/xfs_fs.h)] + ) ++fi + + + dnl ----- as far as I can tell, dbtob always does the wrong thing --- netatalk-2.0.4~beta2.orig/debian/patches/107_afpd-zeroconf.patch +++ netatalk-2.0.4~beta2/debian/patches/107_afpd-zeroconf.patch @@ -0,0 +1,1386 @@ +? etc/afpd/afp_avahi.c +? etc/afpd/afp_avahi.c.org +? etc/afpd/afp_avahi.h +? etc/afpd/afp_avahi.h.org +? etc/afpd/afp_bonjour.c +? etc/afpd/afp_bonjour.c.org +? etc/afpd/afp_bonjour.h +? etc/afpd/afp_bonjour.h.org +? etc/afpd/afp_howl.c +? etc/afpd/afp_howl.c.org +? etc/afpd/afp_howl.h +? etc/afpd/afp_howl.h.org +? etc/afpd/afp_zeroconf.c +? etc/afpd/afp_zeroconf.c.org +? etc/afpd/afp_zeroconf.h +? etc/afpd/afp_zeroconf.h.org +? macros/zeroconf.m4 +? macros/zeroconf.m4.org +Index: configure.in +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/configure.in,v +retrieving revision 1.203 +diff -u -r1.203 configure.in +--- netatalk/configure.in 28 Apr 2005 20:49:17 -0000 1.203 ++++ netatalk/configure.in 5 May 2006 10:46:30 -0000 +@@ -386,6 +386,9 @@ + dnl Check for optional server location protocol support (used by MacOS X) + NETATALK_SRVLOC + ++dnl Check for optional Zeroconf support ++NETATALK_ZEROCONF ++ + dnl Check for PAM libs + netatalk_cv_use_pam=no + AC_PATH_PAM([ +Index: config/afpd.conf.tmpl +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/config/afpd.conf.tmpl,v +retrieving revision 1.16 +diff -u -r1.16 afpd.conf.tmpl +--- netatalk/config/afpd.conf.tmpl 28 Apr 2005 20:49:20 -0000 1.16 ++++ netatalk/config/afpd.conf.tmpl 5 May 2006 10:46:31 -0000 +@@ -51,6 +51,8 @@ + # empty string. + # -noslp Don't register this server with the Service + # Location Protocol. ++# -nozeroconf Don't register this server with the Multicats ++# DNS Protocol. + # + # + # Authentication Methods: +Index: contrib/a2boot/Makefile.am +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/contrib/a2boot/Makefile.am,v +retrieving revision 1.5 +diff -u -r1.5 Makefile.am +--- netatalk/contrib/a2boot/Makefile.am 28 Apr 2005 20:49:21 -0000 1.5 ++++ netatalk/contrib/a2boot/Makefile.am 5 May 2006 10:46:32 -0000 +@@ -10,7 +10,7 @@ + EXTRA_DIST = COPYRIGHT VERSION + + CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/sys \ +- @CFLAGS@ @SLP_CFLAGS@ \ ++ @CFLAGS@ @SLP_CFLAGS@ @ZEROCONF_CFLAGS@ \ + -D_PATH_A_GS_BLOCKS=\"$(PKGCONFDIR)/a2boot/ProDOS16\ Boot\ Blocks\" \ + -D_PATH_A_2E_BLOCKS=\"$(PKGCONFDIR)/a2boot/Apple\ :2f:2fe\ Boot\ Blocks\" \ + -D_PATH_P16_IMAGE=\"$(PKGCONFDIR)/a2boot/ProDOS16\ Image\" +Index: etc/afpd/Makefile.am +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/etc/afpd/Makefile.am,v +retrieving revision 1.38 +diff -u -r1.38 Makefile.am +--- netatalk/etc/afpd/Makefile.am 30 Apr 2005 21:33:41 -0000 1.38 ++++ netatalk/etc/afpd/Makefile.am 5 May 2006 10:46:33 -0000 +@@ -8,19 +8,21 @@ + file.c enumerate.c desktop.c filedir.c fork.c appl.c gettok.c \ + mangle.c status.c afp_options.c afp_asp.c afp_dsi.c messages.c \ + afp_config.c nfsquota.c quota.c uam.c afs.c uid.c afp_util.c \ +- catsearch.c afprun.c ++ catsearch.c afprun.c \ ++ afp_zeroconf.c afp_avahi.c afp_bonjour.c afp_howl.c + + afpd_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la + afpd_LDFLAGS = -export-dynamic + + noinst_HEADERS = auth.h afp_config.h desktop.h directory.h file.h \ + filedir.h fork.h globals.h icon.h mangle.h misc.h status.h switch.h \ +- uam_auth.h uid.h unix.h volume.h ++ uam_auth.h uid.h unix.h volume.h \ ++ afp_zeroconf.h afp_avahi.h afp_bonjour.h afp_howl.h + +-LIBS = @LIBS@ @QUOTA_LIBS@ @SLP_LIBS@ @WRAP_LIBS@ @LIBADD_DL@ ++LIBS = @LIBS@ @QUOTA_LIBS@ @SLP_LIBS@ @ZEROCONF_LIBS@ @WRAP_LIBS@ @LIBADD_DL@ + + CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/sys \ +- @CFLAGS@ @SLP_CFLAGS@ \ ++ @CFLAGS@ @SLP_CFLAGS@ @ZEROCONF_CFLAGS@ \ + -D_PATH_AFPDDEFVOL=\"$(pkgconfdir)/AppleVolumes.default\" \ + -D_PATH_AFPDSYSVOL=\"$(pkgconfdir)/AppleVolumes.system\" \ + -D_PATH_AFPDPWFILE=\"$(pkgconfdir)/afppasswd\" \ +Index: etc/afpd/afp_config.c +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/etc/afpd/afp_config.c,v +retrieving revision 1.23 +diff -u -r1.23 afp_config.c +--- netatalk/etc/afpd/afp_config.c 28 Apr 2005 20:49:39 -0000 1.23 ++++ netatalk/etc/afpd/afp_config.c 5 May 2006 10:46:35 -0000 +@@ -50,6 +50,9 @@ + #ifdef USE_SRVLOC + #include + #endif /* USE_SRVLOC */ ++#ifdef USE_ZEROCONF ++#include "afp_zeroconf.h" ++#endif /* USE_ZEROCONF */ + + #include "globals.h" + #include "afp_config.h" +@@ -154,9 +157,9 @@ + } + #endif /* USE_SRVLOC */ + +-#ifdef USE_SRVLOC + static void dsi_cleanup(const AFPConfig *config) + { ++#ifdef USE_SRVLOC + SLPError err; + SLPError callbackerr; + SLPHandle hslp; +@@ -189,8 +192,16 @@ + srvloc_dereg_err: + dsi->srvloc_url[0] = '\0'; + SLPClose(hslp); +-} ++#elif defined (USE_ZEROCONF) ++ DSI *dsi = (DSI *)config->obj.handle; ++ ++ /* Do nothing if we didn't register. */ ++ if (!dsi || dsi->zeroconf_registered == 0) ++ return; ++ ++ zeroconf_deregister(); + #endif /* USE_SRVLOC */ ++} + + #ifndef NO_DDP + static void asp_cleanup(const AFPConfig *config) +@@ -355,6 +366,10 @@ + struct servent *afpovertcp; + int afp_port = 548; + char *srvloc_hostname, *hostname; ++#elif defined (USE_ZEROCONF) ++ struct servent *afpovertcp; ++ int afp_port = 548; ++ char *hostname = NULL; + #endif /* USE_SRVLOC */ + + if ((config = (AFPConfig *) calloc(1, sizeof(AFPConfig))) == NULL) { +@@ -449,6 +464,36 @@ + } + #endif /* USE_SRVLOC */ + ++#ifdef USE_ZEROCONF ++ dsi->zeroconf_registered = 0; /* Mark that we haven't registered. */ ++ ++ if (!(options->flags & OPTION_NOZEROCONF)) { ++ /* XXX We don't want to tack on the port number if we don't have to. ++ * Why? ++ * Well, this seems to break MacOS < 10. If the user _really_ wants to ++ * use a non-default port, they can, but be aware, this server might ++ * not show up int the Network Browser. ++ */ ++ afpovertcp = getservbyname("afpovertcp", "tcp"); ++ if (afpovertcp != NULL) { ++ afp_port = ntohs(afpovertcp->s_port); ++ } ++ ++ /* If specified use the FQDN to register with srvloc, otherwise use IP. */ ++ p = NULL; ++ if (options->fqdn) { ++ hostname = options->fqdn; ++ p = strchr(hostname, ':'); ++ } ++ else ++ hostname = inet_ntoa(dsi->server.sin_addr); ++ ++ if (!(options->flags & OPTION_NOSLP)) { ++ zeroconf_register(afp_port, hostname); ++ dsi->zeroconf_registered = 1; /* Mark that we have registered. */ ++ } ++ } ++#endif /* USE_ZEROCONF */ + + config->fd = dsi->serversock; + config->obj.handle = dsi; +@@ -469,6 +514,9 @@ + #ifdef USE_SRVLOC + config->server_cleanup = dsi_cleanup; + #endif ++#ifdef USE_ZEROCONF ++ config->server_cleanup = dsi_cleanup; ++#endif + return config; + } + +Index: etc/afpd/afp_options.c +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/etc/afpd/afp_options.c,v +retrieving revision 1.35 +diff -u -r1.35 afp_options.c +--- netatalk/etc/afpd/afp_options.c 28 Apr 2005 20:49:39 -0000 1.35 ++++ netatalk/etc/afpd/afp_options.c 5 May 2006 10:46:39 -0000 +@@ -202,10 +202,15 @@ + /* parse toggles */ + if (strstr(buf, " -nodebug")) + options->flags &= ~OPTION_DEBUG; ++ + #ifdef USE_SRVLOC + if (strstr(buf, " -noslp")) + options->flags |= OPTION_NOSLP; + #endif /* USE_SRVLOC */ ++#ifdef USE_ZEROCONF ++ if (strstr(buf, " -nozeroconf")) ++ options->flags |= OPTION_NOZEROCONF; ++#endif + + if (strstr(buf, " -nouservolfirst")) + options->flags &= ~OPTION_USERVOLFIRST; +@@ -578,6 +583,12 @@ + puts( "No" ); + #endif + ++#ifdef USE_ZEROCONF ++ puts( "Yes" ); ++#else ++ puts( "No" ); ++#endif ++ + printf( " TCP wrappers support:\t" ); + #ifdef TCPWRAP + puts( "Yes" ); +Index: etc/afpd/globals.h +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/etc/afpd/globals.h,v +retrieving revision 1.21 +diff -u -r1.21 globals.h +--- netatalk/etc/afpd/globals.h 28 Apr 2005 20:49:43 -0000 1.21 ++++ netatalk/etc/afpd/globals.h 5 May 2006 10:46:39 -0000 +@@ -35,6 +35,7 @@ + #define OPTION_CUSTOMICON (1 << 4) + #define OPTION_NOSLP (1 << 5) + #define OPTION_ANNOUNCESSH (1 << 6) ++#define OPTION_NOZEROCONF (1 << 7) + + #ifdef FORCE_UIDGID + /* set up a structure for this */ +Index: include/atalk/dsi.h +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/include/atalk/dsi.h,v +retrieving revision 1.6 +diff -u -r1.6 dsi.h +--- netatalk/include/atalk/dsi.h 3 May 2005 14:55:12 -0000 1.6 ++++ netatalk/include/atalk/dsi.h 5 May 2006 10:46:41 -0000 +@@ -86,6 +86,10 @@ + char srvloc_url[512]; + #endif + ++#ifdef USE_ZEROCONF ++ int zeroconf_registered; ++#endif ++ + /* buffer for OSX deadlock */ + int noblocking; + char *buffer; +Index: macros/summary.m4 +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/macros/summary.m4,v +retrieving revision 1.2 +diff -u -r1.2 summary.m4 +--- netatalk/macros/summary.m4 28 Apr 2005 20:50:05 -0000 1.2 ++++ netatalk/macros/summary.m4 5 May 2006 10:46:46 -0000 +@@ -49,6 +49,7 @@ + AC_MSG_RESULT([ Options:]) + AC_MSG_RESULT([ CUPS support: $netatalk_cv_use_cups]) + AC_MSG_RESULT([ SLP support: $netatalk_cv_srvloc]) ++ AC_MSG_RESULT([ Zeroconf support: $netatalk_cv_zeroconf]) + AC_MSG_RESULT([ tcp wrapper support: $netatalk_cv_tcpwrap]) + dnl if test x"$netatalk_cv_linux_sendfile" != x; then + dnl AC_MSG_RESULT([ Linux sendfile support: $netatalk_cv_linux_sendfile]) +Index: man/man5/afpd.conf.5.tmpl +=================================================================== +RCS file: /cvsroot/netatalk/netatalk/man/man5/afpd.conf.5.tmpl,v +retrieving revision 1.4 +diff -u -r1.4 afpd.conf.5.tmpl +--- netatalk/man/man5/afpd.conf.5.tmpl 28 Apr 2005 20:50:06 -0000 1.4 ++++ netatalk/man/man5/afpd.conf.5.tmpl 5 May 2006 10:46:48 -0000 +@@ -210,6 +210,9 @@ + Protocol (if SLP support was compiled in). This is useful if you are + running multiple servers and want one to be hidden, perhaps because + it is advertised elsewhere, ie. by a SLP Directory Agent. ++\-noslp ++Do not register this server using the Multicast DNS ++Protocol (if Zeroconf support was compiled in). + .SH "MISCELLANEOUS OPTIONS" + .TP + \-admingroup \fI[group]\fR +--- netatalk/etc/afpd/afp_avahi.c.org 2006-04-21 10:29:22.000000000 +0200 ++++ netatalk/etc/afpd/afp_avahi.c 2006-04-22 08:34:34.000000000 +0200 +@@ -0,0 +1,500 @@ ++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ ++/* ++ * Author: Daniel S. Haischt ++ * Purpose: Avahi based Zeroconf support ++ * Docs: http://avahi.org/download/doxygen/ ++ * ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#ifdef HAVE_AVAHI ++ ++#include "afp_avahi.h" ++ ++static void publish_reply(AvahiEntryGroup *g, ++ AvahiEntryGroupState state, ++ void *userdata); ++ ++/* ++ * This function tries to register the AFP DNS ++ * SRV service type. ++ */ ++static void register_stuff(struct context *ctx) { ++ char r[128]; ++ int ret; ++ ++ assert(ctx->client); ++ ++ if (!ctx->group) { ++ ++ if (!(ctx->group = avahi_entry_group_new(ctx->client, ++ publish_reply, ++ ctx))) { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to create entry group: %s\n", ++ avahi_strerror(avahi_client_errno(ctx->client))); ++ goto fail; ++ } ++ ++ } ++ ++ LOG(log_info, logtype_afpd, "Adding service '%s'\n", ctx->name); ++ ++ if (avahi_entry_group_is_empty(ctx->group)) { ++ /* Register our service */ ++ ++ if (avahi_entry_group_add_service(ctx->group, ++ AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ 0, ++ ctx->name, ++ AFP_DNS_SERVICE_TYPE, ++ NULL, ++ NULL, ++ ctx->port, ++ NULL) < 0) { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to add service: %s\n", ++ avahi_strerror(avahi_client_errno(ctx->client))); ++ goto fail; ++ } ++ ++ if (avahi_entry_group_commit(ctx->group) < 0) { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to commit entry group: %s\n", ++ avahi_strerror(avahi_client_errno(ctx->client))); ++ goto fail; ++ } ++ } ++ ++ return; ++ ++ fail: ++ avahi_client_free (ctx->client); ++#ifndef HAVE_AVAHI_THREADED_POLL ++ avahi_simple_poll_quit(ctx->simple_poll); ++#else ++ avahi_threaded_poll_quit(ctx->threaded_poll); ++#endif ++} ++ ++/* Called when publishing of service data completes */ ++static void publish_reply(AvahiEntryGroup *g, ++ AvahiEntryGroupState state, ++ AVAHI_GCC_UNUSED void *userdata) ++{ ++ struct context *ctx = userdata; ++ ++ assert(g == ctx->group); ++ ++ switch (state) { ++ ++ case AVAHI_ENTRY_GROUP_ESTABLISHED : ++ /* The entry group has been established successfully */ ++ break; ++ ++ case AVAHI_ENTRY_GROUP_COLLISION: { ++ char *n; ++ ++ /* Pick a new name for our service */ ++ ++ n = avahi_alternative_service_name(ctx->name); ++ assert(n); ++ ++ avahi_free(ctx->name); ++ ctx->name = n; ++ ++ register_stuff(ctx); ++ break; ++ } ++ ++ case AVAHI_ENTRY_GROUP_FAILURE: { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to register service: %s\n", ++ avahi_strerror(avahi_client_errno(ctx->client))); ++ avahi_client_free (avahi_entry_group_get_client(g)); ++#ifndef HAVE_AVAHI_THREADED_POLL ++ avahi_simple_poll_quit(ctx->simple_poll); ++#else ++ avahi_threaded_poll_quit(ctx->threaded_poll); ++#endif ++ break; ++ } ++ ++ case AVAHI_ENTRY_GROUP_UNCOMMITED: ++ case AVAHI_ENTRY_GROUP_REGISTERING: ++ ; ++ } ++} ++ ++static void client_callback(AvahiClient *client, ++ AvahiClientState state, ++ void *userdata) ++{ ++ struct context *ctx = userdata; ++ ++ ctx->client = client; ++ ++ switch (state) { ++ ++ case AVAHI_CLIENT_S_RUNNING: ++ ++ /* The server has startup successfully and registered its host ++ * name on the network, so it's time to create our services */ ++ if (!ctx->group) ++ register_stuff(ctx); ++ break; ++ ++ case AVAHI_CLIENT_S_COLLISION: ++ ++ if (ctx->group) ++ avahi_entry_group_reset(ctx->group); ++ break; ++ ++ case AVAHI_CLIENT_FAILURE: { ++ ++ if (avahi_client_errno(client) == AVAHI_ERR_DISCONNECTED) { ++ int error; ++ ++ avahi_client_free(ctx->client); ++ ctx->client = NULL; ++ ctx->group = NULL; ++ ++ /* Reconnect to the server */ ++ ++#ifndef HAVE_AVAHI_THREADED_POLL ++ if (!(ctx->client = avahi_client_new(avahi_simple_poll_get(ctx->simple_poll), ++#else ++ if (!(ctx->client = avahi_client_new(avahi_threaded_poll_get(ctx->threaded_poll), ++#endif ++ AVAHI_CLIENT_NO_FAIL, ++ client_callback, ++ ctx, ++ &error))) { ++ ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to contact server: %s\n", ++ avahi_strerror(error)); ++ ++ avahi_client_free (ctx->client); ++#ifndef HAVE_AVAHI_THREADED_POLL ++ avahi_simple_poll_quit(ctx->simple_poll); ++#else ++ avahi_threaded_poll_quit(ctx->threaded_poll); ++#endif ++ } ++ ++ } else { ++ LOG(log_error, ++ logtype_afpd, ++ "Client failure: %s\n", ++ avahi_strerror(avahi_client_errno(client))); ++ ++ avahi_client_free (ctx->client); ++#ifndef HAVE_AVAHI_THREADED_POLL ++ avahi_simple_poll_quit(ctx->simple_poll); ++#else ++ avahi_threaded_poll_quit(ctx->threaded_poll); ++#endif ++ } ++ ++ break; ++ } ++ ++ case AVAHI_CLIENT_S_REGISTERING: ++ case AVAHI_CLIENT_CONNECTING: ++ ; ++ } ++} ++ ++static void* thread(void *userdata) { ++#ifndef HAVE_AVAHI_THREADED_POLL ++ struct context *ctx = userdata; ++ sigset_t mask; ++ int r; ++ ++ /* Make sure that signals are delivered to the main thread */ ++ sigfillset(&mask); ++ pthread_sigmask(SIG_BLOCK, &mask, NULL); ++ ++ pthread_mutex_lock(&ctx->mutex); ++ ++ /* Run the main loop */ ++ LOG(log_info, logtype_afpd, "Starting avahi loop..."); ++ r = avahi_simple_poll_loop(ctx->simple_poll); ++ ++ /* Cleanup some stuff */ ++ if (ctx->client) ++ avahi_client_free(ctx->client); ++ ctx->client = NULL; ++ ctx->group = NULL; ++ ++ pthread_mutex_unlock(&ctx->mutex); ++#endif ++ return NULL; ++} ++ ++static int poll_func(struct pollfd *ufds, ++ unsigned int nfds, ++ int timeout, ++ void *userdata) { ++#ifndef HAVE_AVAHI_THREADED_POLL ++ pthread_mutex_t *mutex = userdata; ++ int r; ++ ++ /* Before entering poll() we unlock the mutex, so that ++ * avahi_simple_poll_quit() can succeed from another thread. */ ++ ++ pthread_mutex_unlock(mutex); ++ r = poll(ufds, nfds, timeout); ++ pthread_mutex_lock(mutex); ++ ++ return r; ++#else ++ return 0; ++#endif ++} ++ ++/* ++ * Tries to setup the Zeroconf thread and any ++ * neccessary config setting. ++ */ ++void* av_zeroconf_setup(unsigned long port, const char *name) { ++ struct context *ctx = NULL; ++ ++ /* default service name, if there's none in ++ * the config file. ++ */ ++ char service[256] = "AFP Server on "; ++ int error, ret; ++ ++ /* initialize the struct that holds our ++ * config settings. ++ */ ++ ctx = malloc(sizeof(struct context)); ++ assert(ctx); ++ ctx->client = NULL; ++ ctx->group = NULL; ++#ifndef HAVE_AVAHI_THREADED_POLL ++ ctx->simple_poll = NULL; ++ pthread_mutex_init(&ctx->mutex, NULL); ++#else ++ ctx->threaded_poll = NULL; ++#endif ++ ctx->thread_running = 0; ++ ++ LOG(log_info, ++ logtype_afpd, ++ "Setting port for Zeroconf service to: %i.\n", ++ port); ++ ctx->port = port; ++ ++ /* Prepare service name */ ++ if (!name) { ++ LOG(log_info, ++ logtype_afpd, ++ "Assigning default service name.\n"); ++ gethostname(service+14, sizeof(service)-15); ++ service[sizeof(service)-1] = 0; ++ ++ ctx->name = strdup(service); ++ } ++ else { ++ ctx->name = strdup(name); ++ } ++ ++ assert(ctx->name); ++ ++/* first of all we need to initialize our threading env */ ++#ifdef HAVE_AVAHI_THREADED_POLL ++ if (!(ctx->threaded_poll = avahi_threaded_poll_new())) { ++ goto fail; ++ } ++#else ++ if (!(ctx->simple_poll = avahi_simple_poll_new())) { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to create event loop object.\n"); ++ goto fail; ++ } ++ ++ avahi_simple_poll_set_func(ctx->simple_poll, poll_func, &ctx->mutex); ++#endif ++ ++/* now we need to acquire a client */ ++#ifdef HAVE_AVAHI_THREADED_POLL ++ if (!(ctx->client = avahi_client_new(avahi_threaded_poll_get(ctx->threaded_poll), ++ AVAHI_CLIENT_NO_FAIL, ++ client_callback, ++ ctx, ++ &error))) { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to create client object: %s\n", ++ avahi_strerror(avahi_client_errno(ctx->client))); ++ goto fail; ++ } ++#else ++ if (!(ctx->client = avahi_client_new(avahi_simple_poll_get(ctx->simple_poll), ++ AVAHI_CLIENT_NO_FAIL, ++ client_callback, ++ ctx, ++ &error))) { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to create client object: %s\n", ++ avahi_strerror(avahi_client_errno(ctx->client))); ++ goto fail; ++ } ++#endif ++ ++ return ctx; ++ ++fail: ++ ++ if (ctx) ++ av_zeroconf_unregister(ctx); ++ ++ return NULL; ++} ++ ++/* ++ * This function finally runs the loop impl. ++ */ ++int av_zeroconf_run(void *u) { ++ struct context *ctx = u; ++ int ret; ++ ++#ifdef HAVE_AVAHI_THREADED_POLL ++ /* Finally, start the event loop thread */ ++ if (avahi_threaded_poll_start(ctx->threaded_poll) < 0) { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to create thread: %s\n", ++ avahi_strerror(avahi_client_errno(ctx->client))); ++ goto fail; ++ } else { ++ LOG(log_info, logtype_afpd, "Successfully started avahi loop.\n"); ++ } ++#else ++ /* Create the mDNS event handler */ ++ if ((ret = pthread_create(&ctx->thread_id, NULL, thread, ctx)) < 0) { ++ LOG(log_error, ++ logtype_afpd, ++ "Failed to create thread: %s\n", strerror(ret)); ++ goto fail; ++ } else { ++ LOG(log_info, logtype_afpd, "Successfully started avahi loop.\n"); ++ } ++#endif ++ ++ ctx->thread_running = 1; ++ ++ return 0; ++ ++fail: ++ ++ if (ctx) ++ av_zeroconf_unregister(ctx); ++ ++ return -1; ++} ++ ++/* ++ * Used to lock access to the loop. ++ * Currently unused. ++ */ ++void av_zeroconf_lock(void *u) { ++#ifdef HAVE_AVAHI_THREADED_POLL ++ struct context *ctx = u; ++ ++ avahi_threaded_poll_lock(ctx->threaded_poll); ++#endif ++} ++ ++/* ++ * Used to unlock access to the loop. ++ * Currently unused. ++ */ ++void av_zeroconf_unlock(void *u) { ++#ifdef HAVE_AVAHI_THREADED_POLL ++ struct context *ctx = u; ++ ++ avahi_threaded_poll_unlock(ctx->threaded_poll); ++#endif ++} ++ ++/* ++ * Tries to shutdown this loop impl. ++ * Call this function from outside this thread. ++ */ ++void av_zeroconf_shutdown(void *u) { ++ struct context *ctx = u; ++ ++ /* Call this when the app shuts down */ ++#ifdef HAVE_AVAHI_THREADED_POLL ++ avahi_threaded_poll_stop(ctx->threaded_poll); ++ avahi_free(ctx->name); ++ avahi_client_free(ctx->client); ++ avahi_threaded_poll_free(ctx->threaded_poll); ++#else ++ av_zeroconf_unregister(ctx); ++#endif ++} ++ ++/* ++ * Tries to shutdown this loop impl. ++ * Call this function from inside this thread. ++ */ ++int av_zeroconf_unregister(void *u) { ++ struct context *ctx = u; ++ ++ if (ctx->thread_running) { ++#ifndef HAVE_AVAHI_THREADED_POLL ++ pthread_mutex_lock(&ctx->mutex); ++ avahi_simple_poll_quit(ctx->simple_poll); ++ pthread_mutex_unlock(&ctx->mutex); ++ ++ pthread_join(ctx->thread_id, NULL); ++#else ++ /* First, block the event loop */ ++ avahi_threaded_poll_lock(ctx->threaded_poll); ++ ++ /* Than, do your stuff */ ++ avahi_threaded_poll_quit(ctx->threaded_poll); ++ ++ /* Finally, unblock the event loop */ ++ avahi_threaded_poll_unlock(ctx->threaded_poll); ++#endif ++ ctx->thread_running = 0; ++ } ++ ++ avahi_free(ctx->name); ++ ++ if (ctx->client) ++ avahi_client_free(ctx->client); ++ ++#ifndef HAVE_AVAHI_THREADED_POLL ++ if (ctx->simple_poll) ++ avahi_simple_poll_free(ctx->simple_poll); ++ ++ pthread_mutex_destroy(&ctx->mutex); ++#else ++ if (ctx->threaded_poll) ++ avahi_threaded_poll_free(ctx->threaded_poll); ++#endif ++ ++ free(ctx); ++ ++ return 0; ++} ++ ++#endif /* USE_AVAHI */ +--- netatalk/etc/afpd/afp_avahi.h.org 2006-04-21 10:29:23.000000000 +0200 ++++ netatalk/etc/afpd/afp_avahi.h 2006-04-22 07:40:05.000000000 +0200 +@@ -0,0 +1,58 @@ ++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ ++/* ++ * Author: Daniel S. Haischt ++ * Purpose: Avahi based Zeroconf support ++ * Docs: http://avahi.org/download/doxygen/ ++ * ++ */ ++ ++#ifndef AFPD_AVAHI_H ++#define AFPD_AVAHI_H ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++ ++#ifndef HAVE_AVAHI_THREADED_POLL ++#include ++#include /* SIG_BLOCK */ ++#else ++#include ++#endif ++ ++#include ++#include ++ ++#include ++ ++#define AFP_DNS_SERVICE_TYPE "_afpovertcp._tcp" ++ ++struct context { ++ int thread_running; ++ pthread_t thread_id; ++ pthread_mutex_t mutex; ++ char *name; ++#ifndef HAVE_AVAHI_THREADED_POLL ++ AvahiSimplePoll *simple_poll; ++#else ++ AvahiThreadedPoll *threaded_poll; ++#endif ++ AvahiClient *client; ++ AvahiEntryGroup *group; ++ unsigned long port; ++}; ++ ++/* prototype definitions */ ++void* av_zeroconf_setup(unsigned long, const char *); ++int av_zeroconf_run(void*); ++int av_zeroconf_unregister(void*); ++void av_zeroconf_shutdown(void*); ++void av_zeroconf_lock(void *); ++void av_zeroconf_unlock(void *); ++ ++#endif /* AFPD_AVAHI_H */ +--- netatalk/etc/afpd/afp_bonjour.h.org 2006-04-21 10:29:30.000000000 +0200 ++++ netatalk/etc/afpd/afp_bonjour.h 2006-04-21 07:37:05.000000000 +0200 +@@ -0,0 +1,27 @@ ++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ ++/* ++ * Author: Daniel S. Haischt ++ * Purpose: Bonjour based Zeroconf support ++ * Docs: http://developer.apple.com/documentation/Networking/Reference/DNSServiceDiscovery_CRef/dns_sd/ ++ * ++ */ ++ ++#ifndef AFPD_BONJOUR_H ++#define AFPD_BONJOUR_H ++ ++#include ++#include ++#include ++ ++#include /* DNSServiceRegister(), DNSServiceDiscoveryDeallocate() */ ++ ++#include ++ ++#define AFP_DNS_SERVICE_TYPE "_afpovertcp._tcp" ++ ++/* prototype definitions */ ++void* bo_zeroconf_setup(unsigned long, const char *); ++int bo_zeroconf_unregister(void); ++int bo_zeroconf_run(void); ++ ++#endif /* AFPD_BONJOUR_H */ +--- netatalk/etc/afpd/afp_bonjour.c.org 2006-04-21 10:29:28.000000000 +0200 ++++ netatalk/etc/afpd/afp_bonjour.c 2006-04-21 09:45:13.000000000 +0200 +@@ -0,0 +1,112 @@ ++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ ++/* ++ * Author: Daniel S. Haischt ++ * Purpose: Bonjour based Zeroconf support ++ * Docs: http://developer.apple.com/documentation/Networking/Reference/DNSServiceDiscovery_CRef/dns_sd/ ++ * ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#ifdef HAVE_BONJOUR ++ ++#include "afp_bonjour.h" ++ ++DNSServiceRef publish_session = NULL; ++ ++static void DNSSD_API ++publish_reply(DNSServiceRef, ++ const DNSServiceFlags, ++ DNSServiceErrorType, ++ const char *, ++ const char *, ++ const char *, ++ void *); ++ ++static void DNSSD_API ++publish_reply (DNSServiceRef sdRef, ++ const DNSServiceFlags flags, ++ DNSServiceErrorType errorCode, ++ const char *name, ++ const char *regtype, ++ const char *domain, ++ void *context) ++{ ++} ++ ++void* bo_zeroconf_setup(unsigned long port, const char *name) { ++ DNSServiceErrorType err; ++ char service[256] = "AFP Server on "; ++ ++ /* Prepare service name */ ++ if (!name) { ++ LOG(log_info, logtype_afpd,, "Assigning default service name.\n"); ++ gethostname(service+14, sizeof(service)-15); ++ service[sizeof(service)-1] = 0; ++ ++ name = strdup(service); ++ } ++ ++ assert(name); ++ assert(port); ++ ++ err = DNSServiceRegister (&publish_session, ++ 0, /* flags */ ++ 0, /* interface; 0 for all */ ++ name, /* name */ ++ AFP_DNS_SERVICE_TYPE, /* type */ ++ NULL, /* domain */ ++ NULL, /* hostname */ ++ htons (port), /* port in network byte order */ ++ 0, /* text record length */ ++ NULL, /* text record */ ++ publish_reply, /* callback */ ++ NULL); /* context */ ++ ++ if (err == kDNSServiceErr_NoError) { ++ LOG(log_info, logtype_afpd, "Adding service '%s'\n", name); ++ } else { ++ LOG(log_error, logtype_afpd, "Adding service '%s' failed\n", name); ++ bo_zeroconf_unregister(); ++ } ++} ++ ++int bo_zeroconf_run(void) { ++ fd_set set; ++ int fd; ++ struct timeval timeout; ++ ++ /* Initialize the file descriptor set. */ ++ FD_ZERO (&set); ++ FD_SET (fd, &set); ++ ++ /* Initialize the timeout data structure. */ ++ /* TODO: Should the value for sec be configurable? */ ++ timeout.tv_sec = 10; ++ timeout.tv_usec = 0; ++ ++ if (publish_session != NULL) { ++ fd = DNSServiceRefSockFD(publish_session); ++ ++ if (select(FD_SETSIZE, ++ &set, NULL, NULL, ++ &timeout) > 0) { ++ DNSServiceProcessResult(publish_session); ++ } ++ } ++ ++ return 0; ++} ++ ++int bo_zeroconf_unregister(void) { ++ if (publish_session != NULL) { ++ DNSServiceRefDeallocate(publish_session); ++ publish_session = NULL; ++ } ++ ++ return 0; ++} ++ ++#endif /* HAVE_BONJOUR */ +--- netatalk/etc/afpd/afp_howl.c.org 2006-04-21 10:29:34.000000000 +0200 ++++ netatalk/etc/afpd/afp_howl.c 2006-04-21 09:46:11.000000000 +0200 +@@ -0,0 +1,92 @@ ++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ ++/* ++ * Author: Daniel S. Haischt ++ * Purpose: Howl based Zeroconf support ++ * Doc: http://www.porchdogsoft.com/products/howl/docs/ ++ * ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#ifdef HAVE_HOWL ++ ++#include "afp_howl.h" ++ ++sw_discovery discovery = NULL; ++ ++static sw_result HOWL_API publish_reply(sw_discovery, ++ sw_discovery_oid, ++ sw_discovery_publish_status, ++ sw_opaque); ++ ++static sw_result HOWL_API publish_reply(sw_discovery discovery, ++ sw_discovery_oid oid, ++ sw_discovery_publish_status status, ++ sw_opaque extra) { ++ static sw_string ++ status_text[] = ++ { ++ "Started", ++ "Stopped", ++ "Name Collision", ++ "Invalid" ++ }; ++ ++ LOG(log_info, logtype_afpd, "publish reply: %s\n", status_text[status]); ++ return SW_OKAY; ++} ++ ++void* ho_zeroconf_setup(unsigned long port, const char *name) { ++ sw_result result; ++ sw_discovery_publish_id id; ++ char service[256] = "AFP Server on "; ++ ++ if (sw_discovery_init (&discovery) != SW_OKAY) { ++ LOG(log_error, ++ logtype_afpd, ++ "AFPD could not be started. \nTry running mDNSResponder."); ++ return; ++ } ++ ++ /* Prepare service name */ ++ if (!name) { ++ LOG(log_info, logtype_afpd, "Assigning default service name.\n"); ++ gethostname(service+14, sizeof(service)-15); ++ service[sizeof(service)-1] = 0; ++ ++ name = strdup(service); ++ } ++ ++ assert(name); ++ ++ if (!(result = sw_discovery_publish (discovery, ++ 0, ++ name, ++ AFP_DNS_SERVICE_TYPE, ++ NULL, ++ NULL, ++ port, ++ NULL, ++ 0, ++ publish_reply, ++ NULL, ++ &id)) != SW_OKAY) { ++ LOG(log_info, logtype_afpd, "Adding service '%s'\n", name); ++ } else { ++ LOG(log_error, logtype_afpd, "Adding service '%s' failed\n", name); ++ ho_zeroconf_unregister(); ++ } ++} ++ ++void* ho_zeroconf_run(void) { ++ sw_discovery_run(discovery); ++} ++ ++void* ho_zeroconf_unregister(void) { ++ sw_discovery_stop_run(discovery); ++ sw_discovery_fina(discovery); ++} ++ ++#endif /* USE_HOWL */ +--- netatalk/etc/afpd/afp_howl.h.org 2006-04-21 10:29:33.000000000 +0200 ++++ netatalk/etc/afpd/afp_howl.h 2006-04-21 07:37:11.000000000 +0200 +@@ -0,0 +1,27 @@ ++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ ++/* ++ * Author: Daniel S. Haischt ++ * Purpose: Howl based Zeroconf support ++ * Doc: http://www.porchdogsoft.com/products/howl/docs/ ++ * ++ */ ++ ++#ifndef AFPD_HOWL_H ++#define AFPD_HOWL_H ++ ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++#define NTP_DNS_SERVICE_TYPE "_afpovertcp._tcp" ++ ++/* prototype definitions */ ++void* ho_zeroconf_setup(unsigned long, const char *); ++void* ho_zeroconf_unregister(void); ++void* ho_zeroconf_run(void); ++ ++#endif /* AFPD_HOWL_H */ +--- netatalk/etc/afpd/afp_zeroconf.h.org 2006-04-21 10:29:39.000000000 +0200 ++++ netatalk/etc/afpd/afp_zeroconf.h 2006-04-21 11:39:20.000000000 +0200 +@@ -0,0 +1,40 @@ ++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ ++/* ++ * Author: Daniel S. Haischt ++ * Purpose: Zeroconf facade, that abstracts access to a ++ * particular Zeroconf implementation ++ * Doc: http://www.dns-sd.org/ ++ * ++ */ ++ ++#ifndef AFPD_ZEROCONF_H ++#define AFPD_ZEROCONF_H ++ ++#include /* htons() */ ++#include ++ ++# ifdef HAVE_BONJOUR ++# include "afp_bonjour.h" ++# elif defined (HAVE_HOWL) ++# include "afp_howl.h" ++# elif defined (HAVE_AVAHI) ++# include "afp_avahi.h" ++# endif ++ ++#define AFP_PORT 548 ++ ++/* ++ * Prototype Definitions ++ */ ++ ++/* ++ * registers the ntpd service with a particular Zerconf implemenation. ++ */ ++void zeroconf_register(int port, char *hostname); ++ ++/* ++ * de-registers the ntpd service with a particular Zerconf implemenation. ++ */ ++void zeroconf_deregister(void); ++ ++#endif AFPD_ZEROCONF_H +--- netatalk/etc/afpd/afp_zeroconf.c.org 2006-04-21 10:29:38.000000000 +0200 ++++ netatalk/etc/afpd/afp_zeroconf.c 2006-04-21 13:12:38.000000000 +0200 +@@ -0,0 +1,97 @@ ++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ ++/* ++ * Author: Daniel S. Haischt ++ * Purpose: Zeroconf facade, that abstracts access to a ++ * particular Zeroconf implementation ++ * Doc: http://www.dns-sd.org/ ++ * ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include "afp_zeroconf.h" ++ ++/* ++ * Global Definitions ++ */ ++#ifdef HAVE_AVAHI ++struct context *ctx = NULL; ++#endif ++ ++/* ++ * Functions (actually they are just facades) ++ */ ++void zeroconf_register(int port, char *hostname) ++{ ++#ifdef HAVE_BONJOUR ++ LOG(log_info, ++ logtype_afpd, ++ "Attempting to register with mDNS using Apple's Bonjour\n"); ++ if (hostname && strlen(hostname) > 0 && port) ++ { ++ bo_zeroconf_setup(port, hostname); ++ } ++ else if (hostname && strlen(hostname) > 0) ++ { ++ bo_zeroconf_setup(AFP_PORT, hostname); ++ } ++ else ++ { ++ bo_zeroconf_setup(AFP_PORT, NULL); ++ } ++ bo_zeroconf_run(); ++#elif defined (HAVE_HOWL) ++ LOG(log_info, ++ logtype_afpd, ++ "Attempting to register with mDNS using Porchdog's Howl\n"); ++ if (hostname && strlen(hostname) > 0 && port) ++ { ++ ho_zeroconf_setup(port, hostname); ++ } ++ else if (hostname && strlen(hostname) > 0) ++ { ++ ho_zeroconf_setup(AFP_PORT, hostname); ++ } ++ else ++ { ++ ho_zeroconf_setup(AFP_PORT, NULL); ++ } ++ bo_zeroconf_run(); ++#elif defined (HAVE_AVAHI) ++ LOG(log_info, logtype_afpd, "Attempting to register with mDNS using Avahi\n"); ++ if (hostname && strlen(hostname) > 0 && port) ++ { ++ ctx = av_zeroconf_setup(port, hostname); ++ } ++ else if (hostname && strlen(hostname) > 0) ++ { ++ ctx = av_zeroconf_setup(AFP_PORT, hostname); ++ } ++ else ++ { ++ ctx = av_zeroconf_setup(AFP_PORT, NULL); ++ } ++ av_zeroconf_run(ctx); ++#endif ++} ++ ++void zeroconf_deregister(void) ++{ ++#ifdef HAVE_BONJOUR ++ LOG(log_error, ++ logtype_afpd, ++ "Attempting to de-register mDNS using Apple's Bonjour\n"); ++ bo_zeroconf_unregister(); ++#elif defined (HAVE_HOWL) ++ LOG(log_error, ++ logtype_afpd, ++ "Attempting to de-register mDNS using Porchdog's Howl\n"); ++ ho_zeroconf_unregister(); ++#elif defined (HAVE_AVAHI) ++ LOG(log_error, logtype_afpd, "Attempting to de-register mDNS using Avahi\n"); ++ if (ctx) ++ av_zeroconf_shutdown(ctx); ++#endif ++} +--- netatalk/macros/zeroconf.m4.org 2006-04-21 10:29:51.000000000 +0200 ++++ netatalk/macros/zeroconf.m4 2006-04-22 07:26:56.000000000 +0200 +@@ -0,0 +1,101 @@ ++dnl Check for optional Zeroconf support ++ ++dnl $Id: $ ++ ++AC_DEFUN([NETATALK_ZEROCONF], [ ++ ++ ZEROCONF_LIBS="" ++ ZEROCONF_CFLAGS="" ++ found_zeroconf=no ++ zeroconf_dir="" ++ ++ AC_ARG_ENABLE(zeroconf, ++ [ --enable-zeroconf[[=DIR]] enable Zeroconf support [[auto]]], ++ [zeroconf=$enableval], ++ [zeroconf=try] ++ ) ++ ++ dnl make sure atalk_libname is defined beforehand ++ [[ -n "$atalk_libname" ]] || AC_MSG_ERROR([internal error, atalk_libname undefined]) ++ ++ if test "x$zeroconf" != "xno"; then ++ ++ savedcppflags="$CPPFLAGS" ++ savedldflags="$LDFLAGS" ++ ++ if test "x$zeroconf" = "xyes" -o "x$zeroconf" = "xtry"; then ++ zeroconf_dir="/usr" ++ else ++ zeroconf_dir="$zeroconf" ++ fi ++ ++ # mDNS support using Apple's Bonjour ++ AC_CHECK_HEADER(dns_sd.h, ++ [AC_CHECK_LIB(dns_sd, ++ DNSServiceRegister, ++ [AC_DEFINE(USE_ZEROCONF, 1, ++ [Use DNS-SD registration])])]) ++ case "$ac_cv_lib_dns_sd_DNSServiceRegister" in ++ yes) ++ ZEROCONF_LIBS="-L$zeroconf_dir/lib -ldns_sd" ++ ZEROCONF_LIBS="-I$zeroconf_dir/include" ++ AC_DEFINE(HAVE_BONJOUR, 1, [Use Bonjour/DNS-SD registration]) ++ found_zeroconf=yes ++ ;; ++ esac ++ # mDNS support using Porchdog's Howl ++ AC_CHECK_HEADER(howl.h, ++ [AC_CHECK_LIB(howl, ++ sw_discovery_publish, ++ [AC_DEFINE(USE_ZEROCONF, 1, ++ [Use DNS-SD registration])])]) ++ case "$ac_cv_lib_howl_sw_discovery_publish" in ++ yes) ++ PKG_CHECK_MODULES(HOWL, [ howl >= 1.0.0 ]) ++ ZEROCONF_LIBS="$HOWL_LIBS" ++ ZEROCONF_CFLAGS="$HOWL_CFLAGS" ++ AC_DEFINE(HAVE_HOWL, 1, [Use Howl/DNS-SD registration]) ++ found_zeroconf=yes ++ ;; ++ esac ++ # mDNS support using Avahi ++ AC_CHECK_HEADER(avahi-client/client.h, ++ [AC_CHECK_LIB(avahi-client, ++ avahi_client_new, ++ [AC_DEFINE(USE_ZEROCONF, 1, ++ [Use DNS-SD registration])])]) ++ case "$ac_cv_lib_avahi_client_avahi_client_new" in ++ yes) ++ PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6 ]) ++ PKG_CHECK_MODULES(AVAHI_TPOLL, [ avahi-client >= 0.6.4 ], ++ [AC_DEFINE(HAVE_AVAHI_THREADED_POLL, 1, [Uses Avahis threaded poll implementation])], ++ [AC_MSG_WARN(This Avahi implementation is not supporting threaded poll objects. Maybe this is not what you want.)]) ++ ZEROCONF_LIBS="$AVAHI_LIBS" ++ ZEROCONF_CFLAGS="$AVAHI_CFLAGS" ++ AC_DEFINE(HAVE_AVAHI, 1, [Use Avahi/DNS-SD registration]) ++ found_zeroconf=yes ++ ;; ++ esac ++ ++ CPPFLAGS="$savedcppflags" ++ LDFLAGS="$savedldflags" ++ fi ++ ++ netatalk_cv_zeroconf=no ++ AC_MSG_CHECKING([whether to enable Zerconf support]) ++ if test "x$found_zeroconf" = "xyes"; then ++ AC_MSG_RESULT([yes]) ++ AC_DEFINE(USE_ZEROCONF, 1, [Define to enable Zeroconf support]) ++ netatalk_cv_zeroconf=yes ++ else ++ AC_MSG_RESULT([no]) ++ if test "x$zeroconf" != "xno" -a "x$zeroconf" != "xtry"; then ++ AC_MSG_ERROR([Zeroconf installation not found]) ++ fi ++ fi ++ ++ LIB_REMOVE_USR_LIB(ZEROCONF_LIBS) ++ CFLAGS_REMOVE_USR_INCLUDE(ZEROCONF_CFLAGS) ++ AC_SUBST(ZEROCONF_LIBS) ++ AC_SUBST(ZEROCONF_CFLAGS) ++]) --- netatalk-2.0.4~beta2.orig/debian/patches/001_make_dist_was_missing_files.patch +++ netatalk-2.0.4~beta2/debian/patches/001_make_dist_was_missing_files.patch @@ -0,0 +1,95 @@ +diff --git a/macros/Makefile.am b/macros/Makefile.am +index a64c315..38f7287 100644 +--- a/macros/Makefile.am ++++ b/macros/Makefile.am +@@ -2,11 +2,13 @@ EXTRA_DIST = \ + afs-check.m4 \ + cnid-backend.m4 \ + config-checks.m4 \ ++ cups.m4 \ + db3-check.m4 \ + grep-check.m4 \ + gssapi-check.m4 \ + iconv.m4 \ + largefile-check.m4 \ ++ libgcrypt.m4 \ + pam-check.m4 \ + perl-check.m4 \ + ps-check.m4 \ +diff --git a/sys/netatalk/Makefile.am b/sys/netatalk/Makefile.am +index bbcf946..14eeab7 100644 +--- a/sys/netatalk/Makefile.am ++++ b/sys/netatalk/Makefile.am +@@ -3,3 +3,5 @@ + pkginclude_HEADERS = aarp.h at.h at_var.h ddp.h ddp_var.h endian.h phase2.h + + SOURCES = aarp.c at_control.c at_proto.c ddp_input.c ddp_output.c ddp_usrreq.c ++ ++EXTRA_DIST = $(SOURCES) +diff --git a/sys/solaris/Makefile.in b/sys/solaris/Makefile.in +index 41f5112..4127a98 100644 +--- a/sys/solaris/Makefile.in ++++ b/sys/solaris/Makefile.in +@@ -1,8 +1,13 @@ + # Solaris specific defines, passed to subdirectories. + # To use Sun CC, uncomment the CC and KFLAGS variables. + # +-# $Id: Makefile.in,v 1.1.2.4 2004/10/06 01:05:32 didg Exp $ +- ++# $Id: Makefile.in,v 1.1.2.4.2.1 2008/12/20 03:10:54 didg Exp $ ++# This Makefile.in is not automake generated ++# copy and paste from automake Makefile.in ++srcdir = @srcdir@ ++top_srcdir = @top_srcdir@ ++VPATH = @srcdir@ ++# end copy and paste + + CC = @CC@ + # LD hardcoded to sun ld, GNU ld has been reported to cause some trouble with 64 bit +@@ -34,7 +39,8 @@ OPTOPTS= + SRC= linkage.c tpi.c dlpi.c ioc.c if.c aarp.c ddp.c sock.c rt.c + OBJ= linkage.o tpi.o dlpi.o ioc.o if.o aarp.o ddp.o sock.o rt.o + HEADERS= if.h ioc.h rt.h sock.h +-EXTRA_DIST= ddp.conf Makefile ++EXTRA_DIST= ddp.conf Makefile.in $(SRC) $(HEADERS) ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + + INCPATH= -I../../include -I../netatalk -I../.. + CFLAGS= ${DEFS} ${OPTOPTS} ${INCPATH} ${KCFLAGS} +@@ -103,7 +109,35 @@ CFLAGS= ${DEFS} ${OPTOPTS} ${INCPATH} ${KCFLAGS} + @SOLARIS_MODULE_TRUE@ @echo + @SOLARIS_MODULE_TRUE@ @echo "To uninstall the Solaris kernel module type 'make kuninstall' as root user" + +-distdir : ++# copy and paste from automake Makefile.in ++distdir : $(DISTFILES) ++ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ++ list='$(DISTFILES)'; for file in $$list; do \ ++ case $$file in \ ++ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ++ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ++ esac; \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ++ dir="/$$dir"; \ ++ $(mkdir_p) "$(distdir)$$dir"; \ ++ else \ ++ dir=''; \ ++ fi; \ ++ if test -d $$d/$$file; then \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ++ fi; \ ++ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ ++ else \ ++ test -f $(distdir)/$$file \ ++ || cp -p $$d/$$file $(distdir)/$$file \ ++ || exit 1; \ ++ fi; \ ++ done ++# end copy and paste + + clean : sysclean + --- netatalk-2.0.4~beta2.orig/debian/patches/201_etc2ps_paths.diff +++ netatalk-2.0.4~beta2/debian/patches/201_etc2ps_paths.diff @@ -0,0 +1,17 @@ +--- netatalk/etc/psf/etc2ps.sh.old 2003-06-06 18:27:06.000000000 +0200 ++++ netatalk/etc/psf/etc2ps.sh 2003-06-06 18:27:43.000000000 +0200 +@@ -9,11 +9,11 @@ + # tag in the case. + # + +-DVIPSPATH=/usr/local/tex/bin +-DVIPS=/usr/local/tex/bin/dvips ++DVIPSPATH=/usr/bin ++DVIPS=/usr/bin/dvips + DVIPSARGS="-f -q" + +-TROFF2PS=/usr/local/psroff/troff2/troff2ps ++TROFF2PS=/usr/bin/troff2ps + TROFF2PSARGS="-Z -O-.10" + + PATH=/usr/bin:$DVIPSPATH; export PATH --- netatalk-2.0.4~beta2.orig/debian/patches/202_psf_8_paths.diff +++ netatalk-2.0.4~beta2/debian/patches/202_psf_8_paths.diff @@ -0,0 +1,15 @@ +--- netatalk/man/man8/psf.8.tmpl.old 2005-03-15 12:50:30.080552653 +0100 ++++ netatalk/man/man8/psf.8.tmpl 2005-03-15 12:50:50.525351065 +0100 +@@ -44,9 +44,9 @@ + .nf + + laser|lp|LaserWriter Plus on AppleTalk:\\ +- :sd=/usr/spool/lpd/laser:\\ +- :lp=/usr/spool/lpd/laser/null:\\ +- :lf=/var/adm/lpd\-errs:pw#80:hl:\\ ++ :sd=/var/spool/lpd/laser:\\ ++ :lp=/var/spool/lpd/laser/null:\\ ++ :lf=/var/log/lpd\-errs:pw#80:hl:\\ + :of=:LIBEXECDIR:/ofpap:\\ + :if=:LIBEXECDIR:/ifpaprev:\\ + :tf=:LIBEXECDIR:/tfpaprev:\\ --- netatalk-2.0.4~beta2.orig/debian/patches/209_rename_initscript_for_automade_file.patch +++ netatalk-2.0.4~beta2/debian/patches/209_rename_initscript_for_automade_file.patch @@ -0,0 +1,43 @@ +--- a/distrib/initscripts/Makefile.in ++++ b/distrib/initscripts/Makefile.in +@@ -314,7 +314,7 @@ + rc.atalk.gentoo.tmpl \ + rc.atalk.debian.tmpl + +-CLEANFILES = $(GENERATED_FILES) atalk afpd atalkd papd timelord ++CLEANFILES = $(GENERATED_FILES) atalk netatalk afpd atalkd papd timelord + EXTRA_DIST = $(TEMPLATES) rc.atalk.cobalt + + # +@@ -357,7 +357,7 @@ + # + @USE_TRU64_TRUE@sysvdir = /sbin/init.d + @USE_COBALT_TRUE@sysv_SCRIPTS = atalk +-@USE_DEBIAN_TRUE@sysv_SCRIPTS = atalk ++@USE_DEBIAN_TRUE@sysv_SCRIPTS = netatalk + @USE_GENTOO_TRUE@sysv_SCRIPTS = atalk + @USE_NETBSD_TRUE@sysv_SCRIPTS = afpd atalkd papd timelord + @USE_REDHAT_TRUE@sysv_SCRIPTS = atalk +@@ -658,16 +658,16 @@ + @USE_GENTOO_TRUE@ -rc-update del atalk default + @USE_GENTOO_TRUE@ rm -f /etc/init.d/atalk + +-@USE_DEBIAN_TRUE@atalk: rc.atalk.debian +-@USE_DEBIAN_TRUE@ cp -f rc.atalk.debian atalk +-@USE_DEBIAN_TRUE@ chmod a+x atalk ++@USE_DEBIAN_TRUE@netatalk: rc.atalk.debian ++@USE_DEBIAN_TRUE@ cp -f rc.atalk.debian netatalk ++@USE_DEBIAN_TRUE@ chmod a+x netatalk + + @USE_DEBIAN_TRUE@install-data-hook: +-@USE_DEBIAN_TRUE@ update-rc.d atalk defaults 90 10 ++@USE_DEBIAN_TRUE@ update-rc.d netatalk defaults 90 10 + + @USE_DEBIAN_TRUE@uninstall-startup: +-@USE_DEBIAN_TRUE@ rm -f /etc/init.d/atalk +-@USE_DEBIAN_TRUE@ update-rc.d atalk remove ++@USE_DEBIAN_TRUE@ rm -f /etc/init.d/netatalk ++@USE_DEBIAN_TRUE@ update-rc.d netatalk remove + + # + # defaults, no init scripts installed --- netatalk-2.0.4~beta2.orig/debian/patches/213_CVE-2008-5718.patch +++ netatalk-2.0.4~beta2/debian/patches/213_CVE-2008-5718.patch @@ -0,0 +1,43 @@ +diff -Nurad netatalk-2.0.4~beta2.orig/etc/papd/lp.c netatalk-2.0.4~beta2/etc/papd/lp.c +--- netatalk-2.0.4~beta2.orig/etc/papd/lp.c 2009-01-29 11:20:33.000000000 +0100 ++++ netatalk-2.0.4~beta2/etc/papd/lp.c 2009-01-29 11:30:53.000000000 +0100 +@@ -219,9 +219,30 @@ + while (len && used < bsize ) { + switch (*src) { + case '$': ++ case '!': + case '\\': + case '"': ++ case ';': ++ case '&': ++ case '(': ++ case ')': ++ case '\'': ++ case ' ': ++ case '*': ++ case '#': ++ case '|': ++ case '>': ++ case '<': ++ case '[': ++ case ']': ++ case '{': ++ case '}': ++ case '^': ++ case '?': ++ case '~': + case '`': ++ case '\x0A': ++ case '\xFF': + if (used + 2 > bsize ) + return used; + *dest = '\\'; +@@ -235,6 +256,8 @@ + len--; + used++; + } ++ ++ *dest = 0; + return used; + } + --- netatalk-2.0.4~beta2.orig/debian/patches/003_fix_afp3_dir_error.patch +++ netatalk-2.0.4~beta2/debian/patches/003_fix_afp3_dir_error.patch @@ -0,0 +1,24 @@ +diff --git a/etc/afpd/file.c b/etc/afpd/file.c +index abbaf82..a0e0b12 100644 +--- a/etc/afpd/file.c ++++ b/etc/afpd/file.c +@@ -1,5 +1,5 @@ + /* +- * $Id: file.c,v 1.92.2.2.2.31.2.22 2008/11/25 15:16:33 didg Exp $ ++ * $Id: file.c,v 1.92.2.2.2.31.2.23 2008/12/23 09:39:02 didg Exp $ + * + * Copyright (c) 1990,1993 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -1878,8 +1878,10 @@ retry: + } + + /* directories are bad */ +- if (S_ISDIR(path.st.st_mode)) +- return AFPERR_BADTYPE; ++ if (S_ISDIR(path.st.st_mode)) { ++ /* OS9 and OSX don't return the same error code */ ++ return (afp_version >=30)?AFPERR_NOID:AFPERR_BADTYPE; ++ } + + memcpy(&bitmap, ibuf, sizeof(bitmap)); + bitmap = ntohs( bitmap ); --- netatalk-2.0.4~beta2.orig/debian/patches/004_fix_solaris10_compilation.patch +++ netatalk-2.0.4~beta2/debian/patches/004_fix_solaris10_compilation.patch @@ -0,0 +1,41 @@ +diff --git a/sys/netatalk/endian.h b/sys/netatalk/endian.h +index 5e68c45..3679ba6 100644 +--- a/sys/netatalk/endian.h ++++ b/sys/netatalk/endian.h +@@ -1,5 +1,5 @@ + /* +- * $Id: endian.h,v 1.7.12.1 2006/02/08 01:38:42 didg Exp $ ++ * $Id: endian.h,v 1.7.12.2 2009/01/10 20:14:29 didg Exp $ + * + * Copyright (c) 1990,1991 Regents of The University of Michigan. + * All Rights Reserved. See COPYRIGHT. +@@ -116,7 +116,7 @@ typedef unsigned long long u_int64_t; + + #else /* mips && KERNEL */ + +-#if !( defined( sun ) && defined( i386 )) ++#if !( defined( sun ) && ( defined( i386 ) || defined(__x86_64) ) ) + unsigned short ntohs(), htons(); + unsigned int ntohl(), htonl(); + #endif /* ! ( sun && i386 ) */ +diff --git a/sys/solaris/Makefile.in b/sys/solaris/Makefile.in +index 4127a98..10d3a47 100644 +--- a/sys/solaris/Makefile.in ++++ b/sys/solaris/Makefile.in +@@ -1,7 +1,7 @@ + # Solaris specific defines, passed to subdirectories. + # To use Sun CC, uncomment the CC and KFLAGS variables. + # +-# $Id: Makefile.in,v 1.1.2.4.2.1 2008/12/20 03:10:54 didg Exp $ ++# $Id: Makefile.in,v 1.1.2.4.2.2 2009/01/10 20:14:29 didg Exp $ + # This Makefile.in is not automake generated + # copy and paste from automake Makefile.in + srcdir = @srcdir@ +@@ -154,5 +154,7 @@ depend : + + check: + ++tags: ++ + # DO NOT DELETE THIS LINE + --- netatalk-2.0.4~beta2.orig/debian/patches/101_fix_manpage_sed_replacements.patch +++ netatalk-2.0.4~beta2/debian/patches/101_fix_manpage_sed_replacements.patch @@ -0,0 +1,11 @@ +--- netatalk/man/man5/Makefile.am.old ++++ netatalk/man/man5/Makefile.am +@@ -9,6 +9,8 @@ + -e s@:BINDIR:@${bindir}@ \ + -e s@:ETCDIR:@${pkgconfdir}@ \ + -e s@:LIBDIR:@${libdir}@ \ ++ -e s@:DEFAULT_CNID_SCHEME:@${default_cnid_scheme}@ \ ++ -e 's@:COMPILED_BACKENDS:@${compiled_backends}@' \ + <$< >$@ + + man_MANS = AppleVolumes.default.5 afpd.conf.5 \ --- netatalk-2.0.4~beta2.orig/debian/patches/207a_afile_namespace_conflict_autobuilt.diff +++ netatalk-2.0.4~beta2/debian/patches/207a_afile_namespace_conflict_autobuilt.diff @@ -0,0 +1,71 @@ +--- a/bin/afile/Makefile.in ++++ b/bin/afile/Makefile.in +@@ -40,7 +40,7 @@ + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ +-bin_PROGRAMS = afile$(EXEEXT) achfile$(EXEEXT) ++bin_PROGRAMS = apple_file$(EXEEXT) apple_chfile$(EXEEXT) + subdir = bin/afile + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -76,12 +76,12 @@ + am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" + binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(bin_PROGRAMS) +-am_achfile_OBJECTS = achfile.$(OBJEXT) common.$(OBJEXT) +-achfile_OBJECTS = $(am_achfile_OBJECTS) +-achfile_LDADD = $(LDADD) +-am_afile_OBJECTS = afile.$(OBJEXT) common.$(OBJEXT) +-afile_OBJECTS = $(am_afile_OBJECTS) +-afile_LDADD = $(LDADD) ++am_apple_chfile_OBJECTS = achfile.$(OBJEXT) common.$(OBJEXT) ++apple_chfile_OBJECTS = $(am_apple_chfile_OBJECTS) ++apple_chfile_LDADD = $(LDADD) ++am_apple_file_OBJECTS = afile.$(OBJEXT) common.$(OBJEXT) ++apple_file_OBJECTS = $(am_apple_file_OBJECTS) ++apple_file_LDADD = $(LDADD) + binSCRIPT_INSTALL = $(INSTALL_SCRIPT) + SCRIPTS = $(bin_SCRIPTS) + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +@@ -95,8 +95,8 @@ + CCLD = $(CC) + LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-SOURCES = $(achfile_SOURCES) $(afile_SOURCES) +-DIST_SOURCES = $(achfile_SOURCES) $(afile_SOURCES) ++SOURCES = $(apple_chfile_SOURCES) $(apple_file_SOURCES) ++DIST_SOURCES = $(apple_chfile_SOURCES) $(apple_file_SOURCES) + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +@@ -311,8 +311,8 @@ + target_vendor = @target_vendor@ + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys + bin_SCRIPTS = acleandir.rc +-afile_SOURCES = afile.c common.c common.h +-achfile_SOURCES = achfile.c common.c common.h ++apple_file_SOURCES = afile.c common.c common.h ++apple_chfile_SOURCES = achfile.c common.c common.h + EXTRA_DIST = acleandir.rc + all: all-am + +@@ -375,12 +375,12 @@ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +-achfile$(EXEEXT): $(achfile_OBJECTS) $(achfile_DEPENDENCIES) +- @rm -f achfile$(EXEEXT) +- $(LINK) $(achfile_LDFLAGS) $(achfile_OBJECTS) $(achfile_LDADD) $(LIBS) +-afile$(EXEEXT): $(afile_OBJECTS) $(afile_DEPENDENCIES) +- @rm -f afile$(EXEEXT) +- $(LINK) $(afile_LDFLAGS) $(afile_OBJECTS) $(afile_LDADD) $(LIBS) ++apple_chfile$(EXEEXT): $(apple_chfile_OBJECTS) $(apple_chfile_DEPENDENCIES) ++ @rm -f apple_chfile$(EXEEXT) ++ $(LINK) $(apple_chfile_LDFLAGS) $(apple_chfile_OBJECTS) $(apple_chfile_LDADD) $(LIBS) ++apple_file$(EXEEXT): $(apple_file_OBJECTS) $(apple_file_DEPENDENCIES) ++ @rm -f apple_file$(EXEEXT) ++ $(LINK) $(apple_file_LDFLAGS) $(apple_file_OBJECTS) $(apple_file_LDADD) $(LIBS) + install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" --- netatalk-2.0.4~beta2.orig/debian/patches/204_uniconv_namespace_conflict.diff +++ netatalk-2.0.4~beta2/debian/patches/204_uniconv_namespace_conflict.diff @@ -0,0 +1,101 @@ +--- netatalk/bin/uniconv/Makefile.am.old 2005-07-13 15:14:58.769900582 +0200 ++++ netatalk/bin/uniconv/Makefile.am 2005-07-13 15:16:02.381823878 +0200 +@@ -2,7 +2,7 @@ + + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys + +-bin_PROGRAMS = uniconv ++sbin_PROGRAMS = netatalk-uniconv + +-uniconv_SOURCES = uniconv.c iso8859_1_adapted.c +-uniconv_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la ++netatalk_uniconv_SOURCES = uniconv.c iso8859_1_adapted.c ++netatalk_uniconv_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la +--- netatalk/man/man1/uniconv.1.tmpl.old 2005-07-13 15:17:08.883737627 +0200 ++++ netatalk/man/man1/uniconv.1.tmpl 2005-07-13 15:24:37.281120223 +0200 +@@ -1,10 +1,10 @@ +-.TH uniconv 1 "24 Jun 2004" 2.0.3 Netatalk ++.TH netatalk-uniconv 1 "24 Jun 2004" 2.0.3 Netatalk + .SH NAME +-uniconv \- convert Netatalk volume encoding ++netatalk-uniconv \- convert Netatalk volume encoding + .SH SYNOPSIS +-\fBuniconv\fR [\-ndv] \-c \fBcnidbackend\fR \-f \fBfromcode\fR \-t \fBtocode\fR [\-m \fBmaccode\fR] \fBvolumepath\fR ++\fBnetatalk-uniconv\fR [\-ndv] \-c \fBcnidbackend\fR \-f \fBfromcode\fR \-t \fBtocode\fR [\-m \fBmaccode\fR] \fBvolumepath\fR + .SH DESCRIPTION +-uniconv converts the volume encoding of ++netatalk-uniconv converts the volume encoding of + \fIvolumepath\fR from the \fIfromcode\fR + to the \fItocode\fR encoding. + .SH OPTIONS +@@ -60,7 +60,7 @@ + and CAP. If you want to use other charsets, they must be provided by + \fBiconv\fR(1) + .PP +-uniconv also knows iso\-8859.adapted, an old style ++netatalk-uniconv also knows iso\-8859.adapted, an old style + 1.x NLS widely used. This is only intended for upgrading old volumes, + \fBafpd\fR(8) + cannot handle iso\-8859.adapted anymore. +@@ -75,49 +75,53 @@ + .PP + If you change a lot of filenames at once, chances are higher that + the afpds fallback mechanisms fail, i.e. files will be assigned new IDs, +-even though the file hasn't changed. uniconv ++even though the file hasn't changed. netatalk-uniconv + therefore updates the CNID entry for each file/directory directly after it + changes the name to avoid inconsistencies. The two supported backends for + volumes, dbd and cdb, use the same CNID db format. Therefore, you +-\fIcould\fR use uniconv with cdb and ++\fIcould\fR use netatalk-uniconv with cdb and + afpd with dbd later. + .PP + \fBWarning\fR: There must not be two + processes opening the CNID database using different backends at once! If a + volume is still opened with dbd (cnid_metad/cnid_dbd) and you start +-uniconv with cdb, the result will be a corrupted CNID ++netatalk-uniconv with cdb, the result will be a corrupted CNID + database, as the two backends use different locking schemes. You might run + into additional problems, e.g. if dbd is compiled with transactions, cdb + will not update the transaction logs. + .PP + In general, it is recommended to use the same backend for +-uniconv you are using with ++netatalk-uniconv you are using with + \fBafpd\fR(8). + .SH EXAMPLES + convert 1.x CAP encoded volume to UTF\-8, clients used MacRoman + codepage, cnidscheme is dbd: + .PP + .nf +-example%\fB uniconv \-c dbd \-f ASCII \-t UTF8 \-m MAC_ROMAN /path/to/share\fR ++example%\fB netatalk-uniconv \-c dbd \-f ASCII \-t UTF8 \-m MAC_ROMAN /path/to/share\fR + .fi + .PP + convert iso8859\-1 volume to UTF\-8, cnidscheme is cdb: + .PP + .nf +-example%\fB uniconv \-c cdb \-f ISO\-8859\-1 \-t UTF8 \-m MAC_ROMAN /path/to/share\fR ++example%\fB netatalk-uniconv \-c cdb \-f ISO\-8859\-1 \-t UTF8 \-m MAC_ROMAN /path/to/share\fR + .fi + .PP + convert 1.x volume using iso8859\-1 adapted NLS to CAP encoding: + .PP + .nf +-example%\fB uniconv \-f ISO\-8859\-ADAPTED \-t ASCII \-m MAC_ROMAN/path/to/share\fR ++example%\fB netatalk-uniconv \-f ISO\-8859\-ADAPTED \-t ASCII \-m MAC_ROMAN/path/to/share\fR + .fi + .PP + convert UTF\-8 volume to CAP, for MacCyrillic clients: + .PP + .nf +-example%\fB uniconv \-f UTF8 \-t ASCII \-m MAC_CYRILLIC /path/to/share\fR ++example%\fB netatalk-uniconv \-f UTF8 \-t ASCII \-m MAC_CYRILLIC /path/to/share\fR + .fi ++.SH "DEBIAN NOTES" ++\fInetatalk-uniconv\fR is the Debian version of upstream's \fIuniconv\fR ++program. This rename was necessary to avoid naming conflicts with other ++packages. Apart from the name the program works identical. + .SH "SEE ALSO" + \fBAppleVolumes.default\fR(5),\fBafpd\fR(8),\fBiconv\fR(1),\fBcnid_metad\fR(8),\fBcnid_dbd\fR(8) +