diff --git a/.gitignore b/.gitignore index 1b00f6f..7ab92b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1 @@ -netatalk-2.1.3.tar.bz2 -/netatalk-2.1.4.tar.bz2 -/netatalk-2.1.5.tar.bz2 -/netatalk-2.2.0.tar.bz2 -/netatalk-2.2.1.tar.bz2 -/netatalk-2.2.2.tar.bz2 -/netatalk-2.2.3.tar.bz2 /netatalk-3.1.3.tar.bz2 diff --git a/ICDumpSuffixMap b/ICDumpSuffixMap deleted file mode 100644 index 3a8283f..0000000 --- a/ICDumpSuffixMap +++ /dev/null @@ -1 +0,0 @@ -#!perl # # ICDumpMap # --- Dump suffix mappings from your Internet Config extension. # # iNOUE Koich! # use Mac::InternetConfig; open MAP, ">AppleVolumes"; printf MAP "%-9s \"%4s\" \"%4s\" %-30s %-25s %-15s\n\n", ".", "TEXT", "ttxt", "ASCII Text", "SimpleText", "text/plain"; print MAP "\# The following lines are extracted from Internet Config Preference.\n\n"; for my $entry (keys %InternetConfigMap) { next unless $entry->extension =~ /^\./; $_ = sprintf "%-9s \"%4s\" \"%4s\" %-30s %-25s %-15s", $entry->extension, $entry->file_type, $entry->file_creator, $entry->entry_name, $entry->creator_app_name, $entry->MIME_type; s/\s*$/\n/; print MAP; } close MAP; \ No newline at end of file diff --git a/netatalk-2.0.2-uams_no_pie.patch b/netatalk-2.0.2-uams_no_pie.patch deleted file mode 100644 index c41c66f..0000000 --- a/netatalk-2.0.2-uams_no_pie.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up netatalk-2.0.3/etc/uams/Makefile.am.uams_no_pie netatalk-2.0.3/etc/uams/Makefile.am ---- netatalk-2.0.3/etc/uams/Makefile.am.uams_no_pie 2008-10-10 10:32:59.000000000 +0200 -+++ netatalk-2.0.3/etc/uams/Makefile.am 2008-10-10 10:32:59.000000000 +0200 -@@ -1,5 +1,5 @@ - # Makefile.am for etc/uams/ -- -+LDFLAGS = - SUBDIRS = uams_krb4 - - # -diff -up netatalk-2.0.3/macros/gssapi-check.m4.uams_no_pie netatalk-2.0.3/macros/gssapi-check.m4 ---- netatalk-2.0.3/macros/gssapi-check.m4.uams_no_pie 2008-10-10 10:32:59.000000000 +0200 -+++ netatalk-2.0.3/macros/gssapi-check.m4 2008-10-10 10:32:59.000000000 +0200 -@@ -126,7 +126,7 @@ AC_DEFUN([NETATALK_GSSAPI_CHECK], - if test x"$ac_cv_func_gss_acquire_cred" = x"yes"; then - AC_DEFINE(HAVE_GSSAPI,1,[Whether to enable GSSAPI support]) - AC_MSG_RESULT([yes]) -- GSSAPI_LIBS="$LDFLAGS $LIBS" -+ GSSAPI_LIBS="$LIBS" - else - AC_MSG_RESULT([no]) - if test x"$compilegssapi" = x"yes"; then diff --git a/netatalk-2.0.4-extern_ucreator.patch b/netatalk-2.0.4-extern_ucreator.patch deleted file mode 100644 index 413ac08..0000000 --- a/netatalk-2.0.4-extern_ucreator.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up netatalk-2.0.4/etc/afpd/desktop.c.extern_ucreator netatalk-2.0.4/etc/afpd/desktop.c ---- netatalk-2.0.4/etc/afpd/desktop.c.extern_ucreator 2009-07-14 16:26:36.984610055 +0200 -+++ netatalk-2.0.4/etc/afpd/desktop.c 2009-07-14 16:27:01.607580009 +0200 -@@ -312,7 +312,7 @@ addicon_err: - } - - static const u_char utag[] = { 0, 0, 0, 0 }; --static const u_char ucreator[] = { 0, 0, 0, 0 };/* { 'U', 'N', 'I', 'X' };*/ -+u_char ucreator[] = { 0, 0, 0, 0 };/* { 'U', 'N', 'I', 'X' };*/ - static const u_char utype[] = { 0, 0, 0, 0 };/* { 'T', 'E', 'X', 'T' };*/ - static const short usize = 256; - diff --git a/netatalk-2.2.3-libdb4.patch b/netatalk-2.2.3-libdb4.patch deleted file mode 100644 index 0b5ea4c..0000000 --- a/netatalk-2.2.3-libdb4.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/configure b/configure -index eb879af..0e5b407 100755 ---- a/configure -+++ b/configure -@@ -18150,7 +18150,7 @@ if test "x$bdb_required" = "xyes"; then - trybdbdir="" - dobdbsearch=yes - bdb_search_dirs="/usr/local /usr" -- search_subdirs="/ /db5 /db5.1 /db51 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4" -+ search_subdirs="/ /db5 /db5.1 /db51 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4 /libdb4" - - bdbfound=no - savedcflags="$CFLAGS" -diff --git a/etc/cnid_dbd/dbd_add.c b/etc/cnid_dbd/dbd_add.c -index 6a818a3..bad57e7 100644 ---- a/etc/cnid_dbd/dbd_add.c -+++ b/etc/cnid_dbd/dbd_add.c -@@ -24,7 +24,7 @@ - #include - #include - #ifdef HAVE_DB4_DB_H --#include -+#include - #else - #include - #endif -diff --git a/macros/db3-check.m4 b/macros/db3-check.m4 -index 2cc59cb..ef58e15 100644 ---- a/macros/db3-check.m4 -+++ b/macros/db3-check.m4 -@@ -87,7 +87,7 @@ AC_DEFUN([AC_PATH_BDB],[ - trybdbdir="" - dobdbsearch=yes - bdb_search_dirs="/usr/local /usr" -- search_subdirs="/ /db5 /db5.1 /db51 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4" -+ search_subdirs="/ /db5 /db5.1 /db51 /db5.0 /db50 /db4.8 /db48 /db4.7 /db47 /db4.6 /db46 /db4 /libdb4" - - bdbfound=no - savedcflags="$CFLAGS" diff --git a/netatalk-2.2.3-sigterm.patch b/netatalk-2.2.3-sigterm.patch deleted file mode 100644 index 169a0d6..0000000 --- a/netatalk-2.2.3-sigterm.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 25e03ec9edd863136008881a4a57ea9a788d34b3 Mon Sep 17 00:00:00 2001 -From: Frank Lahm -Date: Mon, 18 Jun 2012 16:26:28 +0200 -Subject: [PATCH] Block SIGTERM when calling pam_close_session - ---- - etc/afpd/afp_dsi.c | 11 +++++++++-- - 1 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/etc/afpd/afp_dsi.c b/etc/afpd/afp_dsi.c -index bf454e1..6c6bc7d 100644 ---- a/etc/afpd/afp_dsi.c -+++ b/etc/afpd/afp_dsi.c -@@ -80,7 +80,8 @@ static sigjmp_buf recon_jmp; - static void afp_dsi_close(AFPObj *obj) - { - DSI *dsi = obj->handle; -- -+ sigset_t sigs; -+ - close(obj->ipc_fd); - obj->ipc_fd = -1; - -@@ -97,8 +98,14 @@ static void afp_dsi_close(AFPObj *obj) - } - - close_all_vol(); -- if (obj->logout) -+ -+ if (obj->logout) { -+ /* Block SIGTERM, PAM might send us a SIGTERM in (*obj->logout)() -> pam_close_session() */ -+ pthread_sigmask(SIG_BLOCK, &sigs, NULL); -+ sigemptyset(&sigs); -+ sigaddset(&sigs, SIGTERM); - (*obj->logout)(); -+ } - - LOG(log_note, logtype_afpd, "AFP statistics: %.2f KB read, %.2f KB written", - dsi->read_count/1024.0, dsi->write_count/1024.0); --- -1.7.4.1 - -From d8f375c4fbff7a27768ce6efebec64ab193734ee Mon Sep 17 00:00:00 2001 -From: Frank Lahm -Date: Wed, 20 Jun 2012 15:33:26 +0200 -Subject: [PATCH] Fix signal blocking, pthread_sigmask was called before mask initialisation. Also block all sigs instead of only SIGTERM (think I saw SIGHUP somewhere). - ---- - etc/afpd/afp_dsi.c | 5 ++--- - 1 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/etc/afpd/afp_dsi.c b/etc/afpd/afp_dsi.c -index 6c6bc7d..7779b23 100644 ---- a/etc/afpd/afp_dsi.c -+++ b/etc/afpd/afp_dsi.c -@@ -100,10 +100,9 @@ static void afp_dsi_close(AFPObj *obj) - close_all_vol(); - - if (obj->logout) { -- /* Block SIGTERM, PAM might send us a SIGTERM in (*obj->logout)() -> pam_close_session() */ -+ /* Block sigs, PAM/systemd/whoever might send us a SIG??? in (*obj->logout)() -> pam_close_session() */ -+ sigfillset(&sigs); - pthread_sigmask(SIG_BLOCK, &sigs, NULL); -- sigemptyset(&sigs); -- sigaddset(&sigs, SIGTERM); - (*obj->logout)(); - } - --- -1.7.4.1 - diff --git a/netatalk-3.0.1-basedir.patch b/netatalk-3.0.1-basedir.patch new file mode 100644 index 0000000..f289baa --- /dev/null +++ b/netatalk-3.0.1-basedir.patch @@ -0,0 +1,11 @@ +--- netatalk-3.0.1/config/afp.conf.tmpl.basedir 2012-04-20 21:22:18.000000000 +0900 ++++ netatalk-3.0.1/config/afp.conf.tmpl 2013-01-10 01:17:47.345537233 +0900 +@@ -6,7 +6,7 @@ + ; Global server settings + + ; [Homes] +-; basedir regex = /xxxx ++; basedir regex = /home + + ; [My AFP Volume] + ; path = /path/to/volume diff --git a/netatalk-3.1.7-autotools.patch b/netatalk-3.1.7-autotools.patch new file mode 100644 index 0000000..e4b8b28 --- /dev/null +++ b/netatalk-3.1.7-autotools.patch @@ -0,0 +1,50 @@ +diff -Naur netatalk-3.1.7.orig/configure netatalk-3.1.7/configure +--- netatalk-3.1.7.orig/configure 2014-08-29 12:32:50.000000000 +0200 ++++ netatalk-3.1.7/configure 2015-07-23 06:42:17.245794650 +0200 +@@ -17226,8 +17226,8 @@ + + if test x"$compilegssapi" != x"no" ; then + if test "x$compilegssapi" != "xyes" -a "x$compilegssapi" != "xauto" ; then +- export CFLAGS="-I$withval/include" +- export LDFLAGS="-L$withval/${atalk_libname}" ++ export CFLAGS="$CFLAGS -I$withval/include" ++ export LDFLAGS="$LDFLAGS -L$withval/${atalk_libname}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSSAPI support in $compilegssapi" >&5 + $as_echo "$as_me: checking for GSSAPI support in $compilegssapi" >&6;} + fi +@@ -17382,8 +17382,8 @@ + + if test x"$FOUND_GSSAPI" = x"yes" ; then + # check for functions +- export CFLAGS="$GSSAPI_CFLAGS" +- export LIBS="$GSSAPI_LIBS" ++ export CFLAGS="$CFLAGS $GSSAPI_CFLAGS" ++ export LIBS="$LIBS $GSSAPI_LIBS" + ac_fn_c_check_func "$LINENO" "gss_acquire_cred" "ac_cv_func_gss_acquire_cred" + if test "x$ac_cv_func_gss_acquire_cred" = xyes; then : + +diff -Naur netatalk-3.1.7.orig/macros/gssapi-check.m4 netatalk-3.1.7/macros/gssapi-check.m4 +--- netatalk-3.1.7.orig/macros/gssapi-check.m4 2013-10-28 14:43:14.000000000 +0100 ++++ netatalk-3.1.7/macros/gssapi-check.m4 2015-07-23 06:42:12.475826699 +0200 +@@ -18,8 +18,8 @@ + + if test x"$compilegssapi" != x"no" ; then + if test "x$compilegssapi" != "xyes" -a "x$compilegssapi" != "xauto" ; then +- export CFLAGS="-I$withval/include" +- export LDFLAGS="-L$withval/${atalk_libname}" ++ export CFLAGS="$CFLAGS -I$withval/include" ++ export LDFLAGS="$LDFLAGS -L$withval/${atalk_libname}" + AC_MSG_NOTICE([checking for GSSAPI support in $compilegssapi]) + fi + +@@ -64,8 +64,8 @@ + + if test x"$FOUND_GSSAPI" = x"yes" ; then + # check for functions +- export CFLAGS="$GSSAPI_CFLAGS" +- export LIBS="$GSSAPI_LIBS" ++ export CFLAGS="$CFLAGS $GSSAPI_CFLAGS" ++ export LIBS="$LIBS $GSSAPI_LIBS" + AC_CHECK_FUNC(gss_acquire_cred, [], [AC_MSG_ERROR([GSSAPI: required function gss_acquire_cred missing])]) + + # Heimdal/MIT compatibility fix diff --git a/netatalk.spec b/netatalk.spec index c7e77a6..597c49b 100644 --- a/netatalk.spec +++ b/netatalk.spec @@ -12,9 +12,9 @@ %global with_docbook 1 -%global with_dtrace 1 +%global with_dbus 1 -%global with_mysql 1 +%global with_dtrace 1 %global with_mysql 1 @@ -35,13 +35,17 @@ Name: netatalk Epoch: 4 Version: 3.1.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Open Source Apple Filing Protocol(AFP) fileserver License: GPLv2+ URL: http://netatalk.sourceforge.net/ Source0: http://download.sourceforge.net/netatalk/netatalk-%{version}.tar.bz2 Source1: netatalk.pam-system-auth -#Patch2: netatalk-2.0.4-extern_ucreator.patch +# From http://www003.upp.so-net.ne.jp/hat/files/netatalk-3.1.7-0.1.fc22.src.rpm +Patch0: netatalk-3.0.1-basedir.patch +# Let macros/gssapi-check.m4 honor CFLAGS/LDFLAGS +Patch1: netatalk-3.1.7-autotools.patch + BuildRequires: avahi-devel BuildRequires: bison %if 0%{?with_cracklib} @@ -127,7 +131,14 @@ developing applications that use %{name}. %prep %setup -q rm -frv libevent/ -#patch2 -p1 -b .extern_ucreator +%patch0 -p1 +%patch1 -p1 + +# Avoid re-running the autotools +touch -r aclocal.m4 configure configure.ac macros/gssapi-check.m4 + +# fix permissions +find include \( -name '*.h' -a -executable \) -exec chmod -x {} \; %build %ifarch ppc ppc64 s390 s390x @@ -135,6 +146,7 @@ export CFLAGS="$CFLAGS -fsigned-char" %endif %configure \ + --localstatedir=%{_localstatedir}/lib \ %if 0%{?with_acls} --with-acl \ %endif @@ -179,7 +191,7 @@ make -C doc/manual html-local %install %make_install # Ghost lock dir. -mkdir -p %{buildroot}%{_localstatedir}/lock/netatalk +mkdir -p %{buildroot}/var/lock/netatalk # Use specific pam conf. install -pm644 %{S:1} %{buildroot}%{_sysconfdir}/pam.d/netatalk @@ -194,6 +206,7 @@ sh test/afpd/test.sh %else chkconfig --add netatalk %endif +/sbin/ldconfig %preun %if 0%{?with_systemd} @@ -202,6 +215,7 @@ chkconfig --add netatalk if [ $1 -eq 0 ] ; then service netatalk stop &> /dev/null chkconfig --del netatalk &> /dev/null +fi %endif %postun @@ -212,11 +226,12 @@ if [ "$1" -ge "1" ] ; then service netatalk condrestart >/dev/null 2>&1 || : fi %endif +/sbin/ldconfig %files %doc AUTHORS CONTRIBUTORS COPYING COPYRIGHT NEWS %doc doc/manual/*.html -%config %{_sysconfdir}/dbus-1/system.d/netatalk-dbus.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/netatalk-dbus.conf %dir %{_sysconfdir}/netatalk %config(noreplace) %{_sysconfdir}/netatalk/afp.conf %config(noreplace) %{_sysconfdir}/netatalk/dbus-session.conf @@ -234,8 +249,8 @@ fi %else %{_initrddir}/netatalk %endif -%ghost %dir %{_localstatedir}/lock/netatalk -%{_localstatedir}/netatalk/ +%ghost %dir /var/lock/netatalk +%{_localstatedir}/lib %files devel %doc COPYRIGHT COPYING @@ -246,6 +261,22 @@ fi %{_mandir}/man*/netatalk-config.1* %changelog +* Thu Jul 23 2015 Ralf Corsépius - 4:3.1.3-4 +- Address F23FTBFS, RHBZ#1239711: + - Add netatalk-3.1.7-autotools.patch (Fix RHBZ#1160730). + - Remove ICDumpSuffixMap, netatalk-2.0.2-uams_no_pie.patch, + netatalk-2.0.4-extern_ucreator.patch, netatalk-2.2.3-libdb4.patch, + netatalk-2.2.3-sigterm.patch (Unused) + - Add netatalk-3.0.1-basedir.patch. + - Mark %%{_sysconfdir}/dbus-1/system.d/netatalk-dbus.conf noreplace. + - Fix permissions on include-files. + - Remove duplicate %%global with_mysql. + - Enable dbus. + - Add missing "fi" in %%preun. + - Run /sbin/ldconfig in %%postun, %%preun. + - Reflect /var/lock/netatalk is hard-coded into the sources. + - Set --localstatedir=/var/lib (/var/netatalk violates FHS). + * Wed Jun 17 2015 Fedora Release Engineering - 4:3.1.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild