]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
netatalk: New package
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 24 Apr 2020 10:28:12 +0000 (10:28 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 9 May 2020 12:03:59 +0000 (12:03 +0000)
This package adds a daemon for Apple's File Protocol

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/backup/includes/netatalk [new file with mode: 0644]
config/rootfiles/packages/netatalk [new file with mode: 0644]
lfs/netatalk [new file with mode: 0644]
make.sh
src/initscripts/packages/netatalk [new file with mode: 0644]
src/paks/netatalk/install.sh [new file with mode: 0644]
src/paks/netatalk/uninstall.sh [new file with mode: 0644]
src/paks/netatalk/update.sh [new file with mode: 0644]

diff --git a/config/backup/includes/netatalk b/config/backup/includes/netatalk
new file mode 100644 (file)
index 0000000..c2262dc
--- /dev/null
@@ -0,0 +1,2 @@
+/etc/afp.conf
+/etc/extmap.conf
diff --git a/config/rootfiles/packages/netatalk b/config/rootfiles/packages/netatalk
new file mode 100644 (file)
index 0000000..074ae44
--- /dev/null
@@ -0,0 +1,99 @@
+etc/afp.conf
+etc/dbus-session.conf
+etc/extmap.conf
+etc/pam.d/netatalk
+etc/rc.d/init.d/netatalk
+usr/bin/ad
+usr/bin/afpldaptest
+usr/bin/afppasswd
+usr/bin/afpstats
+usr/bin/apple_dump
+usr/bin/asip-status.pl
+usr/bin/cnid2_create
+usr/bin/dbd
+usr/bin/macusers
+#usr/bin/netatalk-config
+#usr/include/atalk
+#usr/include/atalk/acl.h
+#usr/include/atalk/adouble.h
+#usr/include/atalk/afp.h
+#usr/include/atalk/bstrlib.h
+#usr/include/atalk/cnid.h
+#usr/include/atalk/compat.h
+#usr/include/atalk/dictionary.h
+#usr/include/atalk/ea.h
+#usr/include/atalk/globals.h
+#usr/include/atalk/hash.h
+#usr/include/atalk/iniparser.h
+#usr/include/atalk/list.h
+#usr/include/atalk/logger.h
+#usr/include/atalk/netatalk_conf.h
+#usr/include/atalk/paths.h
+#usr/include/atalk/standards.h
+#usr/include/atalk/uam.h
+#usr/include/atalk/unicode.h
+#usr/include/atalk/unix.h
+#usr/include/atalk/util.h
+#usr/include/atalk/vfs.h
+#usr/include/atalk/volume.h
+#usr/lib/libatalk.a
+#usr/lib/libatalk.la
+#usr/lib/libatalk.so
+usr/lib/libatalk.so.18
+usr/lib/libatalk.so.18.0.0
+#usr/lib/netatalk
+#usr/lib/netatalk/uams_clrtxt.so
+usr/lib/netatalk/uams_dhx.so
+usr/lib/netatalk/uams_dhx2.so
+#usr/lib/netatalk/uams_dhx2_pam.a
+#usr/lib/netatalk/uams_dhx2_pam.la
+usr/lib/netatalk/uams_dhx2_pam.so
+#usr/lib/netatalk/uams_dhx2_passwd.a
+#usr/lib/netatalk/uams_dhx2_passwd.la
+usr/lib/netatalk/uams_dhx2_passwd.so
+#usr/lib/netatalk/uams_dhx_pam.a
+#usr/lib/netatalk/uams_dhx_pam.la
+usr/lib/netatalk/uams_dhx_pam.so
+#usr/lib/netatalk/uams_dhx_passwd.a
+#usr/lib/netatalk/uams_dhx_passwd.la
+usr/lib/netatalk/uams_dhx_passwd.so
+#usr/lib/netatalk/uams_guest.a
+#usr/lib/netatalk/uams_guest.la
+usr/lib/netatalk/uams_guest.so
+#usr/lib/netatalk/uams_pam.a
+#usr/lib/netatalk/uams_pam.la
+usr/lib/netatalk/uams_pam.so
+#usr/lib/netatalk/uams_passwd.a
+#usr/lib/netatalk/uams_passwd.la
+usr/lib/netatalk/uams_passwd.so
+#usr/lib/netatalk/uams_randnum.a
+#usr/lib/netatalk/uams_randnum.la
+usr/lib/netatalk/uams_randnum.so
+usr/sbin/afpd
+usr/sbin/cnid_dbd
+usr/sbin/cnid_metad
+usr/sbin/netatalk
+#usr/share/aclocal/netatalk.m4
+#usr/share/man/man1/ad.1
+#usr/share/man/man1/afpldaptest.1
+#usr/share/man/man1/afppasswd.1
+#usr/share/man/man1/afpstats.1
+#usr/share/man/man1/apple_dump.1
+#usr/share/man/man1/asip-status.pl.1
+#usr/share/man/man1/dbd.1
+#usr/share/man/man1/macusers.1
+#usr/share/man/man1/netatalk-config.1
+#usr/share/man/man1/uniconv.1
+#usr/share/man/man5/afp.conf.5
+#usr/share/man/man5/afp_signature.conf.5
+#usr/share/man/man5/afp_voluuid.conf.5
+#usr/share/man/man5/extmap.conf.5
+#usr/share/man/man8/afpd.8
+#usr/share/man/man8/cnid_dbd.8
+#usr/share/man/man8/cnid_metad.8
+#usr/share/man/man8/netatalk.8
+var/ipfire/backup/addons/includes/netatalk
+var/state/netatalk
+#var/state/netatalk/CNID
+#var/state/netatalk/CNID/README
+#var/state/netatalk/README
diff --git a/lfs/netatalk b/lfs/netatalk
new file mode 100644 (file)
index 0000000..09107e2
--- /dev/null
@@ -0,0 +1,98 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# 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 3 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, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 3.1.12
+
+THISAPP    = netatalk-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = netatalk
+PAK_VER    = 1
+
+DEPS       = avahi dbus
+
+CFLAGS    += -Wno-unused-result
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 5aea4b1765171b8d2d240cf265d84171
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist: 
+       @$(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+       @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && ./configure \
+               --prefix=/usr \
+               --sysconfdir=/etc \
+               --localstatedir=/var/state \
+               --without-libevent
+       cd $(DIR_APP) && make $(MAKETUNING)
+       cd $(DIR_APP) && make install
+
+       # Backup
+       install -v -m 644 $(DIR_SRC)/config/backup/includes/netatalk \
+               /var/ipfire/backup/addons/includes/netatalk
+
+       # Install initscript
+       $(call INSTALL_INITSCRIPT,netatalk)
+
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 211243078e76a8e8e727e0f73ca8196be9ff3ec6..78c4edc9097edd9a1e067114392bad7ddc37a676 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1408,6 +1408,7 @@ buildipfire() {
   lfsmake2 cifs-utils
   lfsmake2 krb5
   lfsmake2 samba
+  lfsmake2 netatalk
   lfsmake2 sudo
   lfsmake2 mc
   lfsmake2 wget
diff --git a/src/initscripts/packages/netatalk b/src/initscripts/packages/netatalk
new file mode 100644 (file)
index 0000000..c0e0771
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/netatalk
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+       start)
+               boot_mesg "Starting Netatalk AFP File Server..."
+               loadproc /usr/sbin/netatalk
+               ;;
+
+       stop)
+               boot_mesg "Stopping Netatalk AFP File Server..."
+               killproc /usr/sbin/netatalk
+               ;;
+
+       reload)
+               boot_mesg "Reloading Netatalk AFP File Server..."
+               reloadproc /usr/sbin/netatalk
+               ;;
+
+       restart)
+               ${0} stop
+               sleep 1
+               ${0} start
+               ;;
+
+       status)
+               statusproc /usr/sbin/netatalk
+               ;;
+
+       *)
+               echo "Usage: ${0} {start|stop|reload|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/netatalk
diff --git a/src/paks/netatalk/install.sh b/src/paks/netatalk/install.sh
new file mode 100644 (file)
index 0000000..dd32da1
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire 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.                                      #
+#                                                                          #
+# IPFire 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 IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+
+# Extract everything
+extract_files
+
+# Restore backup
+restore_backup "${NAME}"
+
+# Enable auto-start for service
+ln -sf  ../init.d/netatalk /etc/rc.d/rc0.d/K25netatalk
+ln -sf  ../init.d/netatalk /etc/rc.d/rc3.d/S35netatalk
+ln -sf  ../init.d/netatalk /etc/rc.d/rc6.d/K25netatalk
+
+exit 0
diff --git a/src/paks/netatalk/uninstall.sh b/src/paks/netatalk/uninstall.sh
new file mode 100644 (file)
index 0000000..a1e1f8e
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire 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.                                      #
+#                                                                          #
+# IPFire 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 IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+
+# Stop the service
+service_stop "${NAME}"
+
+# Create a backup
+make_backup "${NAME}"
+
+# Delete all program files
+remove_files
+
+# Disable auto-start
+rm -vf /etc/rc.d/rc*.d/*netatalk
+
+exit 0
diff --git a/src/paks/netatalk/update.sh b/src/paks/netatalk/update.sh
new file mode 100644 (file)
index 0000000..9977665
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire 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.                                      #
+#                                                                          #
+# IPFire 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 IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007-2020 IPFire-Team <info@ipfire.org>.                   #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_backup_includes
+./uninstall.sh
+./install.sh