summaryrefslogtreecommitdiffstats
path: root/source/n/netatalk
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-06-27 04:13:25 +0000
committer Eric Hameleers <alien@slackware.com>2018-06-27 21:00:55 +0200
commit63f56cc135f65b25d924c16f959a8819e55740d9 (patch)
treef7508feb75b8a6f230f61b50ef94ff16b9d69f49 /source/n/netatalk
parent2a8b2eba309a73a177e79a88be0b024f642cc350 (diff)
downloadcurrent-63f56cc135f65b25d924c16f959a8819e55740d9.tar.gz
current-63f56cc135f65b25d924c16f959a8819e55740d9.tar.xz
Wed Jun 27 04:13:25 UTC 201820180627041325
a/kernel-generic-4.14.52-x86_64-1.txz: Upgraded. a/kernel-huge-4.14.52-x86_64-1.txz: Upgraded. a/kernel-modules-4.14.52-x86_64-1.txz: Upgraded. ap/sox-14.4.2-x86_64-6.txz: Rebuilt. Rebuilt to drop libssp dependency. We're no longer building that with gcc since glibc already includes a built-in SSP implementation. d/gcc-8.1.1-x86_64-1.txz: Upgraded. Shared library .so-version bump. This is taken from the gcc-8-branch of the svn repo on 20180626, revision r262159. All packages have been tested for build failures and all new FTBFS issues are fixed - I think we're down to the six possibly obsolete X drivers (geode, r128, s3virge, savage, sis, and tseng) and virtuoso-ose. d/gcc-brig-8.1.1-x86_64-1.txz: Upgraded. d/gcc-g++-8.1.1-x86_64-1.txz: Upgraded. d/gcc-gfortran-8.1.1-x86_64-1.txz: Upgraded. Shared library .so-version bump. d/gcc-gnat-8.1.1-x86_64-1.txz: Upgraded. d/gcc-go-8.1.1-x86_64-1.txz: Upgraded. Shared library .so-version bump. d/gcc-objc-8.1.1-x86_64-1.txz: Upgraded. d/kernel-headers-4.14.52-x86-1.txz: Upgraded. d/libtool-2.4.6-x86_64-8.txz: Rebuilt. Recompiled to update embedded GCC version number. k/kernel-source-4.14.52-noarch-1.txz: Upgraded. l/db48-4.8.30-x86_64-4.txz: Rebuilt. Patched to fix a symbol collision with gcc8. n/netatalk-3.1.11-x86_64-1.txz: Upgraded. Thanks to Matthew Schumacher for updating the build script and providing some useful config file examples. extra/pure-alsa-system/sox-14.4.2-x86_64-6_alsa.txz: Rebuilt. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/n/netatalk')
-rw-r--r--source/n/netatalk/afppasswd0
-rw-r--r--source/n/netatalk/doinst.sh13
-rwxr-xr-xsource/n/netatalk/netatalk.SlackBuild56
-rw-r--r--source/n/netatalk/netatalk.etc2ps.diff20
-rw-r--r--source/n/netatalk/rc.atalk.new175
5 files changed, 72 insertions, 192 deletions
diff --git a/source/n/netatalk/afppasswd b/source/n/netatalk/afppasswd
deleted file mode 100644
index e69de29bb..000000000
--- a/source/n/netatalk/afppasswd
+++ /dev/null
diff --git a/source/n/netatalk/doinst.sh b/source/n/netatalk/doinst.sh
index 18ce52e2f..939e530ff 100644
--- a/source/n/netatalk/doinst.sh
+++ b/source/n/netatalk/doinst.sh
@@ -19,13 +19,6 @@ fi
config etc/rc.d/rc.atalk.new
-config etc/netatalk/AppleVolumes.default.new
-config etc/netatalk/AppleVolumes.system.new
-config etc/netatalk/afp_ldap.conf.new
-config etc/netatalk/afpd.conf.new
-config etc/netatalk/afppasswd.new
-config etc/netatalk/atalkd.conf.new
-config etc/netatalk/netatalk.conf.new
-config etc/netatalk/papd.conf.new
-# Don't need an empty file:
-rm -f etc/netatalk/afppasswd.new
+config etc/netatalk/afp.conf.new
+config etc/netatalk/dbus-session.conf.new
+config etc/netatalk/extmap.conf.new
diff --git a/source/n/netatalk/netatalk.SlackBuild b/source/n/netatalk/netatalk.SlackBuild
index 8a8858016..679cdb76e 100755
--- a/source/n/netatalk/netatalk.SlackBuild
+++ b/source/n/netatalk/netatalk.SlackBuild
@@ -19,12 +19,14 @@
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Script updated to package netatalk 3.1.11 by Matthew Schumacher
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=netatalk
VERSION=${VERSION:-$(echo netatalk-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-7}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -76,42 +78,44 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fixup some paths in etc2ps.sh
-zcat $CWD/netatalk.etc2ps.diff.gz | patch -p1 || exit 1
-
-autoreconf -vif
+# use the system libevent, because the internal one won't compile
+# with openssl 1.1. Also skip pam and kerberos (for now).
CFLAGS="$SLKCFLAGS" \
-CPPFLAGS="-D_IPP_PRIVATE_STRUCTURES" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
- --sysconfdir=/etc \
+ --sysconfdir=/etc/netatalk \
--libexecdir=/usr/sbin \
--localstatedir=/var \
--disable-static \
--with-shadow \
- --enable-ddp \
+ --disable-static \
+ --with-libevent=system \
+ --with-dbus-sysconf-dir=/etc/dbus-1/system.d/ \
+ --with-dbus-daemon=/usr/bin/dbus-daemon \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# At least make this unreadable to non-root users:
+if [ -u $PKG/usr/bin/afppasswd ]; then
+ chmod 4711 $PKG/usr/bin/afppasswd
+fi
+
# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-gzip -9 $PKG/usr/man/man?/*
-
-# This is normally installed setuid root, but I'm not 100% sure I trust it yet.
-# I see it uses strcpy() in a few places...
-chmod 755 $PKG/usr/bin/afppasswd
-
-# Install the afppasswd config file
-mkdir -p $PKG/etc/netatalk
-cat $CWD/afppasswd > $PKG/etc/netatalk/afppasswd
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
# Install an init script
mkdir -p $PKG/etc/rc.d
@@ -123,28 +127,18 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
( cd $PKG/etc/netatalk
- for file in AppleVolumes.default AppleVolumes.system afpd.conf afp_ldap.conf afppasswd atalkd.conf netatalk.conf papd.conf ; do
+ for file in afp.conf dbus-session.conf extmap.conf ; do
mv $file ${file}.new
done
)
mkdir -p $PKG/usr/doc/netatalk-$VERSION
cp -a \
- CONTRIBUTORS COPYING COPYRIGHT NEWS README TODO VERSION doc/* \
+ AUTHORS CONTRIBUTORS COPYING* COPYRIGHT NEWS VERSION \
$PKG/usr/doc/netatalk-$VERSION
-# -1, Redundant
-rm -rf $PKG/usr/doc/netatalk-$VERSION/doc/Makefile* \
- $PKG/usr/doc/netatalk-$VERSION/doc/htmldocs \
- $PKG/usr/doc/netatalk-$VERSION/doc/*.pdf
-
-# "make install" creates this directory with chmod 0777
-# I'd rather use 755, but I'll assume since this is a
-# new directory that it is needed for something. This
-# will help it a bit anyway...
-chmod 1777 $PKG/var/spool/netatalk
-# If anyone can confirm that 755 would still work let me know.
+cp -a $CWD/examples $PKG/usr/doc/netatalk-$VERSION
+chown -R root:root $PKG/usr/doc/netatalk-$VERSION/examples
# Build the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/netatalk-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/n/netatalk/netatalk.etc2ps.diff b/source/n/netatalk/netatalk.etc2ps.diff
deleted file mode 100644
index f326415a7..000000000
--- a/source/n/netatalk/netatalk.etc2ps.diff
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./etc/psf/etc2ps.sh.orig 2004-10-26 20:28:38.000000000 -0700
-+++ ./etc/psf/etc2ps.sh 2004-10-28 11:43:19.000000000 -0700
-@@ -9,14 +9,14 @@
- # tag in the case.
- #
-
--DVIPSPATH=/usr/local/tex/bin
--DVIPS=/usr/local/tex/bin/dvips
-+DVIPSPATH=/usr/share/texmf/bin
-+DVIPS=/usr/share/texmf/bin/dvips
- DVIPSARGS="-f -q"
-
- TROFF2PS=/usr/local/psroff/troff2/troff2ps
- TROFF2PSARGS="-Z -O-.10"
-
--PATH=/usr/bin:$DVIPSPATH; export PATH
-+PATH=$PATH:$DVIPSPATH; export PATH
-
- case $1 in
-
diff --git a/source/n/netatalk/rc.atalk.new b/source/n/netatalk/rc.atalk.new
index 9cb17f009..bc079b580 100644
--- a/source/n/netatalk/rc.atalk.new
+++ b/source/n/netatalk/rc.atalk.new
@@ -1,145 +1,58 @@
-#! /bin/sh
-#
-# Start/stop the Netatalk daemons.
-#
-# Netatalk daemons.
-# If you use AppleTalk, Make sure not to start atalkd in the background:
-# its data structures must have time to stablize before running the
-# other processes.
-#
+#!/bin/sh
+# Start/stop/restart the netatalk daemon.
-#
-# kill the named process(es)
-#
-killproc() {
- pid=`/usr/bin/ps -e |
- /usr/bin/grep $1 |
- /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
- [ "$pid" != "" ] && kill $pid
-}
-
-# netatalk.conf expects hostname in $HOSTNAME by default
-HOSTNAME=`hostname`
-
-. /etc/netatalk/netatalk.conf
-
-
-#
-# Start the netatalk server processes.
-#
-
-atalk_startup() {
- echo -n 'starting netatalk daemons: '
- if [ x"${ATALKD_RUN}" != x"no" ]; then
- if [ -x /usr/sbin/atalkd ]; then
- /usr/sbin/atalkd; echo -n ' atalkd'
- fi
-
- if [ -x /usr/bin/nbprgstr ]; then
- /usr/bin/nbprgstr -p 4 "${ATALK_NAME}:Workstation${ATALK_ZONE}";
- /usr/bin/nbprgstr -p 4 "${ATALK_NAME}:netatalk${ATALK_ZONE}";
- echo -n ' nbprgstr'
- fi
+netatalk_start() {
+ if [ -x /usr/sbin/netatalk ]; then
- if [ x"${PAPD_RUN}" = x"yes" -a -x /usr/sbin/papd ]; then
- /usr/sbin/papd; echo -n ' papd'
- fi
+ LINES="$(grep "^[^;]" /etc/netatalk/afp.conf | wc -l)"
+ if [ "$LINES" -lt "2" ]; then
+ echo "netatalk is not configured.... exiting."
+ exit
+ fi
- if [ x"${TIMELORD_RUN}" = x"yes" -a -x /usr/sbin/timelord ]; then
- /usr/sbin/timelord; echo -n ' timelord'
- fi
- fi
-
- if [ x"${CNID_METAD_RUN}" = x"yes" -a -x /usr/sbin/cnid_metad ]; then
- /usr/sbin/cnid_metad $CNID_CONFIG
- echo -n ' cnid_metad'
- fi
-
- if [ x"${AFPD_RUN}" = x"yes" -a -x /usr/sbin/afpd ]; then
- /usr/sbin/afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
- -c ${AFPD_MAX_CLIENTS} -n "${ATALK_NAME}${ATALK_ZONE}"; echo -n ' afpd'
- fi
-
- echo '.'
+ echo "Starting netatalk: /usr/sbin/netatalk"
+ /usr/sbin/netatalk
+ fi
}
-atalk_shutdown() {
- echo -n 'stopping netatalk daemons:'
-
- if [ -x /usr/sbin/papd ]; then
- killproc papd; echo -n ' papd'
- fi
-
- if [ -x /usr/sbin/afpd ]; then
- killproc afpd; echo -n ' afpd'
- fi
-
- if [ -x /usr/sbin/cnid_metad ]; then
- killproc cnid_met; echo -n ' cnid_metad'
- fi
+# Stop netatalk
+netatalk_stop() {
+ echo "Stopping netatalk."
+ /usr/bin/pkill --ns $$ -f "^/usr/sbin/netatalk" 2> /dev/null
+}
- if [ -x /usr/sbin/timelord ]; then
- killproc timelord; echo -n ' timelord'
- fi
+# Restart netatalk
+netatalk_restart() {
+ netatalk_stop
+ sleep 1
+ netatalk_start
+}
- # kill atalkd last, since without it the plumbing goes away.
- if [ -x /usr/sbin/atalkd ]; then
- killproc atalkd; echo -n ' atalkd'
- fi
- echo '.'
+# Check if netatalk is running
+netatalk_status() {
+ PID="$(/usr/bin/pgrep --ns $$ -f "^/usr/sbin/netatalk" 2> dev/null)
+ if [ $PID ]; then
+ echo "netatalk is running. PID: $PID"
+ else
+ echo "netatalk is stopped."
+ exit 1
+ fi
}
-case "$1" in
+case "$1" in
'start')
- if [ x"${ATALK_BGROUND}" = x"yes" ]; then
- echo -n "Starting netatalk in the background ... "
- atalk_startup > /dev/null &
- else
- atalk_startup
- fi
- ;;
-
-#
-# Stop the netatalk server processes.
-#
+ netatalk_start
+ ;;
'stop')
-
- echo -n 'stopping netatalk daemons:'
-
- if [ -x /usr/sbin/papd ]; then
- killproc papd; echo -n ' papd'
- fi
-
- if [ -x /usr/sbin/afpd ]; then
- killproc afpd; echo -n ' afpd'
- fi
-
- if [ -x /usr/sbin/cnid_metad ]; then
- killproc cnid_met; echo -n ' cnid_metad'
- fi
-
- if [ -x /usr/sbin/timelord ]; then
- killproc timelord; echo -n ' timelord'
- fi
-
- # kill atalkd last, since without it the plumbing goes away.
- if [ -x /usr/sbin/atalkd ]; then
- killproc atalkd; echo -n ' atalkd'
- fi
-
- echo '.'
- ;;
-
+ netatalk_stop
+ ;;
'restart')
-atalk_shutdown
-atalk_startup
- ;;
-#
-# Usage statement.
-#
-
+ netatalk_restart
+ ;;
+'status')
+ netatalk_status
+ ;;
*)
- echo "usage: $0 {start|stop|restart}"
- exit 1
- ;;
+ echo "usage $0 start|stop|restart|status"
esac
+