diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-09-29 16:55:00 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-09-29 16:55:00 +0000 |
commit | a2858f9888592408a12dd9a8b6e8959f7ddc81e6 (patch) | |
tree | 58b0dc594bd8cecd28ac0bc21db7262302cfbf5d /net-fs/netatalk | |
parent | Version bump. Improvements to the init script to support newer OpenRCs, docum... (diff) | |
download | gentoo-2-a2858f9888592408a12dd9a8b6e8959f7ddc81e6.tar.gz gentoo-2-a2858f9888592408a12dd9a8b6e8959f7ddc81e6.tar.bz2 gentoo-2-a2858f9888592408a12dd9a8b6e8959f7ddc81e6.zip |
Add new revision (that I'll maintain); this version includes a number of improvements on USE flags and dependencies, replacing xfs with quota, dropping the extra dependency over xfsprogs, adding proper ldap dependencies rather than leaving it automagic, adding an USE flag to enable or disable appletalk-based utilities, and replacing the upstream-provided init script with two (or five, if using appletalk proper) services that can be started standalone and properly depend on Avahi. Also describe USE flags according to what they actually do.
(Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
Diffstat (limited to 'net-fs/netatalk')
-rw-r--r-- | net-fs/netatalk/ChangeLog | 17 | ||||
-rw-r--r-- | net-fs/netatalk/files/afpd.init | 38 | ||||
-rw-r--r-- | net-fs/netatalk/files/atalk_service.init | 25 | ||||
-rw-r--r-- | net-fs/netatalk/files/atalkd.init | 47 | ||||
-rw-r--r-- | net-fs/netatalk/files/cnid_metad.init | 28 | ||||
-rw-r--r-- | net-fs/netatalk/files/netatalk-2.2.1-gentoo.patch | 65 | ||||
-rw-r--r-- | net-fs/netatalk/metadata.xml | 34 | ||||
-rw-r--r-- | net-fs/netatalk/netatalk-2.2.1-r1.ebuild | 152 |
8 files changed, 400 insertions, 6 deletions
diff --git a/net-fs/netatalk/ChangeLog b/net-fs/netatalk/ChangeLog index 6953a7f8d644..3a5a65eaa1b3 100644 --- a/net-fs/netatalk/ChangeLog +++ b/net-fs/netatalk/ChangeLog @@ -1,6 +1,21 @@ # ChangeLog for net-fs/netatalk # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/ChangeLog,v 1.70 2011/09/09 21:19:37 beandog Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/ChangeLog,v 1.71 2011/09/29 16:55:00 flameeyes Exp $ + +*netatalk-2.2.1-r1 (29 Sep 2011) + + 29 Sep 2011; Diego E. Pettenò <flameeyes@gentoo.org> + +netatalk-2.2.1-r1.ebuild, +files/netatalk-2.2.1-gentoo.patch, + +files/afpd.init, +files/atalk_service.init, +files/atalkd.init, + +files/cnid_metad.init, metadata.xml: + Add new revision (that I'll maintain); this version includes a number of + improvements on USE flags and dependencies, replacing xfs with quota, + dropping the extra dependency over xfsprogs, adding proper ldap dependencies + rather than leaving it automagic, adding an USE flag to enable or disable + appletalk-based utilities, and replacing the upstream-provided init script + with two (or five, if using appletalk proper) services that can be started + standalone and properly depend on Avahi. Also describe USE flags according to + what they actually do. *netatalk-2.2.1 (09 Sep 2011) diff --git a/net-fs/netatalk/files/afpd.init b/net-fs/netatalk/files/afpd.init new file mode 100644 index 000000000000..0415cd30e4f2 --- /dev/null +++ b/net-fs/netatalk/files/afpd.init @@ -0,0 +1,38 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/files/afpd.init,v 1.1 2011/09/29 16:55:00 flameeyes Exp $ + +depend() { + need net cnid_metad + use logger dns atalkd + + if [ ${EXTRA_CONF/-D/} != ${EXTRA_CONF} ]; then + need atalkd + else + config /etc/netatalk/afpd.conf + + sed -e 's:#.*::' /etc/netatalk/afpd.conf | fgrep -q -e -ddp \ + && need atalkd + fi + + need avahi-daemon + need slpd +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start --pidfile "/var/run/${SVCNAME}.pid" \ + --exec /usr/sbin/${SVCNAME} -- \ + ${EXTRA_CONF} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon \ + --stop --pidfile "/var/run/${SVCNAME}.pid" \ + --exec /usr/sbin/${SVCNAME} + eend $? +} diff --git a/net-fs/netatalk/files/atalk_service.init b/net-fs/netatalk/files/atalk_service.init new file mode 100644 index 000000000000..91667e1fbaec --- /dev/null +++ b/net-fs/netatalk/files/atalk_service.init @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/files/atalk_service.init,v 1.1 2011/09/29 16:55:00 flameeyes Exp $ + +depend() { + need net atalkd + use logger dns +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start \ + --exec /usr/sbin/${SVCNAME} -- + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon \ + --stop \ + --exec /usr/sbin/${SVCNAME} + eend $? +} diff --git a/net-fs/netatalk/files/atalkd.init b/net-fs/netatalk/files/atalkd.init new file mode 100644 index 000000000000..384219396cac --- /dev/null +++ b/net-fs/netatalk/files/atalkd.init @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/files/atalkd.init,v 1.1 2011/09/29 16:55:00 flameeyes Exp $ + +: ${ATALK_NAME:=$(hostname -s)} +: ${ATALK_UNIX_CHARSET:=LOCALE} +: ${ATALK_MAC_CHARSET:=MAC_ROMAN} + +depend() { + need net + use logger dns +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start \ + --exec /usr/sbin/${SVCNAME} -- + eend $? + + for reg in \ + "${ATALK_NAME}:Workstation${ATALK_ZONE}" \ + "${ATALK_NAME}:netatalk${ATALK_ZONE}" + do + ebegin " Registering $reg" + nbprgstr "$reg" + eend $? + done +} + +stop() { + for reg in \ + "${ATALK_NAME}:Workstation${ATALK_ZONE}" \ + "${ATALK_NAME}:netatalk${ATALK_ZONE}" + do + ebegin " Registering $reg" + nbpunrgstr "$reg" + eend $? + done + + ebegin "Stopping ${SVCNAME}" + start-stop-daemon \ + --stop \ + --exec /usr/sbin/${SVCNAME} + eend $? +} diff --git a/net-fs/netatalk/files/cnid_metad.init b/net-fs/netatalk/files/cnid_metad.init new file mode 100644 index 000000000000..2a3a4e15e367 --- /dev/null +++ b/net-fs/netatalk/files/cnid_metad.init @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/files/cnid_metad.init,v 1.1 2011/09/29 16:55:00 flameeyes Exp $ + +: ${CNID_CONFIG:=-l log_note} + +depend() { + need net + use logger +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start --pidfile "/var/run/${SVCNAME}.pid" \ + --exec /usr/sbin/${SVCNAME} -- \ + ${CNID_CONFIG} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon \ + --stop --pidfile "/var/run/${SVCNAME}.pid" \ + --exec /usr/sbin/${SVCNAME} + eend $? +} diff --git a/net-fs/netatalk/files/netatalk-2.2.1-gentoo.patch b/net-fs/netatalk/files/netatalk-2.2.1-gentoo.patch new file mode 100644 index 000000000000..d2cd46919735 --- /dev/null +++ b/net-fs/netatalk/files/netatalk-2.2.1-gentoo.patch @@ -0,0 +1,65 @@ +Index: netatalk-2.2.1/etc/afpd/afp_avahi.c +=================================================================== +--- netatalk-2.2.1.orig/etc/afpd/afp_avahi.c ++++ netatalk-2.2.1/etc/afpd/afp_avahi.c +@@ -176,8 +176,8 @@ static void register_stuff(void) { + return; + + fail: +- time(NULL); + // avahi_threaded_poll_quit(ctx->threaded_poll); ++ return; + } + + /* Called when publishing of service data completes */ +Index: netatalk-2.2.1/etc/uams/Makefile.am +=================================================================== +--- netatalk-2.2.1.orig/etc/uams/Makefile.am ++++ netatalk-2.2.1/etc/uams/Makefile.am +@@ -97,16 +97,16 @@ uams_dhx_pam_la_CFLAGS = @SSL_CFLAGS + uams_dhx2_pam_la_CFLAGS = @LIBGCRYPT_CFLAGS@ @PAM_CFLAGS@ + uams_gss_la_CFLAGS = @GSSAPI_CFLAGS@ + +-uams_guest_la_LDFLAGS = -module -avoid-version +-uams_randnum_la_LDFLAGS = -module -avoid-version @SSL_LIBS@ +-uams_passwd_la_LDFLAGS = -module -avoid-version @CRYPT_LIBS@ +-uams_pam_la_LDFLAGS = -module -avoid-version @PAM_LIBS@ +-uams_pgp_la_LDFLAGS = -module -avoid-version @SSL_LIBS@ +-uams_dhx_passwd_la_LDFLAGS = -module -avoid-version @CRYPT_LIBS@ @SSL_LIBS@ +-uams_dhx_pam_la_LDFLAGS = -module -avoid-version @CRYPT_LIBS@ @SSL_LIBS@ @PAM_LIBS@ +-uams_dhx2_passwd_la_LDFLAGS = -module -avoid-version @CRYPT_LIBS@ @LIBGCRYPT_LIBS@ +-uams_dhx2_pam_la_LDFLAGS = -module -avoid-version @LIBGCRYPT_LIBS@ @PAM_LIBS@ +-uams_gss_la_LDFLAGS = -module -avoid-version @GSSAPI_LIBS@ ++uams_guest_la_LDFLAGS = -shared -module -avoid-version ++uams_randnum_la_LDFLAGS = -shared -module -avoid-version @SSL_LIBS@ ++uams_passwd_la_LDFLAGS = -shared -module -avoid-version @CRYPT_LIBS@ ++uams_pam_la_LDFLAGS = -shared -module -avoid-version @PAM_LIBS@ ++uams_pgp_la_LDFLAGS = -shared -module -avoid-version @SSL_LIBS@ ++uams_dhx_passwd_la_LDFLAGS = -shared -module -avoid-version @CRYPT_LIBS@ @SSL_LIBS@ ++uams_dhx_pam_la_LDFLAGS = -shared -module -avoid-version @CRYPT_LIBS@ @SSL_LIBS@ @PAM_LIBS@ ++uams_dhx2_passwd_la_LDFLAGS = -shared -module -avoid-version @CRYPT_LIBS@ @LIBGCRYPT_LIBS@ ++uams_dhx2_pam_la_LDFLAGS = -shared -module -avoid-version @LIBGCRYPT_LIBS@ @PAM_LIBS@ ++uams_gss_la_LDFLAGS = -shared -module -avoid-version @GSSAPI_LIBS@ + + # + # module compilation +Index: netatalk-2.2.1/libatalk/Makefile.am +=================================================================== +--- netatalk-2.2.1.orig/libatalk/Makefile.am ++++ netatalk-2.2.1/libatalk/Makefile.am +@@ -37,5 +37,3 @@ libatalk_la_DEPENDENCIES = \ + unicode/libunicode.la \ + vfs/libvfs.la + +-libatalk_la_LDFLAGS = -static +- +Index: netatalk-2.2.1/libatalk/vfs/Makefile.am +=================================================================== +--- netatalk-2.2.1.orig/libatalk/vfs/Makefile.am ++++ netatalk-2.2.1/libatalk/vfs/Makefile.am +@@ -6,4 +6,5 @@ libvfs_la_SOURCES = vfs.c unix.c ea.c sy + + if HAVE_ACLS + libvfs_la_SOURCES += acl.c ++libvfs_la_LIBADD = $(ACL_LIBS) + endif diff --git a/net-fs/netatalk/metadata.xml b/net-fs/netatalk/metadata.xml index 50687dc481a2..1ed760601ea7 100644 --- a/net-fs/netatalk/metadata.xml +++ b/net-fs/netatalk/metadata.xml @@ -1,9 +1,33 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>net-fs</herd> -<longdescription>kernel level implementation of the AppleTalk protocol suite</longdescription> -<use> - <flag name='xfs'>Enable support for XFS Quota</flag> -</use> + <herd>net-fs</herd> + <maintainer restrict=">=net-fs/netatalk-2.2.1-r1"> + <email>flameeyes@gentoo.org</email> + <description> + CC me on the bugs so I can take a look at them. I actually use + this software and I know how it is supposed to work, at least + partially. + </description> + </maintainer> + <use> + <flag name='appletalk'> + Build support for Apple's AppleTalk (DDP) protocol and its + utilities (atalkd, timelord, papd). + </flag> + <flag name='cups'> + Add support for <pkg>net-print/cups</pkg> printers in papd. This + flag is only considered if appletalk USE flag is enabled, and is + otherwise ignored. + </flag> + <flag name='quota'> + Add support for user quota on various filesystems. + </flag> + <flag name='ssl'> + Use <pkg>dev-libs/openssl</pkg> to provide DHX User Access + Modules. These are not used with most recent versions of OS X + and can be kept disabled without risks. + </flag> + <flag name='xfs'>Enable support for XFS Quota</flag> + </use> </pkgmetadata> diff --git a/net-fs/netatalk/netatalk-2.2.1-r1.ebuild b/net-fs/netatalk/netatalk-2.2.1-r1.ebuild new file mode 100644 index 000000000000..3eed265006fd --- /dev/null +++ b/net-fs/netatalk/netatalk-2.2.1-r1.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/netatalk-2.2.1-r1.ebuild,v 1.1 2011/09/29 16:55:00 flameeyes Exp $ + +EAPI="4" + +inherit pam flag-o-matic multilib autotools + +RESTRICT="test" +DESCRIPTION="Open Source AFP server and other AppleTalk-related utilities" +HOMEPAGE="http://netatalk.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2 BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="acl appletalk avahi cracklib cups debug kerberos ldap pam quota slp ssl static-libs tcpd" + +RDEPEND=">=sys-libs/db-4.2.52 + avahi? ( net-dns/avahi[dbus] ) + cracklib? ( sys-libs/cracklib ) + pam? ( virtual/pam ) + ssl? ( dev-libs/openssl ) + tcpd? ( sys-apps/tcp-wrappers ) + slp? ( net-libs/openslp ) + kerberos? ( virtual/krb5 ) + >=sys-apps/coreutils-7.1 + !app-text/yudit + dev-libs/libgcrypt + appletalk? ( + cups? ( net-print/cups ) + ) + acl? ( + sys-apps/attr + sys-apps/acl + ) + ldap? ( + net-nds/openldap + ) + " +DEPEND="${RDEPEND}" + +REQUIRED_USE="ldap? ( acl )" + +DOCS=( CONTRIBUTORS NEWS VERSION AUTHORS doc/README.AppleTalk ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + eautoreconf +} + +src_configure() { + local myconf= + + if use appletalk; then + myconf+=" --enable-ddp --enable-timelord $(use_enable cups)" + else + myconf+=" --disable-ddp --disable-timelord --disable-cups" + fi + + if use acl; then + myconf+=" --with-acls $(use_with ldap)" + else + myconf+=" --without-acls --without-ldap" + fi + + append-flags -fno-strict-aliasing + + # Ignore --enable-gentoo, we install the init.d by hand and we avoid having + # to sed the Makefiles to not do rc-update. + econf \ + $(use_enable avahi zeroconf) \ + $(use_enable debug) \ + $(use_enable kerberos krbV-uam) \ + $(use_enable quota) \ + $(use_enable slp srvloc) \ + $(use_enable static-libs static) \ + $(use_enable tcpd tcp-wrappers) \ + $(use_with cracklib) \ + $(use_with pam) \ + $(use_with ssl ssl-dir) \ + --disable-krb4-uam \ + --disable-afs \ + --enable-fhs \ + --with-bdb=/usr \ + ${myconf} +} + +src_install() { + default + + newinitd "${FILESDIR}"/afpd.init afpd + newinitd "${FILESDIR}"/cnid_metad.init cnid_metad + + if use appletalk; then + newinitd "${FILESDIR}"/atalkd.init atalkd + newinitd "${FILESDIR}"/atalk_service.init timelord + newinitd "${FILESDIR}"/atalk_service.init papd + fi + + use avahi || sed -i -e '/need avahi-daemon/d' "${D}"/etc/init.d/afpd + use slp || sed -i -e '/need slpd/d' "${D}"/etc/init.d/afpd + + use ldap || rm "${D}"/etc/netatalk/afp_ldap.conf + + rm "${D}"/etc/netatalk/netatalk.conf + + # The pamd file isn't what we need, use pamd_mimic_system + rm -rf "${D}/etc/pam.d" + pamd_mimic_system netatalk auth account password session + + # Move /usr/include/netatalk to /usr/include/netatalk2 to avoid collisions + # with /usr/include/netatalk/at.h provided by glibc (strange, uh?) + # Packages that wants to link to netatalk should then probably change the + # includepath then, but right now, nothing uses netatalk. + # On a side note, it also solves collisions with freebsd-lib and other libcs + mv "${D}"/usr/include/netatalk{,2} || die + sed -i \ + -e 's/include <netatalk/include <netatalk2/g' \ + "${D}"usr/include/{netatalk2,atalk}/* || die + + # These are not used at all, as the uams are loaded with their .so + # extension. + rm "${D}"/usr/$(get_libdir)/netatalk/*.la + + use static-libs || rm "${D}"/usr/$(get_libdir)/*.la +} + +pkg_postinst() { + elog "Starting from version 2.2.1-r1 the netatalk init script has been split" + elog "into different services depending on what you need to start." + elog "This was done to make sure that all services are started and reported" + elog "properly." + elog "" + elog "The new services are:" + elog " cnid_metad" + elog " afpd" + if use appletalk; then + elog " atalkd" + elog " timelord" + elog " papd" + fi + elog "" + elog "Dependencies should be resolved automatically depending on settings" + elog "but please report issues with this on https://bugs.gentoo.org/ if" + elog "you find any." + elog "" + elog "The old configuration file /etc/netatalk/netatalk.conf is no longer" + elog "installed, and will be ignored. The new configuration is supposed" + elog "to be done through individual /etc/conf.d files, for everything that" + elog "cannot be set already through their respective configuration files." +} |