|
@@ -1,157 +1,145 @@
|
|
|
-%bcond_with force_uidgid
|
|
|
-%define rel_suffix %{?with_force_uidgid:.force_uidgid}
|
|
|
-
|
|
|
%define _sysconfdir /etc
|
|
|
|
|
|
################################################# BASIC PACKAGE INFORMATION
|
|
|
-Summary: AppleTalk and AppleShare/IP services for Linux
|
|
|
-Summary(ja): Linux 用 AppleTalk, AppleShare/IP サービス
|
|
|
+Summary: AFP fileserver for Macintosh clients
|
|
|
+Summary(ja): Macintoshクライアント向けのAFPファイルサーバー
|
|
|
Name: netatalk
|
|
|
-Version: 2.2.2
|
|
|
-Release: 2%{_dist_release}%{rel_suffix}
|
|
|
+Version: 3.1.7
|
|
|
+Release: 1%{_dist_release}
|
|
|
License: GPLv2+
|
|
|
Group: System Environment/Daemons
|
|
|
URL: http://netatalk.sourceforge.net/
|
|
|
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
|
-# patch for default config file
|
|
|
-Patch10: netatalk-2.2.0-config-utf8.patch
|
|
|
+
|
|
|
+Source1: netatalk.pam-system-auth
|
|
|
+Patch0: netatalk-3.0.1-basedir.patch
|
|
|
|
|
|
############################################################## REQUIREMENTS
|
|
|
-Requires(pre): chkconfig, /sbin/ldconfig, grep, textutils
|
|
|
-Requires: cracklib, openssl, tcp_wrappers, pam, perl
|
|
|
-BuildRequires: openssl-devel, avahi-devel, pam-devel, libdb-devel,
|
|
|
-BuildRequires: quota, libgcrypt-devel, libacl-devel
|
|
|
+Requires(post): /sbin/chkconfig /sbin/ldconfig
|
|
|
+Requires(preun): /sbin/chkconfig
|
|
|
+Requires(preun): /sbin/service
|
|
|
+Requires(postun): /sbin/service /sbin/ldconfig
|
|
|
+BuildRequires: cracklib openssl-devel pam quota libtool automake
|
|
|
+BuildRequires: autoconf libdb-devel pam-devel tcp_wrappers libgcrypt-devel
|
|
|
+BuildRequires: avahi-devel libacl-devel openldap-devel
|
|
|
+BuildRequires: dbus-devel dbus-glib-devel glib2-devel systemtap-sdt-devel
|
|
|
+BuildRequires: libevent-devel libtdb-devel libmysqlclient-devel
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
-Obsoletes: netatalk-1.4b2+asun
|
|
|
-
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
|
-Packager: shaolin
|
|
|
-
|
|
|
+Packager: shaolin, tomop
|
|
|
|
|
|
%description
|
|
|
-Netatalk is a freely-available Open Source AFP fileserver. It also provides a
|
|
|
-kernel level implementation of the AppleTalk Protocol Suite. A *NIX/*BSD system
|
|
|
-running Netatalk is capable of serving many Macintosh clients simultaneously
|
|
|
-as an AppleShare file server (AFP), AppleTalk router, *NIX/*BSD print server,
|
|
|
-and for accessing AppleTalk printers via Printer Access Protocol (PAP).
|
|
|
-Included are a number of minor printing and debugging utilities.
|
|
|
+Netatalk is a freely-available Open Source AFP fileserver. A *NIX/*BSD
|
|
|
+system running Netatalk is capable of serving many Macintosh clients
|
|
|
+simultaneously as an AppleShare file server (AFP).
|
|
|
|
|
|
%description -l ja
|
|
|
-このパッケージを使うことで, Linux 上で AppleTalk プロトコルを
|
|
|
-扱うことができ, Macintosh と通信が可能になります.
|
|
|
-Linux 上で AppleTalk や AFP over TCP の Mac 向けファイルサーバを
|
|
|
-稼働させることができるデーモンプログラムが収められています.
|
|
|
-
|
|
|
+ Netatalkは自由に利用可能なオープンソースAFPファイルサーバーです。
|
|
|
+Netatalkを実行している*NIX/*BSDシステムでは、多くのMacintoshクライ
|
|
|
+アントに対してAppleShareファイルサーバー(AFP)としてサービスを提供
|
|
|
+可能です。
|
|
|
|
|
|
%package devel
|
|
|
Group: Development/Libraries
|
|
|
-Summary: Headers for AppleTalk development
|
|
|
-Summary(ja): AppleTalk 開発用ヘッダファイル
|
|
|
+Summary: Headers for Netatalk development
|
|
|
+Summary(ja): Netatalk開発用ヘッダファイル
|
|
|
|
|
|
%description devel
|
|
|
-This package contains the header files for building AppleTalk networking
|
|
|
-programs.
|
|
|
+This package contains the header files for Netatalk.
|
|
|
|
|
|
|
|
|
%prep
|
|
|
%setup -q
|
|
|
|
|
|
-%patch10 -p1 -b .cjk-config
|
|
|
+%patch0 -p1 -b .basedir
|
|
|
|
|
|
-%if %{with force_uidgid}
|
|
|
-perl -pi -e 's/uid_t uid$/uid_t uid;/' etc/afpd/uid.c
|
|
|
-%endif
|
|
|
+ln -s ./NEWS ChangeLog
|
|
|
|
|
|
%build
|
|
|
-touch AUTHORS
|
|
|
-ln -s NEWS ChangeLog
|
|
|
-rm -f README.cjk4.cjk
|
|
|
-
|
|
|
-libtoolize --force
|
|
|
-aclocal -I macros
|
|
|
-automake --add-missing
|
|
|
-autoconf
|
|
|
-autoheader
|
|
|
-CFLAGS="${RPM_OPT_FLAGS} -fomit-frame-pointer -fsigned-char" \
|
|
|
-./configure \
|
|
|
- --prefix=%{_prefix} \
|
|
|
- --libdir=%{_libdir} \
|
|
|
- --libexecdir=%{_libdir}/netatalk \
|
|
|
- --sysconfdir=%{_sysconfdir} \
|
|
|
- --mandir=%{_mandir} \
|
|
|
- --localstatedir=%{_var} \
|
|
|
- --enable-shared \
|
|
|
- --enable-zeroconf \
|
|
|
- --disable-srvloc \
|
|
|
- --disable-ddp \
|
|
|
- --with-cnid-dbd-backend \
|
|
|
- --with-cnid-cdb-backend \
|
|
|
- --with-cnid-default-backend=dbd \
|
|
|
- --with-uams-path=%{_libdir}/netatalk \
|
|
|
- --enable-redhat-sysv \
|
|
|
- --with-cracklib \
|
|
|
- --with-pam \
|
|
|
- --with-shadow \
|
|
|
- --enable-tcp-wrappers \
|
|
|
- --with-acls \
|
|
|
- --enable-pgp-uam \
|
|
|
-%if %{with force_uidgid}
|
|
|
- --enable-force-uidgid
|
|
|
-%endif
|
|
|
-
|
|
|
|
|
|
-make all
|
|
|
+export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
+%ifnarch x86_64
|
|
|
+# XXX : enable for x86_64 when glibc bug 149284 is fixed!
|
|
|
+export CFLAGS="$CFLAGS -fPIE"
|
|
|
+export LDFLAGS="-pie -Wl,-z,relro,-z,now,-z,noexecstack"
|
|
|
+#"export LDFLAGS="-pie -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen"
|
|
|
+#Also in case of i686, nodlopen causes the problem.
|
|
|
+%endif
|
|
|
|
|
|
+%configure \
|
|
|
+ --with-pkgconfdir=%{_sysconfdir}/netatalk \
|
|
|
+ --with-cracklib \
|
|
|
+ --with-pam \
|
|
|
+ --with-shadow \
|
|
|
+ --with-uams-path=%{_libdir}/netatalk \
|
|
|
+ --enable-shared \
|
|
|
+ --enable-krbV-uam \
|
|
|
+ --enable-overwrite \
|
|
|
+ --with-gnu-ld \
|
|
|
+ --with-init-style=redhat-sysv \
|
|
|
+ --with-libgcrypt \
|
|
|
+ --without-libevent \
|
|
|
+ --without-tdb \
|
|
|
+ --with-pam-confdir=%{_sysconfdir}/pam.d \
|
|
|
+ --with-dbus-sysconf-dir=%{_sysconfdir}/dbus-1/system.d
|
|
|
+
|
|
|
+make %{?_smp_mflags} all
|
|
|
|
|
|
%install
|
|
|
### INSTALL (USING "make install") ###
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
-mkdir -p ${RPM_BUILD_ROOT}{%{_prefix},%{_sysconfdir}/netatalk/msg}
|
|
|
-make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
-
|
|
|
-## netatalk/at.h is now provided by glibc
|
|
|
-rm -f $RPM_BUILD_ROOT%{_prefix}/include/netatalk/at.h
|
|
|
|
|
|
-## for Bonjour (requires nss-mdns)
|
|
|
-#install -d -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/avahi/services
|
|
|
-#install -m 644 %{SOURCE10} ${RPM_BUILD_ROOT}%{_sysconfdir}/avahi/services/
|
|
|
+make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
|
|
|
|
|
|
+# install example config files in doc
|
|
|
+mkdir config.example
|
|
|
+cp -fp config/afp.conf config.example
|
|
|
+cp -fp config/extmap.conf config.example
|
|
|
+mkdir -p $RPM_BUILD_ROOT/usr/share/netatalk
|
|
|
|
|
|
-%pre
|
|
|
-### COPY OLD PREFERENCE FILES ###
|
|
|
-
|
|
|
-if [ -d /etc/atalk ] ; then
|
|
|
- mkdir -p /etc/netatalk/
|
|
|
- cp -a /etc/atalk /etc/netatalk/00_OLD_VERSION_PREFS
|
|
|
-fi
|
|
|
-exit 0
|
|
|
+cp -fp %{SOURCE1} config.example
|
|
|
+# XXX bad hack until this file is updated in glibc-headers:
|
|
|
+rm -f $RPM_BUILD_ROOT/usr/include/netatalk/at.h
|
|
|
|
|
|
+# Clean up .a and .la files
|
|
|
+find $RPM_BUILD_ROOT -name \*.a -exec rm {} \;
|
|
|
+find $RPM_BUILD_ROOT -name \*.la -exec rm {} \;
|
|
|
|
|
|
%post
|
|
|
-
|
|
|
-### RUN CHKCONFIG ###
|
|
|
+if [ -e /etc/netatalk/afp_signature.conf -a ! -e /var/netatalk/afp_signature.conf ]; then
|
|
|
+ mv -f /etc/netatalk/afp_signature.conf /var/netatalk/
|
|
|
+fi
|
|
|
+if [ -e /etc/netatalk/afp_voluuid.conf -a ! -e /var/netatalk/afp_voluuid.conf ]; then
|
|
|
+ mv -f /etc/netatalk/afp_voluuid.conf /var/netatalk/
|
|
|
+fi
|
|
|
/sbin/chkconfig --add netatalk
|
|
|
-
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
-if test -r /var/lock/atalkd ; then
|
|
|
- /etc/rc.d/init.d/netatalk restart >&2
|
|
|
-fi
|
|
|
-
|
|
|
-
|
|
|
%preun
|
|
|
+if [ "$1" = "0" ] ; then
|
|
|
+ # check for existence due to renaming initscript
|
|
|
+ if [ -x %{_initrddir}/netatalk ] ; then
|
|
|
+ /sbin/service netatalk stop > /dev/null 2>&1
|
|
|
+ /sbin/chkconfig --del netatalk
|
|
|
+ fi
|
|
|
+fi
|
|
|
|
|
|
-### RUN CHKCONFIG ###
|
|
|
-/sbin/chkconfig --del netatalk
|
|
|
-
|
|
|
-
|
|
|
-%triggerpostun -- netatalk <= 1.4b2+asun2.1.3-7vl6
|
|
|
-/sbin/chkconfig --add netatalk
|
|
|
-
|
|
|
+%postun
|
|
|
+if [ "$1" -ge "1" ]; then
|
|
|
+ # Package upgrade, not uninstall
|
|
|
+ if [ -e /etc/netatalk/afp_signature.conf -a ! -e /var/netatalk/afp_signature.conf ]; then
|
|
|
+ mv -f /etc/netatalk/afp_signature.conf /var/netatalk/
|
|
|
+ fi
|
|
|
+ if [ -e /etc/netatalk/afp_voluuid.conf -a ! -e /var/netatalk/afp_voluuid.conf ]; then
|
|
|
+ mv -f /etc/netatalk/afp_voluuid.conf /var/netatalk/
|
|
|
+ fi
|
|
|
+ /sbin/service netatalk condrestart > /dev/null 2>&1 || :
|
|
|
+fi
|
|
|
+/sbin/ldconfig
|
|
|
|
|
|
%clean
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
@@ -159,38 +147,40 @@ rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
-%doc AUTHORS CONTRIBUTORS COPYING COPYRIGHT
|
|
|
-%doc ChangeLog NEWS
|
|
|
-%doc doc/[A-L,N-Z]*
|
|
|
-%config(noreplace) /etc/netatalk/Apple*
|
|
|
-%config(noreplace) /etc/netatalk/*.conf
|
|
|
-%config /etc/pam.d/netatalk
|
|
|
-%config /etc/rc.d/init.d/netatalk
|
|
|
+%doc COPYRIGHT COPYING ChangeLog VERSION NEWS
|
|
|
+%doc config.example
|
|
|
+%attr(755,root,root) %{_initrddir}/netatalk
|
|
|
%dir %{_sysconfdir}/netatalk
|
|
|
-%dir %{_sysconfdir}/netatalk/msg
|
|
|
-#%{_sysconfdir}/avahi/services/afpd.service
|
|
|
-%{_bindir}/*
|
|
|
+%config(noreplace) %{_sysconfdir}/netatalk/afp.conf
|
|
|
+%config(noreplace) %{_sysconfdir}/netatalk/extmap.conf
|
|
|
+%config(noreplace) %{_sysconfdir}/netatalk/dbus-session.conf
|
|
|
+%config(noreplace) %{_sysconfdir}/pam.d/netatalk
|
|
|
+%config(noreplace) %{_sysconfdir}/dbus-1/system.d/netatalk-dbus.conf
|
|
|
%{_sbindir}/*
|
|
|
-%{_libdir}/netatalk/*
|
|
|
-%exclude %{_libdir}/netatalk/*.a
|
|
|
-%exclude %{_libdir}/netatalk/*.la
|
|
|
-%{_mandir}/*/*
|
|
|
-
|
|
|
+%{_bindir}/*
|
|
|
+%exclude %{_bindir}/netatalk-config
|
|
|
+%{_mandir}/man*/*
|
|
|
+%exclude %{_mandir}/man*/netatalk-config*
|
|
|
+%{_datadir}/netatalk
|
|
|
+%{_libdir}/*.so
|
|
|
+%{_libdir}/*.so.*
|
|
|
+%dir %{_libdir}/netatalk
|
|
|
+%{_libdir}/netatalk/*.so
|
|
|
+%{_localstatedir}/netatalk
|
|
|
|
|
|
%files devel
|
|
|
%defattr(-,root,root)
|
|
|
-%{_libdir}/*.a
|
|
|
-%{_libdir}/*.la
|
|
|
-%{_libdir}/netatalk/*.a
|
|
|
-%{_libdir}/netatalk/*.la
|
|
|
+%doc COPYRIGHT COPYING
|
|
|
%dir %{_includedir}/atalk
|
|
|
-%{_includedir}/atalk/*.h
|
|
|
-%dir %{_includedir}/netatalk
|
|
|
-%{_includedir}/netatalk/*.h
|
|
|
+%attr(0644,root,root) %{_includedir}/atalk/*
|
|
|
%{_datadir}/aclocal/netatalk.m4
|
|
|
-
|
|
|
+%{_bindir}/netatalk-config
|
|
|
+%{_mandir}/man*/netatalk-config.1*
|
|
|
|
|
|
%changelog
|
|
|
+* Tue Jun 16 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.7-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
* Mon Dec 1 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 2.2.2-2
|
|
|
- rebuilt with libgcrypt 1.6.0 and libdb 5.3.28
|
|
|
|